/* Paul Park Real Estate: components. Tokens only; no raw spacing. */

*, *::before, *::after { box-sizing: border-box; }
html.lenis { scroll-behavior: auto; height: auto; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: var(--t-body); line-height: 1.55; font-weight: 400; }
/* The ground: one fixed layer of grain, light and column lines that the whole page scrolls over. */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--tex-grain), var(--tex-light), var(--tex-cols), var(--bg); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--s-4); top: var(--s-4); z-index: 100; display: inline-flex; align-items: center; min-height: var(--control); padding: 0 var(--s-5); background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; transform: translateY(-200%); }
.skip:focus { transform: none; }

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
/* Every section fills at least one screen, with its content centred and clear of the header. */
.section, .band { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: var(--hero-top) 0 var(--section); }
.section--soft { background: var(--tex-grain), var(--tex-light) fixed, var(--tex-cols) fixed, var(--bg-soft); }
.cols { display: grid; grid-template-columns: var(--grid-2); gap: var(--head-gap) var(--col-gap); align-items: start; }

/* Section grounds. Each one re-points the semantic tokens, so every component inside just works. */
.band { background: var(--tex-grain), var(--tex-light) fixed, var(--tex-cols) fixed, var(--bg); color: var(--fg); }
.band--warm, [data-tone="light"] { --bg: var(--band-soft); }
.band--blue, [data-tone="blue"], .who { --tex-grain: var(--grain-on-dark); --tex-light: var(--light-on-dark); --bg: var(--band-blue); --fg: var(--on-deep); --fg-quiet: var(--on-deep); --accent: var(--ivory); --on-accent: var(--band-blue); --line: var(--line-deep); --line-strong: var(--line-deep); }
.foot { --tex-grain: var(--grain-on-dark); --tex-light: var(--light-on-dark); --bg: var(--band-night); --fg: var(--on-deep); --fg-quiet: var(--mist); --accent: var(--sky); --on-accent: var(--midnight-900); --line: var(--line-deep); --line-strong: var(--line-deep); }

/* Type scale. h1 is the hero only; h2 opens a section; h3 titles a thing inside a section; h4 names a card;
   h5 is an introductory line; h6 is the small capital label. Body is 16px everywhere. */
.h1, .h2, .h3, .h4, .h5 { font-family: var(--font-display); font-weight: 400; }
.h1 { font-size: var(--t-h1); line-height: 0.94; letter-spacing: -0.04em; }
.h2 { font-size: var(--t-h2); line-height: 1.05; letter-spacing: -0.03em; }
.h3 { font-size: var(--t-h3); line-height: 1.1; letter-spacing: -0.025em; }
.h4 { font-size: var(--t-h4); line-height: 1.25; letter-spacing: -0.015em; }
.h5 { font-size: var(--t-h5); line-height: 1.4; letter-spacing: -0.01em; }
.h6, .label { font-family: var(--font-body); font-size: var(--t-h6); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.6; }
.lead { font-size: var(--t-body); line-height: 1.6; max-width: 34em; }
/* No widows: headings wrap in balanced lines, running text never leaves one word alone on the last line. */
.h1, .h2, .h3, .h4, .h5, h1, h2, h3, .card__name, .video__title { text-wrap: balance; }
p, li, dd, figcaption, blockquote, .lead, .way__body span, .who__facts span { text-wrap: pretty; }
.hero__say .lead { font-family: var(--font-display); font-size: var(--t-h5); line-height: 1.4; letter-spacing: -0.01em; max-width: 26em; }
.quiet { color: var(--fg-quiet); }
.accent { color: var(--accent); }
.head { display: flex; flex-direction: column; gap: var(--s-4); }
.wrap > .head + * { margin-top: var(--head-gap); }

