/* ==========================================================================
   Agent AFK — Landing Page Styles
   Architecture: tokens → reset → layout → components → motion → responsive
   ========================================================================== */

/* --- 1. Design tokens ----------------------------------------------------- */
:root {
  /* Color */
  --color-bg:           #07070b;
  --color-bg-elev:      #0d0d14;
  --color-surface:      #11111a;
  --color-surface-2:    #161621;
  --color-border:       #1f1f2e;
  --color-border-soft:  #15151f;
  --color-accent:       #7c5cfc;
  --color-accent-soft:  #a48dff;
  --color-accent-glow:  rgba(124, 92, 252, 0.18);
  --color-text:         #e9e9f0;
  --color-text-muted:   #9b9bae;
  --color-text-faint:   #5b5b6f;
  --color-success:      #4ade80;
  --color-amber:        #fbbf24;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Fira Code", "Cascadia Code", ui-monospace, Menlo, Monaco, Consolas, monospace;

  /* Geometry */
  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 12px;

  /* Motion */
  --ease:           cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-fast:         120ms;
  --t-base:         180ms;
  --t-slow:         320ms;

  /* Layout */
  --container:      1120px;
  --gutter:         24px;
}

/* --- 2. Reset / base ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, h4, p, ul, ol, figure, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button {
  font-family: inherit;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 0;
}
code, kbd, pre, samp { font-family: var(--font-mono); }
::selection { background: var(--color-accent); color: var(--color-bg); }

/* Page ambient gradient */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1100px 600px at 80% -10%, rgba(124, 92, 252, 0.12), transparent 60%),
    radial-gradient(900px 500px at 0% 30%, rgba(56, 189, 248, 0.06), transparent 60%);
  z-index: 0;
}

/* --- 3. Layout primitives ------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 1;
}
.section {
  position: relative;
  padding-block: clamp(72px, 9vw, 128px);
  z-index: 1;
}
.section + .section { border-top: 1px solid var(--color-border-soft); }
.section__eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-soft);
  margin-bottom: 14px;
}
.section__title {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 38ch;
  margin-bottom: 14px;
}
.section__lede {
  color: var(--color-text-muted);
  font-size: 17px;
  max-width: 60ch;
  margin-bottom: 48px;
}

/* --- 4. Top bar ----------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(7, 7, 11, 0.7);
  border-bottom: 1px solid var(--color-border-soft);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand__mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--color-accent) 0%, #4ade80 100%);
  position: relative;
  box-shadow: 0 0 24px var(--color-accent-glow);
}
.brand__mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 3px;
  background: var(--color-bg);
}
.topbar__nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--color-text-muted);
}
.topbar__nav a { transition: color var(--t-fast) var(--ease); }
.topbar__nav a:hover { color: var(--color-text); }
@media (max-width: 640px) { .topbar__nav { display: none; } }

/* --- 5. Hero -------------------------------------------------------------- */
.hero {
  padding-block: clamp(72px, 12vw, 160px) clamp(56px, 8vw, 96px);
  text-align: left;
}
.hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  margin-bottom: 24px;
}
.hero__pill .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 10px var(--color-success);
}
.hero__title {
  font-size: clamp(40px, 6.5vw, 76px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin-bottom: 22px;
  max-width: 16ch;
}
.hero__title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--color-accent) 0%, #4ade80 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lede {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--color-text-muted);
  max-width: 56ch;
  margin-bottom: 36px;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 56px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: var(--radius);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 8px 24px var(--color-accent-glow);
}
.btn--primary:hover {
  background: var(--color-accent-soft);
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 12px 32px var(--color-accent-glow);
}
.btn--ghost {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text);
}
.btn--ghost:hover { border-color: var(--color-accent); background: var(--color-surface-2); }
.btn .icon { width: 16px; height: 16px; }

