/* U4EDU landing. Tokens mirror src/globals.css so the page matches the app. */

:root {
  --background: hsl(210 20% 98%);
  --foreground: hsl(221 39% 11%);
  --card: hsl(0 0% 99%);
  --muted: hsl(220 13% 91%);
  --muted-foreground: hsl(215 14% 34%);
  --primary: hsl(175 84% 32%);
  --primary-foreground: #fff;
  --accent: hsl(142 76% 36%);
  --border: hsl(220 13% 88%);
  --radius-control: 6px;
  --radius-panel: 10px;
  --radius-pill: 9999px;
  --shadow: 0 1px 2px rgb(15 23 42 / 0.05), 0 12px 32px -12px rgb(15 23 42 / 0.12);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: hsl(221 39% 11%);
    --foreground: hsl(210 20% 98%);
    --card: hsl(215 28% 17%);
    --muted: hsl(217 19% 27%);
    --muted-foreground: hsl(218 11% 65%);
    --primary: hsl(173 80% 40%);
    --accent: hsl(142 69% 58%);
    --border: hsl(217 19% 27%);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px -12px rgb(0 0 0 / 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --background: hsl(221 39% 11%);
  --foreground: hsl(210 20% 98%);
  --card: hsl(215 28% 17%);
  --muted: hsl(217 19% 27%);
  --muted-foreground: hsl(218 11% 65%);
  --primary: hsl(173 80% 40%);
  --accent: hsl(142 69% 58%);
  --border: hsl(217 19% 27%);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px -12px rgb(0 0 0 / 0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: Manrope, ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4.25rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted-foreground); }
.skip {
  position: absolute; left: -999px; top: 8px; background: var(--primary); color: #fff;
  padding: 8px 12px; border-radius: var(--radius-control); z-index: 100;
}
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }

.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-control);
  font: 600 15px/1 Manrope, sans-serif; text-decoration: none; border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-lg { padding: 14px 24px; font-size: 16px; }
