/* a77.ch — brand code v7 (November 2026): what every page shares.
   Type, tokens, header, phone menu, buttons, the speed check form, footer and the reveal.
   The home page adds home.css; /check, /privacy, /brand and the 404 add page.css. */
@font-face { font-family:Archivo; src:url(/assets/fonts/archivo-latin-400-700.woff2) format("woff2"); font-weight:400 700; font-display:swap; }

/* ── tokens ─────────────────────────────────────────────────────────── */
:root {
  --ink:#101010; --paper:#f4f4f4;
  --mute:rgba(16,16,16,.64);            /* 5.5:1 on paper */
  --pad:clamp(20px,5vw,80px);
  --max:1360px;                          /* one grid: every section and the header share this width and edge */
  --head:64px;
  --ease:cubic-bezier(.2,.7,.1,1);       /* long, soft settle */
  --snap:cubic-bezier(.3,.9,.3,1);       /* quick UI response */
}
/* big screens: the grid grows with the screen instead of floating small in the middle */
@media (min-width:1800px) { :root { --max:1640px; } }
@media (min-width:2300px) { :root { --max:1960px; } }
.dark { background:var(--ink); color:var(--paper); --mute:rgba(244,244,244,.64); }

/* ── base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing:border-box; margin:0; }
/* ink behind the page, so pulling past the top or the bottom shows the same black as the hero and the footer */
html { background:var(--ink); scroll-behavior:smooth; scroll-padding-top:var(--head); -webkit-text-size-adjust:100%; text-size-adjust:100%;
  scrollbar-width:thin; scrollbar-color:#8a8a8a transparent; }
html.lock { overflow:hidden; }
body { background:var(--paper); color:var(--ink); font:400 17px/1.6 Archivo, system-ui, sans-serif; overflow-x:hidden; overflow-x:clip; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; text-rendering:optimizeLegibility; }
a { color:inherit; text-decoration:none; -webkit-tap-highlight-color:transparent; }
button { font:inherit; color:inherit; background:none; border:0; padding:0; cursor:pointer; -webkit-tap-highlight-color:transparent; }
img, svg { display:block; max-width:100%; }
h1, h2, h3, h4 { font-size:inherit; text-wrap:balance; }
p { text-wrap:pretty; }
/* a heading set as one line per sentence: each line balances on its own when a phone has to break it */
.lines > span { display:block; }
::selection { background:var(--ink); color:var(--paper); }
.dark ::selection, .hero ::selection, .menu ::selection { background:var(--paper); color:var(--ink); }
/* the focus ring takes the colour of the surface around the control, never the control's own text colour:
   on a solid button that would be the colour of the page behind it, and the ring would vanish */
:focus-visible { outline:2px solid var(--ink); outline-offset:4px; border-radius:6px; }
.dark :focus-visible, .hero :focus-visible, .menu :focus-visible { outline-color:var(--paper); }
.win :focus-visible { outline-color:var(--ink); }
.dark-win :focus-visible { outline-color:var(--paper); }
.head :focus-visible { outline-color:var(--fg); }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap; }
.wrap { max-width:var(--max); margin:0 auto; padding:0 var(--pad); }
.eyebrow { font-weight:600; font-size:13px; letter-spacing:.16em; text-transform:uppercase; color:var(--mute); }
.arr { display:inline-block; transition:transform .35s var(--ease); }
/* drawn icons: the arrow and the tick are not in the Archivo subset, and a fallback font draws them at another weight */
.ico { display:inline-block; width:1em; height:1em; vertical-align:-.14em; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; overflow:visible; }
/* underline that grows from the left on hover */
.ul { background:linear-gradient(currentColor,currentColor) 0 100% / 0 1px no-repeat; padding-bottom:2px; transition:background-size .45s var(--ease), color .2s; }
.ul:hover { background-size:100% 1px; }
.skip { position:fixed; left:12px; top:12px; z-index:40; padding:10px 18px; border-radius:999px; background:var(--paper); color:var(--ink); font-size:14px; font-weight:600;
  box-shadow:0 4px 16px rgba(0,0,0,.25); transform:translateY(calc(-100% - 48px)); transition:transform .3s var(--ease); }   /* far enough up that its shadow stays off screen too */