/* Buttons: one family. A solid pill for the main action, an outlined pill for a second one, and a solid disc for a single glyph. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-3); min-height: var(--control); padding: 0 var(--s-6); border-radius: var(--pill); border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: var(--t-body); line-height: 1.5; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .25s ease, color .25s ease; }
.btn:hover { background: transparent; color: var(--accent); }
.btn span { transition: transform .25s ease; }
.btn:hover span { transform: translateX(var(--s-1)); }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent); color: var(--on-accent); }
.round, .card__go, .video__play { flex: none; width: var(--control); height: var(--control); padding: 0; border-radius: 50%; border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); font-size: var(--t-body); line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background-color .25s ease, color .25s ease; }
.round:hover, .card--all:hover .card__go { background: transparent; color: var(--accent); }

.logo { height: var(--logo); width: auto; }
.dot, .hero__steps .is-on::before { content: ""; display: inline-block; width: var(--s-2); height: var(--s-2); border-radius: 50%; background: var(--accent); margin-right: var(--s-3); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.5); } }

/* Loading screen. Runs on keyframes alone, so it always finishes and gets out of the way. */
.loader { display: none; }
.is-loading .loader { display: block; position: fixed; inset: 0; z-index: 200; background: var(--grain-on-dark), var(--light-on-dark), var(--midnight-700); color: var(--cream); animation: loader-out .6s ease 3.1s both; }
.is-loading .loader__photos { position: absolute; left: 50%; top: 50%; width: 30vmin; height: 30vmin; overflow: hidden; transform: translate(-50%, -50%); animation: loader-open 3.1s linear both; }
.is-loading .loader__photos img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 52% 50%; }
.is-loading .loader__photos img:nth-child(n+2) { animation: loader-pic .4s cubic-bezier(.2, .7, .1, 1) both; }
.is-loading .loader__photos img:nth-child(2) { animation-delay: .6s; }
.is-loading .loader__photos img:nth-child(3) { animation-delay: 1.1s; }
.is-loading .loader__photos img:nth-child(4) { animation-delay: 1.6s; }
.is-loading .loader__mark { position: absolute; left: 50%; top: var(--s-7); height: var(--mark); width: auto; transform: translateX(-50%); animation: loader-fade 3.1s linear both; }
.is-loading .loader__count { position: absolute; left: 0; right: 0; bottom: var(--s-7); text-align: center; font-family: var(--font-display); font-size: var(--t-h4); line-height: 1.25; animation: loader-fade 3.1s linear both; }
@keyframes loader-open { 0% { clip-path: inset(50% 50%); width: 30vmin; height: 30vmin; animation-timing-function: cubic-bezier(.2, .7, .1, 1); } 14% { clip-path: inset(0 0); width: 30vmin; height: 30vmin; } 68% { clip-path: inset(0 0); width: 30vmin; height: 30vmin; animation-timing-function: cubic-bezier(.7, 0, .2, 1); } 100% { clip-path: inset(0 0); width: 100%; height: 100%; } }
@keyframes loader-pic { from { opacity: 0; transform: scale(1.12); } to { opacity: 1; transform: none; } }
@keyframes loader-fade { 0% { opacity: 0; } 12% { opacity: 1; } 64% { opacity: 1; } 72% { opacity: 0; } 100% { opacity: 0; } }
@keyframes loader-out { from { opacity: 1; visibility: visible; } to { opacity: 0; visibility: hidden; } }

/* Header: frosted glass over whatever is behind it. Once the page moves it drops to a slim bar with just the mark. */
.top { position: fixed; left: 0; right: 0; top: 0; z-index: 50; height: var(--header); background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); border-bottom: 1px solid var(--line); transition: height .4s cubic-bezier(.2, .7, .1, 1), background-color .4s ease; }
.top.is-small { height: var(--header-s); background: var(--glass-strong); }
.top__in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); }
.top__logo { display: flex; align-items: center; min-height: var(--control); }
.top .mark { display: none; height: var(--mark); width: auto; }
.top.is-small .logo { display: none; }
.top.is-small .mark { display: block; }
.top__nav { display: none; gap: var(--s-7); }
.top__tools { display: flex; align-items: center; gap: var(--s-2); }
.top__panel { position: absolute; left: 0; right: 0; top: 100%; display: flex; flex-direction: column; padding: var(--s-4) var(--gutter) var(--s-6); background: var(--bg); border-bottom: 1px solid var(--line); }
.top__panel[hidden] { display: none; }
.top__panel a { display: flex; align-items: center; min-height: var(--s-8); text-decoration: none; border-bottom: 1px solid var(--line); }
.top__nav a { display: inline-flex; align-items: center; min-height: var(--control); text-decoration: none; font-size: var(--t-small); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.top__nav a:hover { color: var(--accent); }

/* Hero. In the flow (phones, reduced motion): headline, photo, name band, line, steps, then Paul's card. */
.hero { --p: 0; --a: 1; position: relative; }
.hero__cue { display: none; }
.hero__stage { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: var(--s-6); padding: var(--hero-top) var(--gutter) 0; }
.hero__title { position: relative; z-index: 2; font-family: var(--font-display); font-weight: 400; font-size: var(--t-h1); line-height: 0.94; letter-spacing: -0.04em; margin-left: -0.04em; }
.hero__title em { font-style: normal; color: var(--accent); }
.hero__line { display: block; clip-path: inset(0 -100vw -0.2em -100vw); white-space: nowrap; }
.hero__line > span { display: block; animation: line-up 1s cubic-bezier(.2, .7, .1, 1) both; }
.hero__line--2 > span { animation-delay: .12s; }
@keyframes line-up { from { transform: translateY(105%); } to { transform: none; } }
.hero__photo { position: relative; overflow: hidden; width: var(--hero-photo); aspect-ratio: 3 / 2; animation: unmask 1.2s cubic-bezier(.2, .7, .1, 1) .1s both; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 52% 50%; }
.hero__photo::after { content: ""; position: absolute; inset: var(--frame-inset); border: 1px solid var(--frame); pointer-events: none; }
@keyframes unmask { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
.hero__say { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-6); max-width: 520px; animation: fade-up 1s ease .5s both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(var(--s-5)); } to { opacity: 1; transform: none; } }
.hero__steps { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); color: var(--fg-quiet); animation: fade-up 1s ease .7s both; }
.hero__steps li { white-space: nowrap; }
.hero__steps .is-on { color: var(--accent); }

