/* Double Vision, the booking site.
   Tokens only: every color, line, radius and space comes from ds/tokens.css.
   Type only through the type style classes; this sheet sets no font sizes.
   Materials only through Board; this sheet paints no gradient. */

:root {
  color-scheme: dark;
  --gutter: var(--space-4);
  --header-h: 72px;
  --measure: 26em;
  --wide: 1200px;
}
@media (min-width: 600px) { :root { --gutter: var(--space-8); } }
@media (min-width: 1024px) { :root { --gutter: var(--space-12); } }

html { background: var(--ground); scroll-padding-top: var(--header-h); }
body { background: var(--ground); color: var(--text); font-family: var(--font-serif); }

.site { min-height: 100vh; color: var(--text); }
/* Resets at zero specificity, so every class below wins over them */
.site [hidden] { display: none; }
:where(.site) :where(p, h1, h2, h3, h4, figure, dl, dd, blockquote) { margin: 0; }
:where(.site) :where(ol, ul) { margin: 0; padding: 0; list-style: none; }
:where(.site) :where(h1, h2, h3) { text-wrap: balance; }
:where(.site) :where(p) { text-wrap: pretty; }
:where(.site) :where(a) { color: var(--text); }
:where(.site) :where(img) { display: block; max-width: 100%; height: auto; }

.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

.wrap { max-width: var(--wide); margin-inline: auto; }
.measure { max-width: var(--measure); margin-inline: auto; }
.center { text-align: center; }

/* Skip link: out of sight until it takes focus */
.skip-link.ff-button { position: absolute; top: var(--space-2); left: var(--space-4); z-index: 30; background: var(--ground); }
.skip-link.ff-button:not(:focus) { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); border: 0; }

/* Header: pinned glass */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
.site-header.ff-board { padding: var(--space-3) var(--gutter); }
.header-inner { max-width: var(--wide); margin-inline: auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "home nav book"; align-items: center; column-gap: var(--space-8); }
.header-home { grid-area: home; display: inline-block; text-decoration: none; }
.header-nav { grid-area: nav; justify-self: end; min-width: 0; }
.header-nav ul { display: flex; flex-wrap: wrap; justify-content: flex-end; column-gap: var(--space-6); row-gap: 0; }
.header-book { grid-area: book; }
.header-book [aria-current="page"] { text-decoration-line: underline; text-decoration-thickness: var(--stroke-ui); text-underline-offset: 0.36em; }
.header-menu { grid-area: menu; display: none; }
@media (max-width: 759px) {
  .header-inner { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "home menu book" "nav nav nav"; column-gap: var(--space-4); row-gap: 0; }
  .header-menu { display: block; }
  .header-nav { display: none; justify-self: stretch; }
  .header-nav.is-open { display: block; padding-block: var(--space-2); }
  .header-nav ul { justify-content: center; column-gap: var(--space-6); }
}

/* Sections */
.section.ff-board, .section-ground { padding: var(--space-24) var(--gutter); }
@media (max-width: 599px) { .section.ff-board, .section-ground { padding-block: var(--space-16); } }
.section-head { display: flex; flex-direction: column; align-items: center; gap: var(--space-6); text-align: center; margin-bottom: var(--space-12); }
.section-head > * { max-width: var(--measure); }
.sub { margin-top: var(--space-24); }
@media (max-width: 599px) { .sub { margin-top: var(--space-16); } }
.sub-title { text-align: center; margin-bottom: var(--space-8); }

/* Hero */
.hero.ff-board { padding: var(--space-24) var(--gutter); display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 599px) { .hero.ff-board { padding-block: var(--space-16); } }
.hero-inner { width: 100%; max-width: var(--wide); margin-inline: auto; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-sig { margin: 0 auto var(--space-16); }
.hero-title { max-width: 18em; }
.hero-lede { margin-top: var(--space-6); max-width: 24em; }
.hero-actions { margin-top: var(--space-12); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--space-6); }

/* About: photo wireframes */
.about-opening { max-width: var(--measure); margin-inline: auto; }
.frames { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); max-width: 1000px; margin: var(--space-12) auto 0; }
@media (max-width: 759px) { .frames { grid-template-columns: minmax(0, 280px); justify-content: center; } }
.frame { position: relative; aspect-ratio: 4 / 5; box-sizing: border-box; border: var(--stroke-ui) solid var(--edge); display: flex; align-items: center; justify-content: center; padding: var(--space-6); }
.frame-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.frame-lines line { stroke: var(--line); stroke-width: var(--stroke-ui); vector-effect: non-scaling-stroke; }
.frame-label { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--space-2); max-width: 85%; padding: var(--space-3) var(--space-4); background: var(--ground); text-align: center; }
.frame-label .ff-eyebrow { display: block; }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-12); max-width: 1000px; margin: var(--space-12) auto 0; }
@media (max-width: 759px) { .duo { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); max-width: var(--measure); } }

