/* Brand tokens are injected as CSS variables by layouts/app.blade.php from Settings. */
:root {
  --ink: #2a1f2d;
  --paper: #e8ecee;
  --accent: #8c3b4a;
  --muted: #625a66;
  --white: #fbfcfc;
  --line: color-mix(in srgb, var(--ink) 14%, transparent);
  --soft: color-mix(in srgb, var(--ink) 5%, var(--white));
  --ok: #2f6b4f;
  --warn: #9a6a12;
  --bad: #a3343f;
  --display: 'Bodoni Moda', Georgia, serif;
  --body: 'Figtree', system-ui, sans-serif;
  --r-sm: 6px;
  --r-md: 14px;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.08; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 6.5vw, 5rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1em; max-width: 68ch; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 52ch; }
.small { font-size: .875rem; }
.muted { color: var(--muted); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }
.stack > * + * { margin-top: 1rem; }
.grid { display: grid; gap: 20px; }
@media (min-width: 760px) {
  .g2 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: repeat(3, 1fr); }
  .g4 { grid-template-columns: repeat(4, 1fr); }
}
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
section.band { padding: 72px 0; }
section.band + section.band { border-top: 1px solid var(--line); }

/* Header */
.site-head { padding: 18px 0; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark { font-family: var(--display); font-size: 1.5rem; text-decoration: none; font-weight: 600; }
.nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; font-size: .95rem; }
.nav a { text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; }

/* Buttons and forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--white);
  font: 600 .98rem var(--body); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--white); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: .88rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.linkish { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

label.field { display: block; margin-bottom: 18px; }
label.field > span { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white);
  font: inherit; color: var(--ink);
}
textarea { min-height: 120px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; }
.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); font-size: .93rem; }
.chip input:checked + span { background: var(--ink); color: var(--white); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.errors { border-left: 3px solid var(--bad); padding: 10px 14px; background: var(--white); margin-bottom: 20px; }
.flash { border-left: 3px solid var(--ok); padding: 10px 14px; background: var(--white); margin: 0 0 20px; }
.error-text { color: var(--bad); font-size: .9rem; margin-top: 4px; }

/* Panels: a single treatment, used only where content is a discrete object */
.panel { background: var(--white); border-radius: var(--r-md); padding: 24px; }
.panel.flat { background: transparent; border: 1px solid var(--line); }
.tag { display: inline-block; font-size: .8rem; padding: 2px 10px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.tag.ok { color: var(--ok); }
.tag.warn { color: var(--warn); }
.tag.bad { color: var(--bad); }
.ai-label { font-size: .78rem; color: var(--muted); }

/* Hero mirror */
.hero { padding: 40px 0 80px; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.05fr .95fr; } }
.mirror {
  position: relative; width: min(100%, 420px); aspect-ratio: 3 / 4; margin: 0 auto;
  border-radius: 50% / 42%; overflow: hidden;
  box-shadow: 0 0 0 10px var(--white), 0 0 0 11px var(--line);
  background: var(--soft); touch-action: pan-y;
}
.mirror .layer { position: absolute; inset: 0; }
.mirror .layer.after { clip-path: inset(0 0 0 var(--split, 50%)); }
.mirror .handle {
  position: absolute; top: 0; bottom: 0; left: var(--split, 50%); width: 2px; background: var(--white);
  transform: translateX(-1px); pointer-events: none;
}
.mirror .handle::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; border-radius: 50%;
  background: var(--white); transform: translate(-50%, -50%); box-shadow: 0 1px 4px rgba(42, 31, 45, .25);
}
.mirror input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.mirror-caption { text-align: center; margin-top: 18px; font-size: .85rem; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .mirror.intro .layer.after { animation: reveal 1.6s .4s ease-in-out both; }
  @keyframes reveal { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 50%); } }
}

/* Steps — a real sequence, so it is numbered */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 28px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: s; }
.steps li::before { content: counter(s); font-family: var(--display); font-size: 2.6rem; line-height: 1; display: block; margin-bottom: 10px; color: var(--accent); }

