:root {
  --bg: #000;
  --bg-2: #0a0a0c;
  --ink: #fff;
  --muted: #a9a9b3;
  --line: rgb(255 255 255 / 0.16);
  --page: 1180px;
  --gutter: clamp(22px, 5vw, 64px);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; background: var(--bg); }
html:has(body.home) { scroll-snap-type: y proximity; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 3px; }

.skip { position: absolute; inset-inline-start: 12px; top: -80px; z-index: 40; padding: 10px 16px; background: #fff; color: #000; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---- type ------------------------------------------------------------------------------------ */
h1, h2 { text-transform: uppercase; font-weight: 600; letter-spacing: 0.035em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 4.6vw, 4rem); line-height: 1.1; }
h2 { font-size: clamp(1.7rem, 3.6vw, 3.1rem); line-height: 1.12; }
h3, .t3 { font-size: 1.125rem; line-height: 1.35; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; }
.kicker { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.lead { font-size: clamp(1.05rem, 1.7vw, 1.3rem); line-height: 1.55; color: var(--muted); max-width: 46ch; text-wrap: pretty; }

.words { display: flex; flex-wrap: wrap; gap: 10px 30px; font-size: 0.84rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.words li { display: inline-block; }
.words li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-inline-end: 10px; border-radius: 50%; background: #fff; vertical-align: middle; position: relative; top: -1px; }

/* ---- buttons --------------------------------------------------------------------------------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 52px; padding: 0 34px;
  border: 1px solid rgb(255 255 255 / 0.75); background: transparent; color: #fff;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none;
  transition: background-color .25s, color .25s, border-color .25s;
}
.button:hover { background: #fff; color: #000; border-color: #fff; }
.button-solid { background: #fff; color: #000; border-color: #fff; }
.button-solid:hover { background: #d4d4d8; color: #000; border-color: #d4d4d8; }
.arrow { transition: transform .25s; }
.button:hover .arrow, .next:hover .arrow { transform: translateX(4px); }
[dir="rtl"] .arrow { transform: scaleX(-1); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: flex-start; margin-top: 8px; }

/* ---- header ---------------------------------------------------------------------------------- */
.top {
  position: fixed; inset-inline: 0; top: 0; z-index: 30;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  padding: 16px var(--gutter);
  transition: background-color .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.top.solid, body.inner .top {
  background: rgb(0 0 0 / 0.88);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  border-bottom-color: var(--line);
}
/* the brand: the mark and the word AETHER side by side, as in the sidebar of the product (the mark 28 px high, the word 14 px:
   half of it, weight 600, tracking 0.2em, 10 px between them). Here the mark is 35 px high, so the word is 17.5 px. */
.brand { display: inline-flex; align-items: center; gap: 10px; line-height: 0; justify-self: start; color: #fff; text-decoration: none; }
.brand-name { font-size: 1.09375rem; font-weight: 600; letter-spacing: 0.2em; line-height: 1.25; text-transform: uppercase; white-space: nowrap; }
/* the same pair, large, on the 404 page: the mark is 76 px high, so the word is 38 px */
.brand-large { gap: 22px; }
.brand-large .brand-name { font-size: clamp(1.5rem, 9vw, 2.375rem); }
.nav { justify-self: end; margin-inline-end: clamp(16px, 3vw, 44px); }
.nav ul { display: flex; gap: clamp(18px, 3vw, 40px); }
.nav-link, .top-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none; color: rgb(255 255 255 / 0.82); transition: color .2s; }
.nav-link:hover, .top-link:hover, .nav-link[aria-current] { color: #fff; }
.nav-link[aria-current] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 9px; }
.top-end { display: flex; align-items: center; gap: 22px; justify-self: end; }

.lang, .burger { position: relative; }
.lang summary, .burger summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; min-height: 44px; min-width: 44px; justify-content: center; padding: 6px 4px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; }
.lang summary::-webkit-details-marker, .burger summary::-webkit-details-marker { display: none; }
.burger { display: none; }
.lang-code { display: none; }
.menu-list {
  position: absolute; inset-inline-end: 0; top: calc(100% + 10px); min-width: 210px; padding: 8px;
  background: rgb(10 10 12 / 0.96); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.lang-link, .burger-link { display: flex; align-items: center; min-height: 44px; padding: 8px 14px; text-decoration: none; font-size: 0.84rem; letter-spacing: 0.14em; text-transform: uppercase; }
.lang-link:hover, .burger-link:hover, .lang-link:focus-visible, .burger-link:focus-visible { background: rgb(255 255 255 / 0.08); }
.lang-link[aria-current], .burger-link[aria-current] { color: #fff; font-weight: 700; }

/* ---- home: full-screen panels, laid out as a Z (logo top left, menu top right, text bottom left, then bottom right, ...) ---- */
.panel {
  position: relative; isolation: isolate; min-height: 100svh; scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; text-align: start;
  padding: 120px var(--gutter) clamp(72px, 12vh, 130px); overflow: hidden; background: var(--bg);
}
.panel-right { align-items: flex-end; }
.panel + .panel { border-top: 1px solid var(--line); content-visibility: auto; contain-intrinsic-size: auto 100svh; }
.bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center; }
.panel .bg { inset: -3% 0; height: 106%; } /* room for the slow drift, so the picture never shows an edge */
.panel canvas.bg { inset: 0; height: 100%; display: block; }
.panel::before, .page-head::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgb(0 0 0 / 0.9) 0%, rgb(0 0 0 / 0.58) 38%, rgb(0 0 0 / 0.12) 78%, rgb(0 0 0 / 0.3) 100%),
    linear-gradient(0deg, rgb(0 0 0 / 0.85) 0%, transparent 46%);
}
.panel-right::before {
  background:
    linear-gradient(270deg, rgb(0 0 0 / 0.9) 0%, rgb(0 0 0 / 0.58) 38%, rgb(0 0 0 / 0.12) 78%, rgb(0 0 0 / 0.3) 100%),
    linear-gradient(0deg, rgb(0 0 0 / 0.85) 0%, transparent 46%);
}
.panel-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; max-width: 580px; text-align: start; }
.panel-copy h2 { font-size: clamp(1.9rem, 4.2vw, 3.4rem); max-width: 16ch; text-shadow: 0 2px 28px rgb(0 0 0 / 0.85); }
.panel-text { color: rgb(255 255 255 / 0.88); max-width: 46ch; font-size: clamp(1rem, 1.5vw, 1.15rem); text-shadow: 0 1px 18px rgb(0 0 0 / 0.9); }
.panel-copy .button { margin-top: 14px; }
/* panels without a background: black with a soft grey glow behind the text */
.panel-plain { background: radial-gradient(60% 55% at 14% 120%, rgb(255 255 255 / 0.1), transparent 72%), var(--bg); }
.panel-plain.panel-right { background: radial-gradient(60% 55% at 86% 120%, rgb(255 255 255 / 0.1), transparent 72%), var(--bg); }
.panel-plain::before, .page-head-plain::before { content: none; }
.page-head-plain { background: radial-gradient(60% 80% at 12% 130%, rgb(255 255 255 / 0.07), transparent 72%), var(--bg); }

