/* Design option A: Teal. His own teal (#0197B2, from his logo and flyers) leads, with tall,
   bold, condensed letters like his circuits flyer (Barlow Condensed) and Barlow for reading.
   White text only at large sizes on the teal; smaller words on teal are near-black (5.3:1). */
@font-face { font-family: 'Barlow Condensed'; src: url(/fonts/barlow-condensed-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url(/fonts/barlow-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url(/fonts/barlow-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --teal: #0197B2; --teal-deep: #006E82; --ink: #04161B; --ink-2: #0B2A33; --paper: #FFFFFF; --mist: #EAF3F5; --line: #C9DADE;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --head: 'Barlow Condensed', 'Arial Narrow', sans-serif; --body: 'Barlow', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 18px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: .95; letter-spacing: -.005em; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(44px, 6.4vw, 84px); }
p { margin: 0; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.hero :focus-visible, .close :focus-visible { outline-color: #fff; }
.ic { flex: none; }

/* Buttons: one shape, square like the flyer's blocks; they press in slightly when tapped */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 22px; font: 600 17px/1.1 var(--body); text-decoration: none; border: 2px solid transparent; transition: transform .16s var(--ease), background-color .2s var(--ease), color .2s var(--ease); }
.btn:active { transform: scale(.97); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-2); }
.btn-teal { background: var(--teal-deep); color: #fff; }
.btn-teal:hover { background: var(--ink-2); }
.btn-line { border-color: currentColor; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-height: 48px; }
.brand img { width: 64px; height: auto; }
.brand-name { font: 700 24px/1 var(--head); }
.nav { display: none; gap: 28px; margin-left: auto; }
.nav a { font-weight: 600; text-decoration: none; padding: 12px 0; background: linear-gradient(var(--teal), var(--teal)) 0 calc(100% - 8px) / 0 3px no-repeat; transition: background-size .25s var(--ease); }
.nav a:hover { background-size: 100% 3px; }
.top-cta { display: none; }
.menu { margin-left: auto; position: relative; }
.menu summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; font-weight: 600; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); min-width: 220px; }
.menu-panel ul { list-style: none; margin: 0; padding: 8px 0; }
.menu-panel a { display: block; padding: 12px 20px; font-weight: 600; text-decoration: none; }
.menu-panel a:hover { background: var(--mist); }
@media (min-width: 960px) { .nav, .top-cta { display: flex; } .menu { display: none; } }
@media (max-width: 420px) { .brand-name { font-size: 20px; } .brand img { width: 52px; } }

/* Hero: words on his teal, his photo beside them */
.hero { display: grid; background: var(--teal); }
.hero-text { display: flex; align-items: center; padding: 48px 16px 40px; }
.hero-in { max-width: 640px; margin-left: auto; width: 100%; }
.kicker { font-weight: 600; font-size: 18px; margin-bottom: 16px; }
.hero h1 { color: #fff; font-size: clamp(56px, 6.8vw, 108px); line-height: .9; margin-bottom: 24px; }
.hero h1 .ln { display: block; overflow: hidden; padding-bottom: .04em; }
.hero h1 .ln > span { display: block; }
.lead { font-size: 20px; line-height: 1.5; max-width: 34ch; margin-bottom: 28px; }
.fact { margin-top: 20px; font-weight: 600; }
.hero-photo { position: relative; min-height: 420px; background: var(--ink-2); }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.25fr .75fr; min-height: calc(100svh - 108px); }
  .hero-text { padding: 64px 48px 64px 32px; }
  .hero-photo { min-height: 0; }
}
/* The hero arrives once: each line of the heading slides up, then the rest follows */
@media (prefers-reduced-motion: no-preference) {
  .js .hero h1 .ln > span { animation: up .8s var(--ease) both; }
  .js .hero h1 .ln:nth-child(2) > span { animation-delay: .08s; }
  .js .hero .lead, .js .hero .actions, .js .hero .fact, .js .hero .kicker { animation: fade .6s var(--ease) .25s both; }
  .js .hero-photo img { animation: fade .9s var(--ease) both; }
}
@keyframes up { from { transform: translateY(105%); } }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }

/* Three ways to train */
.train { padding: 96px 0; }
.sec-head { display: grid; gap: 16px; margin-bottom: 48px; }
.sec-head p { font-size: 20px; max-width: 40ch; }
@media (min-width: 900px) { .sec-head { grid-template-columns: 1.3fr 1fr; align-items: end; } }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 40px; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, 1fr); gap: 24px; } .card-img { aspect-ratio: 4 / 5; } }
.card a { display: grid; text-decoration: none; border-top: 4px solid var(--teal); padding-top: 16px; }
.card-img { overflow: hidden; aspect-ratio: 4 / 3; background: var(--mist); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
@media (hover: hover) and (pointer: fine) { .card a:hover .card-img img { transform: scale(1.03); } }
.card-no { font: 700 22px/1 var(--head); color: var(--teal-deep); margin-top: 20px; }
.card-name { font: 700 40px/1 var(--head); margin: 6px 0 10px; }
.card a:hover .card-name { text-decoration: underline; text-decoration-color: var(--teal); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.card-line { font-size: 17px; }

/* His words, set big: they turn teal as you scroll past (all teal without JavaScript) */
.words { padding: 40px 0 96px; }
.big-words { font: 700 clamp(52px, 9vw, 128px)/.92 var(--head); color: var(--teal); max-width: 14ch; }
.big-words.scrub span { color: #5E6E72; transition: color .3s var(--ease); }
.big-words.scrub span.lit { color: var(--teal); }

/* Circuits: the details as a ticket */
.circuits { background: var(--mist); padding: 96px 0; }
.circ-grid { display: grid; gap: 32px; align-items: stretch; }
@media (min-width: 900px) { .circ-grid { grid-template-columns: 1fr 1fr; gap: 0; } }
.circ-photo { min-height: 320px; position: relative; }
.circ-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ticket { background: #fff; padding: 40px 24px; border-top: 8px solid var(--teal); }
@media (min-width: 900px) { .ticket { padding: 56px 48px; border-top: 0; border-left: 8px solid var(--teal); } }
.ticket h2 { font-size: clamp(40px, 4.6vw, 64px); margin-bottom: 20px; }
.ticket-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.ticket-time { font: 700 clamp(64px, 8vw, 112px)/.85 var(--head); color: var(--teal-deep); }
/* The 45-minute class on a stopwatch: the ring runs from quarter to the hour round to half past */
.timer { position: relative; flex: none; width: clamp(88px, 10vw, 120px); aspect-ratio: 1; margin: 0; display: grid; place-items: center; }
.timer svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.t-track, .t-arc { fill: none; stroke-width: 9; }
.t-track { stroke: var(--mist); }
.t-arc { stroke: var(--teal); stroke-dasharray: 45 60; stroke-dashoffset: 0; transform: rotate(180deg); transform-origin: 60px 60px; }
.t-ticks { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.t-num { font: 600 15px/1 var(--body); text-align: center; }
.t-num b { display: block; font: 700 clamp(30px, 3.4vw, 40px)/1 var(--head); }
.ticket-time span { color: var(--ink); }
.ticket-time small { font-size: .4em; }
.ticket-list { margin: 0 0 32px; border-top: 2px dashed var(--line); }
.ticket-list div { display: grid; grid-template-columns: 100px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ticket-list dt { font-weight: 600; color: var(--teal-deep); }
.ticket-list dd { margin: 0; }

/* How to get started: three numbers on a line */
.steps { padding: 96px 0; }
.steps h2 { margin-bottom: 48px; }
.step-list { list-style: none; margin: 0 0 40px; padding: 0; display: grid; gap: 32px; counter-reset: s; position: relative; }
@media (min-width: 760px) {
  .step-list { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .step-list::before { content: ''; position: absolute; left: 0; right: 0; top: 30px; height: 4px; background: var(--ink); border-radius: 2px; transform-origin: 0 50%; }
}
.step-list li { position: relative; }
.step-no { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--teal); box-shadow: inset 0 0 0 5px var(--teal), inset 0 0 0 7px rgba(255, 255, 255, .55); color: var(--ink); font: 700 34px/1 var(--head); margin-bottom: 20px; position: relative; }
.step-list h3 { font-size: 36px; margin-bottom: 10px; }

/* The gym moments, once each as they arrive (options.js adds .in; only with motion allowed):
   the bar slides out, then each plate rolls on and settles; the timer's ring winds round */
.mo .step-list::before { transition: transform .6s var(--ease); }
.mo .step-list:not(.in)::before { transform: scaleX(0); }
.mo .step-list .step-no { transition: transform .65s cubic-bezier(.34, 1.36, .64, 1) calc(.35s + var(--i) * .16s), opacity .3s ease calc(.35s + var(--i) * .16s); }
.mo .step-list:not(.in) .step-no { opacity: 0; transform: translateX(-56px) rotate(-120deg); }
.mo .step-list h3, .mo .step-list p { transition: opacity .4s ease calc(.5s + var(--i) * .16s), transform .5s var(--ease) calc(.5s + var(--i) * .16s); }
.mo .step-list:not(.in) h3, .mo .step-list:not(.in) p { opacity: 0; transform: translateY(8px); }
.mo .t-arc { transition: stroke-dashoffset 1.4s cubic-bezier(.65, 0, .35, 1) .2s; }
.mo .timer:not(.in) .t-arc { stroke-dashoffset: 45; }

/* Meet David */
.about { padding: 0 0 96px; }
.about-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .about-grid { grid-template-columns: .9fr 1.1fr; gap: 64px; } }
.about-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about-text h2 { margin-bottom: 24px; }
.about-text blockquote { margin: 0 0 24px; padding-left: 20px; border-left: 6px solid var(--teal); font: 700 clamp(30px, 3.4vw, 44px)/1.05 var(--head); }
.about-text p + p { margin-top: 16px; }
.reviews-ph { margin-top: 24px !important; }

/* Where David trains: a plain list with lines between */
.where { padding: 0 0 96px; }
.where h2 { margin-bottom: 32px; }
.where-list { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--ink); }
.where-list li { display: grid; gap: 4px; padding: 20px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 760px) { .where-list li { grid-template-columns: 1.3fr 1fr 1fr; align-items: baseline; } }
.w-name { font: 700 30px/1.05 var(--head); }
.w-what { color: var(--teal-deep); font-weight: 600; }

/* The close, back on teal */
.close { background: var(--teal); padding: 96px 0; }
.close-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .close-grid { grid-template-columns: 1.2fr 1fr; align-items: end; } }
.close h2 { color: #fff; font-size: clamp(56px, 8vw, 112px); margin-bottom: 20px; }
.contact { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.contact a { display: flex; align-items: center; gap: 14px; min-height: 56px; border-bottom: 1px solid rgba(4, 22, 27, .3); text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.contact a:hover span { text-decoration: underline; }

/* Footer */
.foot { background: var(--ink); color: #fff; padding: 48px 0 112px; }
@media (min-width: 960px) { .foot { padding-bottom: 48px; } }
.foot-row { display: grid; gap: 16px; }
.foot img { width: 120px; }
.foot .by { color: #C4D3D7; font-size: 15px; }

/* On a phone: Call and Free consultation along the bottom */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
.bar .btn { min-height: 48px; padding: 8px 10px; font-size: 15px; }
@media (min-width: 960px) { .bar { display: none; } }
