:root {
  --field: #0A3A30;
  --field-2: #0F4A3D;
  --mint: #E6F3EE;
  --mint-dim: #9CC3B5;
  --gold: #F0C75E;
  --paper: #F3F7F5;
  --ink: #0A2B24;
  --ink-soft: #46695F;
  --rule: #D3E2DC;
  --cut: #C2410C;
}

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

html { background: var(--field); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--field);
  color: var(--mint);
  font-family: "Alexandria", "Segoe UI", system-ui, sans-serif;
  font-weight: 300;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; border-radius: 4px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 40px; }

/* ---------- Header ---------- */
.top {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
}
.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 26px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 500;
  font-size: 18px;
}
.brand svg { width: 32px; height: 32px; display: block; flex: none; }
.top-actions { display: flex; align-items: center; gap: 22px; font-size: 15px; font-weight: 400; }
.lang {
  appearance: none;
  border: 1px solid rgba(230, 243, 238, .3);
  background: transparent;
  color: var(--mint);
  font: inherit;
  font-size: 15px;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
a.lang { text-decoration: none; display: inline-block; line-height: 1.4; }
.lang:hover { border-color: var(--mint); background: rgba(230, 243, 238, .08); }
.top-link { text-decoration: none; opacity: .85; }
.top-link:hover { opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 110px;
  padding-bottom: 64px;
  position: relative;
  overflow: hidden;
}
.hero h1 {
  font-weight: 800;
  font-size: clamp(56px, 10.5vw, 176px);
  line-height: .95;
  letter-spacing: -0.045em;
  color: var(--mint);
  max-width: 11ch;
}
[dir="rtl"] body { font-weight: 400; }
[dir="rtl"] .hero h1 { letter-spacing: 0; line-height: 1.5; max-width: 12ch; padding-bottom: .12em; }
[dir="rtl"] .hero-foot { margin-top: 32px; }
.hero-foot {
  margin-top: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
}
.hero-foot p { margin: 0; max-width: 46ch; font-size: 20px; color: var(--mint-dim); }
.hero-foot .cta { justify-self: end; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 500;
  font-size: 17px;
  text-decoration: none;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), background-color .2s;
}
.pill:hover { transform: translateY(-2px); background: #F5D47D; }

.scroll-hint {
  margin-top: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--mint-dim);
}
.scroll-hint .track {
  position: relative;
  width: 96px;
  height: 1px;
  background: rgba(230, 243, 238, .2);
  overflow: hidden;
}
.scroll-hint .track::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 32px;
  background: var(--gold);
  animation: run 2.2s cubic-bezier(.6,0,.2,1) infinite;
}
@keyframes run { from { transform: translateX(-40px); } to { transform: translateX(110px); } }
[dir="rtl"] .scroll-hint .track::after { animation-name: run-rtl; }
@keyframes run-rtl { from { transform: translateX(40px); } to { transform: translateX(-110px); } }

/* ---------- The story: one email, followed by scroll ---------- */
.story { position: relative; height: 340vh; }
.stage {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: 64px;
}
.caps { position: relative; min-height: 300px; }
.cap {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .2s ease, transform .2s ease;
}
.cap.on {
  opacity: 1;
  transform: none;
  transition: opacity .45s ease .22s, transform .6s cubic-bezier(.2,.7,.2,1) .22s;
}
.cap .step { display: block; font-size: 15px; color: var(--gold); margin-bottom: 18px; font-weight: 400; }
.cap h2 {
  font-weight: 700;
  font-size: clamp(32px, 3.8vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
[dir="rtl"] .cap h2 { letter-spacing: 0; line-height: 1.45; }
.cap p { margin: 20px 0 0; color: var(--mint-dim); max-width: 40ch; }

.bars { display: flex; gap: 8px; margin-top: 40px; }
.bars span { position: relative; width: 56px; height: 3px; border-radius: 3px; background: rgba(230,243,238,.18); overflow: hidden; }
.bars span i { position: absolute; inset: 0; background: var(--gold); transform-origin: left; transform: scaleX(0); }
[dir="rtl"] .bars span i { transform-origin: right; }

.letter {
  background: var(--paper);
  color: var(--ink);
  border-radius: 22px;
  padding: 36px 40px 32px;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.06);
  will-change: transform, opacity;
}
.letter-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}
.letter-head dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 15px; }
.letter-head dt { color: var(--ink-soft); }
.letter-head dd { margin: 0; font-weight: 500; }
.status {
  flex: none;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: #E0EEE8;
  color: var(--field);
  transition: background-color .3s, color .3s;
}
.status.enc { background: var(--field); color: var(--gold); }
.status.open { background: var(--gold); color: var(--ink); }

