/* ===========================================================================
   THE BODY — Book, phone + tablet (<= 1079px). On top of css/mobile.css.
   Adaptation (no mobile frames in Figma). See MOBILE-CONTRACT.md.
   Section ids from css/book.css. Base rules = tablet + phone; phone-only
   tweaks are in the (max-width: 599px) block at the end.

   CARD PATTERN (doors, booking slot, pickers, channels): each card is an EMPTY
   background element followed by its sibling texts. The section becomes a grid
   whose texts auto-place one per row in the inner column(s); the card background
   is an absolutely positioned grid child spanning its card's rows (absolute grid
   children take no cells, so the texts still auto-place). Row numbers below are
   counted from the markup order in book.html.
   =========================================================================== */

/* section rhythm: ~72px between sections on phones, a little more on tablets */
.page .sec[data-f="298:54"], .page .sec[data-f="298:68"], .page .sec[data-f="299:2"],
.page .sec[data-f="299:36"], .page .sec[data-f="299:63"], .page .sec[data-f="299:91"] {
  padding-top: 48px; padding-bottom: 48px;
}
.page .sec[data-f="298:3"] { padding-bottom: 48px; }

/* eyebrows and one-line values: size to their text (Figma's tight boxes wrap them) */
.page .sec:not(.footer) .t.nw { width: auto; }

/* ---------- 01 hero: two ways to start, two doors stacked ---------- */
.page .sec[data-f="298:3"] {
  --cp: 36px;
  display: grid; grid-template-columns: var(--cp) minmax(0, 1fr) var(--cp);
  row-gap: 0; justify-items: start; align-items: start;
}
.page .sec[data-f="298:3"] > .a { grid-column: 1 / -1; width: auto; }
.page .sec[data-f="298:3"] > [data-f="298:29"] { margin: 14px 0 10px; }
.page .sec[data-f="298:3"] > [data-f="298:31"] { margin-bottom: 32px; }
/* rows: 1 eyebrow · 2 h1 · 3 line · 4-7 door one · 8-11 door two */
.page .sec[data-f="298:3"] > .door {
  position: absolute; inset: 0; width: auto; height: auto; max-width: none;
}
.page .sec[data-f="298:3"] > [data-f="298:34"] { grid-row: 4 / 8; }
.page .sec[data-f="298:3"] > [data-f="298:44"] { grid-row: 8 / 12; top: 14px; }
.page .sec[data-f="298:3"] > :is([data-f="298:35"], [data-f="298:37"], [data-f="298:39"], [data-f="298:42"],
                                 [data-f="298:45"], [data-f="298:47"], [data-f="298:49"], [data-f="298:52"]) { grid-column: 2; }
.page .sec[data-f="298:3"] > [data-f="298:35"] { margin-top: 36px; }
.page .sec[data-f="298:3"] > [data-f="298:45"] { margin-top: calc(14px + 36px); }
.page .sec[data-f="298:3"] > :is([data-f="298:37"], [data-f="298:47"]) { margin: 14px 0 12px; }
.page .sec[data-f="298:3"] > :is([data-f="298:39"], [data-f="298:49"]) { margin-bottom: 26px; }
.page .sec[data-f="298:3"] > :is([data-f="298:42"], [data-f="298:52"]) { width: calc(var(--w) * var(--u)); margin-bottom: 38px; }

/* ---------- 02 pick a time: the booking panel (2026-10-28) ----------
   rows: 1 eyebrow · 2 h2 · 3 terms · 4 copy · 5 Book an Appointment · 6 Call or text.
   The sage panel (#glossgenius-embed) spans rows 4-6 behind its copy and buttons.
   With the live GlossGenius widget (.embed--live, no siblings) it is one 520px row. */
