/* Nails2yu demo. Mobile-first: 360px is the design, wider screens grow from it. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("assets/fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --font-display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Light: her hot magenta, deepened to read on a pale pink-white. */
  --bg: #faf6fa;
  --surface: #ffffff;
  --ink: #170c17;
  --muted: #5b4a5b;
  --line: #e6d9e6;
  --accent: #b3009c;          /* 6.3:1 on --bg */
  --accent-ink: #ffffff;
  --accent-press: #8c007a;
  --lane: #e3cfe1;
  --band: #170c17;
  --band-ink: #faf6fa;
  --focus: #1d4ed8;
  --ok: #17663a;
  --bad: #b3001e;
  --shadow: 0 1px 2px rgb(23 12 23 / 0.06), 0 14px 32px -14px rgb(23 12 23 / 0.3);

  --step--1: clamp(0.88rem, 0.85rem + 0.15vw, 0.95rem);
  --step-0: clamp(1.06rem, 1rem + 0.25vw, 1.15rem);
  --step-2: clamp(2rem, 1.4rem + 2.6vw, 3.4rem);
  --gutter: 1rem;
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark is her booking page's world, done properly: black with neon magenta. */
    --bg: #0c070c;
    --surface: #1a0f1a;
    --ink: #f9eef8;
    --muted: #d0bccd;
    --line: #3a2638;
    --accent: #ff5ce8;        /* 7.9:1 on --bg */
    --accent-ink: #1a0418;
    --accent-press: #ff8ff0;
    --lane: #4a2c46;
    --band: #f9eef8;
    --band-ink: #0c070c;
    --focus: #8ab4ff;
    --ok: #7ee2a8;
    --bad: #ff9fb0;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 16px 36px -14px rgb(0 0 0 / 0.8);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4.5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--font-sans);
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h2 { font-size: var(--step-2); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; max-width: 62ch; }
.small { font-size: var(--step--1); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 50; background: var(--surface); padding: 0.6rem 1rem; border-radius: 8px; }
.skip:focus { top: 1rem; }

.demo-banner {
  margin: 0; max-width: none;
  background: var(--band); color: var(--band-ink);
  text-align: center; font-size: var(--step--1); font-weight: 600;
  padding: 0.55rem 1rem;
}

.wrap { width: min(100% - 2 * var(--gutter), 70rem); margin-inline: auto; }

/* --- Header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.7rem var(--gutter);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.wordmark { font-family: var(--font-display); font-weight: 800; font-size: 1.55rem; line-height: 1; text-decoration: none; margin: 0; letter-spacing: -0.03em; }
.wordmark span { color: var(--accent); }
.call-pill {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0.45rem 1rem; border-radius: 999px;
  border: 2px solid var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
}
.call-pill:hover { background: var(--ink); color: var(--bg); }
.call-pill:active { transform: scale(0.96); }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0.8rem 1.4rem; border-radius: 999px;
  font: 700 1rem/1.2 var(--font-sans); text-decoration: none; cursor: pointer;
  border: 2px solid transparent;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 20px -10px var(--accent); }
.btn-primary:hover { background: var(--accent-press); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-small { min-height: 48px; padding: 0.6rem 1.1rem; }

/* --- Hero: a lane draws to your door, and the door opens on her work ------- */
.hero {
  display: grid;
  grid-template-areas: "title" "journey" "copy";
  padding: 1.2rem var(--gutter) 2rem;
  column-gap: 2.5rem;
}
.hero-title {
  grid-area: title;
  font-size: clamp(2.5rem, 1.5rem + 5vw, 4.9rem);
  line-height: 0.95;
  margin-bottom: 0.2em;
  /* Tier 1: extruded type, stacked hard shadows in her magenta. */
  text-shadow: 1px 1px 0 color-mix(in srgb, var(--accent) 40%, var(--bg)), 2px 2px 0 color-mix(in srgb, var(--accent) 25%, var(--bg)), 3px 3px 0 color-mix(in srgb, var(--accent) 12%, var(--bg));
}
.hero-title .hl { color: var(--accent); }

