/* Monday Night Designs: Parivaar
   Palette comes from the artwork: night black, diya yellow, branch white.
   (The yellow tokens are still called --gold.) */

:root {
  /* Light theme (the default). The dark theme below sets the same tokens. */
  color-scheme: light;
  --ink: #faf6ef;
  --ink-2: #f2ece1;
  --ink-3: #fffdf9;
  --line: #ddd3c3;
  --hairline: rgb(60 40 10 / 0.1);
  --text: #1b1712;
  --text-soft: #3d362e;
  --muted: #6b635a;
  --gold: #fff912;
  --gold-hover: #f2ea00;
  --gold-deep: #e0d800;
  --gold-text: #6e6400;
  --gold-glow: rgb(110 100 0 / 0.35);
  --on-gold: #1a1206;
  --cream: #f1ebe1;
  --cream-2: #e3dbcd;
  --danger: #b3261e;
  --header-bg: rgb(250 246 239 / 0.85);
  --field-bg: #fff;
  --chip-hover: #b9ae9c;
  --pay-card-bg: rgb(255 249 18 / 0.12);
  --tag-bg: #fde2dd;
  --tag-text: #8c1d12;
  --bar-shadow: rgb(60 40 10 / 0.3);
  /* the print is white and yellow on transparent, so the light theme sets it on black like the shirt */
  --art-bg: #0b0b0c;
  --art-pad: clamp(16px, 4vw, 32px);

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --deva: "Tiro Devanagari Hindi", serif;

  --radius: 18px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 64px;
}

/* Dark theme: follows the device unless the header toggle picked a theme
   (data-theme on <html>, see js/app.js). Both blocks hold the same values.
   color-scheme: dark is what Dark Reader, Noir and Chrome's auto dark mode
   look for to see that the site already has its own dark mode. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink: #0b0b0c;
    --ink-2: #131315;
    --ink-3: #1c1c1f;
    --line: #2a2a2e;
    --hairline: var(--hairline);
    --text: #f3efe8;
    --text-soft: #d7d1c8;
    --muted: #a7a19a;
    --gold-hover: #fffb70;
    --gold-text: #fff912;
    --gold-glow: rgb(255 249 18 / 0.6);
    --danger: #ff8a7a;
    --header-bg: rgb(11 11 12 / 0.82);
    --field-bg: #0b0b0c;
    --chip-hover: #4a4a50;
    --pay-card-bg: rgb(255 249 18 / 0.05);
    --tag-bg: #5b1f1a;
    --tag-text: #ffc9c0;
    --bar-shadow: rgb(0 0 0 / 0.6);
    --art-bg: transparent;
    --art-pad: 0px;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #0b0b0c;
  --ink-2: #131315;
  --ink-3: #1c1c1f;
  --line: #2a2a2e;
  --hairline: var(--hairline);
  --text: #f3efe8;
  --text-soft: #d7d1c8;
  --muted: #a7a19a;
  --gold-hover: #fffb70;
  --gold-text: #fff912;
  --gold-glow: rgb(255 249 18 / 0.6);
  --danger: #ff8a7a;
  --header-bg: rgb(11 11 12 / 0.82);
  --field-bg: #0b0b0c;
  --chip-hover: #4a4a50;
  --pay-card-bg: rgb(255 249 18 / 0.05);
  --tag-bg: #5b1f1a;
  --tag-text: #ffc9c0;
  --bar-shadow: rgb(0 0 0 / 0.6);
  --art-bg: transparent;
  --art-pad: 0px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--gold-text); text-underline-offset: 3px; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 3px; border-radius: 6px; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header-bg);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-family: var(--serif); font-weight: 600; font-size: 1.3rem; letter-spacing: 0.01em;
  white-space: nowrap;
}

.nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 28px); font-size: 0.92rem; font-weight: 500; }
.nav a { color: var(--muted); text-decoration: none; transition: color .2s; }
.nav a:hover { color: var(--text); }
.nav .nav-cart { color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
.cart-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--gold); color: var(--on-gold);
  font-size: 0.75rem; font-weight: 700; line-height: 20px; text-align: center;
}
.theme-toggle {
  width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 50%;
  background: none; color: var(--muted); cursor: pointer;
  display: inline-grid; place-items: center; transition: color .2s, border-color .2s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--muted); }
.theme-toggle svg { width: 18px; height: 18px; }
@media (max-width: 560px) {
  .wordmark { font-size: 1.12rem; }
  .nav a:not(.nav-cart) { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0;
  font-weight: 600; font-size: 0.98rem; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .2s, box-shadow .2s;
}
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold); color: var(--on-gold); box-shadow: 0 8px 24px -10px var(--gold-glow); }
.btn-gold:hover { background: var(--gold-hover); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(40px, 8vw, 96px) 0 clamp(48px, 8vw, 104px);
}
.hero-inner {
  position: relative;
  display: grid; grid-template-columns: 1fr 1.05fr; align-items: center; gap: clamp(24px, 5vw, 64px);
}
.eyebrow {
  margin: 0 0 18px; color: var(--gold-text);
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
}
.hero-title {
  margin: 0; font-family: var(--serif); font-weight: 500;
  font-size: clamp(3.6rem, 10vw, 7rem); line-height: 0.95; letter-spacing: 0.01em;
}
.hero-devanagari { margin: 10px 0 0; font-family: var(--deva); font-size: 1.6rem; color: var(--gold-text); }
.hero-devanagari span { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 1.3rem; }
.lede { margin: 22px 0 0; max-width: 34ch; color: var(--text-soft); font-size: 1.08rem; }
.hero-actions { margin-top: 30px; display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; }
.hero-prices { color: var(--muted); font-size: 0.92rem; }

.hero-art { margin: 0; display: grid; place-items: center; }
.hero-art img {
  background: var(--art-bg); padding: var(--art-pad); border-radius: var(--radius);
  width: min(100%, 420px);
}
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .hero-art img { width: min(72%, 320px); }
}

/* ---------- Sections ---------- */
section { position: relative; }
.section-title {
  margin: 0; font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.1rem, 5vw, 3rem); line-height: 1.1;
}
.section-head { margin-bottom: clamp(24px, 4vw, 40px); }
.section-sub { margin: 10px 0 0; color: var(--muted); max-width: 52ch; }

