/* ==========================================================================
   Epek Software Solutions

   The visual system is taken from the company mark: a labyrinth of rectangular
   copper traces turning only at right angles. That gives the page its three
   recurring devices - hairline traces with square terminal pads, mitred icon
   strokes, and the magenta-to-indigo gradient the mark is filled with. Nothing
   on the page is rounded by more than 2px, and no line turns at anything other
   than 90 degrees.
   ========================================================================== */

/* --------------------------------------------------------------- fonts ---
   Both faces are variable and subset to latin; see tools/build-assets.sh.
   swap keeps text painted during the font fetch, which matters more here than
   the brief flash, since the fallback metrics are close. */
@font-face {
  font-family: Montserrat;
  src: url(fonts/dist/montserrat.woff2) format('woff2');
  font-weight: 500 800;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito Sans';
  src: url(fonts/dist/nunito-sans.woff2) format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

/* --------------------------------------------------------------- tokens --- */
:root {
  /* Ground and surfaces */
  --ink:          #04042E;   /* page ground, straight from the brand */
  --ink-raised:   #0A0A3D;   /* cards and wells sitting on the ground */
  --trace:        #232B63;   /* hairlines, borders, the routed lines */
  --paper:        #F3F5FC;   /* the one light band, for the waitlist */
  --paper-ink:    #080826;
  --paper-trace:  #D3DAF0;

  /* Type on ground */
  --fg:           #FFFFFF;
  --fg-muted:     #A3B1D6;

  /* Brand accents */
  --signal:       #43BAFF;   /* every interactive thing */
  --signal-dim:   #1E7FBC;
  --pulse-a:      #E72582;
  --pulse-b:      #242EEE;
  --gradient:     linear-gradient(135deg, var(--pulse-a), var(--pulse-b));

  /* Type */
  --display: Montserrat, 'Segoe UI', Roboto, sans-serif;
  --body: 'Nunito Sans', 'Segoe UI', Roboto, sans-serif;
  /* Utility face carries the eyebrows and pads. A system mono keeps the
     engineering register without a third font request. */
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  --fs-display: clamp(2.4rem, 1.55rem + 3.6vw, 4.4rem);
  --fs-h2:      clamp(1.75rem, 1.35rem + 1.7vw, 2.75rem);
  --fs-h3:      clamp(1.06rem, 1rem + 0.28vw, 1.25rem);
  --fs-lead:    clamp(1.03rem, 0.99rem + 0.22vw, 1.19rem);
  --fs-eyebrow: 0.72rem;

  /* Space */
  --gap:        clamp(1.5rem, 1rem + 2vw, 3rem);
  --section-y:  clamp(3.5rem, 2.2rem + 5vw, 7rem);
  --shell:      1180px;
  --pad-x:      clamp(1.15rem, 0.6rem + 2.6vw, 3rem);

  --header-h:   72px;
}

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  /* The nav drawer parks off-canvas at translateX(100%); clip keeps that out
     of the document's scroll width without creating a scroll container. */
  overflow-x: clip;
  scroll-behavior: smooth;
  /* Anchor targets clear the sticky header instead of hiding beneath it. */
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  background: var(--ink);
  color: var(--fg);
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* The icon stroke language: square caps and mitred joins, matching the right
   angles of the company mark. Declared here rather than on the sprite because
   <use> instances do not inherit the sprite root's presentation attributes. */
svg:not(.sprite) {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

a { color: var(--signal); text-decoration-thickness: 1px; text-underline-offset: 3px; }

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

ul, ol { list-style: none; padding: 0; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: absolute; left: 50%; top: 0; z-index: 200;
  transform: translate(-50%, -120%);
  background: var(--signal); color: var(--ink);
  font-weight: 700; padding: 0.7rem 1.2rem;
  text-decoration: none;
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

/* --------------------------------------------------------------- layout --- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

section { padding-block: var(--section-y); }

/* ------------------------------------------------------------- eyebrow ---
   A mono label preceded by a short trace and a square terminal pad - the
   same way a routed line ends on a board. It marks every section opening. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: '';
  flex: none;
  width: 42px;
  height: 8px;
  /* A 30px run ending in a square terminal pad, both inside the element's own
     box so neither can overlap the label. */
  background:
    linear-gradient(currentColor, currentColor) left center / 30px 2px no-repeat,
    linear-gradient(currentColor, currentColor) right center / 8px 8px no-repeat;
}
.eyebrow--dark { color: var(--pulse-b); }

/* -------------------------------------------------------------- buttons --- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--fg);
  --btn-bd: var(--trace);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.78rem 1.4rem;
  border: 1px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s, border-color 0.18s, color 0.18s, transform 0.18s;
}
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--solid { --btn-bg: var(--signal); --btn-fg: var(--ink); --btn-bd: var(--signal); font-weight: 700; }
.btn--solid:hover { --btn-bg: #6ECBFF; --btn-bd: #6ECBFF; }

.btn--ghost:hover { --btn-bd: var(--signal); --btn-fg: var(--signal); }

.btn--lg { padding: 0.95rem 1.7rem; font-size: 1rem; }

.btn:active { transform: translateY(1px); }

/* ------------------------------------------------------------- lockup --- */
.lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--fg);
}
.lockup__mark { width: auto; height: 34px; flex: none; }
.lockup__name { font-family: var(--display); line-height: 1; }
.lockup__name b {
  display: block;
  font-weight: 800;
  font-size: 1.14rem;
  letter-spacing: 0.01em;
}
.lockup__name > span {
  display: block;
  font-weight: 500;
  font-size: 0.6rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-top: 4px;
}

