/* ==========================================================================
   Web Designs by Haven: styles
   Mobile first. Breakpoints: 640px, 900px, 1200px.
   ========================================================================== */

:root {
  /* Colour */
  --white: #ffffff;
  --ink: #141414;          /* near-black text */
  --ink-soft: #4a4a4a;     /* secondary text: 8.9:1 on white, 6.3:1 on hero grey */
  --line: #e4e4e4;
  --line-strong: #c9c9c9;
  --accent: #8a4b3a;       /* restrained clay: 6.7:1 on white */
  --accent-soft: #f5eeeb;
  --error: #b3261e;        /* 6.5:1 on white */
  --hero-grey: #dadbdf;    /* sampled from the backdrop of "the designer hero.png" */

  /* Type */
  --font-serif: "Playfair Display", "Didot", "Bodoni 72", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --gutter: 20px;
  --max: 1160px;
  --header-h: 72px;
  --radius: 4px;

  /* Motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

[hidden] { display: none !important; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }

a { color: inherit; }

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

section[id], main [id] { scroll-margin-top: calc(var(--header-h) + 16px); }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -100px;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
  text-decoration: none;
  border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 48px;
  padding: 0 28px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font: 500 .95rem/1 var(--font-sans);
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.btn:hover { background: var(--accent); border-color: var(--accent); }

.btn--outline { background: transparent; color: var(--ink); }
.btn--outline:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }

.btn--small { min-height: 40px; padding: 0 18px; font-size: .875rem; }
.btn--large { min-height: 56px; padding: 0 40px; font-size: 1rem; }

.btn[disabled] { opacity: .6; cursor: progress; }

.text-link {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.text-link:hover { color: var(--ink); }

.eyebrow {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fffcf6; /* cream, from the Figma header */
  border-bottom: 1px solid #d7d7d7;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .06);
}