.page .sec[data-f="298:54"] {
  --cp: 32px;
  display: grid; grid-template-columns: var(--cp) minmax(0, 1fr) var(--cp);
  row-gap: 0; justify-items: start; align-items: start;
}
.page .sec[data-f="298:54"] > .a { grid-column: 1 / -1; width: auto; }
.page .sec[data-f="298:54"] > [data-f="298:58"] { margin: 14px 0 6px; }
.page .sec[data-f="298:54"] > [data-f="298:59"] { margin-bottom: 26px; }
.page .sec[data-f="298:54"] > .embed {
  grid-row: 4 / 7; justify-self: stretch; align-self: stretch; height: auto; border-radius: 20px;
}
.page .sec[data-f="298:54"] > .embed--live { grid-row: 4; min-height: 520px; }
.page .sec[data-f="298:54"] > .embed-copy {
  grid-row: 4; grid-column: 2; max-width: 460px; margin: 34px 0 26px;
  font-size: 22px; line-height: 28px; letter-spacing: -0.3px;
}
.page .sec[data-f="298:54"] > :is(.embed-book, .embed-call) { grid-column: 2; width: 284px; }
.page .sec[data-f="298:54"] > .embed-book { grid-row: 5; margin-bottom: 12px; }
.page .sec[data-f="298:54"] > .embed-call { grid-row: 6; margin-bottom: 36px; }

/* ---------- 03 jump to a treatment: four stacked cards, name | price rows ----------
   rows: 1 eyebrow · 2 h2 · card 1 rows 3-13 · card 2 14-20 · card 3 21-33 · card 4 34-44
   (2026-10-28: Massage 2 treatments, Cedar 5, Face 3 + the programs line).
   Each card: number, h3, then (rule, name|price) per treatment, then its Book button
   (Cedar: a Coming Soon pill, also .btn, same box).
   The hairline sits above each row here (markup order), so it also underlines the title. */
.page .sec[data-f="298:68"] {
  --cp: 32px;
  display: grid; grid-template-columns: var(--cp) minmax(0, 1fr) auto var(--cp);
  row-gap: 0; column-gap: 0; justify-items: start; align-items: start;
}
.page .sec[data-f="298:68"] > .a { grid-column: 2 / 4; width: auto; }
.page .sec[data-f="298:68"] > [data-f="298:69"],
.page .sec[data-f="298:68"] > [data-f="298:71"] { grid-column: 1 / -1; }
.page .sec[data-f="298:68"] > [data-f="298:71"] { margin: 14px 0 12px; }
.page .sec[data-f="298:68"] > .picker {
  position: absolute; inset: 16px 0 0; width: auto; height: auto; max-width: none;
  grid-column: 1 / -1;
}
.page .sec[data-f="298:68"] > [data-f="298:74"] { grid-row: 3 / 14; }
.page .sec[data-f="298:68"] > [data-f="298:93"] { grid-row: 14 / 21; }
.page .sec[data-f="298:68"] > [data-f="298:112"] { grid-row: 21 / 34; }
.page .sec[data-f="298:68"] > [data-f="388:2"] { grid-row: 34 / 45; }
.page .sec[data-f="298:68"] > p.k-clay { margin-top: calc(16px + 30px); }            /* 01-04 */
.page .sec[data-f="298:68"] > h3 { margin: 10px 0 18px; }
.page .sec[data-f="298:68"] > .rule { justify-self: stretch; }
.page .sec[data-f="298:68"] > p.hl { grid-column: 2; margin: 14px 0; }                 /* treatment name */
.page .sec[data-f="298:68"] > p.r {                                                     /* duration · price */
  grid-column: 3; justify-self: end; text-align: right;
  max-width: 190px; margin: 18px 0 14px 18px; text-wrap: balance;
}
.page .sec[data-f="298:68"] > .btn { justify-self: stretch; width: auto; margin: 8px 0 30px; }

/* ---------- 04 so nothing is a surprise: 2 x 2 like the desktop row (phone: a list) ---------- */
.page .sec[data-f="299:2"] {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense;
  column-gap: 40px; row-gap: 0; justify-items: start; align-items: start;
}
.page .sec[data-f="299:2"] > .a { grid-column: 1; width: auto; }
.page .sec[data-f="299:2"] > [data-f="299:3"],
.page .sec[data-f="299:2"] > [data-f="299:5"] { grid-column: 1 / -1; }
.page .sec[data-f="299:2"] > [data-f="299:5"] { margin: 14px 0 6px; }
.page .sec[data-f="299:2"] > :is([data-f="299:23"], [data-f="299:26"], [data-f="299:28"]) { grid-column: 1; }
.page .sec[data-f="299:2"] > :is([data-f="299:16"], [data-f="299:19"], [data-f="299:21"],
                                 [data-f="299:30"], [data-f="299:33"], [data-f="299:35"]) { grid-column: 2; }
