/* ============================================================
   Sherif Aboulnasr — portfolio
   Plain CSS. Same design grammar as the EFN Group site:
   precision-light canvas, hairline borders, layered soft
   shadows, pill buttons, one shared easing. Each flagship
   product panel renders in that product's own brand world.
   ============================================================ */

:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --ink: #0b0b0e;
  --ink-2: #4a4a52;
  --ink-3: #6f6f78;
  --hairline: rgba(11, 11, 14, 0.08);
  --hairline-soft: rgba(11, 11, 14, 0.05);

  /* product accents */
  --coral: #ff6b5b;      /* ModernSims */
  --lime: #c8ee44;       /* Dosely */
  --lime-deep: #66790f;
  --cobalt: #1e45ce;     /* Arooba */
  --terra: #e07b5a;      /* Stepsy */
  --teal: #30c39b;
  --amber: #f5a524;

  --sans: "Geist", -apple-system, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "Playfair Display", Georgia, serif;

  --r-xl: 36px;
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;

  --shadow-card: 0 1px 2px rgba(11, 11, 14, 0.04), 0 8px 24px rgba(11, 11, 14, 0.05);
  --shadow-card-hover: 0 2px 4px rgba(11, 11, 14, 0.05), 0 18px 44px rgba(11, 11, 14, 0.10);
  --shadow-panel: 0 1px 2px rgba(11, 11, 14, 0.04), 0 24px 60px rgba(11, 11, 14, 0.07);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: clamp(20px, 4.5vw, 48px);
  --container: 1180px;
}

/* ---------- reset / base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
img, svg { display: block; }

::selection { background: rgba(30, 69, 206, 0.18); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -48px; left: 16px; z-index: 100;
  background: var(--ink); color: #fff;
  padding: 10px 18px; border-radius: 999px;
  font-size: 14px; text-decoration: none;
  transition: top 0.25s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- reveals ---------- */

.reveal-load {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.8s var(--ease) forwards;
  animation-delay: calc(var(--d, 0) * 90ms);
}
@keyframes rise { to { opacity: 1; transform: none; } }

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-size: 15px; font-weight: 500;
  letter-spacing: -0.01em; text-decoration: none;
  border-radius: 999px; padding: 13px 26px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease,
              background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--ink); color: #fff;
  box-shadow: 0 1px 2px rgba(11, 11, 14, 0.2);
}
.btn-primary:hover, .btn-primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(11, 11, 14, 0.22);
}

.btn-ghost {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--hairline);
}
.btn-ghost:hover, .btn-ghost:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(11, 11, 14, 0.16);
  box-shadow: var(--shadow-card);
}

.btn-small { padding: 10px 20px; font-size: 14px; }

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover, .btn-dark:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(11, 11, 14, 0.22);
}

.btn-lime { background: var(--lime); color: #10130a; }
.btn-lime:hover, .btn-lime:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(200, 238, 68, 0.28);
}

.btn-terra { background: var(--terra); color: #1c120c; }
.btn-terra:hover, .btn-terra:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(224, 123, 90, 0.32);
}

.btn-red { background: #c62f34; color: #fff; }
.btn-red:hover, .btn-red:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(198, 47, 52, 0.32);
}

.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover, .btn-light:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
}

.btn-ghost-dark {
  background: transparent; color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.btn-ghost-dark:hover, .btn-ghost-dark:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
}

/* ---------- nav ---------- */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(247, 247, 245, 0.75);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(1.8) blur(18px);
  -webkit-backdrop-filter: saturate(1.8) blur(18px);
  border-bottom: 1px solid var(--hairline-soft);
}
.nav-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 var(--pad);
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 16.5px; letter-spacing: -0.02em;
  text-decoration: none;
}
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px); }
.nav-links a {
  font-size: 14.5px; font-weight: 500; text-decoration: none;
  color: var(--ink-2); transition: color 0.2s ease;
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--ink); }
.nav-cta {
  color: #fff !important; background: var(--ink);
  border-radius: 999px; padding: 9px 18px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease;
}
.nav-cta:hover, .nav-cta:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(11, 11, 14, 0.2);
}

/* ---------- hero ---------- */

