/*
Theme Name: Federal Residences
Theme URI: https://federal.yudity.com/
Author: Federal Residences
Description: A custom, editable WordPress theme for The Federal Residences. Content is managed through native custom post types and metaboxes.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: federal-residences
*/

/* ========================================================================== 
   THE FEDERAL — Register of Interest (teaser) site
   Design canvas: 1920 × 6387 (homepage) / 1920 × 7159 (privacy policy)
   All values below are the literal Figma values, expressed through the
   fluid design-unit `--u` (1 design px) so the composition scales
   proportionally and is pixel-exact at a 1920px viewport.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonts
   Display face — PP Gatwick (Glider, Extralight), self-hosted from /assets/fonts/.
   Text face  — Sweet Sans Pro, served from Adobe Fonts (Typekit kit ers3vhi) as
                the family "sweet-sans-pro" via the <link> in the page head.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'PP Gatwick';
  src: url('assets/fonts/PPGatwick-GliderExtralight.woff2') format('woff2'),
       url('assets/fonts/PPGatwick-GliderExtralight.woff') format('woff');
  font-weight: 100 400;   /* single Extralight cut; span the range the headings request */
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Brand palette — see "Color Guide.png" */
  --espresso:       #271409;          /* Espresso, base */
  --espresso-solid: #1F1007;          /* Espresso with the design's 20% black overlay */
  --leather:        #502E24;          /* Leather */
  --north:          #ABBCC3;          /* North */
  --light:          #F8F8F8;          /* Light */
  --field:          #E0DEDE;          /* Form rules / labels on espresso */
  --red:            #FF3B30;          /* Placeholder marker */

  /* Type
     Display = PP Gatwick (self-hosted, see @font-face above).
     Text    = Sweet Sans Pro (Adobe Fonts, family "sweet-sans-pro").
     Cormorant Garamond stays only as a graceful fallback if the webfont fails. */
  --font-display: 'PP Gatwick', 'Cormorant Garamond', 'Didot', 'Times New Roman', serif;
  --font-text:    'sweet-sans-pro', 'Sweet Sans Pro', 'Jost', 'Futura', 'Avenir Next', 'Helvetica Neue', Arial, sans-serif;

  /* 1 design pixel, fluid. 0.0520833vw × 1920 = 1.000px */
  --cta-gap: max(calc(80 * var(--u)), 56px);   /* space above AND below the "Step into a piece of history" button */
  --u: clamp(0.5px, 0.0520833vw, 1px);

  /* Fluid type scale — each caps at the Figma value at ≥1920px */
  --fs-display-lg: clamp(38px, 3.3333vw, 64px);   /* 64 / 71 */
  --fs-display:    clamp(32px, 2.5vw,    48px);   /* 48 / 64 */
  --fs-caps:       clamp(11px, 0.7292vw, 14px);   /* 14 / 24 · +3 ls */
  --fs-body:       clamp(14px, 0.8333vw, 16px);   /* 16 / 24 */
  --fs-body-sm:    clamp(13px, 0.7292vw, 14px);   /* 14 / 20 */
  --fs-label:      clamp(9px,  0.5208vw, 10px);   /* 10 / 24 · +4 ls */
  --fs-fine:       clamp(7px,  0.4167vw,  8px);   /*  8 / 12 · +1 ls */

  /* Layout — `--content` is the design's content width; the shell adds the gutter */
  --content:    1720px;   /* main content column (hero render width) */
  --content-xl: 1728px;   /* wider media band (aerial) */
  --gutter:     clamp(20px, 2.6042vw, 50px);
  --shell:      calc(var(--content) + var(--gutter) * 2);
  --shell-xl:   calc(var(--content-xl) + var(--gutter) * 2);

  --ease: cubic-bezier(0.33, 0.05, 0.2, 1);
}

/* --------------------------------------------------------------------------
   3. Reset / base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--north);
  color: var(--espresso-solid);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.is-locked { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, p, figure, blockquote { margin: 0; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

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

/* --------------------------------------------------------------------------
   4. Shared type helpers
   -------------------------------------------------------------------------- */

.display {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.25px;
}

