/* ============================================================
   Aethereon — aethereon.ai
   "THE BLUEPRINT" — the site as an engineering drawing sheet.
   Palette anchored on brand #2d4059 (resources/brand_kit),
   strictly monochromatic: navy field, steel-blue linework.
   ============================================================ */

:root {
  --paper: #16243a;
  --panel: #1d2e47;
  --brand: #2d4059;
  --ink: #eaf1f9;
  --muted: #a3b6cf;
  --faint: #6e83a1;
  --steel: #8fb3dc;
  --steel-bright: #b4d0ef;
  --steel-soft: rgba(143, 179, 220, 0.12);
  --line-strong: rgba(186, 208, 233, 0.5);
  --line: rgba(186, 208, 233, 0.22);
  --line-soft: rgba(186, 208, 233, 0.1);
  --grid-minor: rgba(186, 208, 233, 0.045);
  --grid-major: rgba(186, 208, 233, 0.09);
  --font-display: "Big Shoulders Display", "Archivo", sans-serif;
  --font-body: "Archivo", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-minor) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px),
    var(--paper);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding: 14px;
}

::selection { background: var(--steel); color: #14202f; }

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

/* --- grain ---------------------------------------------------------- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- the drawing sheet ---------------------------------------------- */
.sheet {
  position: relative;
  border: 1px solid var(--line-strong);
  outline: 1px solid var(--line-soft);
  outline-offset: 5px;
  min-height: calc(100vh - 28px);
  background: transparent;
}
/* corner registration crosses */
.sheet::before, .sheet::after {
  content: "";
  position: absolute;
  width: 21px; height: 21px;
  background:
    linear-gradient(var(--line-strong), var(--line-strong)) center / 100% 1px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) center / 1px 100% no-repeat;
  z-index: 5;
}
.sheet::before { top: -11px; left: -11px; }
.sheet::after { bottom: -11px; right: -11px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 34px; }

/* --- header strip ---------------------------------------------------- */
.nav {
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 30;
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 68px;
}
.nav-logo img { height: 38px; width: auto; display: block; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-links a { transition: color 0.2s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  border: 1px solid var(--line-strong);
  padding: 9px 18px;
  color: var(--ink);
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.nav-cta:hover { border-color: var(--steel); background: var(--steel-soft); }
.lang-switch { display: flex; gap: 12px; }
.lang-switch a { color: var(--faint); }
.lang-switch a:hover { color: var(--ink); }
.lang-switch a.active { color: var(--steel); }

/* --- hero: FIG. 01 ---------------------------------------------------- */
.hero { border-bottom: 1px solid var(--line); position: relative; }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 56px;
  align-items: center;
  padding-top: 84px;
  padding-bottom: 84px;
}

.fig-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--steel);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}
.fig-label::before {
  content: "";
  width: 9px; height: 9px;
  border: 1px solid var(--steel);
  transform: rotate(45deg);
  flex-shrink: 0;
}

h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(58px, 8.6vw, 132px);
  line-height: 0.92;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  overflow-wrap: break-word;
}
h1 .amp {
  display: block;
  color: transparent;
  -webkit-text-stroke: 2px var(--steel);
}
/* for languages with longer compound words (DE/ES) */
h1.h1-long { font-size: clamp(50px, 6.2vw, 92px); }

/* dimension line under the headline */
.dim {
  position: relative;
  height: 1px;
  background: var(--line-strong);
  margin: 34px 0 30px;
  max-width: 520px;
}
.dim::before, .dim::after {
  content: "";
  position: absolute;
  top: -5px;
  width: 1px; height: 11px;
  background: var(--line-strong);
}
.dim::before { left: 0; }
.dim::after { right: 0; }
.dim span {
  position: absolute;
  top: -9px; left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  padding: 0 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
  white-space: nowrap;
}

.hero-sub { max-width: 46ch; font-size: clamp(16.5px, 1.4vw, 19px); color: var(--muted); }