.skip:focus { transform:none; }

/* ── header ─────────────────────────────────────────────────────────── */
/* the header's edges line up with the page's grid (100% here is the width of the window, without its scrollbar) */
.head { position:fixed; inset:0 0 auto; z-index:20; height:var(--head);
  padding:0 max(var(--pad), env(safe-area-inset-right), (100% - var(--max)) / 2 + var(--pad)) 0 max(var(--pad), env(safe-area-inset-left), (100% - var(--max)) / 2 + var(--pad));
  display:grid; grid-template-columns:1fr auto 1fr; align-items:center;
  --fg:var(--paper); --bg:var(--ink); color:var(--fg);
  transition:background-color .5s var(--ease), color .5s var(--ease), box-shadow .5s var(--ease); }
.head.solid { --fg:var(--ink); --bg:var(--paper); background:rgba(244,244,244,.78); box-shadow:0 1px 0 rgba(16,16,16,.08);
  -webkit-backdrop-filter:saturate(1.6) blur(20px); backdrop-filter:saturate(1.6) blur(20px); }
.head.solid.on-dark { --fg:var(--paper); --bg:var(--ink); background:rgba(16,16,16,.72); box-shadow:0 1px 0 rgba(244,244,244,.08); }
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  .head.solid { background:rgba(244,244,244,.97); } .head.solid.on-dark { background:rgba(16,16,16,.97); } }
.head.menu-open { --fg:var(--paper); --bg:var(--ink); background:transparent !important; box-shadow:none !important; -webkit-backdrop-filter:none; backdrop-filter:none; }
.head-mark { justify-self:start; margin-left:-2px; font-weight:700; font-size:22px; letter-spacing:-.05em; padding:6px 2px; opacity:0; transform:translateY(6px); transition:opacity .5s var(--ease), transform .5s var(--ease); }
.head.solid .head-mark, .head.menu-open .head-mark { opacity:1; transform:none; }
/* without the script the header never learns where it is: keep it solid and readable everywhere */
html:not(.js) .head { --fg:var(--ink); --bg:var(--paper); background:rgba(244,244,244,.95); box-shadow:0 1px 0 rgba(16,16,16,.08); }
html:not(.js) .head-mark { opacity:1; transform:none; }
.nav { display:flex; gap:clamp(18px,2.4vw,36px); font-size:14px; font-weight:500; }
.nav a { position:relative; padding:6px 0; opacity:.72; white-space:nowrap; transition:opacity .2s; }
.nav a::after { content:""; position:absolute; left:0; right:0; bottom:1px; height:1px; background:currentColor; transform:scaleX(0); transform-origin:right; transition:transform .4s var(--ease); }
.nav a:hover, .nav a[aria-current] { opacity:1; }
.nav a:hover::after, .nav a[aria-current]::after { transform:scaleX(1); transform-origin:left; }
.head-end { justify-self:end; display:flex; align-items:center; gap:10px; }
.pill { display:inline-flex; align-items:center; height:38px; padding:0 18px; border-radius:999px; box-shadow:inset 0 0 0 1px currentColor; font-size:14px; font-weight:600; white-space:nowrap; transition:background-color .25s, color .25s; }
.pill:hover { background:var(--fg); color:var(--bg); }
.pill .arr { width:0; opacity:0; transform:translateX(-6px); overflow:hidden; transition:width .35s var(--ease), margin .35s var(--ease), opacity .25s, transform .35s var(--ease); }
.pill:hover .arr { width:1em; margin-left:6px; opacity:1; transform:none; }
.menu-btn { display:none; position:relative; width:38px; height:38px; border-radius:50%; box-shadow:inset 0 0 0 1px currentColor; }
.menu-btn i { position:absolute; left:12px; right:12px; height:1.5px; border-radius:2px; background:currentColor; transition:transform .45s var(--ease), top .45s var(--ease); }
.menu-btn i:nth-child(1) { top:15.5px; } .menu-btn i:nth-child(2) { top:21px; }
.head.menu-open .menu-btn i:nth-child(1) { top:18.25px; transform:rotate(45deg); }
.head.menu-open .menu-btn i:nth-child(2) { top:18.25px; transform:rotate(-45deg); }
@media (max-width:860px) { .nav { display:none; } .menu-btn { display:block; } .head { grid-template-columns:1fr auto; } }
/* without the script the menu button can't open anything: on a phone the links sit under the header instead */
@media (max-width:860px) {
  html:not(.js) .menu-btn { display:none; }
  html:not(.js) .head { position:absolute; height:auto; min-height:var(--head); padding-top:13px; padding-bottom:12px; row-gap:6px; }
  html:not(.js) .nav { display:flex; flex-wrap:wrap; gap:2px 18px; grid-column:1 / -1; grid-row:2; }
}

