/* Understudy landing page. Palette and type follow the Claude Design source
   ("Understudy Website.html"); layout is rebuilt with classes so it can respond
   to narrow screens and satisfy a strict CSP (no inline styles). */

:root {
  --bg: #f6f8f8;
  --ink: #0e142d;
  --ink-2: #3a4160;
  --ink-3: #6b7190;
  --ink-4: #8a90a6;
  --purple: #8870fc;
  --purple-deep: #7358f0;
  --purple-text: #5a44d6;
  --purple-soft: #ede9ff;
  --purple-light: #b2a5ff;
  --line: #dfe2ec;
  --line-soft: #eceef4;
  --field: #d8dbe6;
  --code-bg: #f1f2f7;
  --green: #3ecf8e;
  --error: #c0392b;
  --max: 1120px;
  --pad: 32px;
  --font: 'Figtree', 'Avenir Next', system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--purple); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, pre { margin: 0; }
input, button { font-family: inherit; font-size: inherit; }
input::placeholder { color: var(--ink-4); }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 1px 6px;
  border-radius: 6px;
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Honeypot: off-screen, never in the tab order, but still a real field a bot will fill. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 10;
  background: #fff; color: var(--ink); padding: 8px 12px; border-radius: 8px; font-weight: 600;
}
.skip:focus { left: 8px; }

