/* ══════════════════════════════════════════════════════════════
   doesdev.fr — landing
   Palette is deliberately narrow: one loud accent (hazard) used
   structurally, one quiet accent (signal) reserved for live state.
   ══════════════════════════════════════════════════════════════ */

:root {
  --void:      #0A0C0D;
  --panel:     #111517;
  --panel-hi:  #171D20;
  --bone:      #E9E5DA;
  --bone-dim:  #8C9496;
  --hazard:    #FF6A1F;
  --signal:    #56E0A0;
  --rule:      rgba(233, 229, 218, .13);
  --rule-hi:   rgba(233, 229, 218, .28);

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body:    "Archivo", system-ui, -apple-system, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gut: clamp(1.25rem, 4vw, 4rem);
  --max: 1240px;
  --rail-h: 3.25rem;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--rail-h) + 1rem); }
.hop:nth-child(1), .hop:nth-child(1)::before { animation-delay: 0.18s; }
.hop:nth-child(2), .hop:nth-child(2)::before { animation-delay: 0.88s; }
.hop:nth-child(3), .hop:nth-child(3)::before { animation-delay: 1.58s; }
.hop:nth-child(4), .hop:nth-child(4)::before { animation-delay: 2.28s; }
.hop:nth-child(5), .hop:nth-child(5)::before { animation-delay: 2.98s; }
.hop:nth-child(6), .hop:nth-child(6)::before { animation-delay: 3.68s; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--void);
  color: var(--bone);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--rail-h);
  overflow-x: hidden;
}

/* faint engineering grid, sits behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right,  var(--rule) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rule) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: .28;
  mask-image: radial-gradient(ellipse 120% 70% at 60% 0%, #000 0%, transparent 75%);
}

main, .rail, .foot { position: relative; z-index: 1; }

a { color: inherit; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--hazard); color: var(--void); }

:focus-visible { outline: 2px solid var(--hazard); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--hazard); color: var(--void);
  padding: .6rem 1rem; font: 500 .8rem/1 var(--mono); z-index: 99;
}
.skip:focus { left: .5rem; top: .5rem; }

/* ── shared type ─────────────────────────────────────────────── */

.eyebrow {
  font: 500 .7rem/1.4 var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--hazard);
  margin: 0 0 1.1rem;
}

.h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  line-height: .95;
  letter-spacing: -.005em;
  margin: 0 0 1.1rem;
  max-width: 20ch;
}

.dot {
  width: .42rem; height: .42rem;
  background: var(--signal);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(86, 224, 160, .55);
  animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(86, 224, 160, .5); }
  70%  { box-shadow: 0 0 0 .5rem rgba(86, 224, 160, 0); }
  100% { box-shadow: 0 0 0 0 rgba(86, 224, 160, 0); }
}

/* ── top rail ────────────────────────────────────────────────── */

.rail {
  position: fixed; inset: 0 0 auto 0;
  height: var(--rail-h);
  display: flex; align-items: center; gap: .9rem;
  padding: 0 var(--gut);
  background: rgba(10, 12, 13, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  font: 500 .74rem/1 var(--mono);
  letter-spacing: .06em;
  z-index: 50;
}
.rail__mark { color: var(--bone); letter-spacing: .1em; }
.rail__sep { flex: 0 0 1.25rem; height: 1px; background: var(--rule-hi); }
.rail__state { display: inline-flex; align-items: center; gap: .45rem; color: var(--bone-dim); }
.rail__nav { margin-left: auto; display: flex; gap: 1.4rem; }
.rail__nav a {
  color: var(--bone-dim); text-decoration: none;
  text-transform: uppercase; letter-spacing: .12em;
  transition: color .18s;
}
.rail__nav a:hover { color: var(--hazard); }

.lang {
  margin-left: 1.4rem;
  display: inline-flex; align-items: stretch;
  border: 1px solid var(--rule-hi);
  background: none; padding: 0; cursor: pointer;
  font: 500 .68rem/1 var(--mono); letter-spacing: .1em;
}
.lang span { padding: .38rem .5rem; color: var(--bone-dim); transition: background .18s, color .18s; }
.lang .lang__on { background: var(--hazard); color: var(--void); }
[data-lang="en"] .lang .lang__on { background: none; color: var(--bone-dim); }
[data-lang="en"] .lang .lang__off { background: var(--hazard); color: var(--void); }

@media (max-width: 720px) {
  .rail__nav, .rail__sep, .rail__state { display: none; }
  .lang { margin-left: auto; }
}

/* ── hero ────────────────────────────────────────────────────── */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6.5rem) var(--gut) clamp(2.5rem, 6vw, 4.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(4.5rem, 15vw, 10.5rem);
  line-height: .76;
  letter-spacing: -.02em;
  margin: 0 0 1.4rem;
  display: flex; flex-direction: column;
}
.hero__line { display: block; }
/* the second half is drawn, not filled — the page's one loud gesture */
.hero__line--alt {
  color: transparent;
  -webkit-text-stroke: 2px var(--hazard);
  text-stroke: 2px var(--hazard);
  margin-left: .06em;
}