/* Terminal */
.terminal {
  background: var(--color-bg-elev);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.7), 0 0 0 1px var(--color-border-soft);
  max-width: 760px;
}
.terminal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}
.terminal__dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--color-border);
}
.terminal__dot:nth-child(1) { background: #ff5f57; }
.terminal__dot:nth-child(2) { background: #febc2e; }
.terminal__dot:nth-child(3) { background: #28c840; }
.terminal__title {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-text-faint);
}
.terminal__body {
  padding: 24px 22px;
  font-family: var(--font-mono);
  font-size: 14.5px;
  line-height: 1.7;
  min-height: 160px;
}
.terminal__line { display: block; }
.terminal__prompt { color: var(--color-success); margin-right: 8px; }
.terminal__cmd { color: var(--color-text); }
.terminal__cursor {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  vertical-align: -2px;
  background: var(--color-accent-soft);
  margin-left: 2px;
  animation: blink 1.05s steps(2, end) infinite;
}
.terminal__output {
  display: block;
  margin-top: 6px;
  color: var(--color-text-muted);
  white-space: pre-wrap;
}
@keyframes blink { 50% { opacity: 0; } }

/* --- 6. What it is (3-column features) ----------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 880px) { .feature-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color var(--t-base) var(--ease),
              transform var(--t-base) var(--ease),
              background var(--t-base) var(--ease);
}
.feature-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
  background: var(--color-surface-2);
}
.feature-card__icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--color-accent-glow);
  color: var(--color-accent-soft);
  border-radius: var(--radius);
}
.feature-card__title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.feature-card__desc { color: var(--color-text-muted); font-size: 14.5px; line-height: 1.6; }

/* --- 7. Skills grid ------------------------------------------------------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.skill-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  cursor: default;
  transition: border-color var(--t-base) var(--ease),
              transform var(--t-base) var(--ease),
              background var(--t-base) var(--ease);
  outline: none;
}
.skill-card:hover, .skill-card:focus-within {
  border-color: var(--color-accent);
  background: var(--color-surface-2);
  transform: translateY(-1px);
}
.skill-card__name {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-accent-soft);
  margin-bottom: 8px;
  display: inline-block;
}
.skill-card__summary {
  color: var(--color-text);
  font-size: 14.5px;
  line-height: 1.55;
}
.skill-card__details {
  max-height: 0;
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: 13.5px;
  line-height: 1.6;
  transition: max-height var(--t-base) var(--ease),
              margin-top var(--t-base) var(--ease),
              opacity var(--t-base) var(--ease);
  opacity: 0;
}
.skill-card:hover .skill-card__details,
.skill-card:focus-within .skill-card__details {
  max-height: 220px;
  margin-top: 12px;
  opacity: 1;
}
.skill-card__chevron {
  position: absolute;
  top: 22px; right: 20px;
  color: var(--color-text-faint);
  transition: color var(--t-fast) var(--ease), transform var(--t-base) var(--ease);
}
.skill-card:hover .skill-card__chevron,
.skill-card:focus-within .skill-card__chevron {
  color: var(--color-accent);
  transform: rotate(45deg);
}

/* --- 8. Architecture ------------------------------------------------------ */
.arch {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px clamp(20px, 4vw, 40px);
}
.arch__row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 720px) { .arch__row { grid-template-columns: 1fr; } }
.arch__node {
  background: var(--color-bg-elev);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px 18px;
  position: relative;
}
.arch__node-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: 8px;
}
.arch__node-title { font-weight: 600; margin-bottom: 4px; }
.arch__node-desc { color: var(--color-text-muted); font-size: 13.5px; line-height: 1.55; }
.arch__connector {
  height: 36px;
  display: grid; place-items: center;
  color: var(--color-text-faint);
}
.arch__hub {
  background: linear-gradient(180deg, var(--color-bg-elev), var(--color-surface));
  border: 1px solid var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-accent-glow);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.arch__hub-name {
  font-family: var(--font-mono);
  color: var(--color-accent-soft);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
}
.arch__hub-desc { color: var(--color-text-muted); font-size: 13.5px; }