.who { margin: var(--s-4) calc(var(--gutter) * -1) 0; padding: var(--s-7) var(--gutter); background: var(--tex-grain), var(--bg); color: var(--fg); display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-6); }
.who__face { width: var(--portrait); height: var(--portrait); object-fit: cover; border-radius: 50%; }
.who__name { display: flex; flex-direction: column; gap: var(--s-1); }
.who__facts { width: 100%; border-top: 1px solid var(--line-strong); }
.who__facts li { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-1); padding: var(--s-3) 0; border-bottom: 1px solid var(--line-strong); }

/* The three steps: a heading and one doorstep on the left, three large outlined numerals on the right */
.steps__side { display: flex; flex-direction: column; gap: var(--head-gap); }
.steps__photo { position: relative; width: 100%; max-width: var(--step-photo); }
.steps__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.steps__photo figcaption { margin-top: var(--s-3); color: var(--fg-quiet); }
.steps { display: flex; flex-direction: column; border-top: 1px solid var(--line-strong); }
.steps li { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3) var(--col-gap); align-items: center; padding: var(--s-5) 0; border-bottom: 1px solid var(--line-strong); }
.steps__no { font-family: var(--font-display); font-weight: 300; font-size: var(--t-h1); line-height: 0.8; letter-spacing: -0.03em; color: transparent; -webkit-text-stroke: 1.5px var(--accent); }
.steps__text { display: flex; flex-direction: column; gap: var(--s-3); }

/* Homes. In the flow: three sets of cards, one after another. */
.market { position: relative; }
.market__stage { position: relative; overflow: hidden; padding: var(--section) 0; color: var(--fg); }
.market__sets { display: flex; flex-direction: column; gap: var(--s-8); }
.set { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); display: flex; flex-direction: column; gap: var(--s-6); }
.set__label { text-align: center; }
.set__cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
.card { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 5; text-decoration: none; color: var(--cream); }
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .1, 1); }
.card:hover img { transform: scale(1.06); }
.card__bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2) var(--s-3); padding: var(--s-8) var(--s-5) var(--s-4); background: linear-gradient(180deg, rgba(8, 14, 36, 0) 0%, rgba(8, 14, 36, 0.82) 100%); }
.card__no { flex: none; width: var(--s-6); height: var(--s-6); border-radius: 50%; background: var(--ivory); color: var(--midnight-700); font-size: var(--t-small); font-weight: 600; display: flex; align-items: center; justify-content: center; transition: background-color .25s ease; }
.card:hover .card__no { background: var(--sky); }
.card__name { margin-left: auto; font-family: var(--font-display); font-size: var(--t-h4); line-height: 1.25; letter-spacing: -0.01em; text-align: right; }
.card--all { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: var(--s-5); border: 1px solid var(--line-strong); color: var(--fg); }
.market__word { display: none; }