.hero {
  position: relative; overflow: hidden; overflow: clip;
  padding: clamp(116px, 15vh, 164px) var(--pad) 0;
  text-align: center;
}
/* engineer's graph paper — a fine dot grid that dissolves down the hero */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(11, 11, 14, 0.14) 1px, transparent 1.35px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(130% 95% at 50% -8%, #000 36%, transparent 76%);
  mask-image: radial-gradient(130% 95% at 50% -8%, #000 36%, transparent 76%);
}
/* whisper of grain so the glow field doesn't read as a flat gradient */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.05; mix-blend-mode: multiply;
}
.hero-glow {
  position: absolute; inset: -20% -10%; z-index: -1;
  filter: blur(90px); opacity: 0.58; pointer-events: none;
}
.hero-glow .g { position: absolute; border-radius: 50%; will-change: transform; }
.g1 { width: 44vw; height: 44vw; left: -8vw; top: -6vw;
  background: radial-gradient(circle, rgba(255, 107, 91, 0.32), transparent 65%);
  animation: drift1 24s ease-in-out infinite alternate; }
.g2 { width: 40vw; height: 40vw; right: -6vw; top: -10vw;
  background: radial-gradient(circle, rgba(48, 195, 155, 0.30), transparent 65%);
  animation: drift2 28s ease-in-out infinite alternate; }
.g3 { width: 36vw; height: 36vw; left: 22vw; top: 12vw;
  background: radial-gradient(circle, rgba(200, 238, 68, 0.30), transparent 65%);
  animation: drift3 26s ease-in-out infinite alternate; }
.g4 { width: 38vw; height: 38vw; right: 8vw; top: 4vw;
  background: radial-gradient(circle, rgba(245, 165, 36, 0.28), transparent 65%);
  animation: drift4 30s ease-in-out infinite alternate; }
.g5 { width: 34vw; height: 34vw; left: 38vw; top: -8vw;
  background: radial-gradient(circle, rgba(30, 69, 206, 0.16), transparent 65%);
  animation: drift5 27s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(6vw, 4vw) scale(1.10); } }
@keyframes drift2 { to { transform: translate(-5vw, 5vw) scale(1.08); } }
@keyframes drift3 { to { transform: translate(-4vw, -3vw) scale(0.94); } }
@keyframes drift4 { to { transform: translate(4vw, -4vw) scale(1.12); } }
@keyframes drift5 { to { transform: translate(-3vw, 5vw) scale(1.06); } }

.hero-inner { position: relative; z-index: 1; max-width: var(--container); margin: 0 auto; }

/* floating proof cards — the real products, holding the hero's flanks */
.hero-orbit { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hf { position: absolute; }
.hf-c {
  display: flex; flex-direction: column; gap: 3px; align-items: flex-start;
  background: rgba(255, 255, 255, 0.72);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--hairline); border-radius: 15px;
  padding: 12px 16px 11px;
  box-shadow: var(--shadow-card);
  transform: rotate(var(--tilt, 0deg));
  animation: hf-bob 7s ease-in-out infinite alternate;
  animation-delay: var(--bd, 0s);
}
.hf-c b {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em;
}
.hf-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent),
              inset 0 0 0 1px rgba(11, 11, 14, 0.08);
}
.hf-m { font-family: var(--mono); font-size: 11px; color: var(--ink-3); padding-left: 16px; }
@keyframes hf-bob {
  from { transform: rotate(var(--tilt, 0deg)) translateY(-5px); }
  to   { transform: rotate(var(--tilt, 0deg)) translateY(7px); }
}
.hf-1 { left: clamp(16px, 6vw, 150px);    top: 27%; --tilt: -4deg;   --bd: -1.2s; }
.hf-2 { right: clamp(16px, 5.5vw, 140px); top: 21%; --tilt: 3deg;    --bd: -3.4s; }
.hf-3 { left: clamp(24px, 8vw, 195px);    top: 57%; --tilt: 2.5deg;  --bd: -5.1s; }
.hf-4 { right: clamp(24px, 7.5vw, 175px); top: 54%; --tilt: -2.5deg; --bd: -2.2s; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 999px; padding: 8px 16px;
  font-size: 13.5px; font-weight: 550; color: var(--ink-2);
  letter-spacing: -0.005em;
}
.hero-eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(30, 69, 206, 0.16);
}