.btn-solid { background: var(--primary); color: var(--primary-foreground); }
.btn-solid:hover { background: color-mix(in srgb, var(--primary) 88%, #000); }
.btn-ghost { border-color: var(--border); color: var(--foreground); background: transparent; }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-light { background: #fff; color: hsl(221 39% 11%); }
.btn-outline { border-color: rgb(255 255 255 / 0.45); color: #fff; }
.btn-outline:hover { border-color: #fff; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--background) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: var(--border); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -0.01em; }
.brand-mark {
  display: inline-block; width: 30px; height: 30px; border-radius: 8px; padding: 3px;
  background: #fff; object-fit: contain; vertical-align: middle;
}
.nav-links { display: flex; gap: 26px; }
.nav-links a { text-decoration: none; color: var(--muted-foreground); font-weight: 500; font-size: 15px; position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
  background: var(--primary); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.nav-links a:hover { color: var(--foreground); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta { display: flex; gap: 10px; }
.nav-cta .btn { padding: 9px 14px; font-size: 14px; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px);
  align-items: center; padding: clamp(56px, 9vw, 120px) clamp(16px, 4vw, 48px) clamp(48px, 6vw, 88px);
  max-width: 1280px; margin: 0 auto;
}
.lede { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--muted-foreground); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.dash {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-panel);
  box-shadow: var(--shadow); padding: 18px; transform: rotate(-1.2deg);
  transition: transform 0.6s var(--ease);
}
.hero-visual:hover .dash { transform: rotate(0deg) translateY(-4px); }
.dash-head { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.dash-title { margin-left: 10px; font: 500 12.5px/1 "IBM Plex Mono", monospace; color: var(--muted-foreground); }
.dash-bar { height: 10px; border-radius: var(--radius-pill); background: var(--muted); overflow: hidden; margin-bottom: 22px; }
.dash-fill {
  display: block; height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 1.6s var(--ease) 0.3s;
}
.is-visible .dash-fill, .dash-fill.run { width: var(--w, 72%); }
.dash-row { display: grid; grid-template-columns: 128px 1fr; gap: 18px; align-items: center; }
.ring-wrap { position: relative; width: 128px; height: 128px; }
.ring { width: 128px; height: 128px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--muted); stroke-width: 10; }
.ring-fg {
  fill: none; stroke: var(--primary); stroke-width: 10; stroke-linecap: round;
  stroke-dasharray: 314; stroke-dashoffset: 314;
  transition: stroke-dashoffset 1.6s var(--ease) 0.5s;
}
.ring-fg.run { stroke-dashoffset: calc(314 - 314 * var(--p, 0.94)); }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-label strong { font-size: 24px; line-height: 1; }
.ring-label span { font-size: 11px; color: var(--muted-foreground); margin-top: 4px; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.feed li {
  font-size: 14px; display: flex; align-items: center; gap: 10px;
  opacity: 0; transform: translateX(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  transition-delay: var(--d, 0s);
}
.feed li.d1 { --d: 0.2s; }
.feed li.d2 { --d: 0.5s; }
.feed li.d3 { --d: 0.8s; }
.feed li.d4 { --d: 1.1s; }
.is-visible .feed li, .feed li.run { opacity: 1; transform: none; }
.tag {
  font: 500 11px/1 "IBM Plex Mono", monospace; padding: 5px 7px; border-radius: 4px; white-space: nowrap;
}
.tag.ok { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.tag.warn { background: hsl(38 92% 50% / 0.16); color: hsl(32 90% 38%); }
.tag.info { background: color-mix(in srgb, var(--primary) 16%, transparent); color: var(--primary); }

/* Marquee strip */
.strip { border-block: 1px solid var(--border); overflow: hidden; background: var(--card); }
.marquee { padding: 18px 0; }
.marquee-track {
  display: flex; gap: 40px; width: max-content; animation: slide 38s linear infinite;
  font: 600 15px/1 Manrope, sans-serif; color: var(--muted-foreground);
}
.marquee-track span { display: inline-flex; align-items: center; gap: 40px; }
.marquee-track span::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }

/* Sections */
.section { max-width: 1280px; margin: 0 auto; padding: clamp(64px, 9vw, 120px) clamp(16px, 4vw, 48px); }
.tint { background: var(--card); border-block: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head p:not(.eyebrow) { color: var(--muted-foreground); font-size: 1.05rem; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-panel);
  padding: 26px; position: relative; overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--primary) 14%, transparent), transparent 60%);
  opacity: 0; transition: opacity 0.3s;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card p { color: var(--muted-foreground); margin: 0; font-size: 15px; }
.card-wide { grid-column: span 2; }
.card-icon {
  width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 18px;
  background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary);
}
.card-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Roles tabs */
.roles { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: start; max-width: 1280px; margin: 0 auto; padding: clamp(64px, 9vw, 120px) clamp(16px, 4vw, 48px); }
.roles-intro p:not(.eyebrow) { color: var(--muted-foreground); font-size: 1.05rem; }
.tab-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tab {
  font: 600 15px/1 Manrope, sans-serif; padding: 11px 16px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: transparent; color: var(--muted-foreground); cursor: pointer;
  transition: all 0.25s var(--ease);
}
.tab:hover { color: var(--foreground); }
.tab[aria-selected="true"] { background: var(--foreground); color: var(--background); border-color: var(--foreground); }
.tab-panel {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-panel);
  padding: 28px; animation: fadeUp 0.5s var(--ease);
}
.tab-panel ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.tab-panel li { padding-left: 26px; position: relative; font-size: 1.02rem; }
.tab-panel li::before {
  content: ""; position: absolute; left: 0; top: 0.55em; width: 12px; height: 12px; border-radius: 3px;
  background: var(--primary); transform: rotate(45deg) scale(0.6); opacity: 0.7;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Timeline */
.timeline {
  list-style: none; margin: 0; padding: 0; max-width: 1280px; margin-inline: auto;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative;
}
.timeline::before {
  content: ""; position: absolute; left: 0; right: 0; top: 14px; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent)); transform-origin: left; transform: scaleX(var(--progress, 0));
  transition: transform 1.4s var(--ease);
}
.timeline.is-visible::before { --progress: 1; transform: scaleX(1); }
.timeline li { padding: 0 18px 0 0; position: relative; }
.step {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--background); border: 2px solid var(--primary); color: var(--primary);
  font: 600 11px/1 "IBM Plex Mono", monospace; margin-bottom: 18px; position: relative; z-index: 1;
}
.timeline h3 { font-size: 1.02rem; }
.timeline p { color: var(--muted-foreground); font-size: 14.5px; }

/* Connected diagram */
.connect { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; max-width: 1280px; margin: 0 auto; padding: clamp(64px, 9vw, 120px) clamp(16px, 4vw, 48px); }
.connect-copy p:not(.eyebrow) { color: var(--muted-foreground); font-size: 1.05rem; }
.diagram svg { width: 100%; height: auto; }
.diagram .links line {
  stroke: var(--primary); stroke-width: 1.5; stroke-dasharray: 6 6; opacity: 0.55;
  animation: dash 1.2s linear infinite;
}
@keyframes dash { to { stroke-dashoffset: -24; } }
.diagram .hub { fill: var(--primary); }
.diagram .hub-text { fill: #fff; font: 700 15px Manrope, sans-serif; }
.diagram .hub-text.sub { font-weight: 500; font-size: 12px; }
.diagram .node circle { fill: var(--card); stroke: var(--border); stroke-width: 1.5; transition: stroke 0.3s; }
.diagram .node:hover circle { stroke: var(--primary); }
.diagram .node text { fill: var(--foreground); font: 600 13px Manrope, sans-serif; }

/* Security split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; max-width: 1280px; margin: 0 auto; }
.split > div:first-child p:not(.eyebrow) { color: var(--muted-foreground); font-size: 1.05rem; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; }
.checklist li { padding: 18px 0; border-bottom: 1px solid var(--border); color: var(--muted-foreground); }
.checklist li:first-child { border-top: 1px solid var(--border); }
.checklist strong { color: var(--foreground); display: block; margin-bottom: 4px; font-size: 1.02rem; }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--border); padding: 4px 0; }
.faq details:first-child { border-top: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 40px 18px 0; font-weight: 700; font-size: 1.08rem; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font: 400 26px/1 Manrope, sans-serif; color: var(--primary); transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted-foreground); padding-right: 40px; animation: fadeUp 0.35s var(--ease); }

/* Closing band */
.band { background: var(--foreground); color: var(--background); }
.band-inner { max-width: 1000px; margin: 0 auto; padding: clamp(64px, 9vw, 110px) clamp(16px, 4vw, 48px); text-align: center; }
.band h2 { color: inherit; }
.band p { opacity: 0.8; font-size: 1.1rem; }
.band .hero-actions { justify-content: center; }

/* Footer */
.footer { padding: 48px clamp(16px, 4vw, 48px) 28px; }
.footer-inner { max-width: 1280px; margin: 0 auto; display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-inner > div:first-child { display: grid; gap: 8px; }
.footer-inner .brand-mark { margin-bottom: 4px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; align-content: start; }
.footer-links a { text-decoration: none; color: var(--muted-foreground); font-size: 15px; }
.footer-links a:hover { color: var(--primary); }
.copy { max-width: 1280px; margin: 36px auto 0; color: var(--muted-foreground); font-size: 13px; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.timeline li.reveal:nth-child(2) { transition-delay: 0.08s; }
.timeline li.reveal:nth-child(3) { transition-delay: 0.16s; }
.timeline li.reveal:nth-child(4) { transition-delay: 0.24s; }
.timeline li.reveal:nth-child(5) { transition-delay: 0.32s; }
.bento .reveal:nth-child(2) { transition-delay: 0.05s; }
.bento .reveal:nth-child(3) { transition-delay: 0.1s; }
.bento .reveal:nth-child(4) { transition-delay: 0.15s; }
.bento .reveal:nth-child(5) { transition-delay: 0.2s; }
.bento .reveal:nth-child(6) { transition-delay: 0.25s; }
.bento .reveal:nth-child(7) { transition-delay: 0.3s; }

/* Responsive */
@media (max-width: 960px) {
  .hero, .roles, .connect, .split { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr 1fr; }
  .card-wide { grid-column: span 2; }
  .timeline { grid-template-columns: 1fr; gap: 28px; }
  .timeline::before { display: none; }
  .nav-links { display: none; }
}
@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; }
  .card-wide { grid-column: span 1; }
  .nav-cta .btn-ghost { display: none; }
  .dash { transform: none; }
  .dash-row { grid-template-columns: 1fr; justify-items: center; }
  .feed { width: 100%; }
  .hero-actions .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}

/* Book a demo dialog */
button.btn { cursor: pointer; font: inherit; }
.demo-dialog {
  width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border); border-radius: 14px;
  background: var(--background); color: var(--foreground); box-shadow: 0 24px 60px rgb(0 0 0 / 0.35);
}
.demo-dialog::backdrop { background: rgb(5 10 20 / 0.6); }
.demo-form, .demo-done { display: grid; gap: 8px; padding: 22px; }
.demo-head { display: flex; align-items: center; justify-content: space-between; }
.demo-head h2, .demo-done h2 { margin: 0; font-size: 22px; }
.demo-close { border: 0; background: transparent; color: var(--muted-foreground); font-size: 26px; line-height: 1; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.demo-close:hover { color: var(--foreground); }
.demo-intro { margin: 0 0 6px; font-size: 14px; }
.demo-form label { font-size: 13px; font-weight: 600; margin-top: 4px; }
.demo-form input {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: transparent; color: inherit; font: inherit; font-size: 15px;
}
.demo-form input:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.demo-form input[aria-invalid="true"] { border-color: #e5484d; }
.demo-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.demo-status { min-height: 18px; margin: 4px 0 0; font-size: 13px; color: #e5484d; }
.demo-submit { width: 100%; margin-top: 4px; }
.demo-submit[disabled] { opacity: 0.6; cursor: wait; }