.hero__lede {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  line-height: 1.08;
  letter-spacing: .005em;
  margin: 0 0 1.3rem;
  max-width: 22ch;
}

.hero__body {
  color: var(--bone-dim);
  max-width: 46ch;
  font-size: 1.02rem;
  line-height: 1.7;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.35rem;
  border: 1px solid var(--rule-hi);
  font: 500 .78rem/1 var(--mono);
  letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; color: var(--bone);
  transition: border-color .18s, color .18s, background .18s;
}
.btn:hover { border-color: var(--hazard); color: var(--hazard); }
.btn--solid { background: var(--hazard); border-color: var(--hazard); color: var(--void); }
.btn--solid:hover { background: transparent; color: var(--hazard); }

/* ── the scope: signature element ────────────────────────────── */

.scope {
  position: relative;
  margin: 0;
  padding: 1.15rem 1.25rem 1.4rem;
  background: linear-gradient(180deg, var(--panel) 0%, rgba(17, 21, 23, .55) 100%);
}
/* corner ticks instead of a box — console vernacular, not a card */
.scope::before, .scope::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none;
}
.scope::before { top: 0; left: 0;  border-top: 1px solid var(--hazard); border-left: 1px solid var(--hazard); }
.scope::after  { bottom: 0; right: 0; border-bottom: 1px solid var(--hazard); border-right: 1px solid var(--hazard); }

.scope__cap {
  display: flex; justify-content: space-between; align-items: center;
  font: 500 .68rem/1 var(--mono);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--bone-dim);
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: .35rem;
}
.scope__live { display: inline-flex; align-items: center; gap: .45rem; color: var(--signal); }

.scope__body { position: relative; }

.scope__list { list-style: none; margin: 0; padding: .35rem 0 0 2.1rem; }

.scope__wire {
  position: absolute;
  left: .74rem; top: 1.4rem; bottom: 1.4rem;
  width: 1px;
  background: var(--rule-hi);
}
.scope__packet {
  position: absolute; left: 50%; top: 0;
  width: 5px; height: 5px; margin-left: -2px;
  background: var(--signal);
  border-radius: 50%;
  box-shadow: 0 0 8px 1px rgba(86, 224, 160, .8);
  animation: travel 4.2s linear infinite;
}
@keyframes travel {
  0%   { top: 0;    opacity: 0; }
  6%   { opacity: 1; }
  94%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.hop {
  position: relative;
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  align-items: baseline;
  gap: .1rem .85rem;
  padding: .62rem 0;
  animation: hopPass 4.2s linear infinite;
}
.hop::before {
  content: "";
  position: absolute;
  left: -1.43rem; top: 1.15rem;
  width: 7px; height: 7px;
  margin-left: -3px;
  border: 1px solid var(--rule-hi);
  background: var(--void);
  transition: border-color .2s, background .2s;
}
.hop__id {
  grid-column: 1;
  font: 500 .66rem/1.4 var(--mono);
  letter-spacing: .06em;
  color: var(--bone-dim);
  text-align: right;
  transition: color .2s;
}
.hop__name {
  grid-column: 2;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.32rem;
  line-height: 1.05;
  letter-spacing: .01em;
}
.hop__note {
  grid-column: 2;
  font: 400 .78rem/1.3 var(--body);
  color: var(--bone-dim);
}
.hop--end .hop__name { color: var(--hazard); }

/* hop lights as the packet reaches it — same clock, staggered delay */
@keyframes hopPass {
  0%  { opacity: .78; }
  4%  { opacity: 1; }
  16% { opacity: 1; }
  30% { opacity: .78; }
  100%{ opacity: .78; }
}
.hop::before { animation: markPass 4.2s linear infinite; }
@keyframes markPass {
  0%  { border-color: var(--rule-hi); background: var(--void); }
  4%  { border-color: var(--signal);  background: var(--signal); }
  22% { border-color: var(--signal);  background: var(--signal); }
  40% { border-color: var(--rule-hi); background: var(--void); }
  100%{ border-color: var(--rule-hi); background: var(--void); }
}

@media (prefers-reduced-motion: reduce) {
  .scope__packet, .hop, .hop::before, .dot { animation: none; }
  .hop { opacity: 1; }
  .hop::before { border-color: var(--signal); background: var(--signal); }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero__body { max-width: 60ch; }
}

/* ── ticker ──────────────────────────────────────────────────── */

.ticker {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: rgba(17, 21, 23, .5);
}
.ticker__grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gut);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.stat {
  padding: 1.6rem 1rem 1.7rem 0;
  border-left: 1px solid var(--rule);
  padding-left: 1.1rem;
}
.stat:first-child { border-left: 0; padding-left: 0; }
.stat dt {
  font: 500 .64rem/1.4 var(--mono);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--bone-dim);
  margin-bottom: .35rem;
}
.stat dd {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: .9;
  letter-spacing: -.01em;
}
.stat dd small { font-size: .34em; letter-spacing: .08em; color: var(--bone-dim); margin-left: .15em; }