.journey {
  grid-area: journey;
  position: relative;
  width: min(100%, 26rem);
  aspect-ratio: 360 / 200;
  margin: 0.2rem 0 1.2rem;
  perspective: 800px;
}
.route { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transform: translateY(calc(var(--p, 0) * 22px)); }
.lane, .lane-draw { fill: none; stroke-linecap: round; }
.lane { stroke: var(--lane); stroke-width: 12; }
.lane-draw { stroke: var(--accent); stroke-width: 4; stroke-dasharray: 0.03 0.025; }
.start { fill: var(--accent); }
.door {
  position: absolute;
  left: calc(276 / 360 * 100%); top: calc(96 / 200 * 100%);
  width: 46%; aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--accent);
  box-shadow: var(--shadow), 0 0 0 8px color-mix(in srgb, var(--accent) 14%, transparent);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(calc(1 + var(--p, 0) * 0.22));
  transition: transform 0.3s ease;
}
.door img { width: 100%; height: 100%; object-fit: cover; }
.tag {
  position: absolute; z-index: 2;
  font: 800 0.85rem/1 var(--font-display); letter-spacing: -0.01em;
  padding: 0.3rem 0.55rem; border-radius: 999px;
  background: var(--ink); color: var(--bg);
}
.tag-start { left: 0; top: calc(168 / 200 * 100% + 12px); }
.tag-end { left: calc(276 / 360 * 100%); top: calc(96 / 200 * 100% + 23% * 360 / 200 - 6px); translate: -50% 0; background: var(--accent); color: var(--accent-ink); }

/* Motion only once script.js says so: everything above is the finished, still
   frame. One run of about two seconds, then it rests: transform and opacity
   only, apart from the short line draw. */
@media (prefers-reduced-motion: no-preference) {
  .motion-on .lane-draw {
    stroke-dasharray: 1 1;
    animation: draw 1.3s cubic-bezier(0.45, 0, 0.2, 1) 0.15s both, dashes 0.01s linear 1.5s forwards;
  }
  .motion-on .start { transform-box: fill-box; transform-origin: center; animation: pop 0.4s ease-out both; }
  .motion-on .door { animation: door-open 0.8s cubic-bezier(0.2, 0.9, 0.25, 1.2) 1.25s both; }
  .motion-on .tag-start { animation: fade-up 0.4s ease-out 0.1s both; }
  .motion-on .tag-end { animation: fade-up 0.4s ease-out 1.8s both; }
}
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes dashes { to { stroke-dasharray: 0.03 0.025; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes door-open {
  from { opacity: 0; scale: 0.12; }
  to { opacity: 1; scale: 1; }
}

.hero-copy { grid-area: copy; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 1rem; }
.hero-lede { font-size: 1.1rem; color: var(--muted); }
.rating { font-weight: 700; margin: 0; }
.stars { color: var(--accent); letter-spacing: 0.08em; margin-right: 0.3rem; }

/* --- Sections ----------------------------------------------------------- */
.section { padding: 3.5rem 0; content-visibility: auto; contain-intrinsic-size: auto 800px; }
.two-col { display: grid; gap: 1.8rem; }
.example-note {
  display: inline-block; font-size: var(--step--1); font-weight: 600;
  padding: 0.35rem 0.7rem; border-radius: 8px; margin-top: 0.4rem;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--ink);
}
.card-3d { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.25s ease; }

/* Area checker */
.checker {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.2rem;
}
.check-form label { display: block; font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 0.6rem; }
.check-row { display: flex; gap: 0.5rem; }
.check-row input { flex: 1; min-width: 0; }
.check-answer { min-height: 1.6em; font-weight: 700; margin: 0.7rem 0 0.4rem; }
.check-answer.is-yes { color: var(--ok); }
.check-answer a { color: var(--accent); }
.pins { list-style: none; padding: 0; margin: 0.4rem 0 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pins li {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.3rem 0.7rem 0.3rem 0.5rem; border-radius: 999px;
  border: 1px solid var(--line); font-size: var(--step--1); font-weight: 600;
}
.pins li::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50% 50% 50% 0; rotate: -45deg; background: var(--accent); }
.pins li.is-match { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }

/* Gallery */
.gallery { list-style: none; padding: 0; margin-top: 1.4rem; display: grid; gap: 1rem; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.gallery figcaption { font-weight: 700; margin-top: 0.5rem; }

/* Prices */
.price-groups { display: grid; gap: 1rem; margin-top: 1.4rem; }
.price-group {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.1rem 1.2rem 0.6rem;
}
.price-group h3 { color: var(--accent); }
.price-group dl { margin: 0; }
.price-group dl > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-top: 1px solid var(--line); }
.price-group dt { font-weight: 500; }
.price-group dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Reviews */
.quotes { display: grid; gap: 1rem; margin-top: 1.4rem; }
.quote {
  margin: 0; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--accent);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem 1.3rem 1rem;
}
.quote blockquote { margin: 0 0 0.7rem; }
.quote blockquote p { font-size: 1.12rem; margin: 0; }
.quote figcaption { font-weight: 700; color: var(--muted); font-size: var(--step--1); }

/* Hours and booking */
.open-now { font-weight: 700; display: flex; align-items: center; gap: 0.5rem; }
.open-now::before { content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--muted); flex: none; }
.open-now.is-open::before { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 25%, transparent); }
.hours { border-collapse: collapse; width: 100%; max-width: 26rem; }
.hours th, .hours td { text-align: left; padding: 0.5rem 0.2rem; border-bottom: 1px solid var(--line); }
.hours th { font-weight: 600; }
.hours .is-today th, .hours .is-today td { color: var(--accent); font-weight: 800; }
.book-note { margin-top: 0.8rem; padding: 0.7rem 0.9rem; border-radius: 10px; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); font-weight: 600; }
.or-call { margin-top: 1rem; }

