/* ==========================================================================
   Sifu Tangkap Studios — styles
   Design language: Apple "white gallery" (see DESIGN.md)
   ========================================================================== */

:root {
  /* Colour */
  --white: #ffffff;
  --mist: #f5f5f7;          /* alternate section bands, footer */
  --frost: #fafafc;         /* local nav */
  --hairline: #d6d6d6;      /* 1px dividers */
  --control: #e6e6e8;       /* image placeholders, subtle edges */
  --ink: #1d1d1f;           /* text, dark buttons */
  --slate: #707070;         /* secondary text */
  --steel: #86868b;         /* input + outline borders */
  --link: #0066cc;          /* inline links */
  --accent: #0071e3;        /* filled conversion pills only */
  --launch: #b64400;        /* small status labels */

  /* Type */
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Shape + space */
  --radius-card: 28px;
  --radius-inner: 20px;
  --radius-pill: 9999px;
  --section-gap: 90px;
  --gap: 20px;
  --container: 1200px;
  --gutter: 24px;
  --header-h: 56px;      /* header height; sticky offsets derive from this */
  --hero-top: 28px;      /* nav -> back link. A breadcrumb sits close to the chrome. */
  --back-gap: 36px;      /* back link -> hero content. The air belongs here, not above. */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 72px); }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.374px;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; letter-spacing: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip-link:focus { left: 8px; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-gap) 0; }
.band-mist { background: var(--mist); }
.center { text-align: center; display: flex; flex-direction: column; align-items: center; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }

/* ---------- Type ---------- */
.display-xl, .display-lg, .h2, .h-quote, .kicker, .local-title, .brand { font-family: var(--font-display); font-weight: 600; }
.display-xl { margin: 0; font-size: clamp(56px, 9vw, 128px); line-height: 1; letter-spacing: -0.024em; }
.display-lg { margin: 0; font-size: clamp(44px, 5.6vw, 80px); line-height: 1.05; letter-spacing: -0.015em; }
.h2 { margin: 0; font-size: clamp(32px, 3.4vw, 48px); line-height: 1.08; letter-spacing: -0.01em; }
.h-quote { margin: 0; font-size: clamp(36px, 3.9vw, 56px); line-height: 1.07; letter-spacing: -0.014em; }
.kicker { display: block; font-size: 21px; letter-spacing: 0.011em; }
.lede { margin: 24px 0 0; max-width: 680px; font-size: 21px; line-height: 1.38; letter-spacing: 0.011em; }
.lede-muted { margin: 16px 0 0; max-width: 720px; color: var(--slate); }
.body-muted { margin: 20px 0 0; color: var(--slate); }
.launch-label { display: block; margin-bottom: 12px; font-size: 12px; font-weight: 600; letter-spacing: -0.12px; color: var(--launch); }
.link-lg { font-size: 17px; white-space: nowrap; }
.link-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 32px; margin-top: 26px; }
.link-col { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px; border: none; border-radius: var(--radius-pill);
  font-size: 14px; letter-spacing: -0.224px; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-blue { background: var(--accent); color: #fff; }
.btn-blue:hover { background: #0077ed; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--steel); }
.btn-outline:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.btn-sm { min-height: 36px; padding: 0 16px; font-size: 12px; }
.btn-lg { width: 100%; margin-top: 28px; }
.btn-xl { width: 100%; min-height: 52px; font-size: 17px; }
.btn-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }

/* ---------- Header ---------- */
/* Liquid glass: thin enough to read the photos through, blurred hard enough
   that they average into a wash rather than competing with the nav text.
   No border — the blur boundary is the edge. */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.6); backdrop-filter: saturate(200%) blur(30px); -webkit-backdrop-filter: saturate(200%) blur(30px); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 21px; letter-spacing: 0.011em; }
.brand-mark { flex: none; width: 30px; height: 30px; object-fit: contain; }
.brand:hover { text-decoration: none; }
.nav-commas { display: flex; align-items: center; font-size: 17px; color: var(--slate); }
.nav-commas a { color: var(--ink); padding: 12px 0; }
.nav-commas.has-current a:not([aria-current]) { color: var(--slate); }
.nav-commas.has-current a:not([aria-current]):hover { color: var(--ink); }
.nav-commas .comma { white-space: pre; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; width: 44px; height: 44px; border: none; background: transparent; border-radius: var(--radius-pill); align-items: center; justify-content: center; }

/* Same glass as .site-header, hairlined top AND bottom. The top line draws the
   seam between the two bars, so 116px of stacked blur reads as two distinct
   materials rather than one washed-out slab; the bottom line closes the chrome
   against page content. Both live here rather than on .site-header so the
   homepage header, which has no local nav under it, stays borderless. */