/* Start: three ways in, each a tall photo card */
.ways { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
.way { position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); min-height: var(--way-h); padding: var(--s-5); color: var(--cream); text-decoration: none; }
.way__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .1, 1); }
.way::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 14, 36, 0.1) 0%, rgba(8, 14, 36, 0.86) 100%); transition: opacity .4s ease; }
.way__body, .way__go { position: relative; z-index: 1; }
.way__body { display: flex; flex-direction: column; gap: var(--s-2); max-width: 22em; }
.way:hover .way__img { transform: scale(1.06); }
.way:hover .way__go { background: transparent; color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-top: var(--s-7); }
.tags li { display: inline-flex; align-items: center; font-size: var(--t-small); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.6; white-space: nowrap; }
.tags li::before { content: ""; width: var(--s-1); height: var(--s-1); border-radius: 50%; background: currentColor; margin-right: var(--s-3); }

/* The window: a house, with his clients' words on it as glass cards */
.window { --q: 1; position: relative; }
.window__stage { position: relative; overflow: hidden; display: flex; align-items: flex-end; min-height: 100svh; }
.window__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.window__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 14, 36, 0) 25%, rgba(8, 14, 36, 0.72) 100%); }
.reviews { position: relative; padding-top: var(--hero-top); padding-bottom: var(--s-7); }
/* One review at a time, on a single panel of midnight glass: label and score, the words at heading size, then count, line and arrows. */
.rev { --accent: var(--ivory); --on-accent: var(--midnight-700); width: 100%; max-width: var(--rev-w); display: flex; flex-direction: column; gap: var(--s-6); padding: var(--s-6) var(--s-5); background: rgba(11, 19, 48, 0.62); -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3); border: 1px solid var(--line-deep); color: var(--cream); }
.rev__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-5); padding-bottom: var(--s-4); border-bottom: 1px solid var(--line-deep); }
.rev__score { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--control); font-weight: 600; text-underline-offset: 6px; }
.rev__list { display: flex; flex-direction: column; gap: var(--s-6); }
.rev__list blockquote { display: flex; flex-direction: column; gap: var(--s-5); }
.rev__list footer { color: var(--sky); }
.rev__foot { display: flex; align-items: center; gap: var(--s-4); }
.rev__bar { flex: 1; height: 1px; background: var(--line-deep); }
.rev__bar span { display: block; height: 100%; width: 14.286%; background: var(--cream); transition: width .5s cubic-bezier(.2, .7, .1, 1); }
.rev__nav { display: flex; gap: var(--s-2); }
/* With the script running, the reviews share one place and change with a short rise. */
.rev.is-live .rev__list { display: grid; }
.rev.is-live .rev__list li { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(var(--s-4)); transition: opacity .45s ease, transform .6s cubic-bezier(.2, .7, .1, 1), visibility 0s .45s; }
.rev.is-live .rev__list li.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .45s ease .1s, transform .6s cubic-bezier(.2, .7, .1, 1) .1s, visibility 0s; }

.doors__head { display: flex; flex-direction: column; gap: var(--s-5); }
.doors { margin-top: var(--head-gap); display: flex; flex-direction: column; gap: var(--s-4); overflow-x: auto; scrollbar-width: none; }
.doors::-webkit-scrollbar { display: none; }
.doors.is-driven { overflow: hidden; }
.doors__track { display: flex; gap: var(--s-4); width: max-content; padding: 0 var(--gutter); will-change: transform; }
.doors__track img { flex: none; width: min(var(--door-w), 21svh); aspect-ratio: 640 / 700; object-fit: cover; }

/* Media: one large film and two smaller, in one block of even height, titles on the pictures */
.videos { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
.video { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; color: var(--cream); text-decoration: none; }
.video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .1, 1); }
.video:hover img { transform: scale(1.05); }
.video__bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: var(--s-4); padding: var(--s-8) var(--s-5) var(--s-5); background: linear-gradient(180deg, rgba(8, 14, 36, 0) 0%, rgba(8, 14, 36, 0.85) 100%); }
.video__play { --accent: var(--ivory); --on-accent: var(--midnight-700); font-size: var(--t-small); }
@media (max-width: 767px) {
  /* On phones the title sits under the picture, so it never covers the words inside a thumbnail. */
  .video { aspect-ratio: auto; overflow: visible; color: var(--fg); }
  .video img { position: static; aspect-ratio: 16 / 9; height: auto; }
  .video__bar { position: static; padding: var(--s-4) 0 0; background: none; }
  .video__play { --accent: var(--brand-blue); --on-accent: var(--ivory); }
}
.video__title { font-family: var(--font-display); font-size: var(--t-h4); line-height: 1.25; letter-spacing: -0.015em; }