.caps {
  font-family: var(--font-text);
  font-size: var(--fs-caps);
  font-weight: 500;              /* Sweet Sans Medium — uniform across the site (client request) */
  line-height: calc(24 * var(--u));
  letter-spacing: calc(3 * var(--u));
  text-transform: uppercase;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --------------------------------------------------------------------------
   5. Pill button (shared)
   Figma: h 42 · radius 53 · 1px border · SMALL CAPS 14/24 +3
   -------------------------------------------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: calc(42 * var(--u));
  padding: 0 calc(28 * var(--u));
  border: 1px solid currentColor;
  border-radius: 53px;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-text);
  font-size: var(--fs-caps);
  font-weight: 500;              /* Sweet Sans Medium (client request) */
  line-height: 1;
  letter-spacing: calc(3 * var(--u));
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color .45s var(--ease), color .45s var(--ease),
              border-color .45s var(--ease);
}

/* Dark-on-light pill → fills espresso on hover (see "BUTTON HOVER/CLICK STATE") */
.pill--dark { color: var(--espresso-solid); }
.pill--dark:hover,
.pill--dark:focus-visible { background: var(--espresso-solid); color: var(--light); border-color: var(--espresso-solid); }
.pill--dark:active { background: var(--espresso); }

/* Light-on-espresso pill → inverts on hover */
.pill--light { color: var(--light); border-color: var(--field); }
.pill--light:hover,
.pill--light:focus-visible { background: var(--field); color: var(--espresso-solid); }
.pill--light:active { background: var(--light); }

/* --------------------------------------------------------------------------
   6. Loading screen
   Figma: North field, shadow texture, centred FEDERAL RESIDENCES mark 484×109
   -------------------------------------------------------------------------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--north);
  cursor: pointer;
  transition: opacity 1.1s var(--ease), visibility 1.1s var(--ease);
}

.loader::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../img/shadow-texture.jpg') center / cover no-repeat;
  mix-blend-mode: multiply;
  opacity: .23;
  -webkit-mask-image: linear-gradient(270deg, transparent 0%, #000 100%);
          mask-image: linear-gradient(270deg, transparent 0%, #000 100%);
  pointer-events: none;
}

.loader__mark {
  position: relative;
  width: calc(484 * var(--u));
  max-width: 62vw;
  color: var(--espresso-solid);
  opacity: 0;
  transform: translateY(calc(10 * var(--u)));
  animation: markIn 1.4s var(--ease) .15s forwards;
}

.loader__mark svg,
.loader__mark img { width: 100%; height: auto; }

@keyframes markIn {
  to { opacity: 1; transform: none; }
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   7. Header — teaser
   Figma: mark 306×69 at y56, centred. Register pill 170×33 at x1650 / y56.
   Note (Figma): "Register button moves, but the logo stays in place."
   -------------------------------------------------------------------------- */

.site-header {
  position: relative;
  z-index: 20;
  padding-top: calc(56 * var(--u));   /* logo top aligns with the Register button top (also 56) */
  line-height: 0;                     /* no inline descender below the mark */
  text-align: center;
}

/* Full stacked logo — THE / FEDERAL / NEWSTEAD / EST · 1889 (aspect 566.93 × 254.76) */
.site-header__mark {
  display: inline-block;
  width: calc(320 * var(--u));
  min-width: 168px;
  color: var(--espresso-solid);
}

.site-header__mark svg,
.site-header__mark img { width: 100%; height: auto; }

/* The register pill detaches and travels with the viewport */
.register-pill {
  position: fixed;
  top: calc(56 * var(--u));
  right: calc(100 * var(--u));
  z-index: 60;
  min-height: calc(33 * var(--u));
  padding: 0 calc(22 * var(--u));
  border: 1px solid var(--espresso-solid);
  border-radius: 103px;
  background: rgba(171, 188, 195, .8);
  -webkit-backdrop-filter: blur(3px);
          backdrop-filter: blur(3px);
  color: var(--espresso-solid);
  transition: top .5s var(--ease), right .5s var(--ease),
              background-color .45s var(--ease), color .45s var(--ease),
              border-color .45s var(--ease);
}