/* phone menu: drops down from the top like a blind */
.menu { position:fixed; inset:0; z-index:19; background:var(--ink); color:var(--paper);
  padding:calc(var(--head) + 24px) var(--pad) max(28px, env(safe-area-inset-bottom));
  display:flex; flex-direction:column; justify-content:space-between; overflow-y:auto;
  clip-path:inset(0 0 100% 0); visibility:hidden; transition:clip-path .6s var(--ease), visibility 0s .6s; }
.menu.open { clip-path:inset(0); visibility:visible; transition:clip-path .6s var(--ease), visibility 0s; }
.menu-main a { display:block; width:max-content; font-weight:700; font-size:clamp(40px,11vw,64px); letter-spacing:-.05em; line-height:1.1;
  opacity:0; transform:translateY(28px); transition:opacity .45s var(--ease), transform .6s var(--ease); }
.menu.open .menu-main a { opacity:1; transform:none; }
.menu.open .menu-main a:nth-child(1) { transition-delay:.08s; } .menu.open .menu-main a:nth-child(2) { transition-delay:.12s; }
.menu.open .menu-main a:nth-child(3) { transition-delay:.16s; } .menu.open .menu-main a:nth-child(4) { transition-delay:.2s; }
.menu.open .menu-main a:nth-child(5) { transition-delay:.24s; }
.menu-sub { display:grid; gap:12px; margin-top:44px; font-size:15px; opacity:0; transition:opacity .5s var(--ease) .25s; }
.menu.open .menu-sub { opacity:1; }
.menu-sub a { display:flex; justify-content:space-between; align-items:center; padding:12px 0; border-top:1px solid rgba(244,244,244,.12); }

/* ── buttons and links ──────────────────────────────────────────────── */
.btn { display:inline-flex; align-items:center; gap:12px; height:64px; padding:0 34px; border-radius:999px; background:var(--ink); color:var(--paper); font-weight:600; font-size:18px; letter-spacing:-.01em;
  box-shadow:0 10px 30px -12px rgba(16,16,16,.5); transition:transform .35s var(--ease), box-shadow .35s var(--ease); }
.btn:hover { transform:translateY(-2px); box-shadow:0 18px 40px -14px rgba(16,16,16,.55); }
.btn:hover .arr { transform:translateX(4px); }
.btn:active { transform:translateY(0) scale(.98); }
.or { margin-top:22px; font-size:15px; color:var(--mute); }
.or a { color:var(--ink); text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:3px; transition:text-decoration-color .2s; }
.or a:hover { text-decoration-color:transparent; }
.more { position:relative; display:inline-flex; align-items:center; gap:10px; padding:4px 0; font-weight:600; font-size:17px; }
.more::after { content:""; position:absolute; left:0; right:0; bottom:0; height:1px; background:currentColor; }
.more:hover::after { animation:relink .75s var(--ease); }
.more:hover .arr { transform:translateX(5px); }
@keyframes relink { 0% { transform:scaleX(1); transform-origin:right; } 45% { transform:scaleX(0); transform-origin:right; }
  46% { transform:scaleX(0); transform-origin:left; } 100% { transform:scaleX(1); transform-origin:left; } }
