:root {
  --bg: #ffffff;
  --paper: #f4f4f3;
  --surface: #ececeb;
  --surface2: #e0e1e0;
  --ink: #17191b;
  --muted: #555a5e;
  --accent: #ff6a13;
  --accent-ink: #17191b;
  --deep: #c34706;
  --pale: #ffc7a3;
  --line-grey: #cfd1d2;

  --display: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --text: "Source Serif 4", Georgia, serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1rem + 0.6vw, 1.625rem);
  --step-head: clamp(2.25rem, 1.2rem + 4.2vw, 5.5rem);
  --step-display: clamp(7rem, 19vw, 20rem);

  --gap: 8px;
  --pad: clamp(20px, 1.6vw, 28px);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-reveal: 800ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--step-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.tile-accent :focus-visible, .tile-accent:focus-visible, .contact :focus-visible { outline-color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* type roles */
.display, .head, .lead, .figure, h3, .bar, .chip, .cell, .f-word {
  font-family: var(--display);
  font-weight: 700;
}
.display { font-size: var(--step-display); line-height: 0.82; letter-spacing: -0.055em; text-transform: uppercase; margin-left: -0.04em; }
.head { font-size: var(--step-head); line-height: 0.95; letter-spacing: -0.035em; text-wrap: balance; }
.lead, h3 { font-size: var(--step-lead); line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
.figure { font-size: var(--step-head); line-height: 0.95; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.small { font-size: var(--step-small); line-height: 1.45; }

/* the board */
.board { display: grid; gap: var(--gap); padding: 0 var(--gap); margin-bottom: var(--gap); }
.tile { position: relative; padding: var(--pad); overflow: hidden; min-width: 0; }
.tile-paper { background: var(--paper); }
.tile-surface { background: var(--surface); }
.tile-surface2 { background: var(--surface2); }
.tile-ink { background: var(--ink); color: #fff; }
.tile-accent { background: var(--accent); color: var(--accent-ink); }
.tile-deep { background: var(--deep); color: #fff; }
.tile-photo { padding: 0; background: var(--surface2); }
.tile-photo img, .tile-photo video { width: 100%; height: 100%; object-fit: cover; }

.arrow { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: square; transition: transform var(--t-hover) var(--ease-out); }

/* top bar */
.bar {
  position: sticky; top: 0; z-index: 10;
  grid-template-columns: 64px 1fr auto;
  padding-top: var(--gap); margin-bottom: var(--gap);
  background: var(--bg);
  font-size: var(--step-small);
}
.bar .tile { padding: 0 20px; height: 56px; display: flex; align-items: center; }
.bar-mark { justify-content: center; padding: 0 !important; text-decoration: none; font-size: var(--step-body); letter-spacing: -0.03em; }
.bar-nav { padding-left: 0 !important; }
.bar-nav ul { display: flex; gap: 32px; margin-left: calc(50vw - 72px - var(--gap)); }
.bar-nav a { position: relative; text-decoration: none; font-size: var(--step-body); padding-bottom: 2px; }
.bar-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform var(--t-hover) var(--ease-out); }
.bar-nav a:hover::after { transform: none; }
.bar-menu { display: none; }
.bar-cta { text-decoration: none; font-size: var(--step-body); padding: 0 28px !important; background: var(--accent); color: var(--accent-ink); transition: background-color var(--t-hover) ease; }
.bar-cta:hover { background: var(--ink); color: #fff; }

/* hero: two by two */
.hero {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  height: calc(100svh - 72px - var(--gap));
  min-height: 640px;
}
.hero-name { display: flex; flex-direction: column; justify-content: flex-end; gap: 28px; }
.hero-sub { max-width: 34ch; }
.hero-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); min-height: 0; }
.hero-pair .tile { display: flex; flex-direction: column; justify-content: space-between; }
.hero-go { text-decoration: none; transition: background-color var(--t-hover) ease; }
.hero-go:hover { background: #ff7d33; }
.hero-go:hover .arrow, .f-go:hover .arrow, .times-go:hover .arrow { transform: translate(4px, -4px); }
.go-line { display: flex; align-items: center; gap: 12px; font-size: var(--step-body); }

/* services mosaic */
.mosaic {
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(96px, auto);
}
.m-head { grid-column: 1 / 7; grid-row: 1 / 4; display: flex; flex-direction: column; justify-content: space-between; }
.m-head-text { max-width: 44ch; }
.m-video { grid-column: 7 / 13; grid-row: 1 / 6; }
.m-fig { grid-column: 1 / 4; grid-row: 4 / 6; display: flex; flex-direction: column; justify-content: space-between; }
.m-fig p:last-child { max-width: 30ch; }
.m-air { grid-column: 4 / 7; grid-row: 4 / 6; }
.m-list { grid-column: 1 / 4; grid-row: 6 / 9; display: flex; flex-direction: column; justify-content: space-between; }
.m-list li { padding: 4px 0; }
.m-door { grid-column: 4 / 7; grid-row: 6 / 9; }
.m-import { grid-column: 7 / 13; grid-row: 6 / 9; display: flex; flex-direction: column; justify-content: space-between; }
.m-export { grid-column: 1 / 7; grid-row: 9 / 12; display: flex; flex-direction: column; justify-content: space-between; }
.m-import p, .m-export p { max-width: 58ch; }
.m-team { grid-column: 7 / 13; grid-row: 9 / 12; }
.tile-photo img { transition: transform 900ms var(--ease-soft); }
.mosaic .tile-photo:hover img { transform: scale(1.04); }

/* flow */
.flow-tile { padding: clamp(28px, 4vw, 64px) var(--pad); display: grid; gap: 48px; }
.flow-intro { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); row-gap: 24px; }
.flow-intro .head { grid-column: 1 / 6; }
.flow-intro p { grid-column: 7 / 12; align-self: end; max-width: 52ch; }
.flow { width: 100%; height: auto; }
.flow-tall { display: none; }
.q1.t1 { fill: var(--line-grey); }
.q1.t2 { fill: var(--pale); }
.q2 { fill: var(--ink); }
.q3 { fill: var(--accent); }
.flow-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); margin-top: 32px; }
.flow-steps li { max-width: 34ch; }
.flow-steps strong { display: block; font-family: var(--display); font-size: var(--step-lead); letter-spacing: -0.02em; margin-bottom: 6px; }

/* times + live origin picker */
.times {
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto minmax(260px, 33vw) minmax(260px, 33vw) auto;
}
.times-head { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px 48px; }
.origins { display: flex; flex-wrap: wrap; gap: var(--gap); }
.chip {
  border: 0; cursor: pointer; padding: 14px 20px; min-height: 48px;
  background: var(--surface2); color: var(--ink); font-size: var(--step-body);
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.chip:hover { background: var(--line-grey); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
.times-photo { grid-column: 1; grid-row: 2 / 4; }
.times-tile { grid-column: 2; display: flex; flex-direction: column; gap: 12px; padding: 28px; }
.times-tile p:not(.figure) { max-width: 26ch; }
.times-tile .figure span { display: inline-block; }
.times-tile .figure.swap span { animation: swap 520ms var(--ease-out); }
@keyframes swap { from { opacity: 0; transform: translateY(0.3em); } to { opacity: 1; transform: none; } }
.times-go { margin-top: auto; display: inline-flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 700; text-decoration: none; color: var(--accent); font-size: var(--step-lead); }
.times-note { grid-column: 1 / -1; color: var(--ink); }

/* faq bands */
.faq { margin-bottom: var(--gap); }
.faq-title-band { background: var(--accent); min-height: 40svh; display: flex; align-items: flex-end; padding: 32px max(var(--pad), 24px); }
.faq-band { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); padding: 56px max(var(--pad), 24px); background: var(--paper); }
.faq-band:nth-child(odd) { background: var(--surface); }
.faq-q { grid-column: 1 / 6; max-width: 22ch; }
.faq-a { grid-column: 7 / 13; max-width: 60ch; }

/* contact */
.contact { background: var(--accent); color: var(--accent-ink); min-height: 80svh; padding: 48px 0 96px; overflow: hidden; margin-bottom: var(--gap); }
.strip { overflow: hidden; }
.strip-track { display: flex; gap: var(--gap); width: max-content; animation: drift 70s linear infinite; }
.strip img { height: 150px; width: auto; object-fit: cover; }
.strip .r34 { aspect-ratio: 3 / 4; }
.strip .r11 { aspect-ratio: 1; }
.strip .r32 { aspect-ratio: 3 / 2; }
@keyframes drift { to { transform: translateX(calc(-50% - var(--gap) / 2)); } }
.contact-inner { padding: 72px max(var(--pad), 24px) 0; }
.contact-text { max-width: 52ch; margin-top: 24px; }
.quote { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); margin-top: 40px; }
.cell { display: block; height: 96px; background: #ff8a47; transition: background-color var(--t-hover) ease; }
.cell input { width: 100%; height: 100%; border: 0; background: transparent; text-align: center; font-size: var(--step-body); font-family: var(--display); font-weight: 700; color: var(--ink); }
.cell input::placeholder { color: var(--ink); opacity: 0.72; }
.cell input:focus { outline: none; }
.cell:focus-within { background: #ffe1cc; outline: 3px solid var(--ink); outline-offset: 2px; }
.cell-go { border: 0; cursor: pointer; background: var(--ink); color: #fff; font-size: var(--step-body); transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.cell-go:hover { background: #2c3034; }
.quote-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); margin-top: 12px; }
.quote-notes p:last-child { grid-column: 3; }

/* footer of tiles */
.foot { grid-template-columns: repeat(12, 1fr); grid-template-rows: 220px 320px auto; padding-bottom: var(--gap); margin-bottom: 0; }
.f-state { grid-column: 1 / 5; display: flex; flex-direction: column; justify-content: space-between; }
.f-nav { grid-column: 5 / 8; }
.f-nav li { padding: 2px 0; }
.f-nav a { text-decoration: none; }
.f-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.f-time { grid-column: 8 / 10; display: flex; flex-direction: column; justify-content: space-between; }
.f-mail { grid-column: 10 / 13; display: flex; flex-direction: column; justify-content: space-between; }
.f-mail a { text-decoration-thickness: 2px; text-underline-offset: 5px; overflow-wrap: anywhere; }
.f-word { grid-column: 1 / 9; display: flex; align-items: center; justify-content: center; font-size: var(--step-display); letter-spacing: -0.055em; line-height: 0.8; }
.f-go { grid-column: 9 / 13; display: flex; flex-direction: column; justify-content: space-between; text-decoration: none; transition: background-color var(--t-hover) ease; }
.f-go:hover { background: #ff7d33; }
.f-go .arrow { align-self: flex-end; width: 64px; height: 64px; }
.f-credits { grid-column: 1 / -1; color: var(--ink); }

/* press feedback */
.press { transition-property: background-color, color, transform; }
.press:active { transform: scale(0.98); }

/* motion */
@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] { opacity: 0; transform: translateY(22px); animation: rise var(--t-reveal) var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 90ms + 200ms); }
  .js .shutter { clip-path: inset(0 0 100% 0); animation: shutter 1100ms var(--ease-in-out) 150ms forwards; }
  .js .shutter img { transform: scale(1.12); animation: settle 1600ms var(--ease-soft) 150ms forwards; }
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 75ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .flow .q { transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: calc(var(--d) * 12ms); transform-box: fill-box; transform-origin: center; }
  .js .flow-body:not(.is-in) .q { opacity: 0; transform: scale(0.2); }
  .js .flow-body .q3 { transition-delay: calc(var(--d) * 12ms + 500ms); }
  .js .flow-body .q2 { transition-delay: calc(var(--d) * 8ms + 250ms); }
  .hero-sea img { transition: none; }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes shutter { to { clip-path: inset(0); } }
@keyframes settle { to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .strip-track { animation: none; }
  .strip { overflow-x: auto; }
}

/* tablet */
@media (max-width: 1024px) {
  .mosaic { grid-auto-rows: minmax(72px, auto); }
  .times-tile { padding: var(--pad); }
  .foot { grid-template-rows: auto 260px auto; }
  .f-state { grid-column: 1 / 8; }
  .f-nav { grid-column: 8 / 13; }
  .f-time { grid-column: 1 / 5; min-height: 180px; }
  .f-mail { grid-column: 5 / 13; min-height: 180px; }
  .f-word { grid-column: 1 / 13; }
  .f-go { grid-column: 1 / 13; min-height: 200px; }
  .bar-nav ul { margin-left: 24px; gap: 24px; }
  .flow-intro .head { grid-column: 1 / -1; }
  .flow-intro p { grid-column: 1 / 10; }
}

/* phone: its own board */
@media (max-width: 720px) {
  :root { --gap: 6px; --pad: 20px; }
  .bar { grid-template-columns: 56px 1fr auto; }
  .bar .tile { height: 52px; }
  .bar-cta { padding: 0 16px !important; }
  .bar-menu { display: block; border: 0; background: none; padding: 0 20px; height: 100%; cursor: pointer; font-weight: 700; font-family: var(--display); font-size: var(--step-body); }
  .bar-nav { position: static; }
  .bar-nav ul { display: none; }
  .bar-nav.open ul {
    display: grid; position: absolute; left: var(--gap); right: var(--gap); top: calc(52px + var(--gap) * 2);
    gap: var(--gap); margin: 0;
  }
  .bar-nav.open { overflow: visible; }
  .bar-nav.open li a { display: block; background: var(--ink); color: #fff; padding: 18px 20px; font-family: var(--display); font-size: var(--step-lead); }

  .hero { grid-template-columns: 1fr; grid-template-rows: auto auto auto; height: auto; min-height: 0; }
  .hero-name { min-height: 42svh; gap: 32px; }
  :root { --step-display: 40vw; }
  .hero-sea { aspect-ratio: 4 / 3; }
  .hero-air { order: 4; aspect-ratio: 4 / 3; }
  .hero-pair .tile { aspect-ratio: 1; }

  .mosaic { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; }
  .mosaic > * { grid-column: auto !important; grid-row: auto !important; }
  .m-head, .m-video, .m-import, .m-export, .m-team { grid-column: 1 / -1 !important; }
  .m-head { min-height: 260px; gap: 24px; }
  .m-video, .m-team { aspect-ratio: 4 / 3; }
  .m-fig, .m-air, .m-list, .m-door { aspect-ratio: 1; }
  .m-fig p:last-child { font-size: var(--step-small); line-height: 1.4; }
  .m-list { grid-column: 1 / -1 !important; aspect-ratio: auto; gap: 16px; }
  .m-door { grid-column: 1 / -1 !important; aspect-ratio: 4 / 3; }
  .m-import, .m-export { gap: 16px; }

  .flow-intro { display: block; }
  .flow-intro p { margin-top: 20px; }
  .flow-body { display: grid; grid-template-columns: 1fr 38vw; gap: 16px; }
  .flow-wide { display: none; }
  .flow-tall { display: block; }
  .flow-steps { grid-template-columns: 1fr; grid-template-rows: repeat(3, 1fr); margin-top: 0; gap: 0; }
  .flow-steps li { line-height: 1.4; align-self: center; }

  .times { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .times-photo { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 4 / 3; }
  .times-tile { grid-column: auto; aspect-ratio: auto; min-height: 50vw; padding: 16px; }
  .times-tile p:not(.figure) { line-height: 1.4; }
  .times-go { font-size: var(--step-body); }
  .chip { padding: 12px 14px; }

  .faq-title-band { min-height: 30svh; padding: 24px 20px; }
  .faq-band { display: block; padding: 32px 20px; }
  .faq-q { margin-bottom: 12px; }

  .strip img { height: 110px; }
  .contact-inner { padding-top: 48px; }
  .quote { grid-template-columns: 1fr; }
  .cell { height: 60px; }
  .quote-notes { grid-template-columns: 1fr; }
  .quote-notes p:last-child { grid-column: auto; }

  .foot { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .foot > * { grid-column: auto !important; }
  .f-word { grid-column: 1 / -1 !important; order: -1; height: 160px; }
  .f-go { grid-column: 1 / -1 !important; order: -2; min-height: 160px; }
  .f-time, .f-mail { min-height: 160px; }
  .f-state, .f-credits, .f-mail { grid-column: 1 / -1 !important; gap: 24px; }
  .f-mail .lead { font-size: var(--step-body); }
}