.eyebrow {
  font-size: 14px; font-weight: 700; color: var(--purple);
  letter-spacing: 0.04em; text-transform: uppercase;
}
.h1 {
  font-size: clamp(40px, 6vw, 60px); line-height: 1.04;
  letter-spacing: -0.03em; font-weight: 800; text-wrap: balance;
}
.h2 {
  font-size: 40px; line-height: 1.1;
  letter-spacing: -0.025em; font-weight: 800; text-wrap: balance;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; border: 0; cursor: pointer; white-space: nowrap;
  font-weight: 700; transition: background 0.15s ease, color 0.15s ease;
}
.btn-dark { background: var(--ink); color: #fff; padding: 13px 22px; font-size: 15px; }
.btn-dark:hover { background: var(--purple); color: #fff; }
.btn-purple { background: var(--purple); color: #fff; padding: 13px 22px; font-size: 15px; }
.btn-purple:hover { background: var(--purple-deep); color: #fff; }
.btn[disabled] { cursor: default; }
.btn[disabled]:hover { background: var(--purple); }

/* Nav */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-top: 22px; padding-bottom: 22px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.brand img { width: 34px; }
.brand:hover { color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; }
.nav-links a { color: var(--ink-2); }
.nav-links a:hover { color: var(--purple); }
.nav-links .nav-cta { background: var(--ink); color: #fff; padding: 9px 16px; border-radius: 999px; font-weight: 600; }
.nav-links .nav-cta:hover { background: var(--purple); color: #fff; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
  padding-top: 64px; padding-bottom: 40px;
}
.hero-copy { display: flex; flex-direction: column; gap: 24px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  background: var(--purple-soft); color: var(--purple-text);
  font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--purple); }
.lede { font-size: 20px; line-height: 1.5; color: var(--ink-2); max-width: 520px; text-wrap: pretty; }
.hero-note { font-size: 14px; color: var(--ink-3); }
.hero-note a { color: var(--purple-text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.hero-note a:hover { color: var(--purple); }

/* Waitlist form (hero + closing CTA) */
.waitlist { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 480px; margin-top: 4px; }
.waitlist-row { display: flex; gap: 10px; }
.field {
  flex: 1; min-width: 0; height: 50px; padding: 0 18px;
  border-radius: 999px; border: 1.5px solid var(--field);
  background: #fff; font-size: 16px; color: var(--ink);
}
.field:disabled { color: var(--ink-3); background: var(--code-bg); }
.waitlist .btn { height: 50px; padding: 0 22px; font-size: 16px; }
.form-status { font-size: 14px; color: var(--ink-3); padding-left: 18px; }
.form-status.is-error { color: var(--error); }
.form-status:empty { display: none; }

/* Slack demo */
.demo { position: relative; }
.demo-glow {
  position: absolute; inset: -30px -20px; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 60% at 60% 40%, #e6e1ff 0%, rgba(230, 225, 255, 0) 100%);
}
.demo-card {
  position: relative; z-index: 1; background: #fff; border-radius: 20px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(14, 20, 45, 0.10), 0 1px 0 rgba(14, 20, 45, 0.06);
}
.demo-head {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--line-soft);
}
.demo-channel { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; }
.demo-channel .hash { color: var(--ink-4); }
.demo-tabs { display: flex; gap: 6px; }
.demo-tab {
  border: 0; cursor: pointer; font-size: 12px; font-weight: 600; padding: 5px 10px;
  border-radius: 999px; white-space: nowrap; background: var(--code-bg); color: var(--ink-2);
}
.demo-tab:hover { background: var(--line); }
.demo-tab[aria-selected="true"] { background: var(--ink); color: #fff; }
.demo-panel { padding: 18px 18px 0; display: flex; flex-direction: column; gap: 16px; }
.msg { display: flex; gap: 12px; }
.msg-avatar { width: 36px; height: 36px; border-radius: 10px; flex: none; }
.avatar-sam { background: #ffd9a8; }
.avatar-priya { background: #c9e8ff; }
.avatar-marco { background: #d6f5e3; }
.msg-avatar-bot { background: var(--purple-soft); display: grid; place-items: center; }
.msg-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.msg-meta { display: flex; align-items: baseline; gap: 8px; }
.msg-meta strong { font-size: 15px; }
.msg-time { font-size: 12px; color: var(--ink-4); }
.msg-app { font-size: 11px; background: var(--code-bg); color: var(--ink-3); padding: 1px 6px; border-radius: 4px; font-weight: 600; }
.msg-text { font-size: 15px; color: var(--ink); text-wrap: pretty; }
.msg-reply { margin-left: 22px; padding-left: 14px; border-left: 2px solid var(--line-soft); }
.msg-cmd {
  font-family: var(--mono); font-size: 13.5px; background: var(--code-bg);
  padding: 2px 6px; border-radius: 6px; color: var(--purple-text);
}
.msg-code {
  font-family: var(--mono); font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; overflow-x: auto;
  background: #f6f7fb; border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 12px; color: var(--ink-2);
}
.msg-consulted { font-size: 13px; color: var(--ink-3); font-style: italic; }
.demo-status {
  margin: 16px 18px 18px 40px; padding-left: 14px;
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3);
}
.demo-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

/* Value strip */
.strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-top: 40px; padding-bottom: 24px; }
.card { background: #fff; border-radius: 18px; padding: 26px; display: flex; flex-direction: column; gap: 8px; }
.card-kicker { font-size: 13px; font-weight: 700; color: var(--purple); letter-spacing: 0.04em; text-transform: uppercase; }
.card-title { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.card p { color: var(--ink-2); font-size: 15px; }

/* How it works */
.section { padding-top: 72px; padding-bottom: 72px; }
.section-head { max-width: 640px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 44px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { display: flex; flex-direction: column; gap: 14px; padding: 28px; background: #fff; border-radius: 20px; }
.step-num {
  width: 40px; height: 40px; border-radius: 12px; background: var(--ink); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 17px;
}
.step-num.accent { background: var(--purple); }
.step h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.step p { color: var(--ink-2); font-size: 15px; text-wrap: pretty; }

/* Security */
.security { background: var(--ink); color: #fff; }
.security .wrap {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start;
  padding-top: 88px; padding-bottom: 88px;
}
.security-intro { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 32px; }
.security .eyebrow { color: var(--purple-light); }
.security-intro p { color: #b8bdd1; font-size: 17px; text-wrap: pretty; }
.security-link {
  align-self: flex-start; margin-top: 8px; color: #fff; font-weight: 600;
  border-bottom: 1.5px solid var(--purple); padding-bottom: 2px;
}
.security-link:hover { color: var(--purple-light); }
.security-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sec-card {
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 8px;
}
.sec-card h3 { font-weight: 700; font-size: 17px; }
.sec-card p { color: #b8bdd1; font-size: 14.5px; }

/* Hosting */
.hosting { padding-top: 88px; padding-bottom: 72px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.plan {
  background: #fff; border-radius: 22px; padding: 36px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 20px;
}
.plan.managed { background: var(--purple-soft); }
.plan-badge {
  position: absolute; top: 22px; right: 22px; background: var(--purple); color: #fff;
  font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; letter-spacing: 0.02em;
}
.plan-head { display: flex; flex-direction: column; gap: 6px; }
.plan-kicker { font-size: 14px; font-weight: 700; color: var(--ink-3); }
.managed .plan-kicker { color: var(--purple-text); }
.plan-name { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.plan-desc { font-size: 16px; color: var(--ink-2); }
.checks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--ink-2); }
.checks li { display: flex; gap: 10px; }
.checks li::before { content: "✓"; color: var(--purple); font-weight: 800; }
.plan .btn { align-self: flex-start; margin-top: auto; }

/* FAQ */
.faq { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; padding-top: 24px; padding-bottom: 88px; }
.faq-intro { display: flex; flex-direction: column; gap: 12px; }
.faq-intro p { color: var(--ink-2); font-size: 16px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 0; cursor: pointer; font-size: 18px; font-weight: 600; letter-spacing: -0.01em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--purple); }
.faq-icon {
  flex: none; width: 28px; height: 28px; border-radius: 50%; background: #fff;
  display: grid; place-items: center; color: var(--purple); font-weight: 700; font-size: 18px;
}
.faq-icon::before { content: "+"; }
.faq-item[open] .faq-icon::before { content: "–"; }
.faq-item p { padding: 0 48px 22px 0; color: var(--ink-2); font-size: 16px; text-wrap: pretty; }

/* Closing CTA */
.cta { padding-bottom: 88px; }
.cta-card {
  background: #fff; border-radius: 28px; padding: 64px 48px; box-shadow: 0 1px 0 rgba(14, 20, 45, 0.06);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px;
}
.cta-card img { width: 72px; }
.cta-card .h2 { max-width: 560px; }
.cta-card p { color: var(--ink-2); font-size: 17px; max-width: 480px; text-wrap: pretty; }
.cta-card .waitlist { max-width: 460px; margin-top: 0; }
.cta-card .field { background: var(--bg); }
.cta-card .form-status { text-align: center; padding-left: 0; }

/* Footer */
.footer { border-top: 1px solid var(--line); }
.footer .wrap {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px;
  padding-top: 32px; padding-bottom: 32px; font-size: 14px; color: var(--ink-3);
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { width: 24px; }
.footer-brand strong { color: var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 24px; font-weight: 500; }
.footer-links a { color: var(--ink-3); }
.footer-links a:hover { color: var(--purple); }

/* Responsive */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 40px; }
  .security .wrap { grid-template-columns: 1fr; gap: 40px; padding-top: 64px; padding-bottom: 64px; }
  .security-intro { position: static; }
  .faq { grid-template-columns: 1fr; gap: 32px; }
  .plans { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav-links { gap: 20px; }
  .nav-links a:not(.nav-cta) { display: none; }
}
@media (max-width: 760px) {
  :root { --pad: 20px; }
  .strip, .steps { grid-template-columns: 1fr; }
  .security-grid { grid-template-columns: 1fr; }
  .h2 { font-size: 32px; }
  .lede { font-size: 18px; }
  .section { padding-top: 56px; padding-bottom: 56px; }
  .hosting { padding-top: 64px; padding-bottom: 56px; }
  .cta-card { padding: 44px 24px; }
  .demo-glow { inset: -16px -8px; }
}
@media (max-width: 480px) {
  .waitlist-row { flex-direction: column; }
  .waitlist .btn { width: 100%; }
  .form-status { padding-left: 0; }
  .demo-tabs { width: 100%; }
  .demo-tab { flex: 1; text-align: center; }
  .faq-item summary { font-size: 17px; }
  .faq-item p { padding-right: 0; }
}

/* [hidden] must beat the display rules above (tab panels, anything toggled by JS). */
[hidden] { display: none !important; }
