/* =========================================================================
   VIVIDUS — base.css
   Tokens · reset · typography · utility primitives.
   Maps tokens.json → CSS custom properties. Do not hard-code colour / type
   anywhere else — extend via tokens or a semantic component class.
   ========================================================================= */

/* ---------- 1. Tokens ---------- */

:root {
  /* paper */
  --vv-paper:        #F8F3E6;
  --vv-paper-ivory:  #FAF7ED;
  --vv-paper-vellum: #F2EBD6;
  --vv-paper-sepia:  #E9DDBF;

  /* ink */
  --vv-ink:        #2E2818;
  --vv-ink-soft:   #5C5136;
  --vv-ink-mute:   #8E8265;

  /* gold — the brand */
  --vv-gold:       #C8A968;
  --vv-gold-deep:  #9D8345;
  --vv-gold-pale:  #F1E8CE;
  --vv-gold-leaf:  #E0C07A;

  /* lines */
  --vv-line:       #E0D2AE;
  --vv-line-soft:  #EEE4C4;
  --vv-shade:      rgba(46, 40, 24, .06);

  /* fonts */
  --fd: 'Cormorant Garamond', 'Times New Roman', serif;
  --fb: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fk: 'Noto Serif Kannada', 'Cormorant Garamond', serif;

  /* scale */
  --t-hero:     clamp(48px, 6vw, 108px);
  --t-hero-sub: clamp(22px, 1.9vw, 32px);
  --t-section:  clamp(36px, 4.4vw, 64px);
  --t-pillar:   clamp(44px, 5vw, 72px);
  --t-card:     clamp(22px, 2.2vw, 30px);
  --t-body-lg:  clamp(17px, 1.15vw, 20px);
  --t-body:     16px;
  --t-sm:       13px;
  --t-label:    11px;
  --t-kannada:  clamp(36px, 4vw, 60px);

  /* space */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px; --s11: 160px;
  --section-y: 160px;
  --container:     1280px;
  --container-pad: 72px;

  /* radius · shadow */
  --r-sm:   4px;
  --r-md:   6px;
  --r-pill: 999px;
  --shadow-soft:  0 1px 2px rgba(46,40,24,.05), 0 4px 20px rgba(46,40,24,.06);
  --shadow-plate: 0 2px 6px rgba(46,40,24,.05), 0 14px 44px rgba(46,40,24,.08);

  /* motion */
  --m-fast:   160ms;
  --m-base:   360ms;
  --m-slow:   520ms;
  --m-breath: 22s;
  --ease:     cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(0, 0, .2, 1);
}

@media (max-width: 1180px) {
  :root { --container-pad: 48px; }
}
@media (max-width: 860px) {
  :root { --container-pad: 32px; --section-y: 96px; }
}
@media (max-width: 640px) {
  :root { --container-pad: 24px; --section-y: 80px; }
}


/* ---------- 2. Reset & base ---------- */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--vv-paper);
  color: var(--vv-ink);
  font-family: var(--fb);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.66;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
button   { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; padding: 0; }
a        { color: inherit; text-decoration: none; }

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


/* ---------- 3. Typography ---------- */

h1, h2, h3, h4, h5 {
  font-family: var(--fd);
  font-weight: 400;
  color: var(--vv-ink);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin: 0;
}

h1 { font-size: var(--t-hero); }
h2 { font-size: var(--t-section); }
h3 { font-size: var(--t-card); line-height: 1.15; }
h4 { font-size: 20px; line-height: 1.3; }

em { font-style: italic; color: var(--vv-gold-deep); }

p {
  margin: 0 0 var(--s4) 0;
  max-width: 60ch;
}

.lede {
  font-size: var(--t-body-lg);
  color: var(--vv-ink-soft);
  line-height: 1.7;
  max-width: 54ch;
}


/* ---------- 4. Labels & small caps ---------- */

.label {
  font-family: var(--fb);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--vv-ink-mute);
}
.label--gold { color: var(--vv-gold-deep); }

/* Bilingual label — English · Kannada, same cap height */
.label-bi {
  display: inline-flex; align-items: baseline; gap: .7em;
}
.label-bi .kn {
  font-family: var(--fk);
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--vv-gold-deep);
  line-height: 1;
  position: relative; top: 1px;
}


/* ---------- 5. The champagne hairline ---------- */