.story { padding: clamp(48px, 8vw, 96px) 0; border-top: 1px solid var(--hairline); }
.story-inner { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(20px, 5vw, 64px); }
.story-text p { margin: 0 0 16px; color: var(--text-soft); font-size: 1.06rem; }
.story-text em { font-family: var(--serif); font-size: 1.25em; color: var(--gold-text); }
@media (max-width: 820px) { .story-inner { grid-template-columns: 1fr; } }

/* ---------- Products ---------- */
.shop { padding: clamp(48px, 8vw, 96px) 0; background: var(--ink-2); }
.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 32px); }
@media (max-width: 760px) { .products { grid-template-columns: 1fr; } }

.product {
  background: var(--ink-3); border: 1px solid var(--hairline);
  border-radius: calc(var(--radius) + 4px); overflow: hidden;
  display: flex; flex-direction: column;
}
/* The photos are square with their white backdrop and shadow built in
   (scripts/make-form-assets.py), so dark-mode tools can't tint the white. */
.stage { background: #fff; aspect-ratio: 1 / 1; }
.mockup { width: 100%; height: 100%; }

.product-body { padding: 22px clamp(18px, 3vw, 28px) 24px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.product-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.product-name { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.6rem; line-height: 1.15; }
.price { margin: 0; font-weight: 700; font-size: 1.2rem; color: var(--gold-text); }
.product-meta { margin: -8px 0 0; color: var(--muted); font-size: 0.92rem; }

.sizes { border: 0; margin: 0; padding: 0; }
.sizes legend, .pay-choice legend, .field label {
  display: block; margin-bottom: 8px; padding: 0;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.size-options { display: flex; flex-direction: column; gap: 10px; }
.size-group { display: flex; align-items: center; gap: 8px; }
.size-group-label { flex: 0 0 44px; font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.size-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.size-chips .chip span { min-width: 44px; padding: 0 10px; }

.chip { position: relative; display: inline-flex; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  min-width: 52px; height: 44px; padding: 0 16px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--ink-2);
  font-weight: 600; transition: border-color .15s, background-color .15s, color .15s;
}
.chip:hover span { border-color: var(--chip-hover); }
.chip input:checked + span { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.chip input:focus-visible + span { outline: 2px solid var(--gold-text); outline-offset: 3px; }

.personalize { display: flex; flex-direction: column; gap: 12px; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; min-height: 32px; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--gold-text); cursor: pointer; }
.pz-price { color: var(--gold-text); font-weight: 700; margin-left: 4px; }
.pz-fields { display: flex; flex-direction: column; gap: 16px; }
.pz-fields .field-help { margin: -6px 0 0; }
.cart-pz { margin: -6px 0 8px; font-size: 0.88rem; font-weight: 600; overflow-wrap: anywhere; }
.cart-pz span { color: var(--gold-text); }

.buy-row { display: flex; gap: 12px; margin-top: auto; padding-top: 6px; }
.buy-row .btn-add { flex: 1; }

.stepper {
  display: inline-flex; align-items: center; height: 48px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--ink-2);
}
.stepper .step {
  width: 44px; height: 100%; border: 0; background: none; cursor: pointer;
  font-size: 1.25rem; color: var(--text); border-radius: 999px;
}
.stepper .step:hover { color: var(--gold-text); }
.stepper input {
  width: 36px; border: 0; background: none; text-align: center; font-weight: 700;
  -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper.small { height: 38px; }
.stepper.small .step { width: 34px; font-size: 1.05rem; }
.stepper.small input { width: 28px; }

.add-hint { margin: -4px 0 0; min-height: 1.4em; font-size: 0.88rem; color: var(--gold-text); }
.add-hint.is-error { color: var(--danger); }

/* ---------- Order ---------- */
.order { padding: clamp(48px, 8vw, 96px) 0; }
.order-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 40px); align-items: start; }
@media (max-width: 820px) { .order-grid { grid-template-columns: 1fr; } }

.cart-panel, .order-form, .confirmation {
  background: var(--ink-2); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: clamp(18px, 3vw, 28px);
}
.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-line {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.cart-line:first-child { padding-top: 0; }
.cart-thumb { width: 56px; height: 56px; border-radius: 12px; background: #fff; overflow: hidden; }
.cart-thumb img { width: 100%; height: 100%; }
.cart-info { min-width: 0; }
.cart-name { margin: 0; font-weight: 600; line-height: 1.3; }
.cart-sub { margin: 2px 0 8px; color: var(--muted); font-size: 0.88rem; }
.cart-actions { display: flex; align-items: center; gap: 10px; }
.cart-remove {
  border: 0; background: none; padding: 4px; cursor: pointer;
  color: var(--muted); font-size: 0.85rem; text-decoration: underline; text-underline-offset: 3px;
}
.cart-remove:hover { color: var(--text); }
.cart-line-total { font-weight: 700; }
.cart-empty { margin: 0; color: var(--muted); }
.cart-total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 16px; font-size: 1.05rem;
}
.cart-total strong { font-size: 1.6rem; color: var(--gold-text); }

.order-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; margin: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; gap: 16px; } }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; min-height: 48px;
  background: var(--field-bg); border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .15s;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold-text); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field-help { margin: -8px 0 0; color: var(--muted); font-size: 0.85rem; }