.hero-title {
  margin: 26px 0 0;
  font-size: clamp(44px, 7.6vw, 96px);
  font-weight: 650; line-height: 1.04;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
/* the punchline turns editorial — Playfair italic, same voice as the
   panel pull-quotes, gradient-filled */
.hero-it {
  font-family: var(--serif); font-style: italic; font-weight: 600;
  font-size: 1.02em; letter-spacing: -0.015em;
  padding-right: 0.09em; /* italic overhang would clip the gradient text box */
}
.grad {
  background: linear-gradient(96deg, #30c39b 0%, #2456c9 70%, #1e45ce 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
@supports not ((background-clip: text) or (-webkit-background-clip: text)) {
  .grad {
    background: none;
    color: var(--ink);
    -webkit-text-fill-color: currentColor;
  }
}

.hero-sub {
  margin: 22px auto 0; max-width: 56ch;
  font-size: clamp(16px, 1.9vw, 19px); color: var(--ink-2);
  text-wrap: pretty;
}

.hero-actions {
  margin-top: 34px;
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}

.hero-stats {
  max-width: 920px;
  margin: clamp(44px, 7vh, 72px) auto 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--hairline);
}
.stat {
  padding: clamp(20px, 3vw, 32px) 12px;
  border-right: 1px solid var(--hairline-soft);
  display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.stat:last-child { border-right: 0; }
.stat b {
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 650; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat span { font-size: 13.5px; color: var(--ink-3); }

/* ---------- section heads ---------- */

.section-head {
  max-width: var(--container); margin: 0 auto;
  padding: clamp(84px, 13vh, 140px) var(--pad) clamp(40px, 6vh, 64px);
  text-align: center;
}
.kicker {
  font-family: var(--mono); font-size: 12.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-3);
}
.section-head h2, .about-bio h2 {
  margin-top: 14px;
  font-size: clamp(32px, 4.6vw, 56px);
  font-weight: 650; line-height: 1.05; letter-spacing: -0.035em;
  text-wrap: balance;
}
.section-head p:not(.kicker) {
  margin: 18px auto 0; max-width: 52ch;
  color: var(--ink-2); font-size: clamp(15px, 1.7vw, 17.5px);
  text-wrap: pretty;
}

/* ---------- product panels ---------- */

.panels {
  max-width: var(--container); margin: 0 auto;
  padding: 0 var(--pad);
  display: flex; flex-direction: column;
  gap: clamp(20px, 3vw, 32px);
}

.panel {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: clamp(28px, 4.5vw, 72px);
  align-items: center;
  border-radius: var(--r-xl);
  border: 1px solid var(--hairline);
  padding: clamp(28px, 4.5vw, 64px);
  box-shadow: var(--shadow-panel);
  overflow: hidden; overflow: clip;
  position: relative;
}
.panel--rev { grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.08fr); }
.panel--rev .panel-info { order: 2; }
.panel--rev .panel-visual { order: 1; }

.panel-info { max-width: 60ch; }

.p-kicker {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--p-accent, var(--ink-3));
}
.panel h3 {
  margin-top: 14px;
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 650; letter-spacing: -0.035em; line-height: 1.04;
}
.p-tag {
  margin-top: 6px;
  font-size: clamp(17px, 2vw, 21px);
  color: var(--p-muted, var(--ink-2));
  font-weight: 500; letter-spacing: -0.015em;
}
.p-desc {
  margin-top: 16px;
  font-size: 15.5px; color: var(--p-muted, var(--ink-2));
  text-wrap: pretty;
}
.p-points { margin-top: 16px; display: grid; gap: 8px; }
.p-points li {
  position: relative; padding-left: 20px;
  font-size: 14.5px; color: var(--p-muted, var(--ink-2));
}
.p-points li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 8px; height: 8px; border-radius: 3px;
  background: var(--p-accent, var(--ink));
  opacity: 0.85;
}
.p-stats {
  margin-top: 20px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.p-stats span {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--p-chip, var(--hairline));
  color: var(--p-chip-ink, var(--ink-2));
  white-space: nowrap;
}
.p-actions { margin-top: 24px; display: flex; gap: 10px; flex-wrap: wrap; }

.panel-visual { display: flex; justify-content: center; min-width: 0; }

/* listing panels: info + phone mock side by side on top, full-width
   screenshot rail spanning below — the EFN App Store listing arrangement */
.panel--listing { row-gap: clamp(26px, 3.2vw, 44px); }
.panel--listing .rail { grid-column: 1 / -1; }
.panel--rev .rail { order: 3; }