.local-nav { position: sticky; top: var(--header-h); z-index: 40; background: rgba(255,255,255,0.6); backdrop-filter: saturate(200%) blur(30px); -webkit-backdrop-filter: saturate(200%) blur(30px); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.local-inner { height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.local-title { font-size: 19px; letter-spacing: 0.012em; }
.local-nav nav { display: flex; align-items: center; gap: 28px; font-size: 12px; letter-spacing: -0.12px; }
.local-nav nav a:not(.btn) { color: var(--ink); padding: 14px 0; }

/* ---------- Image placeholders (swap for <img>) ---------- */
.ph { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: var(--control); color: var(--slate); border-radius: var(--radius-card); font-size: 14px; letter-spacing: -0.224px; text-align: center; overflow: hidden; }
.ph > img, .ph > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph-reel { height: clamp(320px, 45vw, 640px); margin-top: 56px; }
.ph-hero { width: 100%; height: clamp(300px, 40vw, 560px); margin-top: 56px; }
.ph-tile { height: clamp(300px, 39vw, 560px); }
.ph-wide { height: clamp(260px, 36vw, 520px); }
.ph-card { height: 200px; border-radius: var(--radius-inner); font-size: 12px; }
.reel-pill { position: absolute; left: 32px; bottom: 32px; display: flex; align-items: center; gap: 14px; padding: 8px 20px 8px 8px; border-radius: var(--radius-pill); background: #fff; color: var(--ink); font-weight: 600; }
.reel-pill .play { width: 44px; height: 44px; border-radius: var(--radius-pill); background: var(--ink); display: flex; align-items: center; justify-content: center; }

/* ---------- Home ---------- */
.hero-home { padding-top: 16px; padding-bottom: var(--section-gap); }
.meta-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--hairline); font-size: 14px; line-height: 1.43; letter-spacing: -0.224px; }
.meta-row > span { display: flex; flex-direction: column; }
.meta-row > span > span { color: var(--slate); }
.meta-row .meta-links { align-items: flex-end; }
.meta-row .meta-links a { color: var(--link); }

/* Home hero gallery — two 3x3 grids with the statement headline between them.
   Tiles are plain <img> elements: not links, no hover state. Each one is its
   own grid cell, cropped to a 3:2 frame by object-fit, so swapping a photo is
   a one-line edit to the src in index.html.
   To borrow Studio Freight's uneven rhythm, delete a tile and push a later one
   into an explicit column to leave a hole, e.g.
     .gallery-grid:first-of-type .gallery-item:nth-child(8) { grid-column: 3; } */
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.gallery-item { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: center; background: var(--control); }

/* Leaving a hole: don't insert a spacer image — just push a tile into an
   explicit column and grid auto-placement leaves the cells before it empty.
   Add .col-2 or .col-3 to the tile that should START that column, e.g. a hole
   at row 1 column 1 means the first tile carries .col-2. Tiles after it flow
   on normally. Costs no element, no request, and nothing for a screen reader
   to announce. */
.gallery-grid .col-2 { grid-column: 2; }
.gallery-grid .col-3 { grid-column: 3; }

/* Swapping cells: a stack of photos cross-cut by a white flash. Each frame
   fades up, holds, then drops out before the next fades in — the white
   background shows through the gap, which is the blink. Frames are evenly
   spaced across the cycle, so `--dur` (set per cell in the HTML) is the only
   knob; give each cell a different one so they never blink in unison. */
.gallery-swap { position: relative; overflow: hidden; background: #fff; }
.gallery-swap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: 0; animation: tile-swap var(--dur, 9s) infinite; }
.gallery-swap img:nth-child(2) { animation-delay: calc(var(--dur, 9s) / 3); }
.gallery-swap img:nth-child(3) { animation-delay: calc(var(--dur, 9s) / 3 * 2); }

@keyframes tile-swap {
  0%, 3%    { opacity: 0; }
  5%, 28%   { opacity: 1; }
  30%, 100% { opacity: 0; }
}

/* headline sandwiched between the two grids — centred, generous air either side */
.gallery-statement { text-align: center; margin: 52px 0; font-size: clamp(38px, 5.4vw, 84px); }

.tile-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--gap); margin-top: 48px; }
.tile-wide { margin-top: 56px; }
.tile { display: flex; flex-direction: column; gap: 20px; color: var(--ink); }
.tile:hover { text-decoration: none; }
.tile:hover .ph { background: #dcdce0; }
.tile-caption { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.tile-caption > span:first-child { display: flex; align-items: baseline; gap: 14px; }
.num { font-size: 14px; letter-spacing: -0.224px; color: var(--slate); }
.tile-name { font-family: var(--font-display); font-size: 28px; font-weight: 600; line-height: 1.14; }
.tile-tags { font-size: 14px; letter-spacing: -0.224px; color: var(--slate); text-align: right; }

.svc-list { margin-top: 40px; border-top: 1px solid var(--hairline); }
.svc-row { display: grid; grid-template-columns: 80px minmax(0, 1.2fr) minmax(0, 1fr) 160px 56px; align-items: center; gap: 24px; padding: 36px 0; border-bottom: 1px solid var(--hairline); color: var(--ink); }
.svc-row:hover { text-decoration: none; }
.svc-row .num { font-size: 17px; }
.svc-name { font-family: var(--font-display); font-size: clamp(36px, 3.9vw, 56px); font-weight: 600; line-height: 1.07; letter-spacing: -0.014em; }
.svc-desc { color: var(--slate); }
.svc-price { font-weight: 600; text-align: right; }
.round-arrow { width: 56px; height: 56px; border-radius: var(--radius-pill); background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; transition: transform .25s ease; }
.svc-row:hover .round-arrow { transform: translateX(4px); }

.cta-final { padding: 110px 0; }
.cta-final .lede { margin-left: auto; margin-right: auto; }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.filter-row { margin-top: 32px; }
.chip { min-height: 44px; padding: 0 20px; border-radius: var(--radius-pill); border: 1px solid var(--steel); background: var(--white); color: var(--ink); font-size: 14px; letter-spacing: -0.224px; }
.filter-row .chip { background: transparent; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Reviews ---------- */
.review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: 32px; }
#reviews .section-head + .review-grid { margin-top: 48px; }
.review { margin: 0; min-height: 330px; display: flex; flex-direction: column; padding: 32px; border-radius: var(--radius-card); }
.on-mist .review { background: var(--white); }
.on-white .review { background: var(--mist); }
.stars { display: flex; gap: 3px; }
.review blockquote { margin: 20px 0 24px; flex-grow: 1; font-family: var(--font-display); font-size: 21px; font-weight: 500; line-height: 1.38; letter-spacing: 0.011em; }
.review figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; border-top: 1px solid var(--hairline); }
.review figcaption > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.review strong { font-size: 14px; letter-spacing: -0.224px; }
.review small { font-size: 12px; letter-spacing: -0.12px; color: var(--slate); }
.tag { font-size: 12px; font-weight: 600; letter-spacing: -0.12px; color: var(--launch); white-space: nowrap; }

/* ---------- Service page ---------- */
.hero-service { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: var(--hero-top); padding-bottom: var(--section-gap); }
.back-link { align-self: flex-start; font-size: 14px; letter-spacing: -0.224px; margin-bottom: var(--back-gap); }

.tag-row { display: flex; align-items: center; gap: 16px; margin-top: 32px; flex-wrap: wrap; }
.tag-label { font-size: 14px; font-weight: 600; letter-spacing: -0.224px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tags li { height: 32px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: var(--radius-pill); border: 1px solid var(--hairline); background: var(--white); font-size: 14px; letter-spacing: -0.224px; }

.cov-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-top: 40px; }
.cov-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }   /* sports: only two coverage types */
.cov-card { display: flex; flex-direction: column; padding: 20px 20px 28px; border-radius: var(--radius-card); background: var(--white); }
.cov-card h3 { margin: 20px 8px 0; font-family: var(--font-display); font-size: 24px; font-weight: 600; line-height: 1.17; letter-spacing: 0; }
.cov-card p { margin: 6px 8px 0; color: var(--slate); }