.register-pill:hover,
.register-pill:focus-visible {
  background: var(--espresso-solid);
  border-color: var(--espresso-solid);
  color: var(--light);
}

body.is-scrolled .register-pill {
  top: calc(24 * var(--u));
  right: calc(40 * var(--u));
}

/* --------------------------------------------------------------------------
   8. Light body of the page (North field + shadow texture)
   -------------------------------------------------------------------------- */

.page-light {
  position: relative;
  overflow: hidden;
  background: var(--north);
}

.page-light > * { position: relative; z-index: 1; }

/* Figma: content-pixie texture, 1519 tall, multiply @ 23%, fading upward.
   It is anchored to the TOP of the delivery-team section rather than the bottom of
   .page-light, so expanding the team accordions (which grow the page below their
   toggles) can't slide it. The element is oversized and .page-light's overflow:hidden
   trims the surplus, so its painted pixels never move — only how much shows changes,
   and the trimmed band sits inside the mask's solid zone where density is uniform. */
.team {
  position: relative;
  isolation: isolate;
}

.team::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: calc(-479 * var(--u));      /* reaches up to the Figma texture top (y2974) */
  height: calc(2150 * var(--u));   /* oversized; clipped by .page-light overflow */
  background: url('../img/shadow-texture.jpg') center top / cover no-repeat;
  mix-blend-mode: multiply;
  opacity: .23;
  -webkit-mask-image: linear-gradient(to top, #000 62%, transparent 100%);
          mask-image: linear-gradient(to top, #000 62%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.team > * { position: relative; z-index: 1; }

/* --------------------------------------------------------------------------
   9. Hero — cycling render band
   Figma: 1720×860 at y209 (84 below the mark)
   -------------------------------------------------------------------------- */

.hero { padding-top: calc(60 * var(--u)); }   /* tightened below the taller full logo */

.hero__media {
  position: relative;
  aspect-ratio: 1720 / 860;
  overflow: hidden;
  background: #96a8b0;
}

.hero__slide {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.045);
  transition: opacity 1.6s var(--ease), transform 7.5s linear;
}

.hero__slide > img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);   /* per-slide focal point */
}

.hero__slide.is-active {
  opacity: 1;
  transform: scale(1);
}

/* Hero slider controls — dots + brown arrow cursor (left half = back, right half = forward) */
.hero__media.is-prev { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='30' fill='%23F8F8F8' fill-opacity='.9'/%3E%3Cpath d='M40 32H22M30 23l-9 9 9 9' fill='none' stroke='%23502E24' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 32 32, w-resize; }
.hero__media.is-next { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='30' fill='%23F8F8F8' fill-opacity='.9'/%3E%3Cpath d='M24 32h18M34 23l9 9-9 9' fill='none' stroke='%23502E24' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 32 32, e-resize; }

.hero__dots {
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(14px, 2vw, 32px);
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 4px;
  cursor: default;
}
.hero__dot {
  position: relative;
  width: 24px; height: 24px;      /* comfortable tap target */
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.hero__dot::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 8px; height: 8px;
  margin: -4px 0 0 -4px;
  border: 1px solid #F8F8F8;
  border-radius: 50%;
  background: rgba(248, 248, 248, .15);
  box-shadow: 0 0 0 1px rgba(39, 20, 9, .18);
  transition: background .4s var(--ease), transform .4s var(--ease);
}
.hero__dot:hover::before { background: rgba(248, 248, 248, .7); }
.hero__dot.is-active::before { background: #F8F8F8; transform: scale(1.2); }
.hero__dot:focus-visible { outline: 2px solid #502E24; outline-offset: -2px; border-radius: 50%; }

/* --------------------------------------------------------------------------
   10. Story — "History Has a New Front Door"
   Figma: 576 wide block, 64/71 display, arched plate 248×383.85 inline
   -------------------------------------------------------------------------- */

.story {
  padding-top: calc(164 * var(--u));
  text-align: center;
}

.story__heading {
  width: calc(576 * var(--u));
  max-width: 100%;
  margin-inline: auto;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--fs-display-lg);
  line-height: calc(71 * var(--u));
  letter-spacing: -0.25px;
}

.story__heading-line { display: block; }

/* Arched heritage plate */
.plate {
  width: calc(248 * var(--u));
  height: calc(384 * var(--u));
  margin: calc(64 * var(--u)) auto calc(69 * var(--u));
  position: relative;
  border: 0;
  border-radius: calc(124 * var(--u)) calc(124 * var(--u)) 0 0;
  background: var(--north);
  overflow: hidden;
}

.plate__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
}

