/* ═══════════════════════════════════════════════════════════════════
   Pallavi & Chirag — shared design system
   Neemrana Fort-Palace · 20–21 February 2027
   MERGED: the live site's warm editorial palette and faces, carried on
   the structure, motif and rooted layer from design-philosophy.md.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* ── Skin: from pallaviandchirag.com ── */
  --cream:        #F6F1E7;   /* page background */
  --ivory:        #FDFAF3;   /* cards, sheets  */
  --sand:         #EFE7D7;   /* dividers, pressed states */
  --sand-line:    #E3D8C2;
  --ink:          #2C2420;   /* body text */

  /* ── Bones: from design-philosophy.md ── */
  --indigo:       #2C3A64;   /* headings, primary buttons */
  --indigo-night: #1D2A4D;   /* deep bands, hero overlays */
  --terracotta:   #A85C2E;   /* accents, dress-code tags */
  --rani:         #B23A62;   /* hearts, confetti — tiny moments only */

  /* ── Gold: punctuation, never paint. Under 5% of any screen. ── */
  --gold:         #B08D57;
  --gold-deep:    #8A6D3F;
  --gold-soft:    #D3B98C;

  /* ── Motion: one easing, always ── */
  --ease: cubic-bezier(.22, .8, .3, 1);
  --t:    250ms;
  --t-lg: 350ms;

  /* ── The jharokha arch ── */
  --arch:    210px 210px 14px 14px;
  --arch-sm: 120px 120px 10px 10px;

  --gutter: 22px;
  --measure: 62ch;
}

/* Back-compat aliases so nothing breaks mid-refactor */
:root { --sandstone: var(--cream); --stone-deep: var(--sand); --stone-line: var(--sand-line); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 66px; }

