:root {
  --cream: #F6F1EA;
  --cream-2: #EFE7DC;
  --ink: #1A1714;
  --ink-2: #4A433D;
  --muted: #7A7067;
  --line: #DED4C7;
  --accent: #D8775A;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 18px;
  --max: 1120px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(40px, 7vw, 76px); line-height: 1.02; }
h2 { font-size: clamp(30px, 4.5vw, 46px); line-height: 1.08; }
h3 { font-size: 24px; line-height: 1.2; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.eyebrow { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

/* ---------- nav / footer ---------- */
.nav {
  max-width: var(--max); margin: 0 auto; padding: 22px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { font-family: var(--serif); font-size: 30px; text-decoration: none; letter-spacing: -0.02em; }
.foot {
  max-width: var(--max); margin: 60px auto 0; padding: 28px 20px 40px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 14px;
  display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between;
}
.foot-links { display: flex; gap: 20px; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px; border: 1px solid var(--ink);
  background: transparent; cursor: pointer; text-decoration: none; font-weight: 500;
  transition: transform .15s ease, background .15s ease, color .15s ease, opacity .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-ink { background: var(--ink); color: var(--cream); }
.btn-ink:hover:not(:disabled) { background: #000; }
.btn-ghost { border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-lg { padding: 18px 30px; font-size: 18px; }
.btn-sm { padding: 10px 16px; font-size: 14px; }
.cta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 18px; }

main { max-width: var(--max); margin: 0 auto; padding: 0 20px; min-height: 60vh; }

/* ---------- landing ---------- */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center;
  padding: 36px 0 56px;
}
.hero-copy { display: flex; flex-direction: column; gap: 22px; }
.lede { font-size: 20px; color: var(--ink-2); max-width: 36ch; }
.hero-demo { aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden; position: relative; background: var(--cream-2); }

/* demo drape (live result) */
.demo-drape { position: absolute; inset: 0; }
.demo-drape .pane { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; }
.demo-drape .pane img { height: 92%; width: auto; max-width: 100%; object-fit: contain; }
.demo-drape .pane.best { clip-path: inset(0 0 0 50%); transition: clip-path 1.4s cubic-bezier(.7,0,.2,1); }
.demo-drape.open .pane.best { clip-path: inset(0 0 0 0%); }
.demo-drape.closed .pane.best { clip-path: inset(0 0 0 100%); }
.demo-caption { position: absolute; left: 18px; bottom: 16px; color: #fff; font-family: var(--serif); font-size: 28px; text-shadow: 0 1px 12px rgba(0,0,0,.35); }

/* demo fallback: the twelve seasons as fabric */
.demo-swatches { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 1fr); }
.demo-swatches div { position: relative; display: flex; align-items: flex-end; padding: 12px; color: rgba(255,255,255,.92); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-shadow: 0 1px 6px rgba(0,0,0,.35); transition: transform .3s ease; cursor: pointer; }
.demo-swatches div:hover { transform: scale(1.06); z-index: 2; box-shadow: 0 8px 30px rgba(0,0,0,.25); }

.band { padding: 40px 0 10px; border-top: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step { display: flex; flex-direction: column; gap: 10px; }
.step .n { font-family: var(--serif); font-size: 14px; color: var(--accent); letter-spacing: .1em; }
.step p { color: var(--ink-2); }

.seasons-strip { padding: 50px 0 10px; }
.strip { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; }
.strip .cell { aspect-ratio: 1 / 2.2; border-radius: 10px; position: relative; overflow: hidden; }
.strip .cell span { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 6px; font-size: 11px; color: rgba(255,255,255,.95); writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .06em; text-shadow: 0 1px 4px rgba(0,0,0,.4); }

.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 50px 0 0; }
.price-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; gap: 16px; }
.price-card.paid { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.price-card.paid .eyebrow, .price-card.paid .muted { color: #BDB2A6; }
.price-card ul { display: grid; gap: 8px; color: inherit; }
.price-card li::before { content: "— "; color: var(--accent); }

/* ---------- analyze ---------- */
.capture { max-width: 640px; margin: 20px auto 0; display: flex; flex-direction: column; gap: 24px; }
.tips { display: grid; gap: 8px; color: var(--ink-2); }
.tips li::before { content: "·"; margin-right: 10px; color: var(--accent); }
.drop {
  position: relative; border: 1.5px dashed var(--line); border-radius: var(--radius);
  aspect-ratio: 4 / 5; max-height: 62vh; overflow: hidden; cursor: pointer;
  display: flex; align-items: center; justify-content: center; text-align: center; background: var(--cream-2);
  transition: border-color .15s;
}
.drop:hover, .drop.over { border-color: var(--ink); }
.drop-inner { padding: 20px; }
.drop-title { font-family: var(--serif); font-size: 26px; margin-bottom: 6px; }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- processing ---------- */
.processing { max-width: 640px; margin: 20px auto; display: grid; gap: 28px; }
.proc-photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; max-height: 50vh; background: var(--cream-2); }
.proc-photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.4) contrast(1.05); animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { filter: saturate(1) contrast(1); } }
.proc-lines { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; font-family: var(--serif); font-size: 24px; }
.proc-lines li { opacity: 0; transform: translateY(6px); transition: opacity .5s, transform .5s; }
.proc-lines li.on { opacity: 1; transform: none; }
.proc-lines li.done { opacity: .35; }

/* ---------- reveal ---------- */
.reveal { margin: 10px -20px 0; }
@media (min-width: 760px) { .reveal { margin: 10px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; } }
.drape {
  position: relative; aspect-ratio: 4 / 5; max-height: 58vh; width: 100%; overflow: hidden; background: #ccc;
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
@media (min-width: 760px) { .drape { border-radius: 28px; max-height: 78vh; } }
.drape-layer { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; transition: background-color .5s ease; }
.drape-layer img.subject { height: 94%; width: auto; max-width: 100%; object-fit: contain; filter: drop-shadow(0 18px 30px rgba(0,0,0,.18)); }
.drape-layer img.subject.photo { height: 100%; width: 100%; object-fit: cover; filter: none; }
.drape-layer.best { clip-path: inset(0 0 0 100%); }
.drape.animating .drape-layer.best { transition: clip-path .9s cubic-bezier(.7,0,.2,1); }
.drape-handle {
  position: absolute; top: 0; bottom: 0; left: 100%; width: 0; cursor: ew-resize; opacity: 0; transition: opacity .4s;
}
.drape.ready .drape-handle { opacity: 1; }
.drape-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: rgba(255,255,255,.9); }
.drape-handle span {
  position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%; background: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.drape-handle span::before { content: "⟷"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 20px; color: var(--ink); }
.drape-labels { position: absolute; left: 0; right: 0; top: 16px; display: flex; justify-content: space-between; padding: 0 16px; pointer-events: none; }
.lbl { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; color: rgba(255,255,255,.92); text-shadow: 0 1px 8px rgba(0,0,0,.4); opacity: 0; transition: opacity .4s; }
.drape.ready .lbl { opacity: 1; }

.reveal-copy { padding: 22px 20px 0; display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 760px) { .reveal-copy { padding: 0; } }
.season-name { font-size: clamp(44px, 9vw, 92px); line-height: .98; }
.season-name:empty { display: none; }
.season-name .word { display: inline-block; opacity: 0; transform: translateY(14px); animation: rise .6s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.verdict { font-family: var(--serif); font-size: 20px; font-style: italic; color: var(--ink-2); max-width: 32ch; }

/* ---------- result body ---------- */
.result { display: grid; gap: 44px; padding-top: 44px; max-width: 760px; margin: 0 auto; }
.notice { border: 1px solid var(--accent); border-radius: 14px; padding: 14px 18px; background: #FBEDE6; }
.notice a { font-weight: 600; }
.why { display: grid; gap: 10px; font-size: 19px; }
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 12px; }
.swatches.sm { grid-template-columns: repeat(6, 1fr); }
.swatch { aspect-ratio: 1; border-radius: 12px; cursor: pointer; border: 2px solid transparent; transition: transform .15s, border-color .15s; position: relative; }
.swatch:hover { transform: translateY(-2px); }
.swatch.on { border-color: var(--ink); }
.swatch .hex { position: absolute; left: 6px; bottom: 5px; font-size: 10px; letter-spacing: .04em; color: rgba(255,255,255,.9); text-shadow: 0 1px 3px rgba(0,0,0,.5); font-weight: 600; }
.swatch.light .hex { color: rgba(0,0,0,.65); text-shadow: none; }

.share { display: grid; gap: 14px; }
.share-card { border-radius: var(--radius); overflow: hidden; max-width: 380px; box-shadow: 0 20px 50px rgba(0,0,0,.14); background: var(--cream-2); aspect-ratio: 4 / 5; }
.share-card img { width: 100%; height: 100%; object-fit: cover; }

.paywall { background: var(--ink); color: var(--cream); border-radius: 24px; padding: 34px; display: grid; gap: 18px; }
.paywall .eyebrow, .paywall .muted { color: #BDB2A6; }
.paywall ul { display: grid; gap: 8px; }
.paywall li::before { content: "— "; color: var(--accent); }
.paywall .btn-ink { background: var(--cream); color: var(--ink); border-color: var(--cream); }

.paid { display: grid; gap: 24px; }
.palette-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.palette-grid .cell { aspect-ratio: 1; border-radius: 6px; }
.paid-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 32px; }
.paid-grid h3 { font-size: 20px; margin-bottom: 6px; }
.paid-grid p { color: var(--ink-2); }

.again { display: flex; justify-content: center; }

/* ---------- admin ---------- */
.admin { max-width: 760px; margin: 30px auto; display: grid; gap: 20px; }
.admin table { border-collapse: collapse; width: 100%; font-size: 15px; }
.admin td, .admin th { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.admin .big { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.admin .big div { border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.admin .big b { display: block; font-family: var(--serif); font-size: 36px; font-weight: 400; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 10px; }
  .hero-demo { order: -1; max-height: 56vh; aspect-ratio: 4 / 4.6; }
  .steps { grid-template-columns: 1fr; gap: 22px; }
  .pricing { grid-template-columns: 1fr; }
  .strip { grid-template-columns: repeat(6, 1fr); }
  .strip .cell { aspect-ratio: 1 / 1.6; }
  .paid-grid { grid-template-columns: 1fr; }
  .palette-grid { grid-template-columns: repeat(6, 1fr); }
  .admin .big { grid-template-columns: 1fr 1fr; }
  .brand { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