/* light panels */
.p-modernsims {
  --p-accent: #c62f34;
  background:
    radial-gradient(700px 420px at 108% -10%, rgba(255, 107, 91, 0.10), transparent 70%),
    radial-gradient(520px 320px at -8% 110%, rgba(201, 169, 110, 0.12), transparent 70%),
    #fbf7f1;
}
.p-modernsims .p-tag { font-family: var(--serif); font-style: italic; font-weight: 500; color: #3d2f28; }

.p-arooba {
  --p-accent: var(--cobalt);
  background:
    linear-gradient(rgba(30, 69, 206, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 69, 206, 0.045) 1px, transparent 1px),
    #f4f6fb;
  background-size: 24px 24px, 24px 24px, auto;
}

.p-pingr {
  --p-accent: #c62f34;
  background:
    radial-gradient(700px 420px at 108% 112%, rgba(229, 72, 77, 0.09), transparent 70%),
    radial-gradient(520px 320px at -8% -12%, rgba(229, 72, 77, 0.05), transparent 70%),
    #fdf6f5;
}

/* dark panels */
.panel--dark {
  border-color: rgba(255, 255, 255, 0.08);
  color: #f4f4f2;
  --p-muted: rgba(255, 255, 255, 0.68);
}
.panel--dark h3 { color: #fff; }

.p-dosely {
  --p-accent: var(--lime);
  --p-chip: rgba(200, 238, 68, 0.28);
  --p-chip-ink: #dff295;
  background:
    radial-gradient(720px 460px at 110% 115%, rgba(200, 238, 68, 0.14), transparent 70%),
    radial-gradient(480px 320px at -10% -15%, rgba(200, 238, 68, 0.07), transparent 70%),
    #0a0a0a;
}
.p-stepsy {
  --p-accent: var(--terra);
  --p-chip: rgba(224, 123, 90, 0.32);
  --p-chip-ink: #f0b39e;
  background:
    radial-gradient(720px 460px at -10% 115%, rgba(224, 123, 90, 0.16), transparent 70%),
    radial-gradient(480px 320px at 110% -15%, rgba(212, 150, 10, 0.10), transparent 70%),
    #17171a;
}

/* ---------- ModernSims dashboard visual ---------- */

.sim-card {
  width: min(100%, 420px);
  background: #fffdf9;
  border: 1px solid rgba(61, 47, 40, 0.10);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  padding: 22px 22px 18px;
}
.sim-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 14px; border-bottom: 1px solid rgba(61, 47, 40, 0.08);
}
.sim-title {
  font-family: var(--serif); font-style: italic; font-weight: 600;
  font-size: 17px; color: #2a211c; letter-spacing: -0.01em;
}
.sim-badge {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: #0b7a5b; background: rgba(91, 185, 139, 0.14);
  padding: 4px 9px; border-radius: 999px;
}
.sim-rows { display: grid; gap: 12px; padding: 16px 0; }
.sim-row {
  display: grid; grid-template-columns: 96px 1fr 44px;
  align-items: center; gap: 10px;
}
.sim-label { font-size: 12px; color: #6e5f56; }
.sim-bar {
  height: 8px; border-radius: 999px;
  background: rgba(61, 47, 40, 0.07);
  overflow: hidden;
}
.sim-fill {
  display: block; height: 100%; border-radius: 999px;
  background: var(--c); width: var(--w);
  transition: width 1.1s var(--ease) 0.25s;
}
.js .p-modernsims.reveal:not(.is-in) .sim-fill { width: 0; }
.sim-val {
  font-family: var(--mono); font-size: 11.5px; color: #2a211c;
  text-align: right; font-variant-numeric: tabular-nums;
}
.sim-foot {
  display: flex; justify-content: space-between;
  padding-top: 14px; border-top: 1px solid rgba(61, 47, 40, 0.08);
  font-size: 12px; color: #6e5f56;
}
.sim-foot b { font-weight: 640; color: #2a211c; font-variant-numeric: tabular-nums; }
.sim-foot .up { color: #0b7a5b; }

/* ---------- App Store screenshot rails ---------- */

.rail {
  display: flex; gap: 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding: 4px 4px 14px;
  border-radius: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(11, 11, 14, 0.18) transparent;
}
.rail::-webkit-scrollbar { height: 8px; }
.rail::-webkit-scrollbar-track { background: transparent; }
.rail::-webkit-scrollbar-thumb { background: rgba(11, 11, 14, 0.18); border-radius: 999px; }
.rail:focus-visible {
  outline: 2px solid var(--p-accent, var(--ink));
  outline-offset: 4px;
}
.rail img {
  flex: none;
  height: clamp(300px, 26vw, 380px);
  width: auto;
  border-radius: 18px;
  scroll-snap-align: start;
  border: 1px solid rgba(11, 11, 14, 0.10);
  background: #0c0c0f;
  box-shadow: 0 1px 2px rgba(11, 11, 14, 0.10), 0 14px 34px rgba(11, 11, 14, 0.16);
}
.panel--dark .rail { scrollbar-color: rgba(255, 255, 255, 0.28) transparent; }
.panel--dark .rail::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.28); }
.panel--dark .rail:focus-visible { outline-color: rgba(255, 255, 255, 0.7); }
.panel--dark .rail img {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), 0 18px 44px rgba(0, 0, 0, 0.45);
}

/* ---------- phone mocks ---------- */

.phone {
  width: clamp(230px, 22vw, 280px);
  border-radius: 44px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02));
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), 0 28px 60px rgba(0, 0, 0, 0.45);
  transform: rotate(-2.5deg);
  transition: transform 0.5s var(--ease);
}
.panel:hover .phone { transform: rotate(0deg); }

