:root {
  --ivory: #fbf6ee;
  --cream: #f4ebdc;
  --paper: #fffdf9;
  --ink: #2a1a1f;
  --muted: #6b5a5e;
  --burgundy: #6e1a2e;
  --burgundy-deep: #4f1221;
  --gold: #b08a3e;
  --gold-text: #7f6224;      /* gold dark enough for text on ivory (AA) */
  --line: #e4d6bf;
  --error: #a3172c;
  --ok: #2f6b3f;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(42 26 31 / .06), 0 12px 32px -12px rgb(42 26 31 / .22);
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 400 1rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0 0 .5em; color: var(--burgundy-deep); }
h1 { font-size: clamp(2.3rem, 6.5vw, 4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
a { color: var(--burgundy); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--burgundy); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1600px, 100% - clamp(32px, 6vw, 112px)); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--burgundy); color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }

/* header */
.top { position: sticky; top: 0; z-index: 5; background: rgb(251 246 238 / .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--burgundy-deep); text-decoration: none; line-height: 1; }
.brand-yk { font: 400 3rem/1 'Pinyon Script', var(--serif); color: var(--burgundy); -webkit-text-stroke: .015em currentColor; padding-top: .15em; }
.brand-word { font: 600 .74rem var(--sans); letter-spacing: .34em; text-transform: uppercase; color: var(--gold-text); }
nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
nav a { display: block; padding: .5rem .7rem; color: var(--ink); text-decoration: none; font-size: .92rem; font-weight: 500; border-radius: 8px; }
nav a:hover { background: var(--cream); }
@media (max-width: 560px) { .top-row { flex-wrap: wrap; gap: 0; padding-bottom: .3rem; } nav { width: 100%; } nav ul { justify-content: space-between; } nav a { padding: .45rem .5rem; } html { scroll-padding-top: 110px; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .75rem 1.4rem; border-radius: 999px; font: 600 1rem var(--sans); text-decoration: none; cursor: pointer; border: 1.5px solid transparent; transition: background-color .15s, color .15s; }
.btn-primary { background: var(--burgundy); color: #fff; }
.btn-primary:hover { background: var(--burgundy-deep); }
.btn-ghost { background: transparent; color: var(--burgundy); border-color: var(--burgundy); }
.btn-ghost:hover { background: var(--cream); }
.btn-small { min-height: 44px; padding: .55rem 1.1rem; font-size: .95rem; }
.link { font-weight: 600; }

.eyebrow { font: 600 .78rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-text); margin-bottom: .8rem; }
.lede, .section-lede { font-size: 1.12rem; color: var(--muted); max-width: 40rem; }
.muted { color: var(--muted); }
.notice { padding: 1rem 1.2rem; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); background: var(--paper); }
.notice-soft { margin-top: 2rem; text-align: center; border-style: solid; }

/* hero */
.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2rem, 5vw, 4rem); overflow: hidden; }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }
.hero-art { position: relative; height: clamp(340px, 80vw, 620px); }
.hero-card { position: absolute; width: auto; height: 92%; border-radius: 12px; box-shadow: var(--shadow); border: 6px solid var(--paper); }
.hero-card-0 { left: 50%; top: 0; transform: translateX(-90%) rotate(-5deg); }
.hero-card-1 { left: 50%; bottom: 0; transform: translateX(-10%) rotate(4deg); }
@media (min-width: 880px) {
  .hero-grid { grid-template-columns: 1.15fr 1fr; }
  .hero-art { height: auto; aspect-ratio: 1; max-height: 620px; }   /* cards span ≈ art height: keep it within the column */
}

/* products */
.products { padding-bottom: 1rem; }
.product-grid { display: grid; gap: 1rem; }
@media (min-width: 720px) { .product-grid { grid-template-columns: 1fr 1fr; } }
.product { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; border-top: 3px solid var(--gold); }
.product-kicker { font: 600 .75rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); margin-bottom: .3rem; }

/* sections */
.section { padding: clamp(3rem, 8vw, 5.5rem) 0; }
.section-tint { background: var(--cream); }
#personalize-h:focus { outline: none; }