.body { padding: 24px 0 8px; font-size: 18px; line-height: 1.75; min-height: 210px; }
.body .ln { display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
.body .ln + .ln { margin-top: 6px; }

.pass {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 14px;
  background: #E6EFEB;
  font-size: 15px;
}
.pass svg { flex: none; color: var(--field); }
.pass .label { color: var(--ink-soft); }
.pass .dots { margin-inline-start: auto; letter-spacing: 4px; font-weight: 700; color: var(--field); min-width: 8ch; text-align: end; }

/* ---------- Routes ---------- */
.light { background: var(--paper); color: var(--ink); }
.routes { padding: 140px 0; }
.sec-head { max-width: 720px; margin-bottom: 72px; }
.sec-head h2 {
  font-weight: 700;
  font-size: clamp(34px, 4.4vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}
[dir="rtl"] .sec-head h2 { letter-spacing: 0; line-height: 1.45; }
.sec-head p { margin: 22px 0 0; color: var(--ink-soft); font-size: 19px; max-width: 54ch; }

.net {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 180px;
  grid-template-rows: repeat(3, auto);
  column-gap: 0;
  row-gap: 28px;
  align-items: center;
}
.node {
  grid-row: 1 / 4;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  border-radius: 20px;
  background: var(--field);
  color: var(--mint);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.3;
}
.node.pc { grid-column: 3; background: var(--gold); color: var(--ink); }
.node.srv { grid-column: 1; }
.lane { grid-column: 2; padding: 0 28px; }
.lane-top { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; margin-bottom: 10px; }
.lane-top b { font-weight: 500; }
.lane-top span { color: var(--ink-soft); }
.lane.ok .lane-top span { color: var(--field); font-weight: 500; }
.lane.no .lane-top span { color: var(--cut); font-weight: 500; }
.wire { position: relative; height: 4px; border-radius: 4px; background: var(--rule); }
.wire i {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 0;
  border-radius: 4px;
  background: var(--field);
  transition: width 1.1s cubic-bezier(.6,0,.2,1);
}
.lane.no .wire i { background: var(--cut); }
.wire .x {
  position: absolute;
  top: 50%;
  inset-inline-start: 46%;
  width: 22px; height: 22px;
  margin-top: -11px;
  margin-inline-start: -2px;
  opacity: 0;
  transform: scale(.4);
  transition: opacity .3s ease 1s, transform .4s cubic-bezier(.3,1.6,.5,1) 1s;
}
.wire .x::before, .wire .x::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 20px; height: 3px; margin: -1.5px 0 0 -10px; border-radius: 2px; background: var(--cut);
}
.wire .x::before { transform: rotate(45deg); }
.wire .x::after { transform: rotate(-45deg); }
.wire .pulse {
  position: absolute; top: 50%;
  width: 12px; height: 12px; margin-top: -6px;
  border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 0 4px rgba(240,199,94,.3);
  inset-inline-start: 0;
  opacity: 0;
}
.net.go .lane.no .wire i { width: 46%; }
.net.go .lane.ok .wire i { width: 100%; }
.net.go .wire .x { opacity: 1; transform: scale(1); }
.net.go .lane.ok .pulse { animation: travel 2.4s cubic-bezier(.5,0,.5,1) 1.3s infinite; }
@keyframes travel {
  0% { inset-inline-start: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { inset-inline-start: calc(100% - 12px); opacity: 0; }
}
.lane:nth-of-type(3) .wire i { transition-delay: .15s; }
.lane:nth-of-type(4) .wire i { transition-delay: .3s; }

/* ---------- Learns how you work ---------- */
.smart { padding: 140px 0; }
.smart .sec-head p { color: var(--mint-dim); }
.smart-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 72px;
  align-items: start;
}
.finder {
  background: var(--field-2);
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 0 0 1px rgba(230,243,238,.08);
}
.query {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(230,243,238,.07);
  font-size: 18px;
  min-height: 60px;
}
.query svg { flex: none; color: var(--mint-dim); }
.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-inline-start: 2px;
  vertical-align: -0.15em;
  background: var(--gold);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.results { position: relative; height: 252px; margin-top: 18px; }
.res {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 76px;
  padding: 14px 18px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: start;
  transition: transform .8s cubic-bezier(.2,.7,.2,1), background-color .5s ease, opacity .5s ease;
  opacity: .55;
}
.res b { font-weight: 500; font-size: 17px; }
.res span { font-size: 14px; color: var(--mint-dim); }
.res .tag {
  position: absolute;
  top: 50%;
  inset-inline-end: 18px;
  transform: translateY(-50%) scale(.8);
  opacity: 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  transition: opacity .4s ease .5s, transform .5s cubic-bezier(.3,1.6,.5,1) .5s;
}
.res.hit { background: rgba(240,199,94,.12); opacity: 1; }
.res.hit .tag { opacity: 1; transform: translateY(-50%) scale(1); }
.finder-note { margin: 18px 4px 0; font-size: 14px; color: var(--mint-dim); text-align: start; }

.abilities { margin: 0; text-align: start; }
.ability { padding: 22px 0; border-top: 1px solid rgba(230,243,238,.14); }
.ability:first-child { border-top: 0; padding-top: 0; }
.ability dt { font-weight: 500; font-size: 19px; color: var(--mint); }
.ability dd { margin: 6px 0 0; font-size: 16px; color: var(--mint-dim); }

/* ---------- Included ---------- */
.included { padding: 40px 0 140px; }
.list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 80px;
  margin: 0;
}
.item {
  padding: 30px 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 24px;
}
.item dt { font-weight: 500; font-size: 19px; line-height: 1.35; }
.item dd { margin: 0; color: var(--ink-soft); font-size: 16px; }