input, textarea {
  font: inherit; color: var(--ink); background: var(--bg);
  border: 2px solid var(--line); border-radius: 10px; padding: 0.7rem 0.8rem; min-height: 48px; width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:hover, textarea:hover { border-color: color-mix(in srgb, var(--ink) 45%, var(--line)); }
.ask-form {
  display: grid; gap: 0.9rem; margin-top: 1.6rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.2rem;
}
.ask-form h3 { margin: 0; }
.field { display: grid; gap: 0.35rem; }
.field > label { font-weight: 700; }
.optional { font-weight: 400; color: var(--muted); }
.field.is-valid input { border-color: var(--ok); }
.field.is-invalid input { border-color: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 18%, transparent); }
.field-msg { margin: 0; font-size: var(--step--1); font-weight: 600; color: var(--bad); }
.field-msg:empty { display: none; }
.form-done { border-radius: 10px; padding: 1rem; background: color-mix(in srgb, var(--ok) 14%, var(--surface)); }
.form-done p { margin: 0 0 0.4rem; }

/* Footer and call bar */
.site-footer { background: var(--band); color: var(--band-ink); padding: 2.5rem 0 6rem; }
.site-footer .wordmark { font-size: 2rem; margin-bottom: 0.8rem; }
.site-footer .wordmark span { color: inherit; }
.call-bar {
  position: fixed; left: var(--gutter); right: var(--gutter); bottom: 0.8rem; z-index: 30;
  display: flex; align-items: center; justify-content: center; min-height: 54px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none;
  box-shadow: 0 10px 26px -8px rgb(0 0 0 / 0.45);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.call-bar.is-tucked { transform: translateY(150%); opacity: 0; }

/* --- Scroll scenes: hidden states only exist once script.js has run ------- */
@media (prefers-reduced-motion: no-preference) {
  /* Area: the place pins drop in one after another. */
  .scenes-on [data-scene="pins"] .pins li { opacity: 0; transform: translateY(-10px); transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.4); transition-delay: calc(var(--i, 0) * 60ms); }
  .scenes-on [data-scene="pins"].is-in .pins li { opacity: 1; transform: none; }
  /* Work: each photo opens out of a circle, like the door in the hero. */
  .scenes-on [data-scene="open"] img { clip-path: circle(22% at 50% 50%); transition: clip-path 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .scenes-on [data-scene="open"] li:nth-child(2) img { transition-delay: 0.12s; }
  .scenes-on [data-scene="open"] li:nth-child(3) img { transition-delay: 0.24s; }
  .scenes-on [data-scene="open"].is-in img { clip-path: circle(75% at 50% 50%); }
  /* Prices: rows step in, group by group. */
  .scenes-on [data-scene="steps"] .price-group { opacity: 0; transform: translateY(24px); transition: opacity 0.5s ease, transform 0.5s ease; }
  .scenes-on [data-scene="steps"] .price-group:nth-child(2) { transition-delay: 0.1s; }
  .scenes-on [data-scene="steps"] .price-group:nth-child(3) { transition-delay: 0.2s; }
  .scenes-on [data-scene="steps"].is-in .price-group { opacity: 1; transform: none; }
  /* Reviews: lift into place. */
  .scenes-on [data-scene="lift"] .quote { opacity: 0; transform: translateY(28px) rotate(-1deg); transition: opacity 0.55s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .scenes-on [data-scene="lift"] .quote:nth-child(2) { transition-delay: 0.1s; }
  .scenes-on [data-scene="lift"] .quote:nth-child(3) { transition-delay: 0.2s; }
  .scenes-on [data-scene="lift"].is-in .quote { opacity: 1; transform: none; }
}

/* --- Wider screens -------------------------------------------------------- */
@media (min-width: 48rem) {
  :root { --gutter: 2rem; }
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    grid-template-areas: "title journey" "copy journey";
    grid-template-rows: auto 1fr;
    align-items: start;
    padding-top: 3rem; padding-bottom: 3rem;
    width: min(100%, 76rem); margin-inline: auto;
  }
  .journey { width: 100%; max-width: 34rem; align-self: center; margin: 0; }
  .two-col { grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .price-groups { grid-template-columns: repeat(3, 1fr); }
  .quotes { grid-template-columns: repeat(3, 1fr); }
  .quote:nth-child(2) { margin-top: 2rem; }
  .call-bar { display: none; }
  .site-footer { padding-bottom: 2.5rem; }
}

@media print {
  .demo-banner, .call-bar, .journey, .ask-form { display: none; }
}