@media (max-width: 860px) {
  .ticker__grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 1.1rem; padding-bottom: 1.2rem; }
  .stat:first-child, .stat:nth-child(2) { border-top: 0; }
  .stat:nth-child(2) { padding-left: 1.1rem; border-left: 1px solid var(--rule); }
  .stat:nth-child(4) { padding-left: 1.1rem; border-left: 1px solid var(--rule); }
  .stat:last-child { grid-column: 1 / -1; }
}

/* ── bands ───────────────────────────────────────────────────── */

.band {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6.5rem) var(--gut);
}
/* full-bleed tint without breaking the content column: the band keeps its
   max-width, the background is painted by a viewport-wide pseudo-element */
.band--tint { position: relative; isolation: isolate; }
.band--tint::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: rgba(17, 21, 23, .42);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  z-index: -1;
}

.band__head { margin-bottom: clamp(2rem, 4vw, 3.2rem); max-width: 62ch; }
.band__intro { color: var(--bone-dim); max-width: 58ch; }

/* ── architecture cards ──────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.card {
  background: var(--void);
  padding: 1.6rem 1.5rem 1.75rem;
  transition: background .22s;
}
.card:hover { background: var(--panel-hi); }
.card__tag {
  font: 500 .66rem/1.4 var(--mono);
  letter-spacing: .12em;
  color: var(--hazard);
  margin: 0 0 1.4rem;
}
.card__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.62rem;
  line-height: 1;
  margin: 0 0 .75rem;
}
.card p { color: var(--bone-dim); font-size: .95rem; line-height: 1.68; }

/* ── services: a routing table, because that is what it is ───── */

.svc { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.svc__item { border-bottom: 1px solid var(--rule); }
.svc__item > a,
.svc__item > span {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 15rem) minmax(0, 1fr);
  align-items: baseline;
  gap: .3rem 1.5rem;
  padding: 1.15rem .9rem 1.2rem;
  text-decoration: none;
  transition: background .18s, padding-left .18s;
}
.svc__item > a:hover { background: var(--panel-hi); padding-left: 1.4rem; }
.svc__item > a:hover .svc__host { color: var(--hazard); }
.svc__kind {
  font: 500 .66rem/1.4 var(--mono);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--bone-dim);
}
.svc__host {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1;
  color: var(--bone);
  transition: color .18s;
}
.svc__host em { font-style: normal; font-weight: 600; color: var(--bone-dim); }
.svc__desc { color: var(--bone-dim); font-size: .92rem; line-height: 1.5; }

.svc__item--soon > span { opacity: .55; }
.svc__item--soon .svc__kind { color: var(--hazard); }

.svc__note {
  margin-top: 2rem;
  color: var(--bone-dim);
  font-size: .92rem;
  max-width: 62ch;
  border-left: 1px solid var(--hazard);
  padding-left: 1rem;
}

@media (max-width: 860px) {
  .svc__item > a, .svc__item > span { grid-template-columns: 1fr; gap: .35rem; }
  .svc__kind { order: -1; }
}

/* ── engineering notes ───────────────────────────────────────── */

.notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  column-gap: clamp(2rem, 5vw, 4rem);
  row-gap: clamp(2rem, 4vw, 3rem);
}
.note { max-width: 46ch; }
.note__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.02;
  margin: 0 0 .7rem;
  padding-top: .9rem;
  border-top: 2px solid var(--hazard);
}
.note p { color: var(--bone-dim); font-size: .95rem; line-height: 1.68; }

/* ── footer ──────────────────────────────────────────────────── */

.foot {
  position: relative;
  isolation: isolate;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) var(--gut);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
  gap: 2rem clamp(2rem, 5vw, 4rem);
}
.foot::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: var(--panel);
  border-top: 1px solid var(--rule);
  z-index: -1;
}
.foot > * { max-width: 34ch; }
.foot__mark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.1rem;
  line-height: 1;
  margin: 0 0 .4rem;
  letter-spacing: -.01em;
}
.foot__by { color: var(--bone-dim); font-size: .92rem; }
.foot__label {
  font: 500 .64rem/1.4 var(--mono);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--hazard);
  margin: 0 0 .7rem;
}
.foot p:not(.foot__mark):not(.foot__label) { color: var(--bone-dim); font-size: .88rem; line-height: 1.6; }