.nav {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

/* The header runs full width (logo about 40px from the left edge, as in Figma) */
.site-header .nav { max-width: none; padding-inline: clamp(16px, 2.7vw, 40px); }

.logo {
  display: block;
  align-self: flex-end;  /* the bottom swash meets the header's bottom line, as in Figma */
  margin-left: -8px;
  margin-right: auto;
  line-height: 0;
}
.logo img { width: clamp(140px, 15.2vw, 228px); height: auto; }

.wordmark {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-style: italic;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: .01em;
  margin-right: auto;
}

.nav__toggle {
  order: 2;
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--ink);
}
.nav__toggle-bars,
.nav__toggle-bars::before,
.nav__toggle-bars::after {
  display: block;
  width: 20px; height: 1.5px;
  background: currentColor;
  transition: transform .25s var(--ease), opacity .2s;
}
.nav__toggle-bars { position: relative; }
.nav__toggle-bars::before,
.nav__toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav__toggle-bars::before { top: -6px; }
.nav__toggle-bars::after  { top: 6px; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars { background: transparent; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars::after  { transform: translateY(-6px) rotate(-45deg); }

.nav__links {
  list-style: none;
  display: none;
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: #fffcf6;
  border-bottom: 1px solid var(--line);
  padding: 8px var(--gutter) 16px;
}
.nav__links.is-open { display: block; }
.nav__links a {
  display: block;
  padding: 12px 0;
  text-decoration: none;
  font-size: 1.05rem;
}
.nav__links a:hover { color: var(--accent); }

/* Without JavaScript, skip the menu button and just show the links inline. */
html:not(.js) .nav__toggle { display: none; }
html:not(.js) .nav__links {
  display: flex;
  gap: 16px;
  position: static;
  padding: 0;
  border: 0;
  background: none;
}

@media (min-width: 760px) {
  :root { --header-h: 97px; }
  .nav { gap: 36px; }
  .nav__toggle { display: none; }
  .nav__links {
    display: flex;
    gap: 32px;
    position: static;
    padding: 0;
    border: 0;
    background: none;
    order: 0;
  }
  .nav__links a {
    padding: 6px 0;
    font-size: .9rem;
    letter-spacing: .02em;
    background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
    transition: background-size .3s var(--ease), color .2s;
  }
  .nav__links a:hover { background-size: 100% 1px; color: var(--ink); }
}

/* ---------- Hero: "Freelance Web Design / Haven Burke" ---------- */
.hero {
  background: var(--white);
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: flex-start;
  padding: clamp(110px, 21.3vh, 220px) 0 80px;
}
.hero__inner { text-align: center; }
.hero__kicker {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(1rem, 1.6vw, 1.5rem);
  letter-spacing: .01em;
  color: var(--ink);
  margin: 0 0 clamp(28px, 3.6vw, 56px);
}
.hero__title {
  font-family: "Instrument Serif", "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(3.4rem, 6.55vw, 7rem); /* about 98px on a 1500px-wide screen, as in Figma */
  line-height: 1;
  letter-spacing: -0.005em;
  margin: 0;
}

/* ---------- Sections ---------- */
.section { padding: 88px 0; }

@media (min-width: 900px) {
  .section { padding: 128px 0; }
}

.section-head {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 56px;
}
.section-head--left { text-align: left; margin-left: 0; }

.section-title {
  font-size: clamp(2.1rem, 6vw, 3.4rem);
}

.section-intro {
  margin-top: 1.25rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.section-cta {
  text-align: center;
  color: var(--ink-soft);
  margin: 56px 0 0;
}

/* ---------- Work showcase / laptop ---------- */
.work { background: var(--white); padding-top: 40px; }

.showcase { max-width: 900px; margin: 0 auto; }

.laptop {
  position: relative;
  width: 84%;
  max-width: 780px;
  margin: 0 auto;
  isolation: isolate; /* keeps the shadow (z-index: -1) inside the laptop */
}

/* Lid: black bezel with a camera dot */
.laptop__lid {
  position: relative;
  background: #111214;
  border-radius: 3.2% 3.2% 0 0 / 5% 5% 0 0;
  padding: 3% 2.6% 2.6%;
  box-shadow:
    inset 0 0 0 1px #2c2d31,
    inset 0 0 0 2px #0a0a0b;
}
.laptop__lid::before {
  content: "";
  position: absolute;
  top: 1.25%;
  left: 50%;
  width: .9%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #2a2c31;
  box-shadow: inset 0 0 0 1px #3a3d44;
}

.laptop__screen {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f3f3f3;
  border-radius: 2px;
}

.laptop__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}
.laptop__slide.is-active { opacity: 1; }

/* Subtle glass sheen across the screen */
.laptop__screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.08) 0%, rgba(255,255,255,0) 38%);
  z-index: 2;
}

/* Base: aluminium deck, slightly wider than the lid, with a thumb notch */
.laptop__base {
  position: relative;
  width: 118%;
  margin-left: -9%;
  aspect-ratio: 100 / 3.4;
  background: linear-gradient(to bottom, #e9eaed 0%, #d3d5d9 45%, #a9acb2 100%);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  box-shadow: inset 0 1px 0 #f7f7f8;
}
.laptop__base::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 15%;
  height: 42%;
  background: linear-gradient(to bottom, #b9bcc1, #d0d2d6);
  border-radius: 0 0 12px 12px / 0 0 8px 8px;
}

.laptop__shadow {
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: -26px;
  height: 40px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.22) 0%, rgba(0,0,0,.08) 45%, rgba(0,0,0,0) 72%);
  z-index: -1;
  filter: blur(4px);
}

.showcase__caption {
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  margin: 56px 0 14px;
  min-height: 1.6em;
}

.showcase__controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.showcase__dots { display: flex; gap: 2px; }

.showcase__dot {
  position: relative;
  width: 28px; height: 28px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.showcase__dot::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 8px; height: 8px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid var(--ink-soft);
  background: transparent;
  transition: background-color .3s, border-color .3s, transform .3s var(--ease);
}
.showcase__dot:hover::before { border-color: var(--ink); }
.showcase__dot[aria-current="true"]::before {
  background: var(--ink);
  border-color: var(--ink);
  transform: translate(-50%, -50%) scale(1.15);
}