/* The graded video plays true to its colour grade (no multiply tint) on a dark backdrop */
.plate__video {
  mix-blend-mode: normal;
  background: #14100c;
}

.story__eyebrow {
  width: calc(974 * var(--u));
  max-width: 100%;
  margin: calc(77 * var(--u)) auto 0;
  text-wrap: balance;
}

.story__body {
  width: calc(902 * var(--u));
  max-width: 100%;
  margin: calc(22 * var(--u)) auto 0;
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: calc(24 * var(--u));
  color: #000;
}

.story__body p + p { margin-top: calc(24 * var(--u)); }

.story__cta { margin-top: var(--cta-gap); }

.story__cta .pill { min-width: calc(389 * var(--u)); }

/* --------------------------------------------------------------------------
   11. Aerial band
   Uses the supplied 3750×1458 panorama without horizontal cropping.
   -------------------------------------------------------------------------- */

.aerial {
  width: 100%;
  max-width: var(--shell-xl);
  margin: var(--cta-gap) auto 0;   /* matches the space above the CTA button */
  padding-inline: var(--gutter);
}

.aerial__frame {
  position: relative;
  aspect-ratio: 3750 / 1458;
  overflow: hidden;
  background: #D9D9D9;
}

.aerial__frame img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Figma marker — remove once the final asset is supplied */
.aerial__marker {
  position: absolute;
  top: calc(38 * var(--u));
  left: 50%;
  transform: translateX(-50%);
  color: var(--red);
  z-index: 2;
}

/* --------------------------------------------------------------------------
   12. Delivery team
   Figma: label at y3755 · four 262-wide cells · rules at y3988 / y4032
   Interaction: "Collapsible text upon click. + Button rotates to x."
   -------------------------------------------------------------------------- */

.team {
  padding-top: calc(322 * var(--u));
  padding-bottom: calc(461 * var(--u));
}

.team__label {
  text-align: center;
  margin-bottom: calc(101 * var(--u));
}

.team__grid {
  display: grid;
  grid-template-columns: repeat(4, calc(262 * var(--u)));
  justify-content: center;
  column-gap: calc(130 * var(--u));
  row-gap: calc(64 * var(--u));
}

.team__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(62 * var(--u));
  margin-bottom: calc(26 * var(--u));
  color: var(--espresso-solid);
}

.team__logo svg,
.team__logo img { height: auto; max-width: 100%; max-height: 100%; }

.team__logo--unison   :is(svg, img) { width: calc(123 * var(--u)); }
.team__logo--ellivo   :is(svg, img) { width: calc(112 * var(--u)); }
.team__logo--position :is(svg, img) { width: calc(179 * var(--u)); }
.team__logo--builder  :is(svg, img) { width: calc(201 * var(--u)); }

.team__toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: calc(44 * var(--u));
  padding: 0 calc(23 * var(--u));
  border: 0;
  border-top: 1px solid var(--espresso-solid);
  border-bottom: 1px solid var(--espresso-solid);
  background: transparent;
  cursor: pointer;
  color: var(--espresso-solid);
  font-family: var(--font-text);
  font-size: var(--fs-label);
  font-weight: 500;              /* Sweet Sans Medium (client request) */
  line-height: 1;
  letter-spacing: calc(4 * var(--u));
  text-transform: uppercase;
}

.team__toggle::after {
  content: "+";
  position: absolute;
  right: calc(21 * var(--u));
  top: 50%;
  font-size: calc(24 * var(--u));
  font-weight: 300;
  line-height: 0;
  transform: translateY(-50%) rotate(0deg);
  transition: transform .45s var(--ease);
}