.panel-hero { padding-bottom: clamp(88px, 15vh, 150px); }
/* the ring of the hero sits on the right, so the title takes the left: dark on the left, clear on the right */
.panel-hero .bg, .panel-left .bg { object-position: 72% 50%; }
.panel-right .bg { object-position: 28% 50%; }
/* the light panels (text on the right, ring on the left): white panel, black text */
.panel-light { background: #fff; color: #0a0a0c; }
.panel-light::before {
  background:
    linear-gradient(270deg, rgb(255 255 255 / 0.9) 0%, rgb(255 255 255 / 0.62) 40%, rgb(255 255 255 / 0.06) 78%, transparent 100%),
    linear-gradient(0deg, rgb(255 255 255 / 0.7) 0%, transparent 42%);
}
.panel-light .panel-copy h2 { text-shadow: 0 0 30px rgb(255 255 255 / 0.9); }
.panel-light .panel-text { color: rgb(10 10 12 / 0.82); text-shadow: 0 0 22px rgb(255 255 255 / 0.9); }
.panel-light .button { border-color: #0a0a0c; color: #0a0a0c; }
.panel-light .button:hover { background: #0a0a0c; color: #fff; border-color: #0a0a0c; }
.panel-light:focus-visible, .panel-light a:focus-visible { outline-color: #0a0a0c; }
.panel-light + .panel, .panel + .panel-light { border-top-color: rgb(255 255 255 / 0.16); }

.panel-hero::before {
  background:
    linear-gradient(90deg, rgb(0 0 0 / 0.88) 0%, rgb(0 0 0 / 0.6) 34%, rgb(0 0 0 / 0.08) 62%, transparent 100%),
    linear-gradient(0deg, rgb(0 0 0 / 0.75) 0%, transparent 40%);
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; max-width: min(880px, 58vw); text-align: start; }
.hero-copy h1 { font-size: clamp(2.2rem, 5.4vw, 4.8rem); text-shadow: 0 2px 30px rgb(0 0 0 / 0.8); }
.hero-copy .lead { max-width: 50ch; color: rgb(255 255 255 / 0.88); text-shadow: 0 1px 18px rgb(0 0 0 / 0.9); }
.down { position: absolute; bottom: clamp(30px, 6vh, 56px); inset-inline-end: var(--gutter); width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border: 1px solid rgb(255 255 255 / 0.5); border-radius: 50%; color: #fff; transition: border-color .2s, transform .2s; }
.down:hover { border-color: #fff; transform: translateY(3px); }

/* A smooth hand-over from one panel to the next: the browser snaps to the panels (desktop), the text rises in and the
   background drifts slowly as the panel scrolls into view. Browsers without scroll-driven animations just show the panels. */
@media (min-width: 961px) and (pointer: fine) {
  html:has(body.home) { scroll-snap-type: y mandatory; }
}
body.home .foot { scroll-snap-align: end; }
@keyframes rise { from { opacity: 0; transform: translateY(56px); } to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: translateY(-2%); } to { transform: translateY(2%); } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .panel-copy, .hero-copy { animation: rise ease-out both; animation-timeline: view(); animation-range: entry 5% entry 85%; }
    .panel img.bg { animation: drift linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  }
}

/* ---- inner pages ----------------------------------------------------------------------------- */
.page-head {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(78svh, 760px); display: flex; align-items: flex-end;
  padding: 150px var(--gutter) clamp(48px, 9vh, 96px); background: var(--bg);
}
.page-head-copy { width: 100%; max-width: var(--page); margin-inline: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.page-head h1 { max-width: 16ch; }
.page-head .lead { color: rgb(255 255 255 / 0.86); }
.page-head .bg { object-position: center; }
/* the banner of an inner page is an animation on a canvas (scene.js) that fills the page head */
.page-head-scene { min-height: min(92svh, 900px); }
.page-head-scene .bg-scene { inset: 0; width: 100%; height: 100%; display: block; }
/* the drawing sits above the title, which fades into black */
.page-head-scene::before { background: linear-gradient(0deg, rgb(0 0 0 / 0.98) 0%, rgb(0 0 0 / 0.9) 30%, rgb(0 0 0 / 0) 58%); }
/* a drawing that reaches down the right side (Topology, AI): the title is darkened from the left instead */
.page-head-scene-side::before {
  background:
    radial-gradient(ellipse 62% 70% at 6% 100%, rgb(0 0 0 / 0.94) 0%, rgb(0 0 0 / 0.78) 48%, rgb(0 0 0 / 0) 100%),
    linear-gradient(0deg, rgb(0 0 0 / 0.7) 0%, transparent 28%);
}
.block { padding: clamp(44px, 9vh, 96px) var(--gutter); max-width: calc(var(--page) + 2 * var(--gutter)); margin-inline: auto; }
.block h2 { max-width: 20ch; }
.block > .lead { margin-top: 20px; }
.block > .words { margin-top: 30px; }
.rows { border-top: 1px solid var(--line); }
.block h2 + .lead + .words + .rows, .block h2 + .rows { margin-top: 48px; }
.rows li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 12px 40px; padding: 30px 0; border-bottom: 1px solid var(--line); }
.rows p, .steps p, .trust p { color: var(--muted); max-width: 48ch; }
.note { margin-top: 36px; font-weight: 500; max-width: 54ch; }

.steps { margin-top: 48px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px; }
.steps li { border-top: 1px solid rgb(255 255 255 / 0.6); padding-top: 22px; }
.number { display: block; margin-bottom: 18px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.2em; color: var(--muted); font-variant-numeric: tabular-nums; }
.steps h3 { margin-bottom: 10px; }

.trust { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 64px; }
.trust li { border-top: 1px solid var(--line); padding-top: 24px; }
.trust h3 { margin-bottom: 10px; }

.screen { margin-top: 28px; }
.screen img { width: 100%; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 0 100px -30px rgb(255 255 255 / 0.12); background: #0d1117; }
.screen figcaption { margin-top: 12px; font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.screen-main { margin-top: 0; }
.views { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 40px); }
.views .screen { margin-top: 0; }
.views .screen img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.caption { margin-top: 28px; font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

.closing { display: flex; flex-direction: column; align-items: flex-start; text-align: start; gap: 24px; padding: clamp(80px, 16vh, 170px) max(var(--gutter), calc((100% - var(--page)) / 2)) clamp(60px, 10vh, 110px);
  border-top: 1px solid var(--line); background: radial-gradient(60% 70% at 12% 130%, rgb(255 255 255 / 0.1), transparent 72%), var(--bg); }
.closing h2 { max-width: 16ch; }
.next { align-self: flex-end; display: inline-flex; align-items: center; gap: 12px; margin-top: 28px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; text-decoration: none; color: var(--muted); }
.next:hover { color: #fff; }

/* ---- footer ---------------------------------------------------------------------------------- */
.foot { padding: 48px var(--gutter) 44px; border-top: 1px solid var(--line); font-size: 0.86rem; color: var(--muted); }
.foot-grid { max-width: var(--page); margin-inline: auto; display: grid; grid-template-columns: auto 1fr auto; gap: 24px 56px; align-items: start; }
.foot-pages, .foot-lang { display: flex; flex-direction: column; gap: 10px; }
.foot-link { display: inline-flex; align-items: center; min-height: 36px; text-decoration: none; letter-spacing: 0.16em; text-transform: uppercase; }
.foot-link:hover { color: #fff; }
.foot-link[aria-current] { color: #fff; }
.foot-rights { max-width: var(--page); margin: 40px auto 0; letter-spacing: 0.06em; }

/* ---- 404 ------------------------------------------------------------------------------------- */
.lost { min-height: 100svh; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 22px; padding: 120px var(--gutter) clamp(72px, 12vh, 130px); text-align: start; }

@media (max-width: 960px) {
  .top { grid-template-columns: auto 1fr; }
  .nav { display: none; }
  .burger { display: block; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head-scene-side::before { background: linear-gradient(0deg, rgb(0 0 0 / 0.95) 0%, rgb(0 0 0 / 0.7) 42%, rgb(0 0 0 / 0) 74%); }
  /* narrow screens: the title takes the full width over the lower half, the animation stays above it */
  .hero-copy { max-width: none; }
  .panel-hero::before { background: linear-gradient(0deg, rgb(0 0 0 / 0.92) 0%, rgb(0 0 0 / 0.66) 48%, rgb(0 0 0 / 0.08) 82%); }
}

@media (max-width: 720px) {
  .rows li { grid-template-columns: 1fr; padding: 24px 0; }
  .steps { grid-template-columns: 1fr; gap: 30px; }
  .trust { grid-template-columns: 1fr; gap: 32px; }
  .views { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .top-end { gap: 14px; }
}

@media (max-width: 600px), (min-width: 961px) and (max-width: 1100px) {
  /* phones and small laptops: the language shows as its code (EN, PT, ES), so the brand (wider now, with its word) and the
     menu share one line with it; "Português (Brasil)" does not fit beside them */
  .lang-name { display: none; }
  .lang-code { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html:has(body.home) { scroll-snap-type: none !important; }
  .button, .arrow, .down { transition: none; }
}
