/* SEASONS Optical. The booking page, second pass: the same room and faces, but built as a tool.
   Clear controls, a summary that builds as you go, one primary action per screen, one entrance per step.
   Tokens and the running-text action come from ../css/tokens.css. */

:root {
  --surface: #171010; --surface-2: #1f1615;
  --hair: rgba(242,236,230,0.12); --hair-2: rgba(242,236,230,0.24);
  --r: 6px;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--night); scrollbar-color: var(--walnut) var(--night); scrollbar-width: thin; }
body { margin: 0; min-height: 100svh; background: var(--night); color: var(--paper); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.5; -webkit-font-smoothing: antialiased; caret-color: var(--lacquer-bright); overflow-x: hidden; }
::selection { background: var(--lacquer); color: var(--paper); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0; text-wrap: pretty; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; border-radius: 0; appearance: none; text-align: left; }
:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; border-radius: 4px; }
.stop, .q { color: var(--lacquer-bright); }
.skip { position: fixed; left: var(--gutter); top: -4rem; z-index: 90; background: var(--lacquer); color: #fff; padding: 0.65rem 1.1rem; text-decoration: none; font-weight: 500; transition: top 200ms var(--ease-out); }
.skip:focus-visible { top: 1rem; }

/* ---- the bar ---- */
.bar { display: flex; align-items: flex-start; justify-content: space-between; padding: 1.35rem var(--gutter) 0; max-width: 78rem; margin: 0 auto; }
.sign { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-decoration: none; }
.sign-mark { height: 2.4rem; width: auto; }
.sign-word { height: 0.78rem; width: auto; }
.bar-facts { display: flex; align-items: center; gap: 1.75rem; padding-top: 0.55rem; font-size: 0.8125rem; font-stretch: 92%; letter-spacing: 0.02em; }
.hours-line { display: flex; align-items: center; gap: 0.55rem; color: var(--paper-mute); }
.hours-line .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--paper-mute); opacity: 0.7; flex: none; }
.hours-line.is-open { color: var(--paper); }
.hours-line.is-open .dot { background: var(--lacquer-bright); opacity: 1; box-shadow: 0 0 8px rgba(227,105,39,0.6); }
.bar-phone { text-decoration: none; color: var(--paper); font-weight: 500; }
@media (hover: hover) and (pointer: fine) { .bar-phone:hover { color: var(--lacquer-bright); } }

/* ---- the composition: a summary beside the step on wide screens, stacked below 1000px ---- */
.flow { max-width: 78rem; margin: 0 auto; padding: clamp(2.2rem, 6vh, 4rem) var(--gutter) var(--foot); display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
@media (min-width: 1000px) { .flow { grid-template-columns: 19rem minmax(0, 44rem); justify-content: center; column-gap: clamp(2.5rem, 5vw, 5rem); align-items: start; } .summary { position: sticky; top: 2rem; } }
body.embed .bar { display: none; }
body.embed .flow { padding-top: 1.6rem; }
.aside { grid-column: 1 / -1; max-width: 52ch; color: var(--paper-mute); font-size: 0.9375rem; font-stretch: 92%; }
.aside a { text-decoration: none; color: var(--paper); border-bottom: 1px solid var(--hair-2); }
@media (hover: hover) and (pointer: fine) { .aside a:hover { color: var(--lacquer-bright); border-color: var(--lacquer-bright); } }

/* the summary: what you have chosen so far, each line with a way to change it */
.summary { order: -1; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r); padding: 1.1rem 1.25rem 1.25rem; }
.summary-title { font-size: 0.72rem; font-stretch: 90%; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--paper-mute); }
.summary-rows { list-style: none; margin: 0.6rem 0 0; padding: 0; }
.summary-rows li { display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 1rem; align-items: baseline; padding: 0.7rem 0; border-top: 1px solid var(--hair); }
.summary-rows li:first-child { border-top: 0; }
.summary-k { grid-column: 1 / -1; font-size: 0.78rem; color: var(--paper-mute); font-stretch: 92%; }
.summary-v { font-family: var(--serif); font-weight: 330; font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.005em; }
.summary-v.is-empty { color: rgba(201,185,174,0.45); font-style: italic; font-weight: 300; }
.summary-v.is-new { animation: resolve 700ms var(--ease-out) both; }
@keyframes resolve { from { opacity: 0.2; filter: blur(6px); } to { opacity: 1; filter: blur(0); } }
.summary-change { font-size: 0.8125rem; color: var(--paper-mute); border-bottom: 1px solid transparent; transition: color 160ms ease, border-color 160ms ease; }
.summary-change:hover { color: var(--lacquer-bright); border-color: var(--lacquer-bright); }
.summary-foot { margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid var(--hair); font-size: 0.8125rem; color: var(--paper-mute); font-stretch: 92%; }
@media (max-width: 999px) { .summary { order: -1; } .summary-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; } .summary-rows li { border-top: 0; padding: 0.4rem 0; } .summary-rows li.is-hidden { display: none; } .summary-v { font-size: 1.1rem; } .summary-foot { display: none; } }
body.embed .summary { display: none; }
body.embed .flow { grid-template-columns: minmax(0, 1fr); }