/* Price list */
.prices { display: grid; gap: 0; border-top: 1px solid var(--line); }
.prices > div { display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.prices .amount { font-family: var(--display); font-size: 1.8rem; }
.prices p { grid-column: 1 / -1; margin: 0; color: var(--muted); }

details { border-bottom: 1px solid var(--line); padding: 16px 0; }
details summary { cursor: pointer; font-weight: 600; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; float: right; color: var(--muted); }
details[open] summary::after { content: "–"; }
details p { margin: 10px 0 0; color: var(--muted); }

/* Photo wizard */
.slots { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.slot { background: var(--white); border-radius: var(--r-md); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.slot .frame { aspect-ratio: 3 / 4; border-radius: var(--r-sm); background: var(--soft); overflow: hidden; display: grid; place-items: center; position: relative; }
.slot .frame img { width: 100%; height: 100%; object-fit: cover; }
.slot .frame svg { width: 60%; opacity: .5; }
.slot.required .name::after { content: " *"; color: var(--accent); }
.slot .name { font-weight: 600; font-size: .92rem; }
.slot .status { font-size: .82rem; min-height: 1.2em; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Looks gallery */
.looks { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.look { text-decoration: none; }
.look .img { aspect-ratio: 2 / 3; border-radius: var(--r-md); background: var(--soft); overflow: hidden; display: grid; place-items: center; }
.look .img img { width: 100%; height: 100%; object-fit: cover; }
.look .t { font-size: .88rem; margin-top: 6px; }

/* Studio picker */
.picker { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.pick { position: relative; display: block; }
.pick input { position: absolute; opacity: 0; }
.pick .card { display: block; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); cursor: pointer; }
.pick input:checked + .card { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pick input:focus-visible + .card { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick input:disabled + .card { opacity: .45; cursor: not-allowed; }
.pick .card strong { display: block; }
.pick .rec { color: var(--accent); font-size: .8rem; font-weight: 600; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs button { border: 1px solid var(--line); background: transparent; padding: 8px 14px; border-radius: 999px; font: inherit; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.sticky-bar { position: sticky; bottom: 0; background: var(--paper); border-top: 1px solid var(--line); padding: 14px 0; margin-top: 24px; }

/* Compare slider for a look */
.compare { position: relative; max-width: 460px; aspect-ratio: 2 / 3; border-radius: var(--r-md); overflow: hidden; background: var(--soft); touch-action: pan-y; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare .after { clip-path: inset(0 0 0 var(--split, 50%)); }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--split, 50%); width: 2px; background: var(--white); pointer-events: none; }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.compare .lbl { position: absolute; bottom: 10px; font-size: .78rem; background: var(--white); padding: 2px 8px; border-radius: 999px; }

/* Analysis */
.feature { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px 24px; }
@media (min-width: 760px) { .feature { grid-template-columns: 200px 1fr; } }
.feature h3 { font-family: var(--body); font-size: 1rem; font-weight: 600; margin: 0; }
.rec-item { padding: 22px 0; border-bottom: 1px solid var(--line); }
.rec-item dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 12px 0 0; font-size: .95rem; }
.rec-item dt { color: var(--muted); }
.rec-item dd { margin: 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }

/* Tables (admin) */
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); }
.scroll-x { overflow-x: auto; }
.stat { font-family: var(--display); font-size: 2rem; line-height: 1.1; }

.site-foot { padding: 48px 0; border-top: 1px solid var(--line); margin-top: 80px; font-size: .9rem; color: var(--muted); }
.site-foot .wrap { display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between; }

.spinner { width: 22px; height: 22px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; }
@media (prefers-reduced-motion: no-preference) { .spinner { animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } }
[x-cloak] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Paywall placeholder: decorative bars only, no real content underneath */
.locked { position: relative; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); padding: 20px; overflow: hidden; margin-top: 16px; }
.locked-fake { display: grid; gap: 10px; filter: blur(3px); opacity: .55; }
.locked-fake span { display: block; height: 12px; border-radius: 6px; background: color-mix(in srgb, var(--ink) 22%, transparent); }
.locked-cta { position: relative; margin-top: -40px; padding-top: 12px; background: linear-gradient(to bottom, transparent, var(--white) 40%); }

/* Curated product links */
.shop-links { display: grid; gap: 8px; margin-top: 10px; }
@media (min-width: 760px) { .shop-links { grid-template-columns: repeat(2, 1fr); } }
.shop-link { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); text-decoration: none; }
.shop-link img { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; flex: none; }
.shop-link strong { display: block; font-size: .95rem; line-height: 1.3; }
.shop-link:hover { border-color: var(--accent); }

/* Routine and placement steps */
.steps-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps-list > li { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); }
.steps-list .kind { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.figures { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 16px 0; }
.figures div { padding: 14px; border-radius: var(--r-md); background: var(--white); border: 1px solid var(--line); }
.figures b { display: block; font-family: var(--display); font-size: 1.8rem; font-weight: 500; }
