/* ══════════════════════════════════════════════════════════════════════════
   DESIGN TOKENS — Style Shop, Gandhipuram
   Ported verbatim from app/globals.css (Next.js source of truth).
   Palette, radii and type scale live here as CSS custom properties so the
   stylesheet, the SVG art generator and the try-on watermark share one source.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Fonts (self-hosted from fonts/*.woff2) ──────────────────────────────── */

@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/fraunces-latin-opsz-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('../fonts/manrope-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Manrope';
  src: url('../fonts/manrope-latin-ext-wght-normal.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Noto Sans Tamil';
  src: url('../fonts/noto-sans-tamil-tamil-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Sans Tamil';
  src: url('../fonts/noto-sans-tamil-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens ──────────────────────────────────────────────────────────────── */

:root {
  /* Hex literals — read by the SVG art generator. */
  --ink: #171310;
  --ink-soft: #3a322c;
  --ink-mute: #6b6058;

  --ivory: #faf6f0;
  --ivory-deep: #f2ebe0;

  --madder: #7b1e3a;
  --madder-light: #a63455;
  --madder-dark: #5a1229;

  --gold: #c8a15a;
  --gold-light: #e0c489;

  --jade: #1f5f52;

  /* RGB triplets — used by the alpha() utilities below. */
  --rgb-ink: 23 19 16;
  --rgb-ink-soft: 58 50 44;
  --rgb-ink-mute: 107 96 88;

  --rgb-ivory: 250 246 240;
  --rgb-ivory-deep: 242 235 224;

  --rgb-madder: 123 30 58;
  --rgb-madder-light: 166 52 85;
  --rgb-madder-dark: 90 18 41;

  --rgb-gold: 200 161 90;
  --rgb-gold-light: 224 196 137;

  --rgb-jade: 31 95 82;

  /* Type scale — 1.250 major third, 360px → 1920px */
  --step--1: clamp(0.8rem, 0.79rem + 0.06vw, 0.83rem);
  --step-0: clamp(0.94rem, 0.92rem + 0.1vw, 1rem);
  --step-1: clamp(1.13rem, 1.08rem + 0.22vw, 1.25rem);
  --step-2: clamp(1.35rem, 1.26rem + 0.44vw, 1.65rem);
  --step-3: clamp(1.6rem, 1.44rem + 0.8vw, 2.25rem);
  --step-4: clamp(2rem, 1.7rem + 1.4vw, 3rem);
  --step-5: clamp(2.5rem, 1.9rem + 2.6vw, 4.25rem);

  --shell: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  /* Header height, used by sticky gallery offsets and scroll-margin anchors */
  --header-h: 64px;
  --announce-h: 36px;

  color-scheme: light;
}

/* ── Base ────────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  border-color: rgb(var(--rgb-ink) / 0.1);
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--ivory);
  color: var(--ink);
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: 'Fraunces', Georgia, serif;
  letter-spacing: -0.03em;
  line-height: 1.08;
  font-weight: 400;
  text-wrap: balance;
}

p {
  margin: 0;
}

:lang(ta),
.tamil {
  font-family: 'Noto Sans Tamil', sans-serif;
}

/* Focus ring in madder — WCAG 2.2 AA visible focus, never removed. */
:focus-visible {
  outline: 2px solid var(--madder);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: var(--gold-light);
  color: var(--ink);
}

input, select, textarea, button {
  font: inherit;
}

input[type='range'] {
  accent-color: var(--madder);
}

/* Sticky-header-aware anchor jumps (reviews, details) */
:target {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* ── Layout primitives ───────────────────────────────────────────────────── */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.hairline {
  border-top: 1px solid rgb(var(--rgb-ink) / 0.1);
}

.frame-3-4 { aspect-ratio: 3 / 4; }
.frame-4-5 { aspect-ratio: 4 / 5; }

/* ── Type utilities ──────────────────────────────────────────────────────── */

.text-step--1 { font-size: var(--step--1); }
.text-step-1  { font-size: var(--step-1); }
.text-step-2  { font-size: var(--step-2); }
.text-step-3  { font-size: var(--step-3); }
.text-step-4  { font-size: var(--step-4); }
.text-step-5  { font-size: var(--step-5); }

/* Meta / label style: uppercase Manrope 500, 0.14em tracking */
.meta {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.tamil-label {
  font-family: 'Noto Sans Tamil', sans-serif;
  font-size: 0.72em;
  color: rgb(var(--rgb-ink-mute) / 0.9);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 9999px;
  padding-inline: 1.5rem;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 300ms cubic-bezier(.22, 1, .36, 1), color 300ms cubic-bezier(.22, 1, .36, 1), border-color 300ms cubic-bezier(.22, 1, .36, 1);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-primary {
  background: rgb(var(--rgb-ink));
  color: rgb(var(--rgb-ivory));
}

.btn-primary:hover {
  background: rgb(var(--rgb-madder));
}

.btn-madder {
  background: rgb(var(--rgb-madder));
  color: rgb(var(--rgb-ivory));
}

.btn-madder:hover {
  background: rgb(var(--rgb-madder-dark));
}

.btn-outline {
  border-color: rgb(var(--rgb-ink) / 0.25);
  background: transparent;
  color: rgb(var(--rgb-ink));
}

.btn-outline:hover {
  border-color: rgb(var(--rgb-ink));
  background: rgb(var(--rgb-ink));
  color: rgb(var(--rgb-ivory));
}

.btn-ivory {
  background: rgb(var(--rgb-ivory));
  color: rgb(var(--rgb-ink));
}

.btn-ivory:hover {
  background: rgb(var(--rgb-gold-light));
}

.btn-ghost {
  background: transparent;
  color: rgb(var(--rgb-ink));
}

.btn-ghost:hover {
  background: rgb(var(--rgb-ink) / 0.06);
}

/* ── Cards, fields, rails ────────────────────────────────────────────────── */

.card {
  border-radius: 1rem;
  border: 1px solid rgb(var(--rgb-ink) / 0.1);
  background: rgb(var(--rgb-ivory));
  box-shadow: 0 1px 2px rgba(23, 19, 16, 0.04), 0 8px 24px -12px rgba(23, 19, 16, 0.16);
}

.field {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid rgb(var(--rgb-ink) / 0.2);
  background: rgb(var(--rgb-ivory));
  padding: 0.75rem 1rem;
  font-size: 15px;
  color: rgb(var(--rgb-ink));
}

.field::placeholder {
  color: rgb(var(--rgb-ink-mute) / 0.7);
}

.field:focus {
  outline: none;
  border-color: rgb(var(--rgb-madder));
  box-shadow: 0 0 0 2px rgb(var(--rgb-madder) / 0.25);
}

.rail {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.rail::-webkit-scrollbar {
  display: none;
}

/* ── Badges ──────────────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid transparent;
}

.badge-ink     { background: rgb(var(--rgb-ink)); color: rgb(var(--rgb-ivory)); }
.badge-gold    { background: rgb(var(--rgb-gold-light) / 0.5); color: var(--ink); border-color: rgb(var(--rgb-gold) / 0.4); }
.badge-outline { border-color: rgb(var(--rgb-ink) / 0.25); color: rgb(var(--rgb-ink)); }
.badge-jade    { background: rgb(var(--rgb-jade) / 0.12); color: var(--jade); border-color: rgb(var(--rgb-jade) / 0.3); }
.badge-madder  { background: rgb(var(--rgb-madder)); color: rgb(var(--rgb-ivory)); }

/* ── Stars ───────────────────────────────────────────────────────────────── */

.stars {
  display: inline-flex;
  gap: 1px;
  line-height: 1;
  color: var(--gold);
}

.star-full { color: var(--gold); }

/* ── Utilities ───────────────────────────────────────────────────────────── */

.grain {
  background-image: radial-gradient(rgba(250, 246, 240, 0.05) 1px, transparent 1px);
  background-size: 3px 3px;
}

/* Gold text is only ever placed on ink — it fails AA on ivory. */
.on-ink-gold {
  color: var(--gold-light);
}

.no-scrollbar {
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   REDUCED MOTION
   The rules below cover CSS transitions, keyframes and smooth scrolling.
   ══════════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  header,
  footer,
  [data-print='hide'] {
    display: none !important;
  }
}