.team__toggle[aria-expanded="true"]::after {
  transform: translateY(-50%) rotate(45deg);
}

.team__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .5s var(--ease), opacity .4s var(--ease);
  opacity: 0;
}

.team__panel[data-open="true"] {
  grid-template-rows: 1fr;
  opacity: 1;
}

.team__panel > div { overflow: hidden; }

.team__panel p {
  padding-top: calc(16 * var(--u));
  font-size: var(--fs-body-sm);
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
}

/* --------------------------------------------------------------------------
   13. Espresso block — registration + footer are one continuous field
   Figma: espresso from y4493 to the foot of the page
   -------------------------------------------------------------------------- */

.page-dark { background: var(--espresso-solid); }

/* --- 13a. Register your interest ---------------------------------------- */

.register {
  padding-top: calc(140 * var(--u));
  text-align: center;
  color: var(--field);
}

.register__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--fs-display);
  line-height: calc(64 * var(--u));
  letter-spacing: -0.25px;
  color: var(--light);
}

.register__intro {
  width: calc(585 * var(--u));
  max-width: 100%;
  margin: calc(31 * var(--u)) auto 0;
  color: var(--field);
}

.form {
  width: calc(1232 * var(--u));
  max-width: 100%;
  margin: calc(109 * var(--u)) auto 0;
}

.form__grid {
  display: grid;
  grid-template-columns: repeat(2, calc(607 * var(--u)));
  justify-content: space-between;
  column-gap: calc(18 * var(--u));
  row-gap: calc(42 * var(--u));
}

.field { position: relative; }

.field__input {
  width: 100%;
  height: calc(41 * var(--u));
  padding: 0 calc(24 * var(--u)) calc(9 * var(--u));
  border: 0;
  border-bottom: 1px solid var(--field);
  border-radius: 0;
  background: transparent;
  color: var(--light);
  font-family: var(--font-text);
  font-size: var(--fs-caps);
  font-weight: 500;              /* Sweet Sans Medium (client request) */
  letter-spacing: calc(3 * var(--u));
  text-transform: uppercase;
  text-align: center;
  transition: border-color .35s var(--ease);
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
}

.field__input::placeholder {
  color: var(--field);
  opacity: 1;
  text-transform: uppercase;
}

.field__input:focus {
  outline: none;
  border-bottom-color: var(--light);
}

.field__input:focus::placeholder { opacity: .55; }

/* Select — Figma shows a chevron on "Buyer type…" only */
select.field__input {
  color: var(--field);
  cursor: pointer;
  text-align: center;
  text-align-last: center;
}

