/* claugine.com — landing site
   Tokens: steel paper, ink, cobalt for action, amber only for "powered" status in the stack. */

:root {
  --bg: #E9EDF0;
  --panel: #F6F8F9;
  --ink: #121C2B;
  --muted: #566273;
  --rule: #C5CDD6;
  --cobalt: #2747E0;
  --cobalt-ink: #FFFFFF;
  --amber: #F0A400;
  --slab: #DDE3E8;
  --slab-on: #FFFFFF;

  --wide: "wdth" 125;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: 2.5rem;
  --step-4: clamp(2.5rem, 5.4vw, 4.25rem);

  --measure: 62ch;
  --gutter: 16px;
  --max: 1160px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1823;
    --panel: #16212E;
    --ink: #E3E8EE;
    --muted: #9AA6B5;
    --rule: #2A3747;
    --cobalt: #7D93FF;
    --cobalt-ink: #0F1823;
    --slab: #1B2735;
    --slab-on: #223146;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1823;
  --panel: #16212E;
  --ink: #E3E8EE;
  --muted: #9AA6B5;
  --rule: #2A3747;
  --cobalt: #7D93FF;
  --cobalt-ink: #0F1823;
  --slab: #1B2735;
  --slab-on: #223146;
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: var(--step-0);
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
}

a { color: var(--cobalt); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--panel);
  padding: 8px 12px;
}
.skip:focus { left: 8px; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

h1, h2, h3 {
  font-variation-settings: var(--wide);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
}
h1 { font-size: var(--step-4); font-weight: 760; }
h2 { font-size: var(--step-3); font-weight: 720; }
h3 { font-size: var(--step-1); font-weight: 680; line-height: 1.2; }

p { margin: 0; max-width: var(--measure); }

/* header */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 720;
  font-size: var(--step-1);
  font-variation-settings: var(--wide);
}
.brand img { width: 30px; height: 30px; }
.site-nav { display: flex; gap: 24px; font-size: var(--step--1); }
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a:hover { color: var(--cobalt); }

/* buttons */

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 4px;
  font-weight: 620;
  text-decoration: none;
  border: 2px solid var(--cobalt);
}
.btn-primary { background: var(--cobalt); color: var(--cobalt-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-plain { color: var(--cobalt); }
.btn-plain:hover { background: var(--panel); }

/* hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  padding-top: 48px;
  padding-bottom: 96px;
}
.hero h1 { max-width: 13ch; }
.hero .lede {
  margin-top: 24px;
  font-size: var(--step-1);
  color: var(--muted);
  max-width: 44ch;
}
.hero .actions { margin-top: 32px; }

/* the stack — the one memorable element */

.stack-fig { margin: 0; padding-left: 44px; }
.ours { position: relative; }
.ours::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 0;
  bottom: 0;
  width: 16px;
  border: 2px solid var(--cobalt);
  border-right: 0;
  border-radius: 4px 0 0 4px;
}
.ours-tag {
  position: absolute;
  left: -30px;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
  white-space: nowrap;
  font-size: var(--step--1);
  color: var(--cobalt);
  background: var(--bg);
  padding: 0 8px;
}
.stack {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stack.base { margin-top: 8px; }
.stack li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 4px;
  background: var(--slab);
  border: 1px solid var(--rule);
}
.stack .name { font-weight: 640; }
.stack .what { color: var(--muted); font-size: var(--step--1); }
.stack .led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--amber) 25%, transparent);
}
.stack li.on { background: var(--slab-on); }
.stack li.hw { background: transparent; border: 2px dashed var(--muted); }
.stack li.portal { background: var(--cobalt); border-color: var(--cobalt); color: var(--cobalt-ink); }
.stack li.portal .what { color: inherit; opacity: 0.85; }

/* load sequence: layers power up from the servers upward, once */
@media (prefers-reduced-motion: no-preference) {
  .stack li { animation: power 0.45s ease-out both; }
  .stack .led { animation: led 0.45s ease-out both; }
  .base li { animation-delay: 0.1s; }
  .ours li:nth-child(5), .ours li:nth-child(5) .led { animation-delay: 0.35s; }
  .ours li:nth-child(4), .ours li:nth-child(4) .led { animation-delay: 0.6s; }
  .ours li:nth-child(3), .ours li:nth-child(3) .led { animation-delay: 0.85s; }
  .ours li:nth-child(2), .ours li:nth-child(2) .led { animation-delay: 1.1s; }
  .ours li:nth-child(1) { animation-delay: 1.4s; }
  .ours::before, .ours-tag { animation: fade 0.45s ease-out 1.7s both; }
}
@keyframes power {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade {
  from { opacity: 0; }
}
@keyframes led {
  from { background: var(--rule); box-shadow: none; }
}

/* sections */

.section { padding-top: 88px; padding-bottom: 88px; border-top: 1px solid var(--rule); }
.section > h2 { max-width: 20ch; }
.section > .intro { margin-top: 16px; color: var(--muted); font-size: var(--step-1); max-width: 52ch; }

/* journey: a real sequence, so it's numbered */
.journey {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  counter-reset: step;
}
.journey li { counter-increment: step; position: relative; padding-top: 56px; }
.journey li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--ink);
  font-weight: 720;
  font-variation-settings: var(--wide);
}
.journey li:last-child::before { background: var(--cobalt); border-color: var(--cobalt); color: var(--cobalt-ink); }
.journey li::after {
  content: "";
  position: absolute;
  top: 20px;
  left: 52px;
  right: -20px;
  border-top: 2px solid var(--rule);
}
.journey li:last-child::after { display: none; }
.journey h3 { margin-bottom: 10px; }
.journey p { color: var(--muted); }

/* portal audiences */
.audiences {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 6px;
}
.audience { padding: 28px; }
.audience + .audience { border-left: 1px solid var(--rule); }
.audience .who { color: var(--muted); font-size: var(--step--1); margin-top: 6px; }
.audience ul { margin: 18px 0 0; padding-left: 1.1em; }
.audience li + li { margin-top: 8px; }

/* platform components */
.components {
  margin: 48px 0 0;
  display: grid;
  grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
  column-gap: 40px;
}
.components dt {
  font-weight: 680;
  font-variation-settings: var(--wide);
  padding: 18px 0;
  border-top: 1px solid var(--rule);
}
.components dd {
  margin: 0;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
  color: var(--muted);
}
.components dd a { white-space: nowrap; }

/* closing */
.closing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
}
.closing p { margin-top: 16px; color: var(--muted); font-size: var(--step-1); }

.site-foot {
  border-top: 1px solid var(--rule);
  padding-top: 28px;
  padding-bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: var(--step--1);
}
.site-foot a { color: inherit; }

/* 404 */
.notfound { padding-top: 96px; padding-bottom: 160px; }
.notfound p { margin-top: 16px; color: var(--muted); font-size: var(--step-1); }
.notfound .actions { margin-top: 32px; }

/* responsive */

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-bottom: 72px; }
  .journey { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .journey li::after { display: none; }
  .audiences { grid-template-columns: 1fr; }
  .audience + .audience { border-left: 0; border-top: 1px solid var(--rule); }
}

@media (max-width: 640px) {
  :root { --step-3: 1.9rem; }
  .site-nav { gap: 16px; }
  .site-nav .hide-sm { display: none; }
  .hero { padding-top: 24px; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  .journey { grid-template-columns: 1fr; }
  .components { grid-template-columns: 1fr; }
  .components dd { border-top: 0; padding-top: 0; }
  .closing { grid-template-columns: 1fr; }
  .stack li { padding: 12px 14px; }
  .stack-fig { padding-left: 40px; }
}