.page .sec[data-f="299:2"] > .ring44 { width: 44px; height: 44px; margin-top: 34px; }
.page .sec[data-f="299:2"] > h3 { margin: 20px 0 10px; }

/* ---------- 05 call, text or message us: contact cards ----------
   rows: 1 eyebrow · 2 h2 · card 1 rows 3-5 · card 2 6-8 · card 3 9-11 (label, value, note + arrow).
   The Email card (3) is only built when site_flags.STUDIO_EMAIL is set.
   The whole card is the link (a.channel); everything on top of it lets taps through. */
.page .sec[data-f="299:36"] {
  --cp: 30px;
  display: grid; grid-template-columns: var(--cp) minmax(0, 1fr) auto var(--cp);
  row-gap: 0; justify-items: start; align-items: start;
}
.page .sec[data-f="299:36"] > .a { grid-column: 2 / 4; width: auto; pointer-events: none; }
.page .sec[data-f="299:36"] > [data-f="299:37"],
.page .sec[data-f="299:36"] > [data-f="299:39"] { grid-column: 1 / -1; pointer-events: auto; }
.page .sec[data-f="299:36"] > [data-f="299:39"] { margin: 14px 0 10px; }
.page .sec[data-f="299:36"] > .channel {
  position: absolute; inset: 14px 0 0; width: auto; height: auto; max-width: none;
  grid-column: 1 / -1; pointer-events: auto;
}
.page .sec[data-f="299:36"] > [data-f="299:42"] { grid-row: 3 / 6; }
.page .sec[data-f="299:36"] > [data-f="299:49"] { grid-row: 6 / 9; }
.page .sec[data-f="299:36"] > [data-f="299:56"] { grid-row: 9 / 12; }
.page .sec[data-f="299:36"] > p.up.k-mute:not([data-f="299:37"]) { margin-top: calc(14px + 26px); }   /* card labels */
.page .sec[data-f="299:36"] > p.jo { margin: 8px 0 10px; overflow-wrap: anywhere; }
.page .sec[data-f="299:36"] > p.k-clay { grid-column: 2; white-space: normal; margin-bottom: 26px; }
.page .sec[data-f="299:36"] > img.a { grid-column: 3; justify-self: end; align-self: center; width: 13px; height: 9px; margin: 0 2px 26px 16px; }

/* ---------- 06 before you commit: the accordion takes the column ---------- */
.page .sec[data-f="299:63"] > [data-f="299:65"] { margin-bottom: 0; }
.page .sec .faq { width: 100%; margin: 18px 0 0; }
.page .sec .faq-h { text-wrap: pretty; }
.page .sec .faq-item:first-child { border-top: 1px solid var(--hair); }
.page .sec .faq-q {
  gap: 20px; padding: 22px 0 21px;
  font-size: 22px; line-height: 28px; letter-spacing: -0.3px;
}
.page .sec .faq-item.is-open .faq-q { padding-bottom: 12px; }
.page .sec .faq-q span { max-width: none; min-width: 0; }
.page .sec .faq-ic { width: 14px; height: 28px; margin-right: 4px; }
.page .sec .faq-a-in p { max-width: 560px; font-size: 15.5px; line-height: 27px; }
.page .sec .faq-a-in p + p { margin-top: 12px; }
.page .sec .faq-a-in p:last-child { margin-bottom: 24px; }

/* ---------- 07 ready when you are: buttons share a row, then the photo pair ----------
   Main photo to the right, the framed detail overlapping its lower left (as on desktop),
   the clay ornament on the paper beside the detail, under the main photo. */