/* -------------------------------------------------------------- header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--trace);
}

/* The translucency lives on a pseudo-element, not on .site-header itself.
   backdrop-filter (like filter and transform) makes an element the containing
   block for any position:fixed descendant, and the mobile nav drawer is one:
   put the blur on the header and the drawer sizes itself to the 72px header
   instead of the viewport, which collapses it to an unusable sliver. */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(1px)) {
  .site-header::before { background: var(--ink); }
}

/* Scrim behind the open drawer. Without it the strip of page left beside the
   panel stays at full brightness and reads as a rendering fault rather than a
   deliberate edge. Clicks on it land on .site-header, which script.js uses to
   dismiss the drawer. */
.site-header::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgb(2 2 20 / 0.66);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease-out;
}
.site-header.nav-open::after { opacity: 1; pointer-events: auto; }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  min-height: var(--header-h);
}

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem); }

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 1.8vw, 1.7rem);
}

.nav__list a,
.nav__sub-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0;
  border: 0;
  background: none;
  color: var(--fg);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.nav__list > li > a:hover,
.nav__sub-toggle:hover { color: var(--signal); }

.nav__caret { width: 15px; height: 15px; transition: transform 0.2s; }
.nav__sub-toggle[aria-expanded='true'] .nav__caret { transform: rotate(180deg); }

.nav__has-sub { position: relative; }

.nav__sub {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: -1rem;
  min-width: 260px;
  padding: 0.5rem;
  background: var(--ink-raised);
  border: 1px solid var(--trace);
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.45);
  display: none;
}
.nav__sub-toggle[aria-expanded='true'] + .nav__sub { display: block; }

.nav__sub a {
  display: block;
  padding: 0.6rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--fg);
  position: relative;
}
/* The hover state routes a short trace into the label, rather than tinting a
   block of background. */
.nav__sub a::before {
  content: '';
  position: absolute;
  left: 0.85rem;
  top: 50%;
  width: 0;
  height: 2px;
  background: var(--signal);
  transform: translateY(-50%);
  transition: width 0.18s ease-out;
}
.nav__sub a:hover,
.nav__sub a:focus-visible { color: var(--signal); }
.nav__sub a:hover::before,
.nav__sub a:focus-visible::before { width: 12px; }
.nav__sub a:hover,
.nav__sub a:focus-visible { padding-left: 1.65rem; }