/* Numbered sequences */
.steps { max-width: 32em; margin-inline: auto; display: flex; flex-direction: column; gap: var(--space-6); }
.step { display: grid; grid-template-columns: var(--space-12) minmax(0, 1fr); column-gap: var(--space-3); align-items: baseline; }
.step-num { text-align: left; }
.step-body { display: flex; flex-direction: column; gap: var(--space-1); }

/* When the photos arrive: a timeline on a hairline axis, vertical at every width */
.timeline { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-8); max-width: 720px; margin-inline: auto; padding-left: var(--space-8); }
.timeline::before { content: ""; position: absolute; left: 0; top: var(--space-2); bottom: var(--space-2); border-left: var(--stroke-print) solid var(--rule); }
.moment { position: relative; display: flex; flex-direction: column; gap: var(--space-2); }
.moment::before { content: ""; position: absolute; top: var(--space-2); left: calc(-1 * var(--space-8)); width: var(--space-4); border-top: var(--stroke-print) solid var(--rule); }

.plain-list { display: flex; flex-direction: column; gap: var(--space-4); }

/* Cocktails: the menu on glass, one centered axis. A taller light keeps the foot of the glass at
   glass-mid, the ground the Photos section starts on, so no seam shows at the join. */
#cocktails > .ff-board { --ff-board-ry: 150%; }
.menu { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-16) var(--space-12); }
.menu-group { flex: 0 1 300px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: var(--space-6); text-align: center; }
.drinks { display: flex; flex-direction: column; gap: var(--space-6); }
.drink { display: flex; flex-direction: column; gap: var(--space-1); }
.menu-after { margin-top: var(--space-16); display: flex; flex-direction: column; align-items: center; gap: var(--space-12); text-align: center; }
.menu-after > .ff-rule { max-width: 1000px; }
.menu-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-12); max-width: 1000px; width: 100%; }
@media (max-width: 759px) { .menu-notes { grid-template-columns: minmax(0, 1fr); } }
.menu-note { display: flex; flex-direction: column; gap: var(--space-3); }

/* Photos: equal glass Boards on the ground, space-6 apart */
.gallery { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-6); }
.photo-card.ff-board { flex: 0 0 100%; min-width: 0; padding: var(--space-12); display: flex; flex-direction: column; }
@media (max-width: 379px) { .photo-card.ff-board { padding: var(--space-8); } }
@media (min-width: 600px) { .photo-card.ff-board { flex-basis: calc((100% - var(--space-6)) / 2); } }
@media (min-width: 1100px) { .photo-card.ff-board { flex-basis: calc((100% - 2 * var(--space-6)) / 3); } }
.photo-frame { aspect-ratio: 4 / 5; background: var(--veil); overflow: hidden; border-radius: var(--radius-none); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-frame img[data-missing] { opacity: 0; }
.photo-text { margin-top: var(--space-3); display: flex; flex-direction: column; align-items: center; gap: var(--space-2); text-align: center; }
/* Two lines held for the caption and for the line, so every Board is the same height */
.photo-caption { color: var(--text-muted); min-height: 2lh; }
.photo-line { color: var(--text); min-height: 2lh; }
.photo-chip { white-space: nowrap; }
.specials-head { text-align: center; margin: var(--space-16) 0 var(--space-6); }
.photos-close { margin-top: var(--space-16); display: flex; flex-direction: column; align-items: center; gap: var(--space-6); text-align: center; }
.photos-close > p { max-width: var(--measure); }
.releases { max-width: var(--measure); margin-inline: auto; display: flex; flex-direction: column; gap: var(--space-6); }
.releases > .sub-title { margin-bottom: var(--space-2); }
.releases-note { color: var(--text-muted); }

/* Rates */
.shared { max-width: var(--measure); margin: 0 auto var(--space-12); display: flex; flex-direction: column; align-items: center; gap: var(--space-4); text-align: center; }
.shared-lines { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); }
.packages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
@media (max-width: 899px) { .packages { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-inline: auto; } }
.rates-block { max-width: 820px; margin: var(--space-16) auto 0; display: flex; flex-direction: column; gap: var(--space-3); }
.rates-block > .ff-eyebrow { text-align: center; }
.rates-block + .rates-block { margin-top: var(--space-12); }
.rates-list { border-bottom: var(--stroke-ui) solid var(--line); }
.rate { display: grid; grid-template-columns: minmax(0, 10em) minmax(0, 1fr); column-gap: var(--space-8); row-gap: var(--space-1); padding-block: var(--space-4); border-top: var(--stroke-ui) solid var(--line); }
@media (max-width: 759px) { .rate { grid-template-columns: minmax(0, 1fr); } }
.end-action { display: flex; justify-content: center; margin-top: var(--space-12); }