.checks { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks li svg { flex-shrink: 0; margin-top: 3px; }
.checks.small { gap: 10px; margin: 18px 8px 0; font-size: 14px; line-height: 1.43; letter-spacing: -0.224px; }
.checks.small li svg { margin-top: 1px; }

.pkg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: 48px; }
.pkg { display: flex; flex-direction: column; padding: 32px; border-radius: var(--radius-card); background: var(--mist); box-shadow: 0 0 0 1px var(--mist); transition: box-shadow .2s ease; }
.pkg.is-selected { box-shadow: 0 0 0 2px var(--ink); }
.pkg h3 { margin: 0; font-family: var(--font-display); font-size: 28px; font-weight: 600; line-height: 1.14; }
.pkg-price { margin: 8px 0 0; font-family: var(--font-display); font-size: 24px; font-weight: 600; }
.pkg-meta { margin: 6px 0 0; font-size: 14px; letter-spacing: -0.224px; color: var(--slate); }
.pkg hr { width: 100%; border: 0; border-top: 1px solid var(--hairline); margin: 24px 0; }
.pkg .checks { flex-grow: 1; }

.fact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: 48px; }
.fact { min-height: 170px; padding: 28px; border-radius: var(--radius-card); background: var(--white); }
.fact h3 { margin: 0; font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: 0.011em; }
.fact p { margin: 8px 0 0; color: var(--slate); }