.nav-toggle {
  display: none;
  padding: 0.5rem;
  border: 1px solid var(--trace);
  background: none;
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded='true'] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded='true'] .nav-toggle__close { display: block; }

/* ---------------------------------------------------------------- hero --- */
.hero { padding-top: clamp(2.5rem, 1.5rem + 4vw, 5rem); }

.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: var(--gap);
}

.hero h1 { font-size: var(--fs-display); margin-bottom: 1.1rem; }

.hero .lead { max-width: 46ch; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.hero__art img { width: 100%; height: auto; }

.lead {
  font-size: var(--fs-lead);
  color: var(--fg-muted);
}
.lead--wide { max-width: 62ch; }

/* The hero announcement, pointing at the new offer. Square, not a capsule -
   the mark has no curves. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.42rem 0.85rem 0.42rem 0.42rem;
  margin-bottom: 1.6rem;
  border: 1px solid var(--trace);
  background: var(--ink-raised);
  color: var(--fg);
  font-size: 0.855rem;
  text-decoration: none;
  transition: border-color 0.18s;
}
.pill:hover { border-color: var(--signal); }
.pill__tag {
  padding: 0.16rem 0.5rem;
  background: var(--gradient);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.pill__arrow { width: 15px; height: 15px; color: var(--signal); transition: transform 0.18s; }
.pill:hover .pill__arrow { transform: translateX(3px); }

/* ------------------------------------------------- digital marketing band ---
   The single light surface on the page. It is the one section asking for an
   action rather than describing work, so it is the one that inverts. */
.invite {
  background: var(--paper);
  color: var(--paper-ink);
  border-block: 1px solid var(--trace);
}

.invite__inner {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: start;
}

.invite h2 { font-size: var(--fs-h2); margin-bottom: 1.1rem; max-width: 20ch; }
.invite .lead { color: #414A73; max-width: 52ch; }

.invite__points { margin-top: 2.2rem; display: grid; gap: 1.35rem; }
.invite__points li { display: flex; gap: 0.95rem; }
.invite__points svg {
  width: 22px; height: 22px; flex: none; margin-top: 3px;
  color: var(--pulse-b);
}
.invite__points h3 { font-size: 1rem; margin-bottom: 0.15rem; }
.invite__points p { font-size: 0.92rem; color: #4E567E; line-height: 1.6; }

/* ------------------------------------------------------------ waitlist --- */
.waitlist {
  position: relative;
  padding: clamp(1.5rem, 1rem + 2vw, 2.25rem);
  background: #fff;
  border: 1px solid var(--paper-trace);
  box-shadow: 0 20px 50px -30px rgb(8 8 38 / 0.5);
  position: sticky;
  top: calc(var(--header-h) + 2rem);
}
/* A single gradient edge, echoing the mark's fill, marks this as the one
   place on the page that takes input. */
.waitlist::before {
  content: '';
  position: absolute;
  inset: -1px -1px auto;
  height: 3px;
  background: var(--gradient);
}

.waitlist__title { font-size: 1.32rem; margin-bottom: 0.4rem; }
.waitlist__intro { font-size: 0.92rem; color: #4E567E; margin-bottom: 1.4rem; }

.waitlist__label {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #5A628C;
  margin-bottom: 0.5rem;
}

.waitlist__row { display: grid; gap: 0.6rem; }

.waitlist__input {
  width: 100%;
  padding: 0.82rem 0.95rem;
  border: 1px solid #C3CCE8;
  background: #fff;
  color: var(--paper-ink);
  transition: border-color 0.16s, box-shadow 0.16s;
}
.waitlist__input::placeholder { color: #97A0C0; }
.waitlist__input:focus-visible {
  outline: none;
  border-color: var(--pulse-b);
  box-shadow: 0 0 0 3px rgb(36 46 238 / 0.16);
}
.waitlist__input[aria-invalid='true'] {
  border-color: #C81E5B;
  box-shadow: 0 0 0 3px rgb(200 30 91 / 0.14);
}

.waitlist__submit {
  --btn-bg: var(--paper-ink);
  --btn-fg: #fff;
  --btn-bd: var(--paper-ink);
  width: 100%;
}
.waitlist__submit:hover { --btn-bg: var(--pulse-b); --btn-bd: var(--pulse-b); }

.waitlist__hint {
  display: flex;
  gap: 0.55rem;
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--paper-trace);
  font-size: 0.845rem;
  line-height: 1.6;
  color: #4E567E;
}
.waitlist__hint svg { width: 16px; height: 16px; flex: none; margin-top: 4px; color: var(--pulse-b); }

.waitlist__status {
  margin-top: 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
}
.waitlist__status:empty { display: none; }
.waitlist__status[data-state='error'] { color: #C81E5B; }
.waitlist__status[data-state='note'] { color: #1F3BB3; font-weight: 500; }
.waitlist__status[data-state='ok'] { color: #16794A; }

/* ------------------------------------------------------- detail sections ---
   One component for every alternating image/text service block. */
.detail__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
}
.detail--reverse .detail__art { order: -1; }

.detail h2 { font-size: var(--fs-h2); margin-bottom: 1.1rem; }
.detail__copy > p:not(.detail__lead-in) { color: var(--fg-muted); }
.detail__copy > p + p { margin-top: 1rem; }
.detail__lead-in { margin-top: 1.4rem; font-weight: 600; }

.detail__art img { width: 100%; height: auto; }

/* Ticked lists: the tick is a square pad with a mitred check, matching the
   sprite's geometry. */
.ticks { margin-top: 1.1rem; display: grid; gap: 0.6rem; }
.ticks--split { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.ticks li {
  position: relative;
  padding-left: 1.9rem;
  color: var(--fg-muted);
  font-size: 0.95rem;
}
.ticks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 10px;
  height: 10px;
  border: 2px solid var(--signal);
  border-top: 0;
  border-right: 0;
  transform: translateY(-50%) rotate(-45deg);
}

/* ---------------------------------------------------------------- bands --- */
.band h2 { font-size: var(--fs-h2); margin-bottom: 1rem; }

.cards {
  display: grid;
  gap: clamp(0.9rem, 0.5rem + 1.2vw, 1.4rem);
  margin-top: clamp(2rem, 1.4rem + 2vw, 3.2rem);
}
.cards--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  position: relative;
  padding: clamp(1.3rem, 1rem + 1vw, 1.85rem);
  background: var(--ink-raised);
  border: 1px solid var(--trace);
  transition: border-color 0.2s, transform 0.2s;
}
/* A trace corner routes in on hover: two hairlines meeting at a right angle,
   the smallest possible quotation of the mark. */
.card::before,
.card::after {
  content: '';
  position: absolute;
  background: var(--signal);
  transition: transform 0.25s ease-out;
}
.card::before {
  top: -1px; left: -1px; height: 2px; width: 34px;
  transform: scaleX(0); transform-origin: left;
}
.card::after {
  top: -1px; left: -1px; width: 2px; height: 34px;
  transform: scaleY(0); transform-origin: top;
}
.card:hover,
.card:focus-within { border-color: var(--signal-dim); transform: translateY(-3px); }
.card:hover::before,
.card:focus-within::before { transform: scaleX(1); }
.card:hover::after,
.card:focus-within::after { transform: scaleY(1); }

.card__icon {
  width: 30px; height: 30px;
  color: var(--signal);
  margin-bottom: 1.05rem;
}
.card h3 { font-size: var(--fs-h3); }
.card p { margin-top: 0.55rem; font-size: 0.9rem; color: var(--fg-muted); line-height: 1.6; }

.card--link h3 a { color: inherit; text-decoration: none; }
/* Stretched hit area, so the whole card is the target without nesting links. */
.card--link h3 a::after { content: ''; position: absolute; inset: 0; }
.card--link:hover h3 a { color: var(--signal); }

/* -------------------------------------------------------------- process ---
   The signature: six pads wired in series on one continuous trace. This is a
   real sequence, so the connecting line carries actual meaning. */
.process h2 { font-size: var(--fs-h2); margin-bottom: 1rem; }

.route {
  /* Step count drives the trace inset, so the line starts and ends on a pad
     centre rather than floating past the outermost one. */
  --steps: 6;
  --pad: clamp(66px, 5.4vw, 84px);
  display: flex;
  gap: clamp(0.5rem, 2vw, 1rem);
  margin-top: clamp(2.2rem, 1.5rem + 2vw, 3.5rem);
  position: relative;
  counter-reset: step;
}
/* The trace itself, threaded through the centre of every pad. */
.route::before {
  content: '';
  position: absolute;
  left: calc(50% / var(--steps));
  right: calc(50% / var(--steps));
  top: calc(var(--pad) / 2);
  height: 2px;
  background: var(--trace);
}

.route__step {
  counter-increment: step;
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
}

.route__pad {
  position: relative;
  width: var(--pad);
  height: var(--pad);
  display: grid;
  place-items: center;
  background: var(--ink-raised);
  border: 1px solid var(--trace);
  transition: border-color 0.2s, background-color 0.2s;
}
.route__pad svg {
  width: clamp(26px, 2vw, 32px);
  height: clamp(26px, 2vw, 32px);
  color: var(--signal);
}

/* The step number sits on the pad's corner like a silkscreen reference. */
.route__pad::after {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: -1px;
  right: -1px;
  padding: 2px 5px;
  background: var(--trace);
  color: #C9D4F0;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
}

.route__step:hover .route__pad { border-color: var(--signal); background: #10104E; }

.route__name {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(0.92rem, 0.85rem + 0.3vw, 1.05rem);
}

/* -------------------------------------------------------------- contact --- */
.contact__inner {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  align-items: center;
  gap: clamp(2rem, 1rem + 4vw, 4rem);
}
.contact h2 { font-size: var(--fs-h2); margin-bottom: 0.9rem; }
.contact .btn { margin-top: 1.8rem; }
.contact__art img { width: 100%; height: auto; max-width: 320px; }

/* --------------------------------------------------------------- footer --- */
.site-footer {
  border-top: 1px solid var(--trace);
  padding-block: clamp(2.75rem, 2rem + 3vw, 4.5rem) 2rem;
}

.site-footer__grid {
  display: grid;
  /* The brand column absorbs the slack so the two link columns sit against
     the right edge instead of leaving a dead third where the social icons
     used to be. */
  grid-template-columns: 1fr auto auto;
  gap: clamp(2rem, 5vw, 5.5rem);
}

.site-footer__brand p {
  margin-top: 1.1rem;
  max-width: 30ch;
  color: var(--fg-muted);
  font-size: 0.92rem;
}
.site-footer__mail {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.1rem;
  font-size: 0.92rem;
  text-decoration: none;
}
.site-footer__mail svg { width: 17px; height: 17px; }
.site-footer__mail:hover { text-decoration: underline; }

.site-footer__col h2 {
  font-family: var(--mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 1.1rem;
}
.site-footer__col li + li { margin-top: 0.15rem; }
.site-footer__col a {
  display: inline-block;
  /* Padding rather than font-size, to clear the 24px minimum target without
     inflating the footer's visual weight. */
  padding-block: 0.3rem;
  color: var(--fg);
  font-size: 0.92rem;
  text-decoration: none;
}
.site-footer__col a:hover { color: var(--signal); }

.site-footer__end {
  margin-top: clamp(2.2rem, 1.6rem + 2vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--trace);
  font-size: 0.83rem;
  color: var(--fg-muted);
}

/* -------------------------------------------------------------- to top --- */
.to-top {
  position: fixed;
  right: clamp(1rem, 2.5vw, 2rem);
  bottom: clamp(1rem, 2.5vw, 2rem);
  z-index: 90;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--ink-raised);
  border: 1px solid var(--trace);
  color: var(--signal);
  transition: opacity 0.22s, transform 0.22s, border-color 0.18s;
}
.to-top[hidden] { display: none; }
.to-top:not(.is-visible) { opacity: 0; transform: translateY(8px); pointer-events: none; }
.to-top.is-visible { opacity: 1; transform: none; }
.to-top:hover { border-color: var(--signal); }
.to-top svg { width: 20px; height: 20px; }

/* --------------------------------------------------------------- reveal ---
   Scroll-in is applied by script.js only; without JS everything is visible. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease-out, transform 0.55s ease-out;
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive. Mobile-first would mean rewriting the grids twice; the layouts
   above are the wide case, and these steps collapse them.
   ========================================================================== */

@media (max-width: 1080px) {
  .site-footer__grid { grid-template-columns: 1fr auto; row-gap: 2.5rem; }
}

/* The nav collapses well before the layout does - six items plus a button
   crowd the header long before the grids need to stack. */
@media (max-width: 960px) {
  .nav-toggle { display: block; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 0 auto;
    width: min(400px, 86%);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 1.25rem var(--pad-x) 2.5rem;
    background: var(--ink);
    border-left: 1px solid var(--trace);
    overflow-y: auto;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.28s ease-out, visibility 0.28s;
  }
  .nav.is-open { transform: none; visibility: visible; }

  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__list > li { border-bottom: 1px solid var(--trace); }
  .nav__list > li > a,
  .nav__sub-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 0.95rem 0;
    font-size: 1rem;
  }

  .nav__sub {
    position: static;
    min-width: 0;
    padding: 0 0 0.6rem;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .nav__sub a { padding: 0.5rem 0 0.5rem 1.1rem; border-left: 2px solid var(--trace); }
  .nav__sub a::before { display: none; }
  .nav__sub a:hover,
  .nav__sub a:focus-visible { padding-left: 1.1rem; border-left-color: var(--signal); }

  .nav__cta { margin-top: 1.5rem; }
}

@media (max-width: 900px) {
  .hero__inner,
  .invite__inner,
  .detail__inner,
  .contact__inner { grid-template-columns: 1fr; }

  /* The illustration follows the copy on every stacked block, including the
     ones that reverse on desktop, so the reading order stays text-first. */
  .detail--reverse .detail__art { order: 0; }

  .hero__art,
  .detail__art { max-width: 480px; margin-inline: auto; }
  .contact__art { max-width: 240px; margin-inline: auto; }

  .waitlist { position: static; }

  .invite h2 { max-width: none; }

  /* The routed trace turns vertical, but stays one continuous line. */
  .route { flex-direction: column; gap: 0; --pad: 56px; }
  .route::before {
    left: calc(var(--pad) / 2);
    right: auto;
    top: calc(var(--pad) / 2 + 0.5rem);
    bottom: calc(var(--pad) / 2 + 0.5rem);
    width: 2px;
    height: auto;
  }
  .route__step {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 1.1rem;
    padding-block: 0.5rem;
  }
  .route__name { font-size: 1rem; }
}

@media (max-width: 620px) {
  .cards--3 { grid-template-columns: 1fr; }
  .ticks--split { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1 1 100%; }
}

@media (min-width: 640px) {
  /* Side-by-side field and button once there is room for both. */
  .waitlist__row { grid-template-columns: 1fr auto; }
  .waitlist__submit { width: auto; }
}

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

/* --------------------------------------------------------------- print --- */
@media print {
  .site-header, .to-top, .nav-toggle, .hero__art, .detail__art, .contact__art { display: none; }
  body { background: #fff; color: #000; }
}