/* Close: back to the first step, over a very large, very faint mark */
.close { position: relative; overflow: hidden; }
.close::before { content: ""; position: absolute; left: -6vw; bottom: -12vw; width: 44vw; aspect-ratio: 204 / 212; background: url("../assets/img/mark-white.webp") center / contain no-repeat; opacity: 0.07; pointer-events: none; }
.close > .wrap { position: relative; }
.reach { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); }
.reach a { font-family: var(--font-display); font-weight: 400; text-decoration: none; display: inline-flex; align-items: center; min-height: var(--control); overflow-wrap: anywhere; }
.reach a:hover { text-decoration: underline; text-underline-offset: 6px; }
.reach__big { font-size: var(--t-h3); line-height: 1.1; letter-spacing: -0.025em; white-space: nowrap; }
.reach__mid { font-size: var(--t-h4); line-height: 1.25; }
.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
.field { display: flex; flex-direction: column; gap: var(--s-2); }
.field label { font-size: var(--t-small); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.6; }
.field input, .field select, .field textarea { width: 100%; height: var(--control); padding: 0 var(--inset); border: 1px solid var(--line-strong); border-radius: var(--radius); background: transparent; color: var(--fg); font-family: var(--font-body); font-size: var(--t-body); line-height: 1.4; }
.field textarea { height: auto; min-height: 128px; padding: var(--s-3) var(--inset); resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; padding-right: var(--s-7); background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - var(--inset) - 6px) 50%, calc(100% - var(--inset)) 50%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
.field select option { color: var(--midnight-700); background: var(--ivory); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.form__end { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-5); }
.form__note { max-width: 34em; font-weight: 600; }
.field [aria-invalid="true"] { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
.field__error { font-size: var(--t-small); font-weight: 600; line-height: 1.6; }

/* Footer: midnight, in three even columns: the mark, the call, the links. The legal line runs across all three. */
.foot { overflow: hidden; padding: var(--section) 0 var(--s-6); background: var(--tex-grain), var(--tex-light) fixed, var(--bg); color: var(--fg); }
.foot__top { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-7) var(--col-gap); align-items: start; }
.foot__mark { display: inline-flex; align-self: start; justify-self: start; }
.foot__mark img { height: var(--foot-mark); width: auto; }
.foot__lead { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-4); }
.foot__call { display: inline-flex; align-items: center; gap: var(--s-4); min-height: var(--control); font-family: var(--font-display); font-size: var(--t-h3); line-height: 1.1; letter-spacing: -0.025em; color: var(--accent); text-decoration: none; white-space: nowrap; }
.foot__call span { transition: transform .3s ease; }
.foot__call:hover span { transform: translateX(var(--s-2)); }
.foot__facts { width: 100%; display: flex; flex-direction: column; gap: var(--s-4); margin-top: var(--s-4); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.foot__facts div { display: flex; flex-direction: column; gap: var(--s-1); }
.foot__facts dt { color: var(--fg-quiet); }
.foot__facts a { text-decoration: none; display: inline-flex; align-items: center; min-height: var(--control); overflow-wrap: anywhere; }
.foot__facts a:hover { color: var(--accent); }
.foot__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.foot__list { display: flex; flex-direction: column; }
.foot__list a { display: inline-flex; align-items: center; min-height: var(--control); text-decoration: none; }
.foot__list a:hover { color: var(--accent); }
.foot__legal { margin-top: var(--s-8); padding-top: var(--s-5); border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5) var(--col-gap); align-items: start; color: var(--fg-quiet); font-size: var(--t-small); line-height: 1.6; }
.foot__plates { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.foot__plate { display: inline-flex; align-items: center; padding: var(--s-2) var(--s-3); background: var(--ivory); border-radius: var(--radius); }
.foot__plate img { height: 48px; width: auto; }

@media (min-width: 768px) {
  .who__facts li { grid-template-columns: 128px minmax(0, 1fr); gap: var(--s-5); align-items: baseline; }
  .ways, .set__cards, .foot__top, .foot__legal { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps li { grid-template-columns: var(--step-no) minmax(0, 1fr); }
  .videos { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); height: var(--videos-h); }
  .video { aspect-ratio: auto; }
  .video--feature { grid-row: span 2; }
  .doors__head { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .rev { padding: var(--s-7); }
  .form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field--wide { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
  .top__nav { display: flex; }
  .menu, .top__panel { display: none; }
  .close__cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

  /* Pinned hero, three beats. --a runs 0 to 1 as the full-screen photo shrinks into its frame;
     --p runs 0 to 1 as it grows to the left and Paul's card slides in. */
  .hero.is-pinned { height: 480svh; }
  .hero.is-pinned .hero__stage { --W: var(--hero-photo); --H: calc(var(--W) * 1.25); --T: calc(var(--header) + var(--s-6)); position: sticky; top: 0; height: 100svh; display: block; padding: 0; }
  /* The headline starts on the opening photo, bottom-left and light, and rides up to its place as the photo shrinks. */
  .hero.is-pinned .hero__title { position: absolute; left: var(--gutter); top: calc(var(--hero-top) * var(--a) + (100svh - var(--t-h1) * 1.88 - var(--s-8)) * (1 - var(--a))); color: color-mix(in srgb, var(--cream) calc((1 - var(--a)) * 100%), var(--fg)); opacity: calc(1 - var(--p) * 3); }
  .hero.is-pinned .hero__title em { color: color-mix(in srgb, var(--cream) calc((1 - var(--a)) * 100%), var(--accent)); }
  .hero.is-pinned .hero__photo::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(8, 14, 36, 0) 40%, rgba(8, 14, 36, 0.6) 100%); opacity: calc(1 - var(--a) * 2); }
  .is-loading .hero.is-pinned .hero__line > span { animation-delay: 3.1s; }
  .is-loading .hero.is-pinned .hero__line--2 > span { animation-delay: 3.22s; }
  .hero.is-pinned .hero__line--1 { transform: translateX(calc(var(--p) * -8vw)); }
  .hero.is-pinned .hero__line--2 { transform: translateX(calc(var(--p) * 8vw)); }
  .hero.is-pinned .hero__photo { will-change: left, top, width, height; position: absolute; z-index: 1; aspect-ratio: auto; left: calc((100% - var(--gutter) - var(--W)) * var(--a) * (1 - var(--p))); top: calc(var(--T) * var(--a) * (1 - var(--p))); width: calc(100% + (var(--W) - 100%) * var(--a) + (58% - var(--W)) * var(--p)); height: calc(100% + (var(--H) - 100%) * var(--a) + (100% - var(--H)) * var(--p)); }
  .hero.is-pinned .hero__photo::after { opacity: min(calc(var(--a) * 4 - 3), calc(1 - var(--p) * 2)); }
  /* The scroll cue: a glass disc with a slow ring of words and a line that keeps falling. */
  .hero.is-pinned .hero__cue { display: flex; align-items: center; justify-content: center; position: absolute; z-index: 2; right: var(--gutter); bottom: var(--s-7); width: var(--cue); height: var(--cue); border-radius: 50%; color: var(--cream); background: rgba(11, 19, 48, 0.32); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); border: 1px solid var(--line-deep); opacity: calc(1 - var(--a) * 5); }
  .cue__ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: cue-spin 16s linear infinite; }
  .cue__ring text { fill: currentColor; font-family: var(--font-body); font-size: 9px; font-weight: 600; letter-spacing: 0.2em; }
  .cue__line { position: relative; display: block; width: 1px; height: var(--s-6); background: var(--line-deep); overflow: hidden; }
  .cue__line::after { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: var(--s-4); background: var(--sky); animation: cue-drop 1.8s cubic-bezier(.6, 0, .3, 1) infinite; }
  @keyframes cue-spin { to { transform: rotate(360deg); } }
  @keyframes cue-drop { from { transform: translateY(-110%); } to { transform: translateY(210%); } }
  .hero.is-pinned .hero__say { position: absolute; left: var(--gutter); top: calc(var(--hero-top) + var(--t-h1) * 1.88 + var(--s-7)); opacity: min(calc(var(--a) * 4 - 3), calc(1 - var(--p) * 3)); }
  .hero.is-pinned .hero__steps { position: absolute; left: var(--gutter); bottom: var(--s-7); gap: var(--s-8); opacity: min(calc(var(--a) * 4 - 3), calc(1 - var(--p) * 3)); }
  .hero.is-pinned.is-open .hero__say, .hero.is-pinned.is-open .hero__steps, .hero.is-pinned.is-full .hero__say, .hero.is-pinned.is-full .hero__steps { visibility: hidden; }
  .hero.is-pinned .who { will-change: transform; position: absolute; z-index: 3; top: 0; right: 0; bottom: 0; width: 42%; margin: 0; padding: calc(var(--header-s) + var(--s-5)) var(--gutter) var(--s-7) var(--s-8); justify-content: center; transform: translateX(calc((1 - var(--p)) * 100%)); }

  /* Pinned homes: one set of three at a time. Each step swaps the cards, the ground and the big word. */
  .market.is-pinned { height: var(--market-h, 340svh); }
  .market.is-pinned .market__stage { position: sticky; top: 0; height: 100svh; padding: 0; background-image: var(--tex-grain), var(--tex-light), var(--tex-cols); background-attachment: scroll, fixed, fixed; background-color: var(--bg); transition: background-color .9s ease, color .6s ease; }
  .market.is-pinned .market__sets { position: absolute; left: 0; right: 0; top: var(--header-s); bottom: calc(7.2vw + var(--s-7)); display: block; }
  .market.is-pinned .set { position: absolute; left: 0; right: 0; top: 0; bottom: 0; justify-content: center; gap: var(--s-7); visibility: hidden; transition: visibility 0s .9s; }
  .market.is-pinned .set.is-on { visibility: visible; transition: visibility 0s; }
  .market.is-pinned .card { aspect-ratio: auto; height: min(54svh, 560px); }
  .market.is-pinned .set__label, .market.is-pinned .set__cards li { opacity: 0; transform: translateY(var(--s-8)); transition: opacity .6s ease, transform .9s cubic-bezier(.2, .7, .1, 1); }
  .market.is-pinned .set.is-past .set__label, .market.is-pinned .set.is-past .set__cards li { transform: translateY(calc(var(--s-8) * -1)); }
  .market.is-pinned .set.is-on .set__label, .market.is-pinned .set.is-on .set__cards li { opacity: 1; transform: none; }
  .market.is-pinned .set__cards li:nth-child(2) { transition-delay: .08s; }
  .market.is-pinned .set__cards li:nth-child(3) { transition-delay: .16s; }
  .market.is-pinned .market__word { display: block; position: absolute; left: var(--gutter); right: var(--gutter); bottom: var(--s-6); height: 7.2vw; overflow: hidden; font-family: var(--font-display); font-weight: 400; font-size: 7.2vw; line-height: 1; color: var(--accent); }
  .market.is-pinned .word { position: absolute; inset: 0; display: flex; justify-content: space-between; }
  .market.is-pinned .word span { display: block; transform: translateY(110%); transition: transform .9s cubic-bezier(.2, .7, .1, 1); }
  .market.is-pinned .word span:nth-child(2) { transition-delay: .04s; }
  .market.is-pinned .word span:nth-child(3) { transition-delay: .08s; }
  .market.is-pinned .word span:nth-child(4) { transition-delay: .12s; }
  .market.is-pinned .word span:nth-child(5) { transition-delay: .16s; }
  .market.is-pinned .word span:nth-child(6) { transition-delay: .2s; }
  .market.is-pinned .word span:nth-child(7) { transition-delay: .24s; }
  .market.is-pinned .word.is-on span { transform: none; }

  /* Pinned window: the photo opens from a centred window to the full screen as you scroll, then the cards arrive. */
  .window.is-pinned { height: 190svh; }
  .window.is-pinned .window__stage { position: sticky; top: 0; height: 100svh; min-height: 0; }
  .window.is-pinned .window__photo { will-change: clip-path, transform; clip-path: inset(calc((1 - var(--q)) * 22%) calc((1 - var(--q)) * 32%)); transform: scale(calc(1.16 - var(--q) * 0.16)); }
  .window.is-pinned .window__shade { opacity: var(--q); }
  .window.is-pinned .reviews { opacity: calc(var(--q) * 3 - 2); transform: translateY(calc((1 - var(--q)) * var(--s-8))); }
}

/* Sections rise as they enter. The hidden state lives only in the keyframe, so without support the page is simply there. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .rise { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
    @keyframes rise { from { opacity: 0; transform: translateY(var(--s-7)); } to { opacity: 1; transform: none; } }
  }
}

/* Touch screens settle on a section when you stop near one. Desktop does the same from the script, so it can work with the smooth scrolling. */
@media (hover: none) and (pointer: coarse) {
  html { scroll-snap-type: y proximity; }
  main > section { scroll-snap-align: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