.showcase__pause {
  width: 32px; height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
  color: var(--ink);
}
.showcase__pause:hover { border-color: var(--ink); }
/* Pause icon (two bars) / play icon (triangle) */
.showcase__pause-icon {
  width: 8px; height: 10px;
  border-left: 2.5px solid currentColor;
  border-right: 2.5px solid currentColor;
}
.showcase__pause.is-paused .showcase__pause-icon {
  width: 0; height: 0;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent currentColor;
  margin-left: 2px;
}

/* ---------- Services / tiers ---------- */
.services { border-top: 1px solid var(--line); }

.tiers {
  list-style: none;
  display: grid;
  gap: 24px;
}

.tier {
  display: flex;
  flex-direction: column;
  padding: 36px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.tier:hover {
  border-color: var(--line-strong);
  box-shadow: 0 18px 40px -28px rgba(0, 0, 0, .25);
}

.tier__name { font-size: 1.75rem; margin-bottom: .75rem; }

.tier__desc { color: var(--ink-soft); }

.tier__list {
  list-style: none;
  margin: 8px 0 28px;
  border-top: 1px solid var(--line);
}
.tier__list li {
  position: relative;
  padding: 11px 0 11px 22px;
  border-bottom: 1px solid var(--line);
  font-size: .95rem;
}
.tier__list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 1.15em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.tier__price {
  margin-top: auto;
  font-size: .9rem;
  color: var(--ink-soft);
}
.tier__price span {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  color: var(--ink);
  margin-left: .25em;
}

.tier .btn { align-self: flex-start; }

@media (min-width: 900px) {
  .tiers { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- About ---------- */
.about { background: var(--accent-soft); }

.about__inner {
  display: grid;
  gap: 8px;
  max-width: 1000px;
}

.about__body { max-width: 38rem; margin-top: clamp(24px, 3vw, 40px); }
.about__body p { color: var(--ink-soft); }
.about__lead {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3.4vw, 1.7rem);
  line-height: 1.4;
  color: var(--ink) !important;
  margin-bottom: 1.25em;
}
.about__body .btn { margin-top: 1rem; }

/* Heading and text on the left, photo beside them on the right (laptops).
   Phones: heading, photo, then text. */
.about__inner { max-width: 1040px; }
.about .section-head { margin-bottom: 0; }
.about__photo {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin-top: clamp(24px, 5vw, 32px);
  border-radius: var(--radius);
}
@media (min-width: 900px) {
  .about__inner { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); column-gap: clamp(48px, 6vw, 88px); row-gap: 0; }
  .about .section-head { grid-column: 1; grid-row: 1; }
  .about .about__body  { grid-column: 1; grid-row: 2; }
  /* Fill from the top of the heading to the bottom of the buttons; the photo is cropped to fit.
     contain: size stops the photo's own height from stretching the text column. */
  .about .about__photo {
    grid-column: 2; grid-row: 1 / span 2; align-self: stretch;
    width: 100%; height: 100%; max-width: none; margin-top: 0;
    object-fit: cover; object-position: 50% 30%;
    contain: size;
  }
}

/* ---------- Quote form ---------- */
.quote__inner { max-width: 820px; }

.quote-form {
  display: grid;
  gap: 28px;
}

.form-grid { display: grid; gap: 24px; }
@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid--3 { grid-template-columns: repeat(3, 1fr); }
}

.field { display: flex; flex-direction: column; min-width: 0; }