.optional { text-transform: none; letter-spacing: 0; font-weight: 500; }
.pay-choice { border: 0; padding: 0; display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; }
.pay-choice legend { width: 100%; }
.pay-choice .chip span { min-width: 100px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin: 0; color: var(--danger); font-size: 0.92rem; }
.form-error:empty { display: none; }
.fine-print { margin: -4px 0 0; color: var(--muted); font-size: 0.82rem; text-align: center; }

/* ---------- Confirmation ---------- */
.confirmation { max-width: 760px; margin: 0 auto; outline: none; }
.confirm-head { text-align: center; padding: 8px 0 20px; }
.confirm-check {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%;
  display: grid; place-items: center; background: var(--gold); color: var(--on-gold);
}
.confirm-check svg { width: 26px; height: 26px; }
.confirm-head h3 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 2.2rem; line-height: 1.1; }
.confirm-head p { margin: 8px 0 0; color: var(--muted); }
.order-no { color: var(--gold-text); font-weight: 700; letter-spacing: 0.06em; }

.confirm-summary { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; margin: 0 0 20px; list-style: none; }
.confirm-summary li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.confirm-summary .total { font-weight: 700; font-size: 1.1rem; padding-top: 8px; }
.confirm-summary .total span:last-child { color: var(--gold-text); }

.pay-card {
  max-width: 400px; margin: 0 auto; border: 1px solid var(--gold-deep); border-radius: 14px; padding: 22px 18px;
  background: var(--pay-card-bg); display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center;
}
.pay-card h4 { margin: 0; font-size: 1.15rem; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pay-card p { margin: 0; color: var(--text-soft); font-size: 0.94rem; overflow-wrap: anywhere; }
.pay-card .qr { width: min(240px, 100%); aspect-ratio: 1; height: auto; border-radius: 12px; background: #fff; padding: 10px; }
.pay-card .btn { min-height: 46px; padding: 0 22px; }
.pay-swap {
  background: none; border: 0; padding: 4px; cursor: pointer;
  color: var(--muted); font: inherit; font-size: 0.88rem; text-decoration: underline; text-underline-offset: 3px;
}
.pay-swap:hover { color: var(--text); }
.tag {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px;
}
.tag-placeholder { background: var(--tag-bg); color: var(--tag-text); }
.memo-tip {
  margin: 18px 0 0; padding: 14px 16px; border-radius: 12px;
  background: var(--ink); color: var(--text-soft); font-size: 0.94rem;
}
.memo-tip strong { color: var(--text); }
.confirm-foot { margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ---------- Footer ---------- */
.site-footer { padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--hairline); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; color: var(--muted); font-size: 0.88rem; }
.footer-inner p { margin: 0; }

/* ---------- Mobile order bar ---------- */
.cart-bar {
  position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-radius: 16px;
  background: var(--gold); color: var(--on-gold); text-decoration: none; font-size: 0.95rem;
  box-shadow: 0 12px 30px -8px var(--bar-shadow);
  animation: bar-in .25s ease-out;
}
.cart-bar-cta { font-weight: 700; }
@keyframes bar-in { from { transform: translateY(20px); opacity: 0; } }
@media (min-width: 821px) { .cart-bar { display: none !important; } }
@media (max-width: 820px) { body.has-cart-bar .site-footer { padding-bottom: 96px; } }

/* ---------- PR preview note (only on mnd-dev previews) ---------- */
.preview-note {
  padding: 8px var(--gutter); text-align: center; font-size: 0.85rem; font-weight: 600;
  background: #ff8a7a; color: #1a0703;
}