/* ---------- Closing ---------- */
.closing { padding: 160px 0 120px; }
.closing h2 {
  font-weight: 800;
  font-size: clamp(48px, 8vw, 128px);
  line-height: .98;
  letter-spacing: -0.045em;
  max-width: 12ch;
}
[dir="rtl"] .closing h2 { letter-spacing: 0; line-height: 1.45; padding-bottom: .1em; }
.closing-foot { margin-top: 44px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.closing-foot p { margin: 0; max-width: 48ch; color: var(--mint-dim); font-size: 19px; }

footer { border-top: 1px solid rgba(230,243,238,.14); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 24px; padding-bottom: 32px; font-size: 14px; color: var(--mint-dim); }
footer a { text-decoration: none; }
footer a:hover { color: var(--mint); }

/* ---------- Background letter field (dark sections) ---------- */
.bg-glyphs { position: relative; isolation: isolate; }
.bg-glyphs > canvas.glyph-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 86%, transparent 100%);
}

/* ---------- Questions ---------- */
.faq { padding: 0 0 140px; }
.faq-list { max-width: 820px; margin: 0 auto; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 26px 0;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .mark {
  flex: none;
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #E0EEE8;
  transition: background-color .25s ease, transform .35s cubic-bezier(.2,.7,.2,1);
}
.faq summary .mark::before,
.faq summary .mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  margin: -1px 0 0 -7px;
  border-radius: 2px;
  background: var(--field);
}
.faq summary .mark::after { transform: rotate(90deg); }
.faq details[open] summary .mark { background: var(--gold); transform: rotate(45deg); }
.faq summary:hover .mark { background: #D2E6DE; }
.faq details[open] summary:hover .mark { background: var(--gold); }
.faq details p { margin: 0; padding: 0 60px 28px 0; color: var(--ink-soft); font-size: 17px; max-width: 64ch; }
[dir="rtl"] .faq details p { padding: 0 0 28px 60px; }
@media (prefers-reduced-motion: no-preference) {
  .faq details[open] p { animation: faq-in .4s ease both; }
  @keyframes faq-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
}

/* ---------- Centred composition ---------- */
.hero .wrap { text-align: center; }
.hero h1 { margin-inline: auto; }
.hero-foot { grid-template-columns: 1fr; justify-items: center; gap: 36px; }
.hero-foot p { margin-inline: auto; }
.hero-foot .cta { justify-self: center; }
.scroll-hint { justify-content: center; }
.sec-head { margin-inline: auto; text-align: center; }
.sec-head p { margin-inline: auto; }
.closing .wrap { text-align: center; }
.closing h2 { margin-inline: auto; }
.closing-foot { flex-direction: column; justify-content: center; }
.closing-foot p { margin-inline: auto; }

/* ---------- Reduced motion: no scroll story, final state shown ---------- */
.static .story { height: auto; padding: 120px 0; }
.static .stage { position: relative; height: auto; }
.static .caps { min-height: 0; }
.static .cap { position: relative; opacity: 1; transform: none; margin-bottom: 40px; }
.static .bars { display: none; }
.static .scroll-hint .track::after { animation: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .wrap { padding: 0 24px; }
  .stage {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
    padding-top: 72px;
  }
  .caps { min-height: 210px; }
  .cap p { font-size: 16px; margin-top: 12px; }
  .bars { margin-top: 20px; }
  .letter { padding: 24px 22px 20px; border-radius: 18px; }
  .body { font-size: 15px; min-height: 170px; padding-top: 16px; }
  .letter-head dl { font-size: 13px; }
  .smart-grid { grid-template-columns: 1fr; gap: 48px; }
  .smart { padding: 96px 0; }
  .net { grid-template-columns: 1fr; row-gap: 22px; }
  .node { grid-row: auto; grid-column: 1 !important; padding: 16px; }
  .lane { grid-column: 1; padding: 0; }
  .list { grid-template-columns: 1fr; }
  .routes, .closing { padding: 96px 0; }
  .included { padding-bottom: 96px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .top-link { display: none; }
  .hero-foot p { font-size: 17px; }
  .item { grid-template-columns: 1fr; gap: 6px; }
  .caps { min-height: 230px; }
  .cap h2 { font-size: 28px; }
}