.phone-screen {
  border-radius: 35px;
  padding: 14px 16px 18px;
  min-height: 430px;
  position: relative;
  overflow: hidden;
}
.phone--dosely .phone-screen { background: #101208; }
.phone--stepsy .phone-screen { background: #131316; }

/* Pingr sits on a light panel — ink-based frame, dark screen */
.phone--pingr {
  border: 1px solid rgba(11, 11, 14, 0.10);
  background: linear-gradient(160deg, rgba(11, 11, 14, 0.06), rgba(11, 11, 14, 0.015));
  box-shadow: 0 2px 4px rgba(11, 11, 14, 0.12), 0 28px 60px rgba(11, 11, 14, 0.20);
}
.phone--pingr .phone-screen { background: #150b0c; }

.ph-status {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 10px; color: rgba(255, 255, 255, 0.55);
  padding: 2px 6px 0;
}
.ph-batt {
  width: 18px; height: 9px; border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  position: relative;
}
.ph-batt::after {
  content: ""; position: absolute; inset: 1.5px 30% 1.5px 1.5px;
  border-radius: 1.5px; background: rgba(255, 255, 255, 0.7);
}
.ph-h {
  margin: 14px 6px 4px;
  font-size: 19px; font-weight: 650; letter-spacing: -0.02em; color: #fff;
}

.dose-ring, .step-ring {
  position: relative; width: 128px; margin: 10px auto 14px;
}
.dose-ring svg, .step-ring svg { width: 100%; height: auto; }
.ring-bg {
  fill: none; stroke-width: 9;
  stroke: rgba(255, 255, 255, 0.08);
}
.ring-fg {
  fill: none; stroke-width: 9; stroke-linecap: round;
  transform: rotate(-90deg);
  transform-box: fill-box; transform-origin: center;
  stroke-dasharray: 326.7;
  transition: stroke-dashoffset 1.3s var(--ease) 0.3s;
}
.phone--dosely .ring-fg { stroke: var(--lime); stroke-dashoffset: 111; }   /* 66% */
.phone--stepsy .ring-fg { stroke: var(--terra); stroke-dashoffset: 85; }   /* 74% */
.js .p-dosely.reveal:not(.is-in) .ring-fg,
.js .p-stepsy.reveal:not(.is-in) .ring-fg { stroke-dashoffset: 326.7; }
.ring-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; text-align: center;
}
.ring-center b {
  font-size: 20px; font-weight: 650; letter-spacing: -0.02em; color: #fff;
  font-variant-numeric: tabular-nums;
}
.ring-center span { font-size: 10.5px; color: rgba(255, 255, 255, 0.5); }

.dose-row, .tier-row, .ping-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; margin-top: 7px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.dr-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--lime);
}
.dr-dot--off { background: rgba(255, 255, 255, 0.25); }
.dr-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0; }
.dr-txt b {
  font-size: 12.5px; font-weight: 600; color: #fff; letter-spacing: -0.01em;
}
.dr-txt span { font-size: 10.5px; color: rgba(255, 255, 255, 0.48); }
.dr-check {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  position: relative;
}
.dr-done { background: var(--lime); border-color: var(--lime); }
.dr-done::after {
  content: ""; position: absolute; left: 4.5px; top: 2px;
  width: 4px; height: 8px;
  border: solid #10130a; border-width: 0 1.8px 1.8px 0;
  transform: rotate(45deg);
}