.spin { display:none; width:13px; height:13px; border-radius:50%; border:2px solid currentColor; border-right-color:transparent; animation:spin .7s linear infinite; }
@keyframes spin { to { transform:rotate(1turn); } }

/* ── the speed check form (the home page band and /check) ────────────── */
.fine { margin-top:22px; font-size:14px; color:var(--mute); text-wrap:balance; }
.check { display:flex; max-width:600px; margin:clamp(48px,8vh,88px) auto 0; padding:6px 6px 6px 26px; border-radius:999px; background:rgba(244,244,244,.04); box-shadow:inset 0 0 0 1px rgba(244,244,244,.22); transition:box-shadow .3s; }
.check:focus-within { box-shadow:inset 0 0 0 1px rgba(244,244,244,.6), 0 0 0 6px rgba(244,244,244,.06); }
.check.err { animation:shake .4s; }
@keyframes shake { 20%, 60% { translate:-6px 0; } 40%, 80% { translate:6px 0; } }
.check input { flex:1; min-width:0; padding:12px 0; border:0; background:none; color:var(--paper); font:500 clamp(17px,1.6vw,21px) Archivo, sans-serif; letter-spacing:-.01em; outline:none; }
.check input::placeholder { color:var(--paper); opacity:.6; }
.check button { display:inline-flex; align-items:center; gap:8px; padding:0 22px; border-radius:999px; background:var(--paper); color:var(--ink); font-weight:600; font-size:16px; white-space:nowrap; transition:transform .3s var(--ease); }
.check button:hover { transform:scale(1.03); }
.check button:hover .arr { transform:translateX(3px); }
.check button:active { transform:scale(.97); }
.check.busy .spin { display:inline-block; }
.check.busy .arr { display:none; }
@media (max-width:420px) { .check { padding-left:18px; } .check button { padding:0 16px; font-size:15px; } .check .long { display:none; } }
.hint { min-height:1.5em; margin-top:14px; font-size:14px; font-weight:600; color:var(--paper); }
.hint:empty { min-height:0; margin-top:0; }

/* ── footer ─────────────────────────────────────────────────────────── */
.foot { overflow:hidden; padding:clamp(56px,9vh,96px) var(--pad) 0; border-top:1px solid rgba(244,244,244,.12); }
.foot-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:32px; max-width:calc(var(--max) - 2 * var(--pad)); margin:0 auto; font-size:14px; }
.foot-col { display:flex; flex-direction:column; align-items:flex-start; gap:10px; color:var(--mute); }
.foot-col b { margin-bottom:4px; font-weight:600; color:var(--paper); }
.foot-col a:hover { color:var(--paper); }
@media (max-width:760px) { .foot-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:36px 20px; } }
/* the giant mark is also the way back to the top */
.foot-mark { display:block; margin:clamp(40px,8vh,96px) 0 -.06em; padding-right:.05em; font-weight:700; font-size:44vw; letter-spacing:-.05em; line-height:.72; text-align:center; user-select:none; -webkit-user-select:none; }
.foot-mark span { display:block; transition:transform 1.8s var(--ease); }
.js .foot-mark span { transform:translateY(32%); }
.js .foot-mark.in span { transform:none; }
.foot-mark b { display:inline-block; font-weight:inherit; transition:transform .8s var(--ease); }
@media (hover:hover) { .foot-mark:hover b { transform:translateY(-5%); } }
.foot-mark:focus-visible { outline-offset:-12px; }

/* ── reveal on scroll (only when the script runs: without it, everything shows) ── */
.js .rv { opacity:0; transform:translateY(40px); transition:opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.js .rv.in { opacity:1; transform:none; }

@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  .js .rv, .js .foot-mark span { opacity:1; transform:none; transition:none; }
  .menu, .menu.open, .menu-main a, .menu-sub, .menu-btn i { transition:none; }
}