.hero-ctas { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 16px 26px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.btn-solid { background: var(--steel); color: #14202f; border: 1px solid var(--steel); }
.btn-solid:hover { background: var(--steel-bright); border-color: var(--steel-bright); transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--muted); }
.btn-ghost:hover { border-color: var(--steel); color: var(--ink); }

/* schematic figure */
.schematic { position: relative; }
.schematic svg { width: 100%; height: auto; display: block; }
.schematic .caption {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  text-align: center;
}
.sch-line { stroke: var(--line-strong); stroke-width: 1; fill: none; }
.sch-flow {
  stroke: var(--steel);
  stroke-width: 1.2;
  fill: none;
  stroke-dasharray: 5 6;
  animation: dashmove 1.4s linear infinite;
}
@keyframes dashmove { to { stroke-dashoffset: -11; } }
.sch-box { fill: rgba(29, 46, 71, 0.85); stroke: var(--line-strong); stroke-width: 1; }
.sch-core { fill: rgba(143, 179, 220, 0.1); stroke: var(--steel); stroke-width: 1.4; }
.sch-core-glow { animation: corepulse 3s ease-in-out infinite; transform-origin: center; }
@keyframes corepulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
.sch-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  fill: var(--muted);
}
.sch-label-bright { fill: var(--ink); }
.sch-node { fill: var(--steel); }

/* --- marquee divider -------------------------------------------------- */
.marquee {
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 13px 0;
  user-select: none;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee span {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
  padding-right: 0.28em;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* --- sections ---------------------------------------------------------- */
.section-pad { padding: 100px 0; }

.section-head { margin-bottom: 58px; }
.section-head .lede {
  margin-top: 20px;
  color: var(--muted);
  max-width: 62ch;
  font-size: 16.5px;
}
h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 4.6vw, 64px);
  line-height: 0.98;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  max-width: 22ch;
}

/* module plates (what we do) */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.pillar {
  position: relative;
  border: 1px solid var(--line-strong);
  background: rgba(29, 46, 71, 0.55);
  padding: 30px 28px 36px;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.pillar:hover { border-color: var(--steel); background: rgba(29, 46, 71, 0.9); }
/* corner screws */
.pillar i {
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--line-strong);
}
.pillar i:nth-of-type(1) { top: 8px; left: 8px; }
.pillar i:nth-of-type(2) { top: 8px; right: 8px; }
.pillar i:nth-of-type(3) { bottom: 8px; left: 8px; }
.pillar i:nth-of-type(4) { bottom: 8px; right: 8px; }
.pillar-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 22px;
}
.pillar h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  line-height: 1;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.pillar h3 em { font-style: normal; color: var(--steel); }
.pillar p { color: var(--muted); font-size: 15.5px; }

/* --- ownership: the stamp (FIG. 03) ------------------------------------ */
.own {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    repeating-linear-gradient(45deg, transparent 0 10px, rgba(143, 179, 220, 0.045) 10px 11px);
}
.own .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding-top: 96px;
  padding-bottom: 96px;
}
.stamp {
  justify-self: center;
  transform: rotate(-5deg);
  border: 3px double var(--steel);
  padding: 26px 34px;
  text-align: center;
  color: var(--steel);
  max-width: 380px;
}
.stamp .s1 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}
.stamp .s2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 4.4vw, 58px);
  line-height: 0.95;
  text-transform: uppercase;
  display: block;
}
.own h2 { margin-bottom: 30px; }
.own-list { list-style: none; display: grid; gap: 18px; }
.own-list li {
  display: flex;
  gap: 16px;
  align-items: baseline;
  color: var(--muted);
  font-size: 16px;
}
.own-list li::before {
  content: "";
  width: 9px; height: 9px;
  border: 1px solid var(--steel);
  transform: rotate(45deg) translateY(-2px);
  flex-shrink: 0;
}
.own-list strong { color: var(--ink); font-weight: 600; }

/* --- process flow (FIG. 04) -------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: 1fr 44px 1fr 44px 1fr;
  align-items: stretch;
  gap: 0;
}
.step {
  border: 1px solid var(--line-strong);
  background: rgba(29, 46, 71, 0.55);
  padding: 28px 26px 34px;
}
.step-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 18px;
}
.step h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 27px;
  line-height: 1;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.step p { color: var(--muted); font-size: 15px; }
/* dashed connector with arrowhead */
.step-link { position: relative; }
.step-link::before {
  content: "";
  position: absolute;
  top: 50%; left: 4px; right: 12px;
  border-top: 1px dashed var(--steel);
}
.step-link::after {
  content: "";
  position: absolute;
  top: 50%; right: 6px;
  width: 8px; height: 8px;
  border-top: 1px solid var(--steel);
  border-right: 1px solid var(--steel);
  transform: translateY(-50%) rotate(45deg);
}

/* --- contact: the title block ------------------------------------------ */
.contact { padding: 110px 0 90px; text-align: center; }
.contact .fig-label { justify-content: center; }
.contact h2 { margin: 0 auto 18px; }
.contact > .wrap > p { color: var(--muted); max-width: 46ch; margin: 0 auto 38px; }