/* gallery */
.gallery { display: grid; gap: 1.5rem; margin-top: 2rem; }
@media (min-width: 720px) { .gallery { grid-template-columns: 1fr 1fr; } }
.tpl { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.media { background: #1d1416; aspect-ratio: 9 / 16; max-height: 640px; display: grid; place-items: center; overflow: hidden; }
.media img, .media video { width: 100%; height: 100%; object-fit: contain; }
.tpl-body { padding: 1.3rem 1.4rem 1.5rem; }
.tpl-body h3 { margin-bottom: .2rem; }
.tpl-desc { font-size: .92rem; margin: .5rem 0 0; }
.chip { display: inline-block; font: 600 .75rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--burgundy); background: var(--cream); border-radius: 999px; padding: .25rem .7rem; margin-bottom: .6rem; }
.formats { list-style: none; padding: 0; margin: .4rem 0 1.2rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.formats li { font-size: .85rem; border: 1px solid var(--line); border-radius: 8px; padding: .2rem .6rem; background: var(--ivory); }
.tpl-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

/* personalize */
.detail { display: grid; gap: 2rem; margin-top: 2rem; align-items: start; }
@media (min-width: 880px) { .detail { grid-template-columns: minmax(260px, 340px) 1fr; } .detail-preview { position: sticky; top: 84px; } }
.detail-preview .media { border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1rem; width: min(100%, 260px); }
@media (min-width: 880px) { .detail-preview .media { width: 100%; max-height: 560px; } }
.detail-preview h3 { margin-bottom: .1rem; }
.form { display: grid; gap: 1.1rem 1.2rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.2rem, 4vw, 2rem); }
@media (min-width: 640px) { .form { grid-template-columns: 1fr 1fr; } .field-wide { grid-column: 1 / -1; } }
.field label { display: flex; align-items: baseline; gap: .5rem; font-weight: 600; margin-bottom: .35rem; }
.req, .opt { font: 600 .7rem var(--sans); letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; padding: .1rem .5rem; }
.req { background: var(--burgundy); color: #fff; }
.opt { color: var(--muted); border: 1px solid var(--line); font-weight: 500; }
.field input, .field textarea, .field select { width: 100%; min-height: 48px; padding: .65rem .8rem; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid #9a8562; border-radius: 10px; }
.field textarea { resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible { outline: 3px solid var(--burgundy); outline-offset: 1px; border-color: var(--burgundy); }
.field [aria-invalid="true"] { border-color: var(--error); background: #fff6f7; }
.hint { font-size: .87rem; color: var(--muted); margin: .3rem 0 0; }
.err { font-size: .9rem; color: var(--error); font-weight: 600; margin: .3rem 0 0; }
.err:empty { display: none; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.form-actions .hint { margin: 0; }
.status:empty { display: none; }
.status { grid-column: 1 / -1; border-radius: 12px; padding: 1.1rem 1.3rem; }
.status:focus { outline: 3px solid var(--burgundy); outline-offset: 2px; }
.status h3 { font-size: 1.3rem; }
.status ul { margin: 0; padding-left: 1.2rem; }
.status-error { background: #fff6f7; border: 1.5px solid var(--error); }
.status-error a { color: var(--error); }
.status-ok { background: #f3faf4; border: 1.5px solid var(--ok); }
.status-ok h3 { color: var(--ok); }
.status dl { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0; }
.status dt { font-weight: 600; }
.status dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .status dl { grid-template-columns: 1fr; } .status dd { margin-bottom: .4rem; } }

/* pricing */
.price-note { display: inline-block; background: var(--cream); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .9rem; color: var(--muted); font-size: .95rem; }
.plans { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
@media (min-width: 720px) { .plans { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } }
.plan { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.plan-premium { border-top: 3px solid var(--burgundy); }
.plan:not(.plan-premium) { border-top: 3px solid var(--gold); }
.price { font: 600 clamp(2.2rem, 6vw, 2.8rem)/1 var(--serif); color: var(--burgundy); margin: .2rem 0 .8rem; }
.plan ul { padding-left: 1.2rem; margin: 0 0 1.2rem; }
.plan li { margin-bottom: .35rem; }
.plan-tag { margin: auto 0 0; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-text); font-weight: 600; }

/* steps */
.steps { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1rem; counter-reset: step; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--burgundy); color: #fff; font-weight: 600; margin-bottom: .8rem; }
.steps h3 { font-size: 1.3rem; }
.steps p { margin: 0; color: var(--muted); }

/* footer */
.foot { background: var(--burgundy-deep); color: #f1e4d0; padding: 2.5rem 0; font-size: .92rem; }
.foot p { margin: .3rem 0; }
.foot a { color: #e6c98a; }
.policy { max-width: 46rem; }
.policy h2 { margin-top: 2.2rem; }
.policy li { margin: .3rem 0; }
.brand-foot { color: #fff; margin-bottom: .8rem !important; }
.brand-foot .brand-yk { color: #fff; }
.brand-foot .brand-word { color: #e6c98a; }

/* Order form (Phase 5) */
.form-sub { font-size: 1.35rem; margin: .4rem 0 .2rem; }
.form-sub + .hint { margin: 0; }
.order-line { flex-basis: 100%; margin: 0; }
.btn:disabled { opacity: .6; cursor: progress; }
.status-info { background: var(--paper); border: 1.5px solid var(--line); }
.status .ref { font-size: 1.1em; letter-spacing: .04em; white-space: nowrap; }
.form :disabled:not(.btn) { background: #f4efe6; color: var(--ink); }

/* Payment (Phase 6, Razorpay test mode) */
.pay-box .btn { margin: .4rem 0; }

/* Phase 7: storefront */
.devbar { margin: 0; padding: .55rem 1rem; text-align: center; font-size: .9rem; background: var(--burgundy-deep); color: #f6e7cc; }
.occasions { color: var(--gold-text); font-weight: 600; }
.ticks { padding-left: 1.2rem; margin: 0 0 1rem; }
.ticks li { margin-bottom: .25rem; }
@media (min-width: 720px) { .gallery { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); } }
.plan-choice { border: 0; padding: 0; margin: 0; min-width: 0; }
.plan-choice legend { font-weight: 600; margin-bottom: .35rem; }
.plan-choice label { display: flex; gap: .6rem; align-items: baseline; padding: .65rem .8rem; margin-bottom: .5rem; background: #fff; border: 1.5px solid #9a8562; border-radius: 10px; cursor: pointer; }
.plan-choice input { accent-color: var(--burgundy); }
