/* AAL-Nexus / AAL Cloud — static landing styles.
   Nexus palette: institutional tokens from aal-nexus src/configs/brandTokens.js.
   AAL theme: warm tones sampled from the official AAL Team logo. */

:root {
  --navy: #071d49;
  --blue: #004f8f;
  --signal: #168de2;
  --teal: #00b8b0;
  --green: #32c878;

  --ink: #071d49;
  --muted: #4a5878;
  --line: #e3e9f2;
  --bg: #ffffff;
  --tint: #f4f7fb;
  --card: #ffffff;

  --brand: var(--blue);
  --brand-ink: #ffffff;
  --brand-hover: #003d70;
  --accent: var(--signal);
  --grad: linear-gradient(100deg, #004f8f 0%, #0f6fb4 45%, #00807a 100%);
  --hero-glow-1: rgba(22, 141, 226, 0.16);
  --hero-glow-2: rgba(50, 200, 120, 0.12);
  --dark: #071d49;
  --dark-2: #0b1e45;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(7, 29, 73, 0.05), 0 8px 24px -12px rgba(7, 29, 73, 0.16);
  --shadow-lg: 0 2px 4px rgba(7, 29, 73, 0.04), 0 24px 48px -20px rgba(7, 29, 73, 0.28);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --header-h: 72px;
}

[data-theme='aal'] {
  --brand: #4e3a28;
  --brand-hover: #3a2a1c;
  --accent: #8a6a50;
  --tint: #f8f5f1;
  --line: #ebe4dc;
  --muted: #5b5048;
  --ink: #2a2019;
  --grad: linear-gradient(100deg, #4e3a28 0%, #7a5c43 55%, #9a7a5e 100%);
  --hero-glow-1: rgba(168, 139, 110, 0.18);
  --hero-glow-2: rgba(22, 141, 226, 0.08);
  --dark: #2a2019;
  --dark-2: #3a2d22;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

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

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.ico { width: 22px; height: 22px; flex: none; }

/* ---------- buttons & badges ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font: 600 16px/1.2 var(--font); text-decoration: none; white-space: nowrap;
  border: 1.5px solid transparent;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn .ico { width: 18px; height: 18px; }
.btn--primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 8px 20px -10px var(--brand); }
.btn--primary:hover { background: var(--brand-hover); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--sm { min-height: 40px; padding: 8px 18px; font-size: 15px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; vertical-align: middle;
  padding: 3px 10px; border-radius: 999px;
  font: 600 12px/1.5 var(--font); letter-spacing: 0.02em; white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--available { background: #e6f6ec; color: #17693d; }
.badge--development { background: #e6f1fb; color: #0b5c99; }
.badge--planned { background: #eef1f5; color: #44506a; }

.kicker {
  font: 700 13px/1.4 var(--font); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
[data-theme='nexus'] .kicker { color: #0f6fb4; }
.lead { font-size: 19px; color: var(--muted); }

.grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color 0.2s, box-shadow 0.2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(7, 29, 73, 0.4); }
.site-header__inner { height: 100%; display: flex; align-items: center; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand__logo { height: 38px; width: auto; }
.brand__mark { height: 44px; width: 44px; }
.brand__text { font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }

.nav { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.nav ul { display: flex; gap: 4px; }
.nav ul a {
  display: block; padding: 8px 12px; border-radius: 8px;
  font-size: 15px; font-weight: 500; color: var(--muted); text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
}
.nav ul a:hover { color: var(--ink); background: var(--tint); }

.header-tools { display: flex; align-items: center; gap: 8px; }
.lang { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.lang a {
  min-width: 40px; padding: 6px 10px; border-radius: 999px; text-align: center;
  font: 700 12px/1.2 var(--font); letter-spacing: 0.06em; color: var(--muted); text-decoration: none;
}
.lang a[aria-current] { background: var(--ink); color: #fff; }
.lang a:not([aria-current]):hover { color: var(--ink); }

.menu-btn {
  display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); align-items: center; justify-content: center; cursor: pointer;
}
.menu-btn .ico--close { display: none; }
.menu-btn[aria-expanded='true'] .ico--open { display: none; }
.menu-btn[aria-expanded='true'] .ico--close { display: block; }

/* ---------- hero ---------- */

.hero { position: relative; overflow: hidden; padding: 72px 0 96px; }
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 60% at 85% 20%, var(--hero-glow-1), transparent 70%),
    radial-gradient(50% 50% at 10% 90%, var(--hero-glow-2), transparent 70%),
    linear-gradient(180deg, #fff 0%, var(--tint) 100%);
}
.hero__bg::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(7, 29, 73, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px;
  padding: 6px 14px 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.8);
  font-size: 14px; font-weight: 600; color: var(--muted);
}
.eyebrow::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(50, 200, 120, 0.18); }
[data-theme='aal'] .eyebrow::before { background: #a88b6e; box-shadow: 0 0 0 4px rgba(168, 139, 110, 0.2); }
.hero h1 { font-size: clamp(40px, 5.6vw, 68px); line-height: 1.04; letter-spacing: -0.035em; }
.hero__lead { margin-top: 24px; max-width: 34em; font-size: clamp(18px, 1.6vw, 20px); color: var(--muted); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero__by { display: flex; align-items: center; gap: 10px; margin-top: 40px; font-size: 14px; color: var(--muted); }
.hero__by a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.hero__by img { width: 30px; height: 30px; }
.hero__by a:hover strong { text-decoration: underline; }

.hero__copy > * { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero__copy > :nth-child(2) { animation-delay: 0.06s; }
.hero__copy > :nth-child(3) { animation-delay: 0.12s; }
.hero__copy > :nth-child(4) { animation-delay: 0.18s; }
.hero__copy > :nth-child(5) { animation-delay: 0.24s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Nexus hub visual */
.hub { position: relative; width: 100%; max-width: 520px; aspect-ratio: 1; margin-left: auto; }
.hub__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ring { fill: none; stroke: rgba(0, 79, 143, 0.14); stroke-width: 1.2; }
.ring--inner { stroke-dasharray: 3 6; }
.ring--hex { stroke: rgba(0, 79, 143, 0.08); }
.flow { stroke: url(#line); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 2 10; opacity: 0.85; animation: flow 2.4s linear infinite; }
.flow--1 { animation-duration: 3s; }
.flow--2 { animation-duration: 3.6s; }
@keyframes flow { to { stroke-dashoffset: -48; } }
.hub__core {
  position: absolute; left: 50%; top: 50%; width: 31%; aspect-ratio: 1; transform: translate(-50%, -50%);
  display: grid; place-items: center; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 10px rgba(22, 141, 226, 0.08), 0 0 0 22px rgba(22, 141, 226, 0.04), var(--shadow-lg);
}
.hub__core img { width: 72%; }
.hub__core::after {
  content: ''; position: absolute; inset: -10px; border-radius: 50%;
  border: 1.5px solid rgba(50, 200, 120, 0.5); animation: pulse 3.2s ease-out infinite;
}
@keyframes pulse { from { transform: scale(0.92); opacity: 0.9; } to { transform: scale(1.35); opacity: 0; } }
.hub__node {
  position: absolute; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px 9px 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow);
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
.hub__node .ico { width: 18px; height: 18px; color: var(--blue); }
.hub__node--0 { left: 50%; top: 12.31%; }
.hub__node--1 { left: 82.64%; top: 31.15%; }
.hub__node--2 { left: 82.64%; top: 68.85%; }
.hub__node--3 { left: 50%; top: 87.69%; }
.hub__node--4 { left: 17.36%; top: 68.85%; }
.hub__node--5 { left: 17.36%; top: 31.15%; }
.hub__node--1 .ico, .hub__node--4 .ico { color: #00807a; }
.hub__node--2 .ico, .hub__node--5 .ico { color: #1b8a4f; }

/* AAL Cloud domain tree visual */
.tree { display: grid; place-items: center; }
.tree__card {
  width: 100%; max-width: 480px; background: #fff; border: 1px solid var(--line);
  border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.tree__bar { display: flex; gap: 6px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--tint); }
.tree__bar span { width: 10px; height: 10px; border-radius: 50%; background: #d9cfc4; }
.tree__list { padding: 18px; display: grid; gap: 10px; }
.tree__row {
  position: relative; display: flex; flex-direction: column; gap: 2px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.tree__host { font: 600 15px/1.3 var(--mono); color: var(--ink); }
.tree__label { font-size: 14px; color: var(--muted); }
.tree__row--root { border-color: #cdbfb1; background: #fbf9f6; }
.tree__row--root .tree__host { color: #4e3a28; }
.tree__row--child { margin-left: 32px; }
.tree__row--child::before {
  content: ''; position: absolute; left: -20px; top: -11px; width: 14px; height: calc(50% + 11px);
  border-left: 1.5px solid #cdbfb1; border-bottom: 1.5px solid #cdbfb1; border-bottom-left-radius: 8px;
}
.tree__row--nexus { border-color: rgba(0, 79, 143, 0.35); background: linear-gradient(90deg, #f1f7fd, #fff); }
.tree__row--nexus .tree__host { color: #004f8f; }
.tree__row--muted { border-style: dashed; }
.tree__row--muted .tree__host { color: var(--muted); }

/* ---------- sections ---------- */

.section { padding: 112px 0; }
.section--tint { background: var(--tint); }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 44px); }
.section-head .lead { margin-top: 18px; }

/* Platform */
.platform { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.layers {
  position: sticky; top: calc(var(--header-h) + 24px);
  padding: 28px; border-radius: 24px; background: var(--tint); border: 1px solid var(--line);
}
.layer { padding: 18px 20px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.layer__label { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.layer__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.layer__chips li { padding: 6px 12px; border-radius: 8px; background: var(--tint); font-size: 14px; font-weight: 500; }
.layer--core { background: linear-gradient(135deg, #071d49, #004f8f 70%, #0f6fb4); border-color: transparent; color: #fff; box-shadow: var(--shadow-lg); }
.layer--core .layer__label { color: #9fd0f5; }
.layer--core .layer__chips li { background: rgba(255, 255, 255, 0.12); color: #fff; }
.layer__link { position: relative; height: 28px; }
.layer__link::before, .layer__link::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(#168de2, #32c878); border-radius: 2px;
}
.layer__link::before { left: 30%; }
.layer__link::after { right: 30%; }
.layers figcaption { margin-top: 16px; font-size: 13px; color: var(--muted); }

.feature-list { display: grid; gap: 8px; }
.feature { display: flex; gap: 18px; padding: 22px; border-radius: var(--radius); transition: background-color 0.2s; }
.feature:hover { background: var(--tint); }
.feature__icon, .card__icon {
  flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(22, 141, 226, 0.12), rgba(50, 200, 120, 0.12)); color: var(--blue);
}
[data-theme='aal'] .card__icon { background: #f1ebe4; color: #4e3a28; }
.feature h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 19px; margin-bottom: 6px; }
.feature p { color: var(--muted); }

.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 40px; font-size: 14px; color: var(--muted); }
.legend__sep { width: 1px; height: 18px; margin: 0 8px; background: var(--line); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.card {
  display: flex; flex-direction: column; gap: 10px; padding: 28px;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.card h3 { font-size: 20px; }
.card p { color: var(--muted); }

/* Ecosystem */
.eco { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.eco .section-head { margin-bottom: 32px; }
.checks { display: grid; gap: 14px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks .ico { margin-top: 3px; width: 20px; height: 20px; color: #fff; background: var(--green); border-radius: 50%; padding: 3px; stroke-width: 3; }
.eco__map { position: relative; padding: 8px; }
.eco__lines { position: absolute; inset: 8px 8px 48px; width: calc(100% - 16px); height: calc(100% - 56px); }
.eco__lines line { stroke: #9cc7ea; stroke-width: 1.5; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; }
.eco__nodes { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 96px 72px; }
.eco__node {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 20px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
}
.eco__node strong { font-size: 18px; }
.eco__node span:not(.badge) { font-size: 14px; color: var(--muted); }
.eco__node .badge { margin-top: 6px; }
.eco__hub {
  position: absolute; left: 50%; top: calc(50% - 20px); width: 104px; height: 104px; transform: translate(-50%, -50%);
  display: grid; place-items: center; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 8px rgba(22, 141, 226, 0.08), var(--shadow-lg);
}
.eco__hub img { width: 70%; }
.eco__map figcaption { margin-top: 20px; font-size: 13px; color: var(--muted); text-align: center; }

/* Security (dark) */
.section--dark {
  position: relative; background: var(--dark); color: #e2eaf5; overflow: hidden;
}
.section--dark::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(50% 60% at 90% 0%, rgba(22, 141, 226, 0.25), transparent 70%),
    radial-gradient(40% 50% at 0% 100%, rgba(50, 200, 120, 0.12), transparent 70%);
}
.section--dark .container { position: relative; }
.section--dark .kicker { color: #6fd99e; }
.section--dark h2 { color: #fff; }
.section--dark .lead { color: #b8c6dc; }
.sec-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.sec { grid-column: span 2; padding: 28px; border-radius: 20px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); }
.sec:nth-child(4), .sec:nth-child(5) { grid-column: span 3; }
.sec__icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 18px; border-radius: 12px; background: rgba(22, 141, 226, 0.18); color: #7cc4f5; }
.sec h3 { font-size: 19px; color: #fff; margin-bottom: 8px; }
.sec p { color: #b8c6dc; }

/* Products (AAL Cloud) */
.featured {
  display: grid; grid-template-columns: 0.9fr 1.1fr; overflow: hidden;
  border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: var(--shadow-lg);
}
.featured__logo {
  display: grid; place-items: center; padding: 48px;
  background: radial-gradient(70% 70% at 30% 30%, rgba(22, 141, 226, 0.12), transparent), linear-gradient(135deg, #f4f7fb, #eaf3fb);
}
.featured__logo img { width: 100%; max-width: 340px; }
.featured__body { padding: 48px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.featured__body .kicker { color: #0f6fb4; margin: 0; }
.featured__body h3 { font-size: 30px; }
.featured__body p:not(.kicker) { color: var(--muted); margin-bottom: 10px; }
.featured .btn--primary { background: #004f8f; box-shadow: 0 8px 20px -10px #004f8f; }
.featured .btn--primary:hover { background: #003d70; }
.apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.app { display: flex; flex-direction: column; gap: 4px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; }
.app strong { font-size: 18px; }
.app span { color: var(--muted); font-size: 15px; }

/* About */
.about__grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 72px; align-items: center; }
.about__logo {
  display: grid; place-items: center; aspect-ratio: 1; padding: 48px; border-radius: 28px;
  background: radial-gradient(70% 70% at 30% 25%, #fff, #f3eee8); border: 1px solid #ebe4dc;
}
.about__logo img { width: 100%; max-width: 300px; }
.about .section-head { margin-bottom: 20px; }
.about__copy > p { color: var(--muted); }
.domains { display: grid; gap: 12px; margin: 24px 0 32px; }
.domain { display: grid; grid-template-columns: minmax(0, 220px) 1fr; gap: 6px 20px; align-items: baseline; padding: 16px 20px; border: 1px solid var(--line); border-radius: 14px; }
.domain--current { border-color: var(--accent); background: var(--tint); }
[data-theme='nexus'] .domain--current { border-color: rgba(0, 79, 143, 0.4); }
.domain dt { display: flex; align-items: center; gap: 8px; }
.domain dt .ico { width: 18px; height: 18px; color: var(--accent); }
.domain dt a { font: 600 15px/1.3 var(--mono); text-decoration: none; overflow-wrap: anywhere; }
.domain dt a:hover { text-decoration: underline; }
.domain dd { margin: 0; color: var(--muted); font-size: 15px; }

/* Contact */
.contact { padding-top: 0; }
.contact__card {
  position: relative; overflow: hidden; padding: 72px 48px; border-radius: 28px; text-align: center;
  background: linear-gradient(135deg, #f1f7fd 0%, #eefaf3 100%); border: 1px solid var(--line);
}
[data-theme='aal'] .contact__card { background: linear-gradient(135deg, #faf6f1 0%, #f3ede6 100%); }
.contact__card h2 { font-size: clamp(30px, 3.6vw, 44px); }
.contact__card .lead { max-width: 640px; margin: 18px auto 0; }
.contact__ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.contact__note { max-width: 560px; margin: 28px auto 0; font-size: 14px; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--tint); padding: 64px 0 32px; font-size: 15px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer__logo { height: 36px; width: auto; margin-bottom: 16px; }
.footer__wordmark { display: block; margin-bottom: 12px; font-size: 22px; font-weight: 700; }
.footer__brand p { color: var(--muted); max-width: 30em; }
.footer__by { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-weight: 600; color: var(--ink) !important; }
.footer__by img { width: 32px; height: 32px; }
.footer__h { margin-bottom: 14px; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.site-footer ul { display: grid; gap: 10px; }
.site-footer ul a { text-decoration: none; }
.site-footer ul a:hover { text-decoration: underline; }
.footer__bottom { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer__top { margin-left: auto; color: var(--muted); text-decoration: none; }
.footer__top:hover { color: var(--ink); }

/* 404 */
.notfound__main { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.notfound h1 { font-size: clamp(32px, 5vw, 52px); }

/* ---------- scroll reveal ----------
   Fail-open: content is never hidden by default. JS adds .is-in when an element
   enters the viewport, which plays a short entrance animation. */

.reveal.is-in { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .nav ul a { padding: 8px 9px; }
  .cards--4 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  :root { --header-h: 64px; }
  .menu-btn { display: inline-flex; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 16px; padding: 16px 24px 24px;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -24px rgba(7, 29, 73, 0.35);
    visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }
  .nav.is-open { visibility: visible; opacity: 1; transform: none; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav ul a { padding: 14px 4px; font-size: 17px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav__cta { align-self: flex-start; }
  .header-tools { margin-left: auto; }
  html:not(.js) .nav { position: static; visibility: visible; opacity: 1; transform: none; box-shadow: none; }

  .hero { padding: 48px 0 72px; }
  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
  .hub { margin: 0 auto; max-width: 460px; }
  .section { padding: 80px 0; }
  .section-head { margin-bottom: 40px; }
  .platform, .eco, .about__grid { grid-template-columns: 1fr; gap: 40px; }
  .layers { position: static; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .sec-grid { grid-template-columns: 1fr 1fr; }
  .sec, .sec:nth-child(4), .sec:nth-child(5) { grid-column: auto; }
  .sec:nth-child(5) { grid-column: 1 / -1; }
  .featured { grid-template-columns: 1fr; }
  .featured__logo { padding: 40px; }
  .featured__body { padding: 32px; }
  .about__logo { max-width: 320px; padding: 36px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .brand__logo { height: 30px; }
  .brand__mark { width: 38px; height: 38px; }
  .lead { font-size: 17px; }
  .hero__ctas .btn { flex: 1 1 100%; }
  .hub__node { padding: 6px 10px 6px 8px; font-size: 12px; gap: 5px; }
  .hub__node .ico { width: 14px; height: 14px; }
  .hub__node--1, .hub__node--2 { left: 80%; }
  .hub__node--4, .hub__node--5 { left: 20%; }
  .section { padding: 64px 0; }
  .cards, .cards--4, .apps, .sec-grid { grid-template-columns: 1fr; }
  .sec:nth-child(5) { grid-column: auto; }
  .card, .sec { padding: 24px; }
  .feature { padding: 18px 4px; gap: 14px; }
  /* Phone: hub sits above a compact grid instead of between the cards */
  .eco__map { display: flex; flex-direction: column; align-items: center; padding: 0; }
  .eco__lines { display: none; }
  .eco__hub { position: relative; left: auto; top: auto; transform: none; order: -1; width: 84px; height: 84px; margin-bottom: 28px; }
  .eco__hub::after { content: ''; position: absolute; top: 100%; left: 50%; width: 1.5px; height: 28px; background: #9cc7ea; }
  .eco__nodes { width: 100%; gap: 12px; }
  .eco__node { padding: 14px; }
  .domain { grid-template-columns: 1fr; }
  .contact__card { padding: 48px 20px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__top { margin-left: 0; }
  .legend__sep { display: none; }
  .tree__row--child { margin-left: 24px; }
}

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

@media print {
  .site-header, .menu-btn, .hero__visual { display: none; }
  .section--dark { background: #fff; color: #000; }
}