/* ---- the step: one entrance, children a beat apart ---- */
.step { min-width: 0; }
.step [data-in] { opacity: 0; transform: translateY(8px); transition: opacity 420ms var(--ease-soft) var(--d, 0ms), transform 560ms var(--ease-out) var(--d, 0ms); }
.step.is-in [data-in] { opacity: 1; transform: none; }
.step.is-out [data-in] { opacity: 0; transform: translateY(-6px); transition-duration: 160ms; transition-delay: 0ms; }
.crumb { font-size: 0.72rem; font-stretch: 90%; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--paper-mute); }
.crumb b { color: var(--lacquer-bright); font-weight: 500; }
.ask { margin-top: 0.5rem; font-family: var(--serif); font-weight: 330; font-size: clamp(1.9rem, 1.2rem + 1.6vw, 2.6rem); line-height: 1.08; letter-spacing: -0.012em; text-wrap: balance; outline: none; }
.lead { margin-top: 0.6rem; color: var(--paper-mute); font-size: 0.9875rem; font-stretch: 94%; max-width: 54ch; }
.section { margin-top: 1.9rem; }
.section-label { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; font-size: 0.9rem; font-weight: 500; margin-bottom: 0.65rem; }
.section-label span { font-weight: 400; color: var(--paper-mute); font-size: 0.8125rem; font-stretch: 92%; }

/* buttons: one filled primary per screen, quiet secondaries */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; min-height: 3.1rem; padding: 0.75rem 1.3rem; border-radius: var(--r); font-weight: 500; font-size: 1rem; letter-spacing: 0.005em; transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out), border-color 160ms ease; text-decoration: none; }
.btn .arrow { font-weight: 400; transition: transform 320ms var(--ease-out); }
.btn:active { transform: scale(0.985); }
.btn--primary { background: var(--lacquer); color: #fff; }
.btn--primary:hover { background: var(--lacquer-deep); }
.btn--primary:hover .arrow { transform: translateX(0.25em); }
.btn--primary[disabled] { opacity: 0.6; cursor: wait; }
.btn--ghost { border: 1px solid var(--hair-2); color: var(--paper); }
.btn--ghost:hover { border-color: var(--paper); }
.btn--quiet { color: var(--paper-mute); padding-left: 0.4rem; padding-right: 0.4rem; }
.btn--quiet:hover { color: var(--paper); }
.btn--wide { width: 100%; }
.btn em { font-style: normal; font-weight: 500; }
.btn small { font-weight: 400; opacity: 0.85; }

/* a segmented choice (the appointment type) */
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.5rem; }
.seg button { display: flex; flex-direction: column; gap: 0.2rem; min-height: 3.6rem; padding: 0.75rem 0.95rem; border: 1px solid var(--hair-2); border-radius: var(--r); background: var(--surface); transition: border-color 160ms ease, background-color 160ms ease; }
.seg button:hover { border-color: var(--paper); }
.seg button[aria-pressed="true"] { border-color: var(--lacquer-bright); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--lacquer-bright); }
.seg-name { font-weight: 500; }
.seg-line { font-size: 0.8125rem; color: var(--paper-mute); font-stretch: 92%; }
.seg button[aria-pressed="true"] .seg-name { color: var(--lacquer-bright); }

