/* AetherMesh – public home page. Fonts are served by the node itself (CSP: font-src 'self'). */
@font-face { font-family: "Bricolage"; src: url("fonts/bricolage-grotesque-latin-ext-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bricolage"; src: url("fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Jakarta"; src: url("fonts/plus-jakarta-sans-latin-ext-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Jakarta"; src: url("fonts/plus-jakarta-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Jakarta"; src: url("fonts/plus-jakarta-sans-latin-ext-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Jakarta"; src: url("fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cipher"; src: url("fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --night: #0f1338;   /* background: the sky the mesh hangs in */
  --deep: #1b2156;    /* links between nodes, quiet surfaces */
  --ether: #d7dafc;   /* text */
  --mist: #9aa0d6;    /* secondary text */
  --node: #7b86ff;    /* nodes (the app's indigo) */
  --signal: #ffbf5a;  /* a message on its way; the one thing to press */
  --measure: 34rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ether);
  font: 400 1.0625rem/1.65 "Jakarta", system-ui, sans-serif;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 0; padding: .6rem 1rem; background: var(--signal); color: var(--night); font-weight: 600; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

/* ------------------------------------------------------------- top bar */
.top {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 76rem; margin: 0 auto; padding: 1.5rem clamp(1rem, 4vw, 2.5rem);
}
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font: 700 1.25rem/1 "Bricolage", "Jakarta", sans-serif; letter-spacing: -.01em; }
.brand-mark { width: 1.9rem; height: 1.9rem; }
.brand-mark path { fill: none; stroke: var(--node); stroke-width: 1.6; }
.brand-mark circle { fill: var(--ether); }
.top-login { font-weight: 600; text-decoration: none; padding: .45rem .9rem; border-radius: 999px; color: var(--ether); box-shadow: inset 0 0 0 1.5px var(--deep); }
.top-login:hover { box-shadow: inset 0 0 0 1.5px var(--node); }

/* ------------------------------------------------------------- hero */
.hero {
  max-width: 76rem; margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 4rem) clamp(1rem, 4vw, 2.5rem) clamp(3rem, 7vw, 6rem);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
h1 {
  font: 700 clamp(2.6rem, 6.2vw, 4.9rem)/.98 "Bricolage", "Jakarta", sans-serif;
  letter-spacing: -.035em;
  margin: 0 0 1.5rem;
  max-width: 11ch;
}
.lead { color: var(--mist); max-width: var(--measure); margin: 0 0 2rem; font-size: 1.125rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 600;
  padding: .85rem 1.5rem; border-radius: 999px; line-height: 1.2;
}
.btn-main { background: var(--signal); color: var(--night); }
.btn-main:hover { background: #ffd08a; }
.btn-ghost { color: var(--ether); box-shadow: inset 0 0 0 1.5px var(--node); }
.btn-ghost:hover { background: var(--deep); }

/* the mesh: the one thing that moves */
.mesh { margin: 0; }
.mesh svg { width: 100%; height: auto; display: block; overflow: visible; }
.links path { fill: none; stroke: var(--deep); stroke-width: 2; }
.links #trasa { stroke: #2c3478; stroke-width: 2.5; }
.nodes circle { fill: var(--deep); stroke: var(--node); stroke-width: 2; }
.nodes .hop { fill: var(--night); stroke: var(--node); stroke-width: 2.5; }
.nodes .end { fill: var(--node); stroke: none; }
.who text { fill: var(--ether); font: 600 15px "Jakarta", sans-serif; }
.who .node-name { fill: var(--mist); font-weight: 400; font-size: 13px; }
.msg rect { fill: var(--signal); }
.msg text { fill: var(--night); font: 600 14px "Jakarta", sans-serif; }
.msg.cipher rect { fill: var(--deep); stroke: var(--signal); stroke-width: 1.5; }
.msg.cipher text { fill: var(--signal); font: 400 13px "Cipher", ui-monospace, monospace; letter-spacing: .02em; }
.mesh figcaption { color: var(--mist); font-size: .9rem; margin-top: .75rem; max-width: var(--measure); }

/* ------------------------------------------------------------- the trip (a real sequence: numbered) */
.trip, .inside, .node {
  max-width: 76rem; margin: 0 auto; padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 4vw, 2.5rem);
}
h2 { font: 700 clamp(1.8rem, 3.4vw, 2.6rem)/1.05 "Bricolage", "Jakarta", sans-serif; letter-spacing: -.025em; margin: 0 0 2rem; }
h3 { font: 600 1.125rem/1.3 "Jakarta", sans-serif; margin: 0 0 .4rem; color: var(--ether); }
.steps {
  list-style: none; margin: 0; padding: 0; counter-reset: krok;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem;
  position: relative;
}
.steps::before { /* the route the message takes */
  content: ""; position: absolute; left: 1.1rem; right: 1.1rem; top: 1.1rem; height: 2px; background: var(--deep);
}
.steps li { counter-increment: krok; position: relative; padding-top: 3.4rem; }
.steps li::before {
  content: counter(krok); position: absolute; top: 0; left: 0;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--night); box-shadow: inset 0 0 0 2px var(--node);
  font: 700 1rem/1 "Bricolage", sans-serif; color: var(--ether);
}
.steps li:first-child::before, .steps li:last-child::before { background: var(--node); box-shadow: none; color: var(--night); }
.steps p { color: var(--mist); margin: 0; max-width: 28ch; }

/* ------------------------------------------------------------- features: a definition list, not cards */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 4rem; margin: 0; }
.features div { padding: 1.25rem 0; border-top: 1.5px solid var(--deep); }
.features dt { font-weight: 600; margin-bottom: .25rem; }
.features dd { margin: 0; color: var(--mist); max-width: 38ch; }

/* ------------------------------------------------------------- this node */
.node { padding-bottom: clamp(3rem, 7vw, 6rem); }
.node-line { font-size: 1.125rem; color: var(--mist); max-width: var(--measure); margin: 0 0 1.75rem; }
.node-line strong { color: var(--ether); font-weight: 600; }

.foot { max-width: 76rem; margin: 0 auto; padding: 2rem clamp(1rem, 4vw, 2.5rem) 3rem; color: var(--mist); font-size: .875rem; border-top: 1.5px solid var(--deep); }
.foot p { margin: 0; }

/* ------------------------------------------------------------- small screens */
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .mesh { max-width: 32rem; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .steps::before { left: 1.1rem; right: auto; top: 1.1rem; bottom: 1.1rem; width: 2px; height: auto; }
  .steps li { padding: 0 0 0 3.4rem; }
  .features { grid-template-columns: minmax(0, 1fr); }
}
