/* Ralph Network — tokens */
:root {
  --bg: #0F1519;        /* cabinet */
  --panel: #161F24;     /* rack panel */
  --panel-2: #1C272D;
  --line: #27343B;
  --text: #E7EAE6;
  --muted: #97A4AA;
  --amber: #F0A63A;     /* indicator amber — the one accent */
  --amber-ink: #1B1305;
  --ok: #49C47F;        /* status only */
  --bad: #E5674F;       /* status only */

  --f-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* The page colour sits on <html>, so the Earth canvas (z-index -2) can show
   between it and the content. */
html { background: var(--bg); }
body {
  margin: 0;
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--f-mono); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--amber); color: var(--amber-ink); padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

/* type */
h1 {
  font-family: var(--f-display);
  font-weight: 750;
  font-stretch: 112%;
  font-variation-settings: "wdth" 112;
  font-size: clamp(2.35rem, 5.4vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h1 em { font-style: normal; color: var(--amber); }
.h2 {
  font-family: var(--f-display);
  font-weight: 700;
  font-variation-settings: "wdth" 108;
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
  max-width: 24ch;
}
h3 { font-family: var(--f-display); font-weight: 650; font-variation-settings: "wdth" 104; font-size: 1.3rem; line-height: 1.2; }
h4 { font-family: var(--f-display); font-weight: 650; font-size: 1.15rem; line-height: 1.25; }
.lede { color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.2rem); max-width: 54ch; }
.eyebrow { font-family: var(--f-mono); font-size: .8rem; letter-spacing: .04em; color: var(--amber); margin-bottom: 14px; }

.tag { font-family: var(--f-mono); font-size: .78rem; color: var(--amber); }
.tag--muted { color: var(--muted); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent;
  font: 600 1rem/1 var(--f-body); text-decoration: none;
  transition: background-color .15s, border-color .15s, transform .15s;
}
.btn--primary { background: var(--amber); color: var(--amber-ink); }
.btn--primary:hover { background: #F6B65A; }
.btn--ghost { border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--muted); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: .92rem; }
.ico { width: 18px; height: 18px; fill: currentColor; flex: none; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.linkbtn { background: none; border: 0; color: var(--amber); font-size: .8rem; cursor: pointer; padding: 6px 0; text-decoration: underline; text-underline-offset: 3px; }
.arrowlink { display: inline-block; margin-top: 18px; color: var(--amber); font-weight: 600; text-decoration: none; }
.arrowlink::after { content: " →"; }
.arrowlink:hover { text-decoration: underline; text-underline-offset: 4px; }

/* status LED */
.led { width: 9px; height: 9px; border-radius: 50%; background: #3A474E; flex: none; display: inline-block; }
.led--ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(73,196,127,.16); }

/* nav */
.nav { position: sticky; top: 0; z-index: 5; background: rgba(15,21,25,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav__inner { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 750; font-variation-settings: "wdth" 118; letter-spacing: -0.01em; font-size: 1.12rem; text-decoration: none; }
.brand--sm { font-size: 1rem; }
.brand__mark { height: 36px; width: auto; display: block; }
.brand--sm .brand__mark { height: 24px; }
.nav__links { display: flex; gap: 24px; margin-left: auto; }
.nav__links a { text-decoration: none; color: var(--muted); font-size: .95rem; }
.nav__links a:hover { color: var(--text); }

/* hero */
.hero { padding: clamp(48px, 9vw, 112px) 0 clamp(56px, 8vw, 96px); border-bottom: 1px solid var(--line); }
.hero__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero .lede { margin-top: 22px; }

/* the live status board */
.board { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.board__bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; background: var(--panel-2); border-bottom: 1px solid var(--line); font-size: .78rem; color: var(--muted); }
.board__bar .mono:first-child::before { content: "● "; color: var(--amber); }
.board__rows { padding: 6px 0; }
.row { display: grid; grid-template-columns: auto 1fr auto 64px; align-items: center; gap: 14px; padding: 14px 18px; }
.row + .row { border-top: 1px dashed var(--line); }
.row__name { font-weight: 600; display: flex; flex-direction: column; min-width: 0; }
.row__host { font-weight: 400; font-size: .76rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__state { font-size: .78rem; color: var(--muted); }
.row__ms { font-size: .85rem; text-align: right; color: var(--text); }
.row.is-up .row__state { color: var(--ok); }
.row.is-down .row__state { color: var(--muted); }
.row.is-checking .led { animation: blink 0.9s steps(2, start) infinite; background: var(--amber); }
.board__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
@keyframes blink { to { visibility: hidden; } }

/* sections */
.section { padding: clamp(64px, 9vw, 112px) 0; border-bottom: 1px solid var(--line); }
.section--tight { padding: clamp(40px, 6vw, 72px) 0; }

/* problem / compare */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.compare__col { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); }
.compare__col--good { background: var(--panel); border-color: rgba(240,166,58,.35); }
.compare .tag { margin-bottom: 16px; }
.list li { position: relative; padding-left: 30px; margin-top: 12px; }
.list li::before { position: absolute; left: 0; top: 0; font-family: var(--f-mono); }
.list--x li { color: var(--muted); }
.list--x li::before { content: "×"; color: var(--bad); }
.list--tick li::before { content: "✓"; color: var(--ok); }

/* services */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 40px; }
.svc { display: flex; flex-direction: column; gap: 12px; padding: 28px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.svc p { color: var(--muted); }
.svc .svc__for { font-size: .95rem; }
.svc .tag { margin-top: auto; padding-top: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; font-size: .8rem; }
.chips li { padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }

/* work */
.cases { display: grid; gap: 20px; margin-top: 40px; }
.case { display: grid; grid-template-columns: 1.1fr 1fr; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
/* Screenshots keep their own 16:10 shape, centred in the column. Filling the
   column instead cropped the sides whenever the text beside it ran long
   (Divine Heritage lost its logo and WhatsApp button). */
.case__shot { display: flex; align-items: center; overflow: hidden; border-right: 1px solid var(--line); background: var(--bg); }
.case__shot img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .4s ease; }
.case__shot:hover img { transform: scale(1.02); }
.case__body { padding: clamp(22px, 3vw, 36px); }
.case__body h3 { margin-top: 8px; }
.case__dl { margin: 18px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; }
.case__dl dt { font-family: var(--f-mono); font-size: .78rem; color: var(--amber); padding-top: 3px; }
.case__dl dd { margin: 0; color: var(--muted); }

.infra { margin-top: 48px; }
.infra__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.infra__head .arrowlink { margin-top: 0; }
.infra__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.term { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.term__path { font-size: .8rem; color: var(--amber); margin-bottom: 10px; }
.term p { color: var(--muted); margin-top: 8px; }
.term .term__stack { font-size: .76rem; color: var(--text); opacity: .75; margin-top: 16px; }
.term--lead { grid-column: 1 / -1; border-color: rgba(240,166,58,.35); }
.term--lead > p:not(.term__path):not(.term__stack):not(.term__links) { max-width: 70ch; }
.term__points { margin-top: 6px; font-size: .97rem; }
.term__links { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.term__links .arrowlink { margin-top: 8px; }

/* placeholder treatment: impossible to miss, easy to remove */
.ph { position: relative; outline: 1.5px dashed var(--amber); outline-offset: -1.5px; }
.ph::after { content: attr(data-ph); position: absolute; top: 10px; right: 10px; font: 500 .7rem/1 var(--f-mono); color: var(--amber-ink); background: var(--amber); padding: 5px 7px; border-radius: 4px; }
.ph-note { margin-top: 18px; font-size: .78rem; color: var(--amber); }
.ph-note[hidden] { display: none; }

.quote { margin: 0; padding: clamp(28px, 4vw, 44px); border-radius: var(--radius); background: var(--panel); }
.quote blockquote { margin: 0; font-family: var(--f-display); font-variation-settings: "wdth" 100; font-weight: 500; font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.3; max-width: 40ch; }
.quote figcaption { margin-top: 18px; color: var(--muted); font-size: .85rem; }

/* process */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 40px; counter-reset: step; border-top: 1px solid var(--line); }
.steps li { counter-increment: step; padding: 24px 22px 0 0; position: relative; }
.steps li::before { content: counter(step); display: block; font-family: var(--f-mono); font-size: .8rem; color: var(--amber); margin-bottom: 14px; }
.steps li::after { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--amber); }
.steps h3 { font-size: 1.1rem; }
.steps p { color: var(--muted); margin-top: 8px; font-size: .97rem; }

/* about */
.about { display: grid; grid-template-columns: 320px 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.about__photo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
.about__copy p { color: var(--muted); margin-top: 16px; max-width: 60ch; }
.about__copy .h2 { margin-bottom: 8px; }
.facts { margin-top: 28px; display: grid; gap: 10px; font-size: .85rem; }
.facts li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.facts span { color: var(--amber); }

/* contact */
.contact { border-bottom: 0; }
.contact__inner { display: grid; grid-template-columns: 1fr minmax(0, 460px); gap: clamp(32px, 5vw, 72px); align-items: start; }
.contact .h2 { max-width: 20ch; }
.contact .lede { margin-top: 16px; }

/* quote form */
.qform { color-scheme: dark; display: grid; gap: 16px; padding: clamp(22px, 3vw, 32px); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.qform h3 { margin-bottom: 2px; }
.qform__field { display: grid; gap: 6px; }
.qform label { font-size: .9rem; font-weight: 500; }
.qform input, .qform select, .qform textarea {
  width: 100%; min-height: 46px; padding: 10px 12px;
  font: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
}
.qform textarea { resize: vertical; min-height: 110px; }
.qform ::placeholder { color: #5E6B71; }
.qform input:focus, .qform select:focus, .qform textarea:focus { outline: 2px solid var(--amber); outline-offset: 1px; border-color: transparent; }
.qform [aria-invalid="true"] { border-color: var(--bad); }
.qform__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.qform__turnstile:empty { display: none; }
.qform__submit { justify-content: center; }
.qform__submit[disabled] { opacity: .6; cursor: progress; }
.qform__status { min-height: 1.5em; font-size: .95rem; }
.qform__status:empty { display: none; }
.qform__status.is-ok { color: var(--ok); }
.qform__status.is-err { color: #F2A08F; }
.qform__status a { color: var(--amber); }
.qform__note { font-size: .78rem; color: var(--muted); }
.contact__copy { margin-top: 10px; min-height: 1.6em; font-size: .8rem; color: var(--ok); }
.contact__num { margin-top: 20px; font-size: .9rem; color: var(--muted); }
.contact__num a { color: var(--text); text-underline-offset: 3px; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 28px 0; font-size: .9rem; color: var(--muted); }
.foot__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.foot .brand { color: var(--text); vertical-align: middle; }
.foot__links { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.foot__links .mono { font-size: .78rem; }
.foot__links a { color: var(--text); }

/* faint scroll-linked Earth background (earth.js) */
.earth-bg {
  position: fixed; inset: 0; z-index: -2;
  width: 100vw; height: 100vh;
  opacity: 0; pointer-events: none;
  transition: opacity .8s ease;
}
/* 26% only works because the frames have their highlights capped at 160/255
   (curves 0.45 -> 0.63): grey #97A4AA text stays >= 4.8:1 over the brightest
   cloud frames. With uncapped frames, keep this at .16 or lower. */
.earth-bg.is-ready { opacity: .26; }
/* Darken the edges so text never sits on bright imagery. */
.earth-shade {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 45%, transparent 0%, rgba(15,21,25,.35) 60%, rgba(15,21,25,.85) 100%),
    linear-gradient(180deg, rgba(15,21,25,.3), rgba(15,21,25,.1) 40%, rgba(15,21,25,.3));
}

/* text effects (text-fx.js). These classes are only added by the script, so
   without JS or with reduced motion the text is plain and visible. */
.fx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fx-cursor {
  display: inline-block; width: .55em; height: 1.05em; margin-left: 2px;
  vertical-align: -.15em; background: var(--amber);
  animation: fx-blink 1s steps(2, start) infinite;
}
@keyframes fx-blink { to { visibility: hidden; } }
.fx-boot-char { display: inline-block; text-align: center; }
.fx-boot-char.is-scrambling { color: var(--muted); }
.fx-rise { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.fx-rise.is-in { opacity: 1; transform: none; }

/* website check page */
.sample { margin: 0; justify-self: center; width: 100%; max-width: 460px; }
.sample img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.sample figcaption { margin-top: 10px; font-size: .8rem; color: var(--muted); text-align: center; }
.faq { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 32px 0 0; }
.faq div { padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.faq dt { font-family: var(--f-display); font-weight: 650; font-size: 1.1rem; }
.faq dd { margin: 8px 0 0; color: var(--muted); }
.check-cta { margin-top: 28px; color: var(--muted); }
.check-cta a { color: var(--amber); text-underline-offset: 3px; }

/* responsive */
@media (max-width: 960px) {
  .hero__grid, .case, .about, .contact__inner { grid-template-columns: 1fr; }
  .case__shot { border-right: 0; border-bottom: 1px solid var(--line); aspect-ratio: 16 / 10; }
  .about__photo { max-width: 280px; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 28px; }
}
@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__inner { justify-content: space-between; }
  .compare, .services, .infra__grid, .faq { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; border-top: 0; border-left: 1px solid var(--line); padding-left: 22px; }
  .steps li { padding: 0 0 4px; }
  .steps li::after { top: 3px; left: -27px; }
  .steps li::before { margin-bottom: 6px; }
  .row { grid-template-columns: auto 1fr auto; }
  .row__ms { grid-column: 3; }
  .row__state { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .board__foot { flex-direction: column; align-items: flex-start; gap: 4px; }
}
@media (max-width: 400px) {
  .btn--sm span { display: none; }
  .btn--sm { padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .row.is-checking .led { animation: none; }
  .case__shot img, .btn { transition: none; }
}