body {
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 17px; line-height: 28px; font-weight: 400;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─── Typography ─────────────────────────────────────────────────── */
h1, h2, h3, .display {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500; letter-spacing: 0.2px; color: var(--indigo);
}
h1, .display { font-size: 40px; line-height: 44px; }
h2           { font-size: 30px; line-height: 36px; }
h3           { font-size: 24px; line-height: 30px; }
.small       { font-size: 14px; line-height: 21px; }
.muted       { opacity: .72; }
p            { max-width: var(--measure); }

/* Devanagari accent — always above, always small, never load-bearing */
.dev {
  display: block;
  font-family: 'Rozha One', serif;
  font-size: 15px; line-height: 20px; letter-spacing: 1px;
  color: var(--gold-deep);
  margin-bottom: 2px;
}

.eyebrow {
  font-size: 12px; letter-spacing: 2.6px; text-transform: uppercase;
  color: var(--terracotta); font-weight: 600;
}

/* ─── The gold hairline + ornament ───────────────────────────────── */
.rule {
  width: 120px; height: 1px; background: var(--gold);
  border: 0; margin: 20px auto; position: relative;
}
.rule::after {
  content: ''; position: absolute; top: -3.5px; left: 50%;
  width: 8px; height: 8px; background: var(--gold);
  transform: translateX(-50%) rotate(45deg);
}
.rule.left { margin-left: 0; }

/* ─── Layout ─────────────────────────────────────────────────────── */
.wrap    { width: min(1080px, 100% - calc(var(--gutter) * 2)); margin-inline: auto; }
.narrow  { width: min(680px, 100% - calc(var(--gutter) * 2)); margin-inline: auto; }
section  { padding: 64px 0; }
.center  { text-align: center; }

/* ─── Surfaces ───────────────────────────────────────────────────── */
.card {
  background: var(--ivory);
  border: 1px solid var(--stone-line);
  border-radius: 14px;
  padding: 26px 24px;
}
.card.arch  { border-radius: var(--arch-sm); border-color: var(--gold); padding-top: 40px; text-align: center; }
.card.quiet { background: transparent; border-style: dashed; }

/* Depth is tone-on-tone. No drop shadows floating everywhere. */
.band       { background: var(--ivory); }
.band-deep  { background: var(--indigo-night); color: var(--ivory); }
.band-deep h1, .band-deep h2, .band-deep h3 { color: var(--ivory); }
.band-deep .dev { color: var(--gold-soft); }

/* ─── The jharokha frame (portraits, room photos, modals) ────────── */
.jharokha {
  position: relative;
  border-radius: var(--arch);
  overflow: hidden;
  border: 1px solid var(--gold);
  background: var(--stone-deep);
  aspect-ratio: 3 / 4;
}
.jharokha img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jharokha.sm { border-radius: var(--arch-sm); }

/* Monogram placeholder, shown until real photos land */
.monogram {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: linear-gradient(170deg, var(--indigo-night), var(--indigo));
  font-family: 'Cormorant Garamond', serif; font-weight:500; font-size: 68px; color: var(--gold-soft);
  letter-spacing: 2px;
}
.monogram span { display: block; font-size: 12px; letter-spacing: 3px;
  color: var(--sand); text-transform: uppercase; margin-top: 6px; font-family: 'Jost', sans-serif; }

/* ─── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; min-height: 48px;
  font: 500 15px/1 'Jost', sans-serif; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--ivory); background: var(--indigo);
  border: 1px solid var(--indigo); border-radius: 11px;
  cursor: pointer; text-decoration: none;
  transition: background var(--t) var(--ease), transform var(--t) var(--ease);
}
.btn:hover  { background: var(--indigo-night); }
.btn:active { transform: scale(.985); }
.btn.ghost  { background: transparent; color: var(--indigo); border-color: var(--stone-deep); }
.btn.ghost:hover { border-color: var(--gold); background: rgba(176,141,87,.07); }
.btn.gold   { background: transparent; color: var(--indigo); border-color: var(--gold); }
.btn.on-dark{ background: var(--ivory); color: var(--indigo-night); border-color: var(--ivory); }
.btn.wide   { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ─── Forms ──────────────────────────────────────────────────────── */
label {
  display: block; font-size: 13px; font-weight: 600;
  letter-spacing: .8px; margin: 18px 2px 6px;
}
label small { font-weight: 400; color: var(--terracotta); letter-spacing: .2px; }

input, select, textarea {
  width: 100%; padding: 12px 14px;
  font: 400 16px/24px 'Jost', sans-serif;   /* 16px — stops iOS zoom on focus */
  color: var(--indigo); background: #FFFCF6;
  border: 1px solid var(--stone-deep); border-radius: 9px;
  outline: none; -webkit-appearance: none; appearance: none;
  transition: border-color var(--t) var(--ease);
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
input:invalid:not(:placeholder-shown) { border-color: var(--rani); }
textarea { resize: vertical; min-height: 80px; }

/* The blanket appearance:none above strips the native tick and dot.
   Checkboxes and radios opt back out — a guest must SEE what they selected. */
input[type="checkbox"], input[type="radio"] {
  -webkit-appearance: auto; appearance: auto;
  width: auto; padding: 0; border: 0; background: none;
  accent-color: var(--indigo);
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23B08D57' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }
fieldset { border: 0; }

/* Segmented yes/no — bigger tap target than a radio, kinder to elders */
.seg { display: flex; gap: 0; border: 1px solid var(--stone-deep); border-radius: 10px; overflow: hidden; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  flex: 1; margin: 0; padding: 14px 10px; text-align: center; cursor: pointer;
  font-size: 15px; font-weight: 500; letter-spacing: .4px;
  background: #FFFCF6; transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.seg label:not(:first-of-type) { border-left: 1px solid var(--stone-deep); }
.seg input:checked + label { background: var(--indigo); color: var(--ivory); }

.err { color: var(--rani); font-size: 13px; margin-top: 6px; display: none; }
.err.on { display: block; }
.hp { position: absolute; left: -9999px; }   /* honeypot */

/* ─── Tags ───────────────────────────────────────────────────────── */
.tag {
  display: inline-block; padding: 4px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .6px;
  background: rgba(168,92,46,.1); color: var(--terracotta);
  border: 1px solid rgba(168,92,46,.25);
}
.tag.indigo { background: rgba(44,58,100,.08); color: var(--indigo); border-color: rgba(44,58,100,.2); }
.tag.gold   { background: rgba(176,141,87,.12); color: var(--gold-deep); border-color: rgba(176,141,87,.35); }

/* ─── Locked cards — "the fort unlocks soon" ─────────────────────── */
.locked {
  border: 1px dashed var(--stone-deep); border-radius: 14px;
  padding: 28px 24px; text-align: center; background: rgba(253,250,243,.55);
}
.locked .lk {
  display: block; width: 9px; height: 9px; margin: 0 auto 14px;
  background: var(--gold); transform: rotate(45deg);
}
.locked h3 { color: var(--indigo); opacity: .8; }

/* ─── Countdown ──────────────────────────────────────────────────── */
.count { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.count div {
  min-width: 74px; padding: 12px 8px;
  border: 1px solid rgba(185,143,62,.5); border-radius: 10px;
}
.count b {
  display: block; font-family: 'Rozha One', serif; font-weight: 400;
  font-size: 30px; line-height: 34px;
  font-variant-numeric: tabular-nums;
}
.count i {
  font-style: normal; font-size: 11px; letter-spacing: 2px;
  text-transform: uppercase; opacity: .7;
}

/* ─── Header / footer ────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px var(--gutter);
  background: rgba(246,241,231,.93);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--stone-line);
}
.topbar .mark { font-family: 'Cormorant Garamond', serif; font-weight:500; font-size: 19px; letter-spacing: .5px; text-decoration: none; color: var(--indigo); }
.topbar nav { display: flex; gap: 18px; }
.topbar nav a {
  font-size: 14px; color: var(--indigo); text-decoration: none; opacity: .78;
  padding-bottom: 2px; border-bottom: 1px solid transparent;
  transition: opacity var(--t) var(--ease), border-color var(--t) var(--ease);
}
.topbar nav a:hover, .topbar nav a[aria-current] { opacity: 1; border-color: var(--gold); }
@media (max-width: 640px) { .topbar nav { display: none; } }

footer {
  background: var(--indigo-night); color: var(--sand);
  padding: 44px var(--gutter) 34px; text-align: center; font-size: 14px;
}
footer a { color: var(--gold-soft); }

/* ─── Add-to-home-screen nudge ───────────────────────────────────── */
.nudge {
  position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 110%);
  width: min(460px, calc(100% - 20px));
  background: var(--ivory); border: 1px solid var(--gold);
  border-radius: 16px 16px 0 0; padding: 20px 22px 24px;
  z-index: 60; transition: transform var(--t-lg) var(--ease);
}
.nudge.on { transform: translate(-50%, 0); }
.nudge .grab { width: 40px; height: 3px; border-radius: 2px; background: var(--stone-deep); margin: -8px auto 14px; }
.nudge ol { margin: 10px 0 0 18px; font-size: 14px; line-height: 22px; }

/* ─── Toast ──────────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 140%);
  background: var(--indigo-night); color: var(--ivory);
  padding: 12px 20px; border-radius: 10px; font-size: 14px; z-index: 80;
  transition: transform var(--t) var(--ease); max-width: 90vw; text-align: center;
}
.toast.on { transform: translate(-50%, 0); }

/* ─── Grid helper ────────────────────────────────────────────────── */
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .g2, .g3 { grid-template-columns: 1fr; } }

/* ─── Accessibility ──────────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--indigo); color: var(--ivory); padding: 10px 16px;
}
.skip:focus { left: 8px; top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important; }
}


/* ─── Image slots ────────────────────────────────────────────────
   Every picture on the site renders through these. When a file is
   missing the slot shows what belongs there instead of breaking. */
.slot {
  position: relative; display: grid; place-items: center;
  background: var(--sand); border: 1px dashed var(--gold);
  border-radius: 12px; overflow: hidden; text-align: center;
  color: var(--gold-deep); padding: 20px; min-height: 120px;
}
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot.filled { border-style: solid; border-color: var(--sand-line); background: var(--sand); padding: 0; }
.slot .ph b { display: block; font-family: 'Cormorant Garamond', serif; font-weight: 500;
  font-size: 19px; color: var(--indigo); margin-bottom: 4px; }
.slot .ph span { display: block; font-size: 11.5px; line-height: 17px; opacity: .8; }
.slot .ph code { display: inline-block; margin-top: 7px; font-size: 11px; letter-spacing: .3px;
  background: rgba(44,58,100,.07); padding: 3px 8px; border-radius: 5px; color: var(--indigo); }
.slot.arch { border-radius: var(--arch-sm); }

/* ─── Bottom nav (the app) ───────────────────────────────────── */
.appnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--indigo-night);
  padding-bottom: env(safe-area-inset-bottom);
}
.appnav button {
  border: 0; background: none; cursor: pointer; padding: 11px 4px 13px;
  color: var(--sand); opacity: .58; font: 400 11px 'Jost', sans-serif; letter-spacing: .6px;
  transition: opacity var(--t) var(--ease);
}
.appnav button .hi { display: block; font-family: 'Rozha One', serif; font-size: 15px;
  line-height: 19px; color: var(--gold-soft); }
.appnav button.on { opacity: 1; }
.appnav button.on .hi { color: var(--gold); }
.appnav .dot { display: block; width: 4px; height: 4px; border-radius: 50%;
  background: transparent; margin: 4px auto 0; }
.appnav button.on .dot { background: var(--gold); }

.tabpane { display: none; padding-bottom: 96px; }
.tabpane.on { display: block; }

/* ─── Key/value rows ─────────────────────────────────────────── */
.kv { display: flex; justify-content: space-between; align-items: center; gap: 14px;
      padding: 12px 0; border-top: 1px solid var(--sand-line); font-size: 15px; }
.kv:first-of-type { border-top: 0; }
.kv b { font-weight: 500; text-align: right; }
.kv span { opacity: .75; }