/* the fortnight */
.days-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.6rem; }
.months { font-size: 0.9rem; font-weight: 500; }
.pager { display: flex; gap: 0.4rem; }
.pager button { min-height: 2.2rem; padding: 0.3rem 0.75rem; border: 1px solid var(--hair-2); border-radius: var(--r); font-size: 0.875rem; color: var(--paper); transition: border-color 160ms ease, opacity 160ms ease; }
.pager button:not([disabled]):hover { border-color: var(--paper); }
.pager button[disabled] { opacity: 0.3; cursor: default; }
.day-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.35rem; }
.day { width: 100%; min-height: 3.9rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem; padding: 0.5rem 0.2rem; border: 1px solid var(--hair); border-radius: var(--r); background: var(--surface); color: var(--paper); transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease; }
.day-wd { font-size: 0.68rem; font-stretch: 90%; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--paper-mute); }
.day-n { font-family: var(--serif); font-weight: 330; font-size: 1.4rem; line-height: 1; }
.day:not([disabled]):hover { border-color: var(--paper); }
.day[disabled] { cursor: default; background: transparent; border-color: transparent; }
.day[disabled] .day-n, .day[disabled] .day-wd { opacity: 0.3; }
.day[aria-pressed="true"] { background: var(--lacquer); border-color: var(--lacquer); color: #fff; }
.day[aria-pressed="true"] .day-wd { color: rgba(255,255,255,0.8); }
.day.is-today:not([aria-pressed="true"]) .day-wd { color: var(--lacquer-bright); }
.day:not([disabled]):active { transform: scale(0.98); }

/* the times */
.day-title { font-weight: 500; }
.day-title span { font-weight: 400; color: var(--paper-mute); }
.times { margin-top: 0.4rem; min-height: 5rem; }
.times [data-in] { opacity: 0; transform: translateY(6px); transition: opacity 320ms var(--ease-soft) var(--d, 0ms), transform 420ms var(--ease-out) var(--d, 0ms); }
.times.is-in [data-in] { opacity: 1; transform: none; }
.group { margin-top: 1rem; }
.group-label { font-size: 0.8125rem; color: var(--paper-mute); margin-bottom: 0.45rem; }
.time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.6rem, 1fr)); gap: 0.45rem; }
.time { min-height: 3rem; display: flex; align-items: center; justify-content: center; padding: 0.5rem 0.6rem; border: 1px solid var(--hair-2); border-radius: var(--r); background: var(--surface); color: var(--paper); font-weight: 500; font-size: 0.975rem; transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease; }
.time:hover { border-color: var(--paper); }
.time[aria-pressed="true"] { background: var(--lacquer); border-color: var(--lacquer); color: #fff; }
.time:active { transform: scale(0.98); }
.none { margin-top: 1rem; color: var(--paper-mute); }
.notice { margin-top: 1.2rem; padding: 0.85rem 1rem; border: 1px solid rgba(227,105,39,0.5); border-radius: var(--r); color: var(--paper); font-size: 0.95rem; background: rgba(186,56,0,0.1); }

/* the form */
.form { margin-top: 1.4rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.field { display: flex; flex-direction: column; margin-top: 1.1rem; }
.field label { font-size: 0.9rem; font-weight: 500; margin-bottom: 0.4rem; }
.field label small { font-weight: 400; color: var(--paper-mute); margin-left: 0.4rem; font-size: 0.8125rem; }
.field input, .field textarea { width: 100%; min-height: 3.1rem; background: var(--surface); border: 1px solid var(--hair-2); border-radius: var(--r); color: var(--paper); font: inherit; font-size: 1.0625rem; padding: 0.7rem 0.9rem; outline: none; resize: none; transition: border-color 160ms ease, box-shadow 160ms ease; }
.field input::placeholder, .field textarea::placeholder { color: rgba(201,185,174,0.5); }
.field input:focus, .field textarea:focus { border-color: var(--lacquer-bright); box-shadow: 0 0 0 1px var(--lacquer-bright); }
.field.has-err input, .field.has-err textarea { border-color: var(--lacquer-bright); }
.err { margin-top: 0.35rem; font-size: 0.85rem; color: var(--lacquer-bright); min-height: 1.2em; }
.choice { margin-top: 1.1rem; }
.choice-label { font-size: 0.9rem; font-weight: 500; margin-bottom: 0.4rem; }
.choice-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.choice-opts button { min-height: 3.1rem; padding: 0.6rem 0.9rem; border: 1px solid var(--hair-2); border-radius: var(--r); background: var(--surface); color: var(--paper); font-weight: 500; transition: border-color 160ms ease, background-color 160ms ease; }
.choice-opts button:hover { border-color: var(--paper); }
.choice-opts button[aria-pressed="true"] { background: var(--lacquer); border-color: var(--lacquer); color: #fff; }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin-top: 1.8rem; }

/* booked */
.booked-card { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r); padding: 1.4rem 1.5rem 1.5rem; }
.booked { font-family: var(--serif); font-weight: 330; font-size: clamp(2.2rem, 1.4rem + 2vw, 3.2rem); line-height: 1.02; letter-spacing: -0.012em; display: flex; align-items: center; gap: 0.7rem; }
.tick { width: 1.6rem; height: 1.6rem; flex: none; border-radius: 50%; background: var(--lacquer); display: inline-flex; align-items: center; justify-content: center; }
.tick svg { width: 0.9rem; height: 0.9rem; }
.recap { margin-top: 1rem; font-family: var(--serif); font-weight: 330; font-size: clamp(1.25rem, 1rem + 0.8vw, 1.6rem); line-height: 1.3; max-width: 32ch; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1.1rem 2rem; margin: 1.5rem 0 0; }
.facts dt { font-size: 0.78rem; color: var(--paper-mute); margin-bottom: 0.25rem; }
.facts dd { margin: 0; line-height: 1.5; font-size: 0.975rem; overflow-wrap: anywhere; }
.status { margin-top: 0.6rem; color: var(--paper-mute); }
.wait { color: var(--paper-mute); }

/* phones */
@media (max-width: 699px) {
  .bar { padding-top: 1.1rem; } .sign-mark { height: 2rem; } .sign-word { height: 0.66rem; }
  .bar-facts { gap: 1rem; } .bar-facts .hours-line { display: none; }
  .flow { padding-top: 1.4rem; gap: 1.2rem; }
  .day { min-height: 3.6rem; } .day-n { font-size: 1.25rem; }
  .time-grid { grid-template-columns: repeat(3, 1fr); }
  .row2 { grid-template-columns: 1fr; gap: 0; }
  .acts .btn--primary { width: 100%; }
  .choice-opts { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .step [data-in], .times [data-in], .summary-v.is-new, .btn, .btn .arrow { transition: none !important; animation: none !important; opacity: 1; transform: none; }
}
.summary-sub { display: block; font-family: var(--sans); font-size: 0.8rem; color: var(--paper-mute); margin-top: 0.15rem; }

/* ---- third pass: numbered sections, a quiet shortcut, one Continue ---- */
.section-label .n { display: inline-flex; align-items: center; justify-content: center; width: 1.45rem; height: 1.45rem; margin-right: 0.55rem; border-radius: 50%; border: 1px solid var(--hair-2); font-size: 0.75rem; font-weight: 500; color: var(--paper-mute); vertical-align: 0.1em; }
.section-label.is-done .n { background: var(--lacquer); border-color: var(--lacquer); color: #fff; }
.soon { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin-bottom: 0.9rem; padding: 0.7rem 0.9rem; border: 1px dashed var(--hair-2); border-radius: var(--r); font-size: 0.925rem; color: var(--paper-mute); }
.soon b { color: var(--paper); font-weight: 500; }
.soon button { min-height: 2.2rem; padding: 0.3rem 0.8rem; border: 1px solid var(--hair-2); border-radius: var(--r); font-size: 0.875rem; font-weight: 500; color: var(--paper); transition: border-color 160ms ease, background-color 160ms ease; margin-left: auto; }
.soon button:hover { border-color: var(--paper); }
.acts--stick { position: sticky; bottom: 0; margin: 1.6rem calc(-1 * var(--gutter)) 0; padding: 0.9rem var(--gutter) 1rem; background: linear-gradient(to top, var(--night) 70%, rgba(15,8,7,0)); z-index: 5; }
@media (min-width: 1000px) { .acts--stick { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; } }
.acts-hint { font-size: 0.875rem; color: var(--paper-mute); }
.btn--primary[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.booked-card .facts--line { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; margin-top: 0.8rem; color: var(--paper-mute); font-size: 0.95rem; }
.old { text-decoration: line-through; color: var(--paper-mute); }

/* ---- fourth pass: each step is a panel, everything arrives in sequence, fewer words on phones ---- */
.bar { animation: arrive 600ms var(--ease-out) both; }
.summary { opacity: 0; transform: translateY(8px); transition: opacity 520ms var(--ease-soft) 80ms, transform 680ms var(--ease-out) 80ms; }
.summary.is-in { opacity: 1; transform: none; }
.step [data-in] { transition: opacity 520ms var(--ease-soft) var(--d, 0ms), transform 680ms var(--ease-out) var(--d, 0ms); transform: translateY(10px); }
@keyframes arrive { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.panel { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r); padding: 0.95rem 1.1rem 1.1rem; margin-top: 0.9rem; }
.panel .section-label { margin-bottom: 0.75rem; }
.panel .seg button, .panel .day, .panel .time, .panel .pager button { background: var(--surface-2); }
.panel .day[disabled] { background: transparent; }
.seg { grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); }
.seg button { min-height: 3rem; align-items: center; flex-direction: row; justify-content: center; }
.seg-desc { margin-top: 0.6rem; font-size: 0.875rem; color: var(--paper-mute); font-stretch: 94%; }
.soon { margin: 0 0 0.8rem; }
.days-head { margin-bottom: 0.5rem; }
.pager button { min-width: 2.2rem; padding: 0.3rem 0.5rem; }
.day-title { font-size: 0.875rem; }
.times { min-height: 3rem; }
@media (max-width: 699px) {
  .panel { padding: 0.85rem 0.9rem 1rem; }
  .soon { padding: 0.6rem 0.75rem; font-size: 0.875rem; }
  .soon button { margin-left: 0; width: 100%; }
  .day-grid { gap: 0.3rem; }
  .day { min-height: 3.4rem; }
}
@media (prefers-reduced-motion: reduce) { .bar { animation: none; } .summary { opacity: 1; transform: none; transition: none; } }
/* phones: the Continue bar is a solid bottom bar; the summary waits until there is something to summarise */
@media (max-width: 999px) { .summary.is-quiet { display: none; } }
@media (max-width: 699px) {
  .acts--stick { flex-direction: column; align-items: stretch; gap: 0.45rem; padding: 0.7rem var(--gutter) 0.85rem; background: var(--night); border-top: 1px solid var(--hair); }
  .acts--stick .acts-hint { order: -1; text-align: center; font-size: 0.8125rem; }
  .acts--stick .acts-hint:empty { display: none; }
  .acts--stick .btn--quiet { text-align: center; justify-content: center; }
  .flow { padding-top: 1rem; }
}