.field label,
.field .label,
.fieldset legend {
  font-size: .9rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.field__optional {
  font-weight: 400;
  color: var(--ink-soft);
  font-size: .85em;
}

.req-mark { color: var(--accent); }

.field__hint {
  font-size: .85rem;
  color: var(--ink-soft);
  margin: -2px 0 10px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  padding: 13px 14px;
  font: inherit;
  font-size: 1rem; /* 16px stops iOS zooming on focus */
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 150px; }

input::placeholder, textarea::placeholder { color: #767676; } /* 4.5:1 on white */

input:hover, textarea:hover { border-color: #9a9a9a; }

input:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(138, 75, 58, .35);
}

[aria-invalid="true"] { border-color: var(--error) !important; }

.field__error {
  color: var(--error);
  font-size: .85rem;
  margin: 6px 0 0;
  min-height: 0;
}
.field__error:empty { display: none; }
.field__error::before { content: "! "; font-weight: 700; }
.field__error:empty::before { content: none; }

.fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.fieldset legend { padding: 0; margin-bottom: 12px; }

/* Tier radio "chips" */
.tier-options {
  display: grid;
  gap: 10px;
}
@media (min-width: 640px) {
  .tier-options { grid-template-columns: repeat(3, 1fr); }
}

.tier-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.tier-option:hover { border-color: var(--ink); }
.tier-option input {
  width: 18px; height: 18px;
  margin: 0;
  accent-color: var(--ink);
  flex: none;
}
.tier-option:has(input:checked) {
  border-color: var(--ink);
  background: #fafafa;
  box-shadow: inset 0 0 0 1px var(--ink);
}
.tier-option:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.fieldset.is-invalid .tier-option { border-color: var(--error); }

.tier-option.is-highlighted { animation: pulse 1.2s var(--ease) 1; }
@keyframes pulse {
  0%   { background: var(--accent-soft); }
  100% { background: #fafafa; }
}

/* Upload dropzone */
.dropzone {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #fcfcfc;
  transition: border-color .2s, background-color .2s;
}
.dropzone.is-dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.dropzone__label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 16px;
  cursor: pointer;
  text-align: center;
}
.dropzone__or { color: var(--ink-soft); font-size: .9rem; }
.dropzone__input:focus-visible + .dropzone__label .btn {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.thumbs {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.thumbs:empty { display: none; }

.thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: #f0f0f0;
  border: 1px solid var(--line);
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb__name {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 3px 6px;
  font-size: .7rem;
  background: rgba(255, 255, 255, .9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.thumb__remove {
  position: absolute;
  top: 4px; right: 4px;
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 20, 20, .82);
  color: var(--white);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.thumb__remove:hover { background: var(--error); }

.form-actions { padding-top: 4px; }
@media (max-width: 639px) {
  .form-actions .btn { width: 100%; }
}

.form-error-summary {
  padding: 14px 16px;
  border-left: 3px solid var(--error);
  background: #fdf2f1;
  color: var(--error);
  font-size: .95rem;
}

/* Confirmation */
.confirmation {
  text-align: center;
  padding: 56px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.confirmation__title {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin-bottom: 1rem;
}
.confirmation__title:focus { outline: none; }
.confirmation p { color: var(--ink-soft); max-width: 30rem; margin-inline: auto; }
.confirmation__note {
  font-size: .85rem;
  background: var(--accent-soft);
  padding: 10px 14px;
  border-radius: var(--radius);
}
.confirmation .btn { margin-top: 1rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
  font-size: .9rem;
}

.footer__inner {
  display: grid;
  gap: 28px;
}

.wordmark--footer { margin: 0 0 4px; font-size: 1.8rem; }
.footer__tag { color: var(--ink-soft); margin: 0; }

.footer__links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}
.footer__links a {
  text-decoration: none;
  display: inline-block;
  padding: 12px 0; /* at least 44px tall, easy to tap */
}
.footer__links a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }

.footer__copy { color: var(--ink-soft); margin: 0; font-size: .8rem; }

@media (min-width: 900px) {
  .footer__inner {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
  .footer__copy { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--line); }
}

/* ---------- Scroll fade-ins ---------- */
/* Only hide content when JS is running, so the page is never blank without it. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Hero actions ---------- */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 24px;
}
@media (min-width: 900px) {
  .hero__actions { justify-content: flex-start; }
}

/* ---------- Consultation + question ---------- */
.booking { border-top: 1px solid var(--line); }

.contact-grid {
  display: grid;
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

.contact-card {
  display: flex;
  flex-direction: column;
  padding: 36px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
@media (min-width: 640px) {
  .contact-card { padding: 44px 40px; }
}
.contact-card > p { color: var(--ink-soft); }

.contact-card__title {
  font-size: 1.9rem;
  margin-bottom: .75rem;
}

.consult { background: var(--accent-soft); border-color: transparent; }

.consult__meta {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent) !important;
  margin-bottom: 1rem;
}
.consult__price {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink);
  margin-right: .15em;
}
.consult .tier__list { border-top-color: rgba(0, 0, 0, .08); }
.consult .tier__list li { border-bottom-color: rgba(0, 0, 0, .08); }
.consult .btn { align-self: flex-start; margin-top: auto; }
.consult__soon { margin-top: auto; font-size: .95rem; }

.question-form {
  display: grid;
  gap: 20px;
  margin-top: 8px;
}
.question-form .btn { justify-self: start; }

.question__done { margin-top: 8px; }
.question__done-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  line-height: 1.35;
  margin-bottom: .5rem;
}
.question__done-title:focus { outline: none; }
.question__done p { color: var(--ink-soft); }
.question__again {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

/* ==========================================================================
   INTRO: "Hello!" → "I've got you." (five snapping screens)
   Positions come from the 1440 × 1024 Figma frames: on landscape screens each
   slide is a scaled copy of the frame (sizes in cqw = % of frame width), cropped
   to cover the screen. Portrait screens (phones) get their own layout below.
   Without JavaScript, or with reduced motion, the screens simply stack.
   ========================================================================== */
.intro {
  --intro-ink: #0e0e0e;
  position: relative;
  background: #fff;
}

.intro__slide {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--slide-bg, #fff);
}
.intro__slide--hello { --slide-bg: #eef0f3; } /* sampled from the Figma frame */

/* Stacked, snapping mode (turned on by js/main.js) */
.intro.is-snapping {
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.intro.is-snapping .intro__slide {
  position: absolute;
  inset: 0;
  height: auto;
  visibility: hidden;
  z-index: 1;
  will-change: transform;
}
.intro.is-snapping .intro__slide.is-current { visibility: visible; z-index: 2; }
.intro.is-snapping .intro__slide.is-incoming { visibility: visible; z-index: 3; }

/* The scaled 1440 × 1024 design frame */
.intro__frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100%, 140.625svh); /* 1440 / 1024 = 1.40625 */
  aspect-ratio: 1440 / 1024;
  transform: translate(-50%, -50%);
  container-type: inline-size;
}

.intro__line {
  position: absolute;
  margin: 0;
  font-family: "Instrument Serif", "Times New Roman", serif;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.005em;
  color: var(--intro-ink);
  white-space: nowrap;
  z-index: 2;
}

.intro__img {
  position: absolute;
  display: block;
  max-width: none;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

/* 1. Hello! */
/* Hands fill the frame from the top (image is the full 1440 × 1016 Figma frame); "Hello!" sits lower left */
.intro__slide--hello .intro__line { left: 14.5%; top: 76.9%; transform: translateY(-50%); font-size: 8.1cqw; }
.intro__slide--hello .intro__img  { left: 0; top: 0; width: 100%; }
/* On screens wider than the design, trim from the top (the arms already run off it)
   so the nail tips at the bottom always show. */
.intro__slide--hello .intro__frame { top: auto; bottom: 0; transform: translateX(-50%); }

/* 2. Looking for this? */
.intro__slide--looking .intro__line { left: 50%; top: 19.4%; transform: translate(-50%, -50%); font-size: 6.8cqw; }
.intro__face {
  position: absolute;
  left: 12.15%; top: 25.6%; width: 79.17%;
  aspect-ratio: 1900 / 1270;
}
.intro__face > .intro__img {
  inset: 0; width: 100%; height: 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 9%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 9%);
}

/* Eye windows, measured on intro-face.jpg (1900 × 1270): left eye 590,1100 and
   right eye 1045,1105, each about 225 × 100 px. The copy inside is the full photo,
   lined up exactly, so at rest nothing changes; js/main.js nudges it toward the mouse. */
.intro__eye {
  position: absolute;
  overflow: hidden;
  top: 86.61%;
  width: 11.84%;
  height: 7.87%;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 55%, #000 45%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 55%, #000 45%, transparent 100%);
}
.intro__eye--left  { left: 31.05%; --eye-l: 590; --eye-t: 1100; }
.intro__eye--right { left: 55%; top: 87.01%; --eye-l: 1045; --eye-t: 1105; }
.intro__eye img {
  position: absolute;
  max-width: none;
  width: calc(1900 / 225 * 100%);
  height: auto;
  left: calc(var(--eye-l) / 225 * -100%);
  top: calc(var(--eye-t) / 100 * -100%);
  will-change: transform;
}

/* 3. Or maybe this? */
.intro__slide--maybe .intro__line { left: 5.9%; top: 50.2%; transform: translateY(-50%); font-size: 6.7cqw; line-height: 1.12; }
.intro__slide--maybe .intro__img  { left: 34.03%; top: 13.18%; width: 63.19%; }

/* Live Lucky Tips slot machine: laid out at 860px wide, then scaled as one piece
   to fit this box (js/main.js sets the scale). Placed where the machine sits in Figma. */
.intro__slot {
  position: absolute;
  left: 34.4%;
  top: 14.2%;
  width: 60.5%;
  z-index: 2;
}
.intro__slot-inner {
  width: var(--slot-layout-width, 860px); /* phones use a narrower layout so buttons stay readable */
  transform-origin: 0 0;
}
.intro__slot #lucky-slot .lts-result { display: none; } /* the result text isn't part of the Figma screen */
.js .intro__slots-static { display: none; }
html:not(.js) .intro__slot { display: none; }

/* "this?" turns red once each swipe has settled (js/main.js adds .is-settled) */
.intro__this { transition: color .2s ease; }
.intro.is-snapping .intro__slide.is-settled .intro__this,
.intro:not(.is-snapping) .intro__this { color: #b52137; }

/* 4. How about this? */
.intro__slide--how .intro__line { left: 50.3%; top: 46.4%; transform: translate(-50%, -50%); font-size: 6.2cqw; }
.intro__slide--how .intro__img--left  { left: 0; top: 0; width: 33.19%; }
.intro__slide--how .intro__img--right { left: 67.92%; top: 0; width: 32.08%; }

/* 5. I've got you. */
.intro__slide--got .intro__line { left: 50%; top: 46.9%; transform: translate(-50%, -50%); font-size: 6.3cqw; }
.intro__box {
  position: relative;
  display: inline-block;
  padding: .26em .36em .3em;
  border: max(1.5px, .14cqw) dashed var(--intro-ink);
}
.intro__cursor {
  position: absolute;
  left: calc(100% + .1em);
  top: calc(100% - .02em);
  width: .62em;
  height: .62em;
  overflow: visible;
  transform-origin: 0 0; /* the arrow tip */
}

/* "I've got you.": once the swipe settles, the cursor glides onto the words,
   clicks, and the words + dashed frame turn #B52137. Resets when the screen leaves. */
.intro__box { transition: color .2s ease, border-color .2s ease; }
.intro.is-snapping .intro__slide--got.is-settled .intro__cursor {
  animation: intro-cursor-click 1s cubic-bezier(.45, 0, .25, 1) .15s both;
}
.intro.is-snapping .intro__slide--got.is-settled .intro__box {
  color: #b52137;
  border-color: #b52137;
  transition-delay: .8s; /* lands on the click */
}
@keyframes intro-cursor-click {
  0%   { transform: translate(0, 0) scale(1); }
  62%  { transform: translate(-1.25em, -.8em) scale(1); }
  70%  { transform: translate(-1.25em, -.8em) scale(.78); } /* press */
  80%  { transform: translate(-1.25em, -.8em) scale(1); }   /* release */
  100% { transform: translate(-1.25em, -.8em) scale(1); }
}
/* No snapping (reduced motion / no JavaScript): show the clicked state. */
.intro:not(.is-snapping) .intro__box { color: #b52137; border-color: #b52137; }
.intro:not(.is-snapping) .intro__cursor { transform: translate(-1.25em, -.8em); }

/* White-background screens scale to fit (never crop the SPIN button or the box);
   photo screens above scale to fill. */
.intro__slide--looking .intro__frame,
.intro__slide--maybe .intro__frame,
.intro__slide--got .intro__frame { width: min(100%, 140.625svh); }

/* ---------- Portrait screens (phones, tall tablets) ---------- */
@media (max-aspect-ratio: 1/1) {
  .intro__frame {
    inset: 0;
    width: auto;
    aspect-ratio: auto;
    transform: none;
  }
  .intro__slide--looking .intro__frame,
  .intro__slide--maybe .intro__frame,
  .intro__slide--got .intro__frame { width: auto; }

  .intro__slide--hello .intro__frame { inset: 0; transform: none; }
  .intro__slide--hello .intro__line { left: 9%; top: auto; bottom: 13%; transform: none; font-size: 17cqw; }
  .intro__slide--hello .intro__img  { left: 50%; top: 0; width: auto; height: 68%; transform: translateX(-50%); }

  .intro__slide--looking .intro__line { top: 17%; font-size: 12.5cqw; }
  .intro__slide--looking .intro__face { left: 50%; top: auto; bottom: 0; width: auto; height: 62%; transform: translateX(-50%); }

  .intro__slide--maybe .intro__line { left: 8%; top: 17%; transform: none; font-size: 15cqw; }
  .intro__slide--maybe .intro__slot { left: 50%; top: auto; bottom: 9%; width: min(100%, 62vh); transform: translateX(-50%); --slot-layout-width: 600px; }
  .intro__slide--maybe .intro__img  { left: 50%; top: auto; bottom: 7%; width: min(96%, 70vh); transform: translateX(-50%); }

  /* "How about this?" (from the phone mockup): both hair pieces side by side across the
     top, slightly cropped at the outer edges, with the text centred underneath. */
  .intro__slide--how .intro__img--left,
  .intro__slide--how .intro__img--right { top: 0; width: auto; transform: none; }
  .intro__slide--how .intro__img--left  { left: auto; right: 55.7%; height: 55%; }
  .intro__slide--how .intro__img--right { left: 56%; right: auto; height: 57%; }
  .intro__slide--how .intro__line {
    left: 49%;
    top: 65.8%;
    width: 42%;
    font-size: 10.1cqw;
    line-height: 1.12;
    text-align: center;
    white-space: normal;
  }

  /* "I've got you." (from the phone mockup): a touch larger and lower, thicker dashes */
  .intro__slide--got .intro__line { top: 48%; font-size: 13.4cqw; }
}

/* Keep phones' cursor and box readable */
@media (max-aspect-ratio: 1/1) and (max-width: 480px) {
  .intro__box { border-width: 2px; }
}

/* Header button: one line; on small phones it just says "Book" */
.nav__cta { white-space: nowrap; gap: .28em; }
@media (max-width: 420px) { .nav__cta-more { display: none; } }
/* ---------- About buttons ---------- */
.about__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(2rem, 4vw, 3rem); }
.about__body .about__actions .btn { margin-top: 0; }

/* ---------- AI policy pop-up ---------- */
.policy {
  width: min(640px, calc(100% - 32px));
  max-height: min(86vh, 900px);
  padding: 0;
  border: 1px solid #d7d7d7;
  border-radius: var(--radius);
  background: #fffcf6;
  color: var(--ink);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .45);
}
.policy::backdrop { background: rgba(20, 20, 20, .45); }
.policy[open] { animation: policy-in .25s var(--ease); }
@keyframes policy-in { from { opacity: 0; transform: translateY(10px); } }
.policy__inner { position: relative; padding: 44px clamp(22px, 5vw, 48px) 40px; }
.policy__title {
  font-family: "Instrument Serif", "Times New Roman", serif;
  font-size: clamp(2.2rem, 6vw, 3rem);
  margin-bottom: 1.25rem;
}
.policy h3 {
  font-family: var(--font-sans);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin: 1.6rem 0 .5rem;
}
.policy p, .policy li { color: var(--ink-soft); }
.policy ul { padding-left: 1.2em; margin: 0; }
.policy li { margin-bottom: .4em; }
.policy__close {
  position: absolute;
  top: 12px; right: 12px;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  background: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}
.policy__close:hover { background: rgba(0, 0, 0, .06); }

.footer__link-btn {
  padding: 12px 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.footer__link-btn:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }

/* Footer logo (same image as the header) */
.footer__logo { display: inline-block; line-height: 0; margin-bottom: 8px; }
.footer__logo img { width: clamp(150px, 14vw, 200px); height: auto; }