/* --- 9. Quick Start ------------------------------------------------------- */
.steps { display: grid; gap: 14px; }
.step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 16px;
  align-items: start;
}
.step__num {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-accent-soft);
  margin-top: 4px;
}
.step__body { min-width: 0; }
.step__label {
  font-size: 14.5px;
  color: var(--color-text);
  margin-bottom: 8px;
}
.code-block {
  position: relative;
  background: var(--color-bg-elev);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 56px 14px 16px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--color-text);
  overflow-x: auto;
  white-space: pre;
  line-height: 1.55;
}
.code-block code { color: inherit; }
.copy-btn {
  position: absolute;
  top: 8px; right: 8px;
  height: 28px;
  min-width: 28px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: all var(--t-fast) var(--ease);
}
.copy-btn:hover { color: var(--color-text); border-color: var(--color-accent); }
.copy-btn[data-copied="true"] { color: var(--color-success); border-color: var(--color-success); }
.copy-btn .icon { width: 13px; height: 13px; }

/* --- 10. Access (waitlist) ------------------------------------------------ */
.access {
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg-elev) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 56px) clamp(24px, 5vw, 56px);
  position: relative;
  overflow: hidden;
}
.access::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: radial-gradient(600px 200px at 80% 0%, var(--color-accent-glow), transparent 60%);
  pointer-events: none;
}
.access > * { position: relative; z-index: 1; }
.access .section__title { margin-bottom: 14px; }
.access .section__lede { margin-bottom: 28px; }

.access-form {
  display: flex;
  gap: 10px;
  max-width: 520px;
  margin-bottom: 14px;
}
.access-form input[type="email"] {
  flex: 1;
  height: 44px;
  padding: 0 14px;
  background: var(--color-bg-elev);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 14.5px;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.access-form input[type="email"]::placeholder { color: var(--color-text-faint); }
.access-form input[type="email"]:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}
.access-form button { white-space: nowrap; }
@media (max-width: 520px) {
  .access-form { flex-direction: column; }
  .access-form input[type="email"] { width: 100%; flex: none; }
  .access-form button { width: 100%; justify-content: center; }
}

.access-note {
  font-size: 13px;
  color: var(--color-text-faint);
  margin-bottom: 32px;
  min-height: 1.4em;
}
.access-note[data-state="success"] { color: var(--color-success); }
.access-note[data-state="error"]   { color: #f87171; }

.access-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  font-size: 13.5px;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border-soft);
  padding-top: 24px;
}
.access-signals li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.access-signals li::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 8px var(--color-accent-glow);
}
.access-signals strong { color: var(--color-text); font-weight: 500; }

/* --- 11. Footer ----------------------------------------------------------- */
.footer {
  padding: 40px 0 56px;
  border-top: 1px solid var(--color-border-soft);
  color: var(--color-text-faint);
  font-size: 13.5px;
}
.footer__row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.footer a { color: var(--color-text-muted); transition: color var(--t-fast) var(--ease); }
.footer a:hover { color: var(--color-text); }
.footer__links { display: flex; gap: 18px; }

/* a11y utility */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --- 12. Nav dots --------------------------------------------------------- */
.nav-dots {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 30;
}
.nav-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--color-border);
  position: relative;
  transition: all var(--t-fast) var(--ease);
}
.nav-dot::after {
  content: attr(data-label);
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast) var(--ease);
}
.nav-dot:hover { border-color: var(--color-accent); background: var(--color-accent-glow); }
.nav-dot:hover::after { opacity: 1; }
.nav-dot[aria-current="true"] {
  background: var(--color-accent);
  border-color: var(--color-accent);
  box-shadow: 0 0 12px var(--color-accent-glow);
}
@media (max-width: 900px) { .nav-dots { display: none; } }

/* --- 13. Scroll-reveal ---------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 480ms var(--ease), transform 480ms var(--ease);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* --- 14. Reduced motion --------------------------------------------------- */
@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;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .terminal__cursor { animation: none; opacity: 1; }
}

/* --- 15. Mobile tweaks ---------------------------------------------------- */
@media (max-width: 640px) {
  .hero__cta { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .terminal__body { font-size: 13px; padding: 18px 16px; }
}
@media (max-width: 380px) {
  :root { --gutter: 18px; }
  .terminal__body { font-size: 12.5px; }
  .skill-card { padding: 18px 16px; }
}

/* --- 16. Focus ring ------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