/* Footer */
.site-footer.ff-board { padding: var(--space-16) var(--gutter); }
.footer-inner { max-width: var(--wide); margin-inline: auto; display: flex; flex-direction: column; align-items: center; gap: var(--space-2); text-align: center; }
.footer-year { color: var(--text-muted); }

/* Book view: on the ground */
.book { padding: var(--space-16) var(--gutter) var(--space-24); }
.book-head { display: flex; flex-direction: column; align-items: center; gap: var(--space-6); text-align: center; margin-bottom: var(--space-12); }
.book-head > p { max-width: var(--measure); }
.book-grid { max-width: var(--wide); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-12); }
@media (min-width: 1024px) {
  .book-grid { grid-template-columns: minmax(0, 1fr) 340px; column-gap: var(--space-12); }
  .book-main { grid-column: 1; grid-row: 1; }
  .book-grid > .summary { grid-column: 2; grid-row: 1 / span 3; align-self: start; position: sticky; top: calc(var(--header-h) + var(--space-6)); max-height: calc(100vh - var(--header-h) - var(--space-12)); overflow-y: auto; }
  .book-agreement { grid-column: 1; grid-row: 2; }
  .book-sign { grid-column: 1; grid-row: 3; }
}
@media (min-width: 1200px) { .book-grid { grid-template-columns: minmax(0, 1fr) 400px; } }
.book-main { min-width: 0; }

.group { border: 0; margin: 0; padding: var(--space-8) 0 0; min-width: 0; border-top: var(--stroke-ui) solid var(--line); }
.group + .group { margin-top: var(--space-12); }
.group > legend { padding: 0; float: left; width: 100%; margin-bottom: var(--space-6); }
.group > legend + * { clear: both; }
.fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
@media (min-width: 640px) { .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } .span-2 { grid-column: 1 / -1; } }

.cond-notes { display: flex; flex-direction: column; gap: var(--space-2); }
.cond-notes:empty { display: none; }
.cond-note { padding-left: var(--space-4); border-left: var(--stroke-ui) solid var(--edge); color: var(--text); }

/* Calendar */
.cal { max-width: 480px; width: 100%; margin-inline: auto; }
.cal-head { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; column-gap: var(--space-4); min-height: 48px; }
.cal-prev { justify-self: start; }
.cal-month { text-align: center; }
.cal-next { justify-self: end; }
.cal-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: var(--space-1); margin-top: var(--space-2); }
.cal-table th { padding: 0 0 var(--space-2); text-align: center; color: var(--text-muted); }
.cal-table td { padding: 0; }
.cal-day { position: relative; box-sizing: border-box; display: flex; align-items: center; justify-content: center; width: 100%; height: 48px; margin: 0; padding: 0; border: 0; border-radius: var(--radius-hair); background: none; color: var(--text-muted); cursor: default; -webkit-tap-highlight-color: var(--veil); }
.cal-day:focus-visible { z-index: 1; }
.cal-day[data-state="open"] { color: var(--text); box-shadow: inset 0 0 0 var(--stroke-ui) var(--edge); cursor: pointer; }
@media (hover: hover) { .cal-day[data-state="open"]:hover { background: var(--veil); } }
.cal-day[data-chosen="true"] { color: var(--text); background: var(--veil); box-shadow: inset 0 0 0 var(--stroke-focus) var(--text); }
.cal-day[data-state="booked"] .cal-num, .cal-swatch[data-state="booked"] .cal-num { text-decoration-line: line-through; text-decoration-thickness: var(--stroke-ui); }
.cal-day[data-state="held"] .cal-num, .cal-swatch[data-state="held"] .cal-num { text-decoration-line: underline; text-decoration-style: dotted; text-decoration-thickness: var(--stroke-focus); text-underline-offset: 0.25em; }
.cal-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2) var(--space-6); margin-top: var(--space-3); }
.cal-legend li { display: flex; align-items: center; gap: var(--space-2); }
.cal-swatch { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius-hair); color: var(--text-muted); }
.cal-swatch[data-state="open"] { color: var(--text); box-shadow: inset 0 0 0 var(--stroke-ui) var(--edge); }