select.field__input:valid { color: var(--light); }
select.field__input option { color: #111; text-transform: none; letter-spacing: 0; }

.field__chevron {
  position: absolute;
  right: calc(8 * var(--u));
  top: calc(16 * var(--u));
  width: calc(14 * var(--u));
  color: var(--field);
  pointer-events: none;
}

.field.is-invalid .field__input { border-bottom-color: var(--red); }

.form__actions {
  margin-top: calc(87 * var(--u));
  display: flex;
  justify-content: center;
}

.form__submit { min-width: calc(179 * var(--u)); }

.form__status {
  margin-top: calc(24 * var(--u));
  min-height: calc(24 * var(--u));
  font-size: var(--fs-caps);
  letter-spacing: calc(2 * var(--u));
  text-transform: uppercase;
  color: var(--field);
}

.form__status[data-state="error"] { color: var(--red); }

/* --- 13b. Footer --------------------------------------------------------- */

.site-footer {
  margin-top: calc(154 * var(--u));   /* 202 in Figma, less the 48 reserved by .form__status */
  color: var(--north);
}

.site-footer__rule {
  width: calc(100% - var(--gutter) * 2);
  max-width: var(--content);
  height: 1px;
  margin-inline: auto;
  background: var(--north);
}

.site-footer__meta {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: calc(24 * var(--u));
  padding-top: calc(54 * var(--u));
}

/* North on espresso reads faint at Medium; step up to Semibold for legibility (QA feedback) */
.site-footer__meta .caps { color: var(--north); }
.site-footer__meta > :last-child { text-align: right; }

.site-footer__badge {
  width: calc(134 * var(--u));
  min-width: 74px;
}

.site-footer__wordmark {
  /* Same column as the rule, address row and disclaimer so all four edges line up at every width */
  width: calc(100% - var(--gutter) * 2);
  max-width: var(--content);
  margin: calc(384 * var(--u)) auto 0;
  color: var(--north);
}

.site-footer__wordmark :is(svg, img) { width: 100%; height: auto; }

.site-footer__legal {
  width: calc(100% - var(--gutter) * 2);   /* same column as the rule and wordmark */
  max-width: var(--content);
  margin: calc(23 * var(--u)) auto 0;
  text-align: center;
}

.fine {
  font-family: var(--font-text);
  font-size: var(--fs-fine);
  font-weight: 500;                 /* Sweet Sans Medium (client request) */
  line-height: calc(12 * var(--u));
  letter-spacing: calc(1 * var(--u));
  text-transform: uppercase;
  color: var(--north);
}

.site-footer__links {
  display: flex;
  justify-content: center;
  gap: calc(70 * var(--u));
  margin-top: calc(36 * var(--u));
  padding-bottom: calc(41 * var(--u));
  line-height: calc(14 * var(--u));
}

.site-footer__links a { transition: opacity .3s var(--ease); }
.site-footer__links a:hover { opacity: .6; }

/* --------------------------------------------------------------------------
   14. Privacy policy page
   Figma: H1 at x391 / y375 · body 1137 wide · Return Home pill 237×42
   -------------------------------------------------------------------------- */

.legal { padding-top: calc(250 * var(--u)); }

.legal__inner {
  width: calc(1137 * var(--u));
  max-width: 100%;
  margin-inline: auto;
}

.legal__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--fs-display);
  line-height: calc(64 * var(--u));
  letter-spacing: -0.25px;
  color: var(--espresso-solid);
}

.legal__body {
  margin-top: calc(60 * var(--u));
  font-size: var(--fs-body-sm);
  font-weight: 500;
  line-height: max(calc(20 * var(--u)), 1.5em);   /* --u shrinks with the viewport; text must not */
  color: var(--espresso-solid);
}

.legal__body p { margin-bottom: max(calc(20 * var(--u)), 1em); }
.legal__body h2 {
  margin: calc(30 * var(--u)) 0 calc(10 * var(--u));
  font-family: var(--font-text);
  font-size: var(--fs-body-sm);
  font-weight: 500;
  line-height: calc(20 * var(--u));
}
.legal__body ul { margin: 0 0 calc(20 * var(--u)); padding-left: calc(18 * var(--u)); list-style: none; }
.legal__body li { margin-bottom: 2px; }
.legal__body a { text-decoration: underline; text-underline-offset: 2px; }

.legal__actions {
  display: flex;
  justify-content: center;
  margin-top: calc(90 * var(--u));
  padding-bottom: calc(318 * var(--u));
}

.legal__actions .pill { min-width: calc(237 * var(--u)); }

/* --------------------------------------------------------------------------
   15. Staggered reveal ("Subtle reveal throughout. Gentle motion.")
   -------------------------------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(calc(28 * var(--u)));
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   16. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  :root { --u: clamp(0.55px, 0.0520833vw, 0.72px); }

  .register-pill { right: var(--gutter); top: 40px; }

  .team__grid {
    grid-template-columns: repeat(2, minmax(0, 300px));
    column-gap: calc(90 * var(--u));
    row-gap: 56px;
  }

  /* Widths become intrinsic below the design canvas so nothing can overflow */
  .story__heading  { width: min(100%, 560px); line-height: 1.12; }
  .story__eyebrow  { width: min(100%, 720px); }
  .story__body     { width: min(100%, 660px); }
  .register__intro { width: min(100%, 520px); }
  .legal__inner    { width: 100%; }

  .form { width: min(100%, 900px); }
  .form__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plate { margin-block: 48px 52px; }
  .story__eyebrow { margin-top: 56px; }
  .story__body { margin-top: 36px; line-height: 1.55; }
  .story__cta .pill { min-width: 0; }

  .team { padding-top: 180px; padding-bottom: 200px; }
  .story { padding-top: 110px; }

  .register { padding-top: 110px; }
  .form { margin-top: 70px; }
  .form__grid { column-gap: 24px; row-gap: 34px; }
  .field__input { height: 40px; padding: 0 22px 8px; }
  .form__actions { margin-top: 60px; }
  .site-footer { margin-top: 130px; }
  .site-footer__wordmark { margin-top: 200px; }
  .legal { padding-top: 140px; }
  .legal__actions { margin-top: 70px; padding-bottom: 180px; }
}