.page .sec[data-f="299:91"] { flex-direction: row; flex-wrap: wrap; column-gap: 10px; padding-bottom: 64px; }
.page .sec[data-f="299:91"] > .t:not(.btn) { flex-basis: 100%; }
.page .sec[data-f="299:91"] > [data-f="299:95"] { margin: 14px 0 6px; }
.page .sec[data-f="299:91"] > .btn { margin-top: 14px; }
.page .sec[data-f="299:91"] > [data-f="388:37"] { width: 62%; margin: 52px 0 0 auto; }
.page .sec[data-f="299:91"] > [data-f="299:109"] { width: 38%; margin: -30% 0 0 8%; z-index: 1; }
.page .sec[data-f="299:91"] > [data-f="299:105"] {
  width: 128px; height: 128px; margin: 34px 4% 0 auto; pointer-events: none;
}

/* ---------- phones ---------- */
@media (max-width: 599px) {
  .page .sec[data-f="298:54"], .page .sec[data-f="298:68"], .page .sec[data-f="299:2"],
  .page .sec[data-f="299:36"], .page .sec[data-f="299:63"], .page .sec[data-f="299:91"] {
    padding-top: 36px; padding-bottom: 36px;
  }
  .page .sec[data-f="298:3"] { padding-bottom: 36px; }
  .page .sec[data-f="299:91"] { padding-bottom: 56px; }

  .page .sec[data-f="298:3"] { --cp: 24px; }
  .page .sec[data-f="298:3"] > [data-f="298:35"] { margin-top: 30px; }
  .page .sec[data-f="298:3"] > [data-f="298:45"] { margin-top: calc(14px + 30px); }
  .page .sec[data-f="298:3"] > :is([data-f="298:42"], [data-f="298:52"]) { margin-bottom: 30px; }

  .page .sec[data-f="298:54"] { --cp: 22px; }
  .page .sec[data-f="298:54"] > .embed-copy { margin: 28px 0 22px; font-size: 20px; line-height: 27px; }
  .page .sec[data-f="298:54"] > :is(.embed-book, .embed-call) { justify-self: stretch; width: auto; }
  .page .sec[data-f="298:54"] > .embed-call { margin-bottom: 28px; }

  .page .sec[data-f="298:68"] { --cp: 22px; }
  .page .sec[data-f="298:68"] > p.k-clay { margin-top: calc(16px + 24px); }
  .page .sec[data-f="298:68"] > p.r { max-width: 132px; margin-left: 14px; }
  .page .sec[data-f="298:68"] > .btn { margin-bottom: 24px; }

  /* the four things become a numbered list: ring beside its title, copy under the title */
  .page .sec[data-f="299:2"] { grid-template-columns: 44px minmax(0, 1fr); column-gap: 16px; grid-auto-flow: row; }
  .page .sec[data-f="299:2"] > .a.ring44 { grid-column: 1; margin-top: 28px; }
  .page .sec[data-f="299:2"] > h3.a { grid-column: 2; align-self: center; margin: 28px 0 0; white-space: normal; }
  .page .sec[data-f="299:2"] > p.hl.a { grid-column: 2; margin-top: 6px; }

  .page .sec[data-f="299:36"] { --cp: 22px; }
  .page .sec[data-f="299:36"] > p.up.k-mute:not([data-f="299:37"]) { margin-top: calc(14px + 22px); }
  .page .sec[data-f="299:36"] > p.jo { font-size: 24px; line-height: 30px; margin: 6px 0 8px; }
  .page .sec[data-f="299:36"] > p.k-clay,
  .page .sec[data-f="299:36"] > img.a { margin-bottom: 22px; }

  .page .sec .faq-q { gap: 16px; padding: 20px 0 19px; font-size: 19px; line-height: 25px; letter-spacing: -0.2px; }
  .page .sec .faq-item.is-open .faq-q { padding-bottom: 10px; }
  .page .sec .faq-ic { height: 25px; }
  .page .sec .faq-a-in p { font-size: 15px; line-height: 26px; }
  .page .sec .faq-a-in p:last-child { margin-bottom: 22px; }

  .page .sec[data-f="299:91"] > [data-f="388:37"] { width: 80%; margin-top: 44px; }
  .page .sec[data-f="299:91"] > [data-f="299:109"] { width: 46%; margin: -34% 0 0 0; }
  .page .sec[data-f="299:91"] > [data-f="299:105"] { width: 84px; height: 84px; margin: 26px 8px 0 auto; }
}