/* Thin line with a single gold bullet at its midpoint.
   Use as <hr class="gold-rule"> or apply to any .gold-rule element. */
.gold-rule {
  position: relative;
  border: 0;
  height: 1px;
  background: var(--vv-line);
  width: 100%;
  margin: var(--s6) 0;
}
.gold-rule::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 3px; height: 3px;
  background: var(--vv-gold);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.gold-rule--short { max-width: 96px; margin-left: auto; margin-right: auto; }


/* ---------- 6. The V ornament ---------- */

.v-mark {
  display: inline-block;
  width: 28px; height: 28px;
  color: var(--vv-gold-deep);
}
.v-mark svg { width: 100%; height: 100%; display: block; }


/* ---------- 7. Pull-quote ---------- */

.pull-quote {
  font-family: var(--fd);
  font-style: italic;
  font-size: clamp(26px, 2.4vw, 36px);
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--vv-ink);
  max-width: 42ch;
}
.pull-quote em { color: var(--vv-gold-deep); }


/* ---------- 8. Link (the only link style) ---------- */

.btn-link {
  display: inline-flex; align-items: baseline; gap: .5em;
  font-family: var(--fd);
  font-style: italic;
  font-size: clamp(17px, 1.2vw, 20px);
  color: var(--vv-ink);
  position: relative;
  padding-bottom: 2px;
  transition: color var(--m-fast) var(--ease);
}
.btn-link::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0; height: 1px;
  background: var(--vv-gold-deep);
  transition: right 260ms var(--ease-out);
}
.btn-link:hover { color: var(--vv-gold-deep); }
.btn-link:hover::after { right: 0; }
.btn-link .arrow {
  font-style: normal;
  font-family: var(--fb);
  font-size: .9em;
  transition: transform var(--m-base) var(--ease-out);
}
.btn-link:hover .arrow { transform: translateX(4px); }


/* ---------- 9. Container ---------- */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  width: 100%;
}


/* ---------- 10. Reveal (paired with IntersectionObserver in main.js) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--m-slow) var(--ease-out),
              transform var(--m-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: opacity var(--m-fast) var(--ease-out); transform: none; }
  .reveal.is-in { transform: none; }
}


/* ---------- 11. Focus ---------- */

:focus-visible {
  outline: 2px solid var(--vv-gold-deep);
  outline-offset: 4px;
  border-radius: 2px;
}


/* ---------- 12. Utility ---------- */

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

.kn { font-family: var(--fk); font-feature-settings: "liga", "dlig"; }


/* ---------- 13. Paper grain — tactile ground layer ---------- */

/* Fractal-noise SVG tiled over the whole page at a whisper opacity.
   Sits above everything (z-50) so the texture is uniform across
   paper sections, card faces, and the menu overlay. Non-interactive. */
.paper-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='7'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/></svg>");
}


/* ---------- 14. V watermark — editorial margin mark ---------- */

/* A large, faint V mark fixed to the right edge, vertically centred.
   Lives behind all content but above the body-stack background,
   pinned across scroll so the page always has a quiet signature. */
.v-watermark {
  position: fixed;
  top: 50%;
  right: clamp(-12px, 0vw, 24px);
  transform: translateY(-50%);
  width: clamp(280px, 36vh, 460px);
  height: clamp(280px, 36vh, 460px);
  pointer-events: none;
  z-index: 3;
  opacity: 0.12;
  color: var(--vv-gold-deep);
}
.v-watermark svg { width: 100%; height: 100%; display: block; }

@media (max-width: 860px) {
  .v-watermark { display: none; }
}


/* ---------- 15. VIVIDUS monogram crest ---------- */

/* The full brand emblem: dual hairline ring + arc-text VIVIDUS
   + tick marks + inner V + gold-leaf apex + MMXX · BENGALURU line.
   Used twice total — anchor and footer. Size set by the parent's width. */
.v-crest {
  display: inline-block;
  width: clamp(180px, 18vw, 240px);
  aspect-ratio: 1 / 1;
  color: var(--vv-gold-deep);
  line-height: 0;
}
.v-crest svg {
  width: 100%; height: 100%;
  display: block;
  overflow: visible;
}
/* Small variant for the footer meta row */
.v-crest--sm {
  width: clamp(64px, 6vw, 88px);
}