@media (max-width: 767px) {
  :root {
    --u: 0.62px;
    --gutter: 20px;
    --fs-display-lg: 38px;
    --fs-display: 32px;
    --fs-caps: 10px;
    --fs-body: 14px;
    --fs-body-sm: 13px;
    --fs-label: 9px;
    --fs-fine: 7px;
  }

  .caps { line-height: 1.7; letter-spacing: 2px; }

  .site-header { padding-top: 22px; }
  .site-header__mark { width: 116px; min-width: 0; }   /* keeps a clear gap from the Register pill */

  .register-pill {
    top: 22px;                     /* aligns with the logo top */
    right: 16px;
    min-height: 30px;
    padding: 0 14px;
    font-size: 9px;
    letter-spacing: 1.5px;
  }
  body.is-scrolled .register-pill { top: 14px; right: 14px; }

  .hero { padding-top: 30px; }
  .hero__media { aspect-ratio: 4 / 5; }

  .story { padding-top: 64px; }
  .story__heading { width: 100%; }
  .plate { width: 190px; height: 294px; border: 0; border-radius: 95px 95px 0 0; margin-block: 34px 36px; }
  .story__eyebrow { margin-top: 40px; }
  .story__body { margin-top: 28px; }
  .story__body p + p { margin-top: 18px; }
  .pill { min-height: 42px; padding: 0 20px; letter-spacing: 2px; white-space: normal; text-align: center; line-height: 1.4; }

  .aerial { padding-inline: var(--gutter); }
  .aerial__frame { aspect-ratio: 4 / 3; }
  .aerial__marker { top: 14px; }

  .team { padding-top: 90px; padding-bottom: 100px; }
  .team__label { margin-bottom: 44px; }
  .team__grid { grid-template-columns: minmax(0, 320px); row-gap: 40px; }
  .team__logo { height: 62px; }
  .team__logo--unison :is(svg, img) { width: 108px; }
  .team__logo--ellivo :is(svg, img) { width: 98px; }
  .team__logo--position :is(svg, img) { width: 152px; }
  .team__logo--builder :is(svg, img) { width: 170px; }
  .team__toggle { height: 42px; letter-spacing: 3px; }
  .team__toggle::after { right: 14px; font-size: 20px; }

  .register { padding-top: 72px; }
  .register__intro { margin-top: 20px; width: 100%; }
  .form { margin-top: 46px; padding-inline: var(--gutter); }
  .form__grid { grid-template-columns: minmax(0, 1fr); row-gap: 26px; }
  .field__input { height: 40px; padding: 0 22px 8px; }
  .form__actions { margin-top: 44px; }

  .site-footer { margin-top: 80px; }
  .site-footer__meta {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 26px;
    padding-top: 34px;
  }
  .site-footer__meta > :last-child { text-align: center; }
  .site-footer__badge { width: 86px; order: -1; }
  .site-footer__wordmark { margin-top: 90px; }
  .site-footer__legal { margin-top: 20px; }
  .fine { line-height: 1.6; letter-spacing: .6px; }
  .site-footer__links { gap: 26px; margin-top: 22px; padding-bottom: 30px; }

  .legal { padding-top: 70px; }
  .legal__body { margin-top: 34px; line-height: 1.6; }
  .legal__actions { margin-top: 50px; padding-bottom: 90px; }
}

/* --------------------------------------------------------------------------
   17. Motion / print preferences
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .loader__mark { opacity: 1; transform: none; }
}

@media print {
  .loader, .register-pill, .hero, .aerial { display: none !important; }
  body { background: #fff; color: #000; }
}