.tier-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--terra);
}
.tier-off .tier-dot { background: rgba(255, 255, 255, 0.25); }
.tier-row em {
  font-style: normal; font-family: var(--mono);
  font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--terra); flex: none;
}
.tier-off em { color: rgba(255, 255, 255, 0.4); text-transform: none; letter-spacing: 0; }

.ph-chart { margin-top: 12px; padding: 0 2px; }
.ph-chart svg { width: 100%; height: 52px; border-radius: 8px; }
.ph-chart-label {
  display: block; margin-top: 6px;
  font-family: var(--mono); font-size: 9.5px;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase; letter-spacing: 0.08em;
}

.ping-banner {
  margin: 10px 2px 2px; padding: 10px 12px;
  border-radius: 14px;
  background: rgba(229, 72, 77, 0.16);
  border: 1px solid rgba(229, 72, 77, 0.40);
  display: flex; flex-direction: column; gap: 1px;
}
.ping-banner b { font-size: 12.5px; font-weight: 600; color: #fff; letter-spacing: -0.01em; }
.ping-banner span { font-size: 10.5px; color: rgba(255, 255, 255, 0.55); }
.ping-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: #e5484d;
}
.ping-dot--off { background: rgba(255, 255, 255, 0.25); }
.ping-row em {
  font-style: normal; font-family: var(--mono);
  font-size: 9.5px; color: #f0989b; flex: none;
}
.ping-row--dim em { color: rgba(255, 255, 255, 0.4); }

/* ---------- Arooba gauge visual ---------- */

.gauge-card {
  width: min(100%, 380px);
  background: #fff;
  border: 1px solid rgba(10, 15, 30, 0.09);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  padding: 24px 26px 22px;
  text-align: center;
}
.gauge-kicker {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: #5a6478;
}
.gauge { position: relative; width: min(100%, 260px); margin: 18px auto 0; }
.gauge svg { width: 100%; height: auto; overflow: visible; }
.gauge-track {
  fill: none; stroke: rgba(10, 15, 30, 0.08);
  stroke-width: 12; stroke-linecap: round;
}
.gauge-arc {
  fill: none; stroke: var(--cobalt);
  stroke-width: 12; stroke-linecap: round;
  stroke-dasharray: 264;          /* semicircle r=84 ≈ 263.9 */
  stroke-dashoffset: 37;          /* ~86% swept */
  transition: stroke-dashoffset 1.3s var(--ease) 0.3s;
}
.js .p-arooba.reveal:not(.is-in) .gauge-arc { stroke-dashoffset: 264; }
.gauge-letter {
  position: absolute; left: 0; right: 0; bottom: 7px;
  font-size: 58px; font-weight: 650; letter-spacing: -0.04em;
  line-height: 1; color: #0a0f1e;
}
.gauge-letter span { color: var(--amber); }
.gauge-note {
  margin-top: 16px;
  font-family: var(--mono); font-size: 11px; color: #5a6478;
}
.gauge-chips {
  margin-top: 14px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
}
.gauge-chips span {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(30, 69, 206, 0.06);
  border: 1px solid rgba(30, 69, 206, 0.14);
  color: #1e3ca8;
}

/* ---------- also-in-flight minis ---------- */