/* contact form */
.cform {
  max-width: 660px;
  margin: 0 auto;
  text-align: left;
  display: grid;
  gap: 18px;
}
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cform label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.cform input, .cform textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  background: rgba(29, 46, 71, 0.6);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  padding: 13px 14px;
  transition: border-color 0.2s ease;
}
.cform input:focus, .cform textarea:focus {
  outline: none;
  border-color: var(--steel);
  background: rgba(29, 46, 71, 0.9);
}
.cform textarea { resize: vertical; min-height: 150px; }
.cf-captcha {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}
.cf-captcha img {
  display: block;
  border: 1px solid var(--line-strong);
  background: rgba(29, 46, 71, 0.6);
  height: 52px;
  width: auto;
}
.cf-captcha label { flex: 1; min-width: 130px; }
.cform button { justify-self: start; cursor: pointer; }
/* honeypot — hidden from humans, present for bots */
.cf-hp { position: absolute !important; left: -6000px !important; height: 1px; overflow: hidden; }

.title-block {
  margin-top: 74px;
  border: 1px solid var(--line-strong);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: left;
}
.tb-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px 14px;
  min-width: 0;
}
.tb-cell:nth-child(4n) { border-right: none; }
.tb-cell.end { border-right: none; }
.tb-cell.wide { grid-column: span 2; }
.tb-cell .k {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 3px;
}
.tb-cell .v {
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.04em;
  color: var(--ink);
  overflow-wrap: break-word;
}
.tb-cell a.v:hover { color: var(--steel); }
.tb-legal {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--faint);
}
.tb-legal nav { display: flex; gap: 22px; }
.tb-legal a:hover { color: var(--ink); }

/* --- reveal animation --------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(16px); animation: rise 0.8s cubic-bezier(0.2, 0.6, 0.2, 1) forwards; }
.reveal.d1 { animation-delay: 0.08s; }
.reveal.d2 { animation-delay: 0.18s; }
.reveal.d3 { animation-delay: 0.3s; }
.reveal.d4 { animation-delay: 0.44s; }
.reveal.d5 { animation-delay: 0.6s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* --- legal page (terms.html) --------------------------------------------- */
.legal-hero { padding: 84px 0 56px; border-bottom: 1px solid var(--line); }
.legal-hero h1 { font-size: clamp(48px, 6vw, 96px); }
.legal-hero .hero-sub { margin-top: 18px; }
.back-home {
  display: inline-flex;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 30px;
}
.back-home:hover { color: var(--steel); }
.legal-body { max-width: 780px; padding: 64px 34px 100px; margin: 0 auto; }
.legal-meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--faint);
  border: 1px solid var(--line);
  padding: 12px 16px;
  margin-bottom: 36px;
}
.legal-body h2 {
  font-size: 30px;
  margin: 54px 0 16px;
  display: flex;
  align-items: baseline;
  gap: 16px;
  max-width: none;
}
.legal-body h2 .lnum {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--steel);
  letter-spacing: 0.1em;
}
.legal-body p, .legal-body li { color: var(--muted); font-size: 16px; }
.legal-body p { margin-bottom: 13px; }
.legal-body ul { margin: 6px 0 14px 22px; }
.legal-body li { margin-bottom: 6px; }
.legal-body strong { color: var(--ink); font-weight: 600; }

/* --- responsive ----------------------------------------------------------- */
@media (max-width: 1020px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 60px; }
  .schematic { max-width: 560px; }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .step-link { height: 44px; width: 44px; margin-left: 40px; }
  .step-link::before { left: 50%; right: auto; top: 4px; bottom: 12px; width: 0; border-top: none; border-left: 1px dashed var(--steel); }
  .step-link::after { top: auto; bottom: 6px; right: auto; left: 50%; transform: translateX(-50%) rotate(135deg); }
}
@media (max-width: 900px) {
  body { padding: 8px; }
  .wrap { padding: 0 20px; }
  .nav-links > a:not(.nav-cta) { display: none; }
  .nav-links { gap: 16px; }
  .nav-logo img { height: 30px; }
  .cf-row { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .own .wrap { grid-template-columns: 1fr; gap: 56px; }
  .stamp { justify-self: start; }
  .section-pad { padding: 72px 0; }
  .title-block { grid-template-columns: 1fr 1fr; }
  .tb-cell:nth-child(4n) { border-right: 1px solid var(--line); }
  .tb-cell:nth-child(2n), .tb-cell.wide { border-right: none; }
  .tb-cell.wide { grid-column: span 2; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; opacity: 1; transform: none; }
  .sch-flow, .sch-core-glow, .marquee-track { animation: none; }
  .btn { transition: none; }
}