/* Checkboxes */
.check { display: flex; flex-direction: column; }
.check-label-top { margin-bottom: var(--space-3); color: var(--text); }
.check-row { display: flex; align-items: flex-start; gap: var(--space-3); }
.check-box { flex: none; box-sizing: border-box; width: 20px; height: 20px; margin: 5px 0 0; -webkit-appearance: none; appearance: none; border: var(--stroke-ui) solid var(--edge); border-radius: var(--radius-hair); background: none; cursor: pointer; }
.check-box:checked { background: var(--solid); box-shadow: inset 0 0 0 3px var(--ground); }
.check-box[aria-invalid="true"] { border-color: var(--alert); box-shadow: 0 0 0 var(--stroke-ui) var(--alert); }
.check-text { cursor: pointer; }
.check-hint, .check-error { margin-top: var(--space-2); padding-left: calc(20px + var(--space-3)); }
.check-hint { color: var(--text-muted); }
.check-error { color: var(--alert); }

/* The request, summarized */
.summary { background: var(--veil); padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-6); min-width: 0; }
.summary-list { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); column-gap: var(--space-4); row-gap: var(--space-3); align-items: baseline; }
.summary-list dt { color: var(--text-muted); }
.summary-list dd { color: var(--text); overflow-wrap: anywhere; }
.summary-list dd.is-empty { color: var(--text-muted); }
.summary-notes { display: flex; flex-direction: column; gap: var(--space-2); }
.summary-foot { color: var(--text-muted); }

/* The agreement: an ivory document with its own scroll */
.book-agreement { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-6); min-width: 0; }
.book-agreement > p { max-width: var(--measure); }
.agreement-scroll { align-self: stretch; max-height: 70vh; overflow-y: auto; border-radius: var(--radius-screen); overscroll-behavior: contain; }
.agreement-scroll.is-open { max-height: none; overflow: visible; }
@media (max-width: 759px) { .agreement-scroll { max-height: 50vh; overscroll-behavior: auto; } }
.agreement-doc.ff-board { padding: var(--space-12); }
@media (max-width: 599px) { .agreement-doc.ff-board { padding: var(--space-6); } }
.ff-agreement { max-width: 42em; margin-inline: auto; color: var(--text); }
.ff-agreement > * + * { margin-top: var(--space-6); }
.ff-agreement > .eyebrow + .title { margin-top: var(--space-2); }
.ff-agreement > section { margin-top: var(--space-8); }
.ff-agreement > section > h3 { margin-bottom: var(--space-3); }
.ff-agreement .ff-clauses { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.ff-agreement .ff-clauses > li { position: relative; padding-left: var(--space-12); }
.ff-agreement .ff-clause-no { position: absolute; left: 0; top: 0; }
.ff-fill:empty { display: inline-block; min-width: 8em; height: 1.1em; vertical-align: baseline; border-bottom: var(--stroke-ui) solid var(--edge); }
.ff-schedule { width: 100%; border-collapse: collapse; }
.ff-schedule tr { border-top: var(--stroke-ui) solid var(--line); }
.ff-schedule tr:last-child { border-bottom: var(--stroke-ui) solid var(--line); }
.ff-schedule th { width: 42%; padding: var(--space-2) var(--space-4) var(--space-2) 0; text-align: left; vertical-align: baseline; color: var(--text-muted); }
.ff-schedule td { padding: var(--space-2) 0; vertical-align: baseline; overflow-wrap: anywhere; }
.ff-signatures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
@media (max-width: 759px) { .ff-signatures { grid-template-columns: minmax(0, 1fr); } }
.ff-signer { display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-3); border-top: var(--stroke-print) solid var(--rule); }

/* Signing and sending */
.book-sign { display: flex; flex-direction: column; gap: var(--space-6); min-width: 0; max-width: 720px; }
.signed-date { display: flex; flex-direction: column; gap: var(--space-3); }
.signed-date .eyebrow { color: var(--text); }
.error-summary { color: var(--alert); }
.error-summary:empty { display: none; }
.submit-row { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .submit-row { display: flex; } }

/* Confirmation */
.confirm { max-width: 720px; margin-inline: auto; display: flex; flex-direction: column; gap: var(--space-8); }
.confirm > h1 { text-align: center; }
.confirm .summary { align-self: stretch; }
.confirm-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--space-6); }

/* Motion: one 200ms fade for what appears, none when motion is reduced */
.fade-in { animation: ff-fade 200ms ease-out both; }
@keyframes ff-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .fade-in { animation: none; } }

/* Behind the Bar session */
.session-facts { margin-top: var(--space-12); }
.session-facts dd { margin: 0; }