.also {
  max-width: var(--container); margin: 0 auto;
  padding: clamp(40px, 6vh, 72px) var(--pad) 0;
}
.also-h {
  margin: 0;
  font-family: var(--mono); font-size: 12.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-3); text-align: center;
}
.also-grid {
  max-width: 860px;
  margin: 24px auto 0;
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(14px, 2vw, 22px);
}
.mini {
  display: flex; flex-direction: column;
  background: linear-gradient(135deg, var(--wash, transparent), transparent 55%), var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: clamp(20px, 2.4vw, 28px);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.35s ease, border-color 0.35s ease, transform 0.35s var(--ease);
}
.mini:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(11, 11, 14, 0.13);
  transform: translateY(-2px);
}
.mini-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mini h4 {
  margin: 0;
  font-size: 20px; font-weight: 640; letter-spacing: -0.02em;
  color: var(--accent, var(--ink));
}
.pill {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--hairline);
  color: var(--ink-3); background: var(--surface);
  white-space: nowrap;
}
.pill-live {
  color: #0b7a5b; background: rgba(91, 185, 139, 0.12);
  border-color: rgba(11, 122, 91, 0.22);
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease;
}
a.pill-live:hover, a.pill-live:focus-visible {
  background: rgba(91, 185, 139, 0.2);
  border-color: rgba(11, 122, 91, 0.38);
}
.mini p { margin-top: 12px; font-size: 14px; color: var(--ink-2); text-wrap: pretty; }
.mini .mini-meta {
  margin-top: auto; padding-top: 14px;
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-3);
}

/* ---------- tooling (terminal cards) ---------- */

.term-grid {
  max-width: var(--container); margin: 0 auto;
  padding: 0 var(--pad);
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2vw, 22px);
}
.term {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid rgba(11, 11, 14, 0.5);
  background: #101014;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.35s ease, transform 0.35s var(--ease);
}
.term:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.term-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.045);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.term-bar i {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}
.term-bar i:nth-child(1) { background: #e5484d; }
.term-bar i:nth-child(2) { background: #f5a524; }
.term-bar i:nth-child(3) { background: #30c39b; }
.term-bar span {
  margin-left: 6px;
  font-family: var(--mono); font-size: 11px; color: rgba(255, 255, 255, 0.55);
}
.term { display: flex; flex-direction: column; }
.term-body {
  padding: 18px 20px 20px;
  display: flex; flex-direction: column; flex: 1;
}
.term-body h3 {
  font-size: 17.5px; font-weight: 640; letter-spacing: -0.015em; color: #fff;
}
.term-body h3::before {
  content: "❯ ";
  color: var(--teal);
  font-family: var(--mono); font-weight: 500;
}
.term-body p { margin-top: 10px; font-size: 13.5px; color: rgba(255, 255, 255, 0.62); text-wrap: pretty; }
.term-body .term-meta {
  margin-top: auto; padding-top: 14px;
  font-family: var(--mono); font-size: 11px; color: rgba(255, 255, 255, 0.55);
}

/* ---------- research ---------- */

.research-grid {
  max-width: var(--container); margin: 0 auto;
  padding: 0 var(--pad);
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 2vw, 22px);
}
.res {
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--wash, transparent), transparent 42%), var(--surface);
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--accent, var(--ink));
  border-radius: var(--r-lg);
  padding: clamp(20px, 2.4vw, 28px);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}
.res:hover { box-shadow: var(--shadow-card-hover); }
.res h3 { font-size: 17px; font-weight: 640; letter-spacing: -0.015em; }
.res p { margin-top: 10px; font-size: 13.5px; color: var(--ink-2); text-wrap: pretty; }
.res .res-meta {
  margin-top: auto; padding-top: 14px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
}

/* ---------- about ---------- */

.about {
  max-width: var(--container); margin: 0 auto;
  padding: clamp(84px, 13vh, 140px) var(--pad) 0;
}
.about-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.about-bio h2 { margin-top: 14px; }
.about-bio p:not(.kicker) {
  margin-top: 18px; max-width: 56ch;
  color: var(--ink-2); font-size: 15.5px; text-wrap: pretty;
}
.chips { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips span {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--hairline);
  color: var(--ink-2);
}

.timeline {
  border-left: 1px solid var(--hairline);
  padding-left: clamp(20px, 2.5vw, 32px);
  display: grid; gap: 22px;
  margin-top: 44px;
}
.t-row { position: relative; }
.t-row::before {
  content: ""; position: absolute;
  left: calc(-1 * clamp(20px, 2.5vw, 32px) - 4.5px);
  top: 7px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--ink-3);
}
.t-year {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  color: var(--ink-3); letter-spacing: 0.04em;
}
.t-row p { margin-top: 2px; font-size: 14.5px; color: var(--ink); }