/* ---------- Quote form ---------- */
.quote-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 64px; align-items: start; }
.quote-intro { position: sticky; top: 160px; }
.selected-pkg { display: flex; flex-direction: column; gap: 6px; margin-top: 28px; padding: 20px 24px; border-radius: var(--radius-inner); background: var(--white); }
.selected-pkg small { font-size: 12px; color: var(--slate); }
.selected-pkg strong { font-family: var(--font-display); font-size: 21px; font-weight: 600; }
.else-label { margin: 36px 0 0; font-size: 14px; font-weight: 600; letter-spacing: -0.224px; }

.quote-form { display: flex; flex-direction: column; gap: 28px; padding: 40px; border-radius: var(--radius-card); background: var(--white); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.field-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }   /* sports: date + from/to time slot on one row */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .chip-field legend { font-size: 14px; font-weight: 600; letter-spacing: -0.224px; }
.req { color: var(--launch); }
.field input, .field textarea { width: 100%; border: 1px solid var(--steel); background: var(--white); font-size: 17px; color: var(--ink); }
.field input { height: 52px; padding: 0 22px; border-radius: 980px; }
.field textarea { padding: 16px 22px; border-radius: var(--radius-inner); line-height: 1.47; resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,113,227,0.18); }
.field input[aria-invalid="true"] { border-color: var(--launch); }
.chip-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.chip-field legend { padding: 0; margin-bottom: 12px; }
.chip-field legend span { font-weight: 400; color: var(--slate); }
.note { display: flex; gap: 12px; padding: 16px 20px; border-radius: var(--radius-inner); background: var(--mist); font-size: 14px; line-height: 1.43; letter-spacing: -0.224px; }
.note svg { flex-shrink: 0; margin-top: 1px; }
.form-error { margin: 0; font-size: 14px; color: var(--launch); }
.form-success { min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 20px; border-radius: var(--radius-pill); background: var(--mist); text-align: center; }

/* ---------- Footer ---------- */
.site-footer { padding: 40px 0; background: var(--mist); border-top: 1px solid var(--hairline); font-size: 12px; line-height: 1.33; letter-spacing: -0.12px; color: var(--slate); }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); padding-bottom: 28px; border-bottom: 1px solid var(--hairline); }
.footer-cols > div { display: flex; flex-direction: column; gap: 10px; }
.footer-cols h3 { margin: 0; font-size: 12px; font-weight: 600; color: var(--ink); }
.footer-cols a, .footer-legal a { color: var(--slate); }
.footer-legal { display: flex; justify-content: space-between; gap: 16px; padding-top: 20px; flex-wrap: wrap; }

/* ==========================================================================
   Responsive — Apple-style breakpoints
   ========================================================================== */
@media (max-width: 1068px) {
  :root { --section-gap: 72px; --hero-top: 24px; --back-gap: 32px; }
  .cov-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-row { grid-template-columns: 56px minmax(0, 1fr) 56px; }
  .svc-desc, .svc-price { grid-column: 2; }
  .svc-row .round-arrow { grid-column: 3; grid-row: 1; }
  .quote-grid { grid-template-columns: 1fr; gap: 40px; }
  .quote-intro { position: static; }
  .local-nav nav a:not(.btn) { display: none; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-commas { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: flex-start; padding: 8px var(--gutter) 20px; background: var(--white); border-bottom: 1px solid var(--hairline); font-size: 24px; font-family: var(--font-display); font-weight: 600; }
  .nav-commas.is-open { display: flex; }
  .nav-commas .comma { display: none; }
  .nav-commas.has-current a:not([aria-current]) { color: var(--ink); }
}

@media (max-width: 734px) {
  :root { --section-gap: 56px; --gutter: 20px; --hero-top: 20px; --back-gap: 24px; }
  /* stay 3-up so each block keeps its 3x3 shape — dropping to two columns
     would leave an orphan tile, since 9 is odd. Just tighten the gap. */
  .gallery-grid { gap: 10px; }
  .gallery-statement { margin: 36px 0; }
  .header-actions .btn { display: none; }
  .meta-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meta-row .meta-links { align-items: flex-start; }
  .tile-grid, .review-grid, .pkg-grid, .fact-grid, .cov-grid, .field-grid, .footer-cols { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .tile-caption { flex-direction: column; gap: 4px; }
  .tile-tags { text-align: left; }
  .quote-form { padding: 24px; }
  .review { min-height: 0; }
  .reel-pill { left: 16px; bottom: 16px; }
  .hero-home { padding-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gallery-swap img { animation: none; opacity: 0; }
  .gallery-swap img:first-child { opacity: 1; }
  * { transition: none !important; }
}