.ethos-grid {
  margin-top: clamp(48px, 7vh, 80px);
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2vw, 22px);
}
.ethos {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: clamp(20px, 2.4vw, 28px);
  box-shadow: var(--shadow-card);
}
.ethos h3 { font-size: 16.5px; font-weight: 620; letter-spacing: -0.015em; }
.ethos p { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); }

/* ---------- CTA ---------- */

.cta-wrap {
  max-width: var(--container); margin: 0 auto;
  padding: clamp(84px, 13vh, 140px) var(--pad);
}
.cta {
  position: relative; overflow: hidden;
  background: #0b0b0e; color: #fff;
  border-radius: var(--r-xl);
  text-align: center;
  padding: clamp(56px, 9vw, 110px) var(--pad);
}
.cta-glow {
  position: absolute; inset: -10%;
  background:
    radial-gradient(620px 380px at 12% 108%, rgba(255, 107, 91, 0.30), transparent 70%),
    radial-gradient(620px 380px at 88% -8%, rgba(200, 238, 68, 0.20), transparent 70%),
    radial-gradient(540px 340px at 62% 112%, rgba(30, 69, 206, 0.28), transparent 70%);
  filter: blur(50px); pointer-events: none;
}
.cta h2 {
  position: relative;
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 650; line-height: 1.05; letter-spacing: -0.035em;
  text-wrap: balance;
}
.cta p {
  position: relative;
  margin: 16px auto 0; max-width: 44ch;
  color: rgba(255, 255, 255, 0.65);
  font-size: clamp(15px, 1.8vw, 17.5px);
}
.cta-actions {
  position: relative;
  margin-top: 32px;
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}

/* ---------- footer ---------- */

.footer {
  background: var(--surface);
  border-top: 1px solid var(--hairline);
}
.footer-grid {
  max-width: var(--container); margin: 0 auto;
  padding: clamp(44px, 6vh, 64px) var(--pad) 32px;
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}
.footer-brand p {
  margin-top: 14px; max-width: 34ch;
  font-size: 13.5px; color: var(--ink-3);
}
.footer-h {
  font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.02em;
  color: var(--ink-3);
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 14px; color: var(--ink-2); text-decoration: none;
  transition: color 0.2s ease;
  width: fit-content;
}
.footer-col a:hover, .footer-col a:focus-visible { color: var(--ink); }
.footer-bar {
  max-width: var(--container); margin: 0 auto;
  padding: 20px var(--pad) 28px;
  border-top: 1px solid var(--hairline-soft);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: 13px; color: var(--ink-3);
}

/* ---------- breakpoints ---------- */

@media (max-width: 1360px) {
  .hero-orbit { display: none; }
}

@media (max-width: 960px) {
  .panel, .panel--rev { grid-template-columns: 1fr; }
  .panel--rev .panel-info { order: 1; }
  .panel--rev .panel-visual { order: 2; }
  .panel-visual { margin-top: 8px; }
  .phone { transform: rotate(0deg); }
  .rail img { height: clamp(300px, 46vw, 380px); }

  .also-grid { grid-template-columns: 1fr; }
  .term-grid { grid-template-columns: 1fr 1fr; }
  .research-grid { grid-template-columns: 1fr 1fr; }
  .ethos-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .timeline { margin-top: 8px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--hairline-soft); }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .hero { padding-top: 120px; }
  .term-grid { grid-template-columns: 1fr; }
  .research-grid { grid-template-columns: 1fr; }
  .p-stats span { font-size: 11px; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-load, .reveal, .js .reveal {
    opacity: 1 !important; transform: none !important;
    animation: none !important; transition: none !important;
  }
  .hero-glow .g { animation: none !important; }
  .hf-c { animation: none !important; }
  .sim-fill, .ring-fg, .gauge-arc { transition: none !important; }
  .js .p-modernsims.reveal:not(.is-in) .sim-fill { width: var(--w); }
  .js .p-dosely.reveal:not(.is-in) .ring-fg { stroke-dashoffset: 111; }
  .js .p-stepsy.reveal:not(.is-in) .ring-fg { stroke-dashoffset: 85; }
  .js .p-arooba.reveal:not(.is-in) .gauge-arc { stroke-dashoffset: 37; }
  .phone { transform: none !important; transition: none !important; }
  .btn, .nav-cta, .mini, .term, .res, .footer-col a, .nav-links a, .skip-link {
    transition: none !important;
  }
}
