/* The landing page: what a visitor with no session meets at the root
   (accountpages/templates/landing.html). Standalone, like the sign-in door: it loads
   nothing of the console's own stylesheets. */
/* Layout: a left-set hero beside a draft plan and the pull-request stack it becomes; a four-step process in one row; an uneven two-column list of what you control; a closing setup checklist. */
:root {
  --bg: #f6f3f9;
  --surface: #ffffff;
  --surface-2: #eee8f5;
  --line: #ddd3e9;
  --fg: #1d1725;
  --muted: #5e5469;
  --accent: #6a4aa2;
  --accent-ink: #ffffff;
  --accent-soft: #e8dff5;
  --ember: #c4602a;
  --ok: #2c7a4c;
  --warn: #99600c;
  /* System faces only: the console's policy loads no font from another
     host. The display stack prefers a condensed face where one is
     installed. */
  --font-display: "Big Shoulders Display", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  --radius: 10px;
  --wrap: 72rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15121a; --surface: #211e26; --surface-2: #2a2531; --line: #3a3344;
    --fg: #ece6f3; --muted: #b1a7be; --accent: #c9aff0; --accent-ink: #24193a;
    --accent-soft: #33284a; --ember: #f09c5c; --ok: #82d0a0; --warn: #e6b35c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15121a; --surface: #211e26; --surface-2: #2a2531; --line: #3a3344;
  --fg: #ece6f3; --muted: #b1a7be; --accent: #c9aff0; --accent-ink: #24193a;
  --accent-soft: #33284a; --ember: #f09c5c; --ok: #82d0a0; --warn: #e6b35c;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.landing {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1rem/1.6 var(--font-body);
  padding-inline: clamp(16px, 4vw, 40px);
}
a { color: inherit; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin-inline: auto; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
code { font-family: var(--font-mono); font-size: 0.86em; }

/* Header: it stays at the top while the page scrolls, and takes a ground
   of its own once the page has moved (landing.js sets .is-scrolled). */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 1rem; flex-wrap: wrap;
}
/* The ground and its bottom rule reach past the gutters to both edges of
   the window by a shadow clipped to the header's own height: a shadow
   paints beyond the box without widening the page, as a wider box would. */
.top::before, .top::after {
  content: ""; position: absolute; z-index: -1; clip-path: inset(0 -100vmax);
  opacity: 0; transition: opacity 0.25s ease;
}
.top::before { inset: 0; background: var(--bg); box-shadow: 0 0 0 100vmax var(--bg); }
.top::after { inset: auto 0 0; height: 1px; background: var(--line); box-shadow: 0 0 0 100vmax var(--line); }
.top.is-scrolled::before, .top.is-scrolled::after { opacity: 1; }
section[id] { scroll-margin-top: 5rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand span { font: 800 1.3rem/1 var(--font-display); letter-spacing: 0.02em; text-transform: uppercase; }
.top nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.top nav a { text-decoration: none; color: var(--muted); font-size: 0.92rem; }
.top nav a:hover { color: var(--fg); }
.top nav a.top__door { color: var(--accent); font-weight: 600; }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
  padding-block: clamp(2rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5.5rem);
}
.hero h1 {
  font: 800 clamp(2.3rem, 4.6vw, 3.9rem)/1 var(--font-display);
  text-transform: uppercase; letter-spacing: -0.02em;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { margin-top: 1.5rem; font-size: 1.13rem; color: var(--muted); max-width: 34rem; }
.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 2rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.2rem; border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: 0.97rem; border: 1px solid transparent;
}
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { filter: brightness(1.08); }
.btn--ghost { border-color: var(--line); color: var(--fg); }
.btn--ghost:hover { background: var(--surface-2); }
.vendors { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; color: var(--muted); font-size: 0.88rem; }
.vendors strong { color: var(--fg); font-weight: 600; }

/* The example cards */
.demo { display: grid; gap: 1rem; min-width: 0; }
.example-tag {
  justify-self: start; font: 500 0.7rem/1 var(--font-mono); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.15rem 1.25rem; min-width: 0;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -28px rgba(40, 20, 70, 0.35);
}
.card__head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.card__kind { font: 500 0.75rem/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.pill {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.25rem 0.6rem; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap;
}
.pill--warn { color: var(--warn); }
.pill--ok { color: var(--ok); }
.pill--hot { color: var(--ember); }
.dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; flex: none; }
.pill--hot .dot { animation: glow 1.6s ease-in-out infinite; }
@keyframes glow { 50% { opacity: 0.35; transform: scale(0.8); } }
.card__task { margin-top: 0.8rem; font-weight: 600; line-height: 1.45; }
.steps { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.55rem; }
.steps li {
  display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: 0.6rem; align-items: start;
  padding: 0.6rem 0.7rem; border-radius: 8px; background: var(--surface-2);
}
.steps .n { font: 600 0.8rem/1.7 var(--font-mono); color: var(--accent); }
.steps .t { font-size: 0.93rem; font-weight: 500; }
.steps .m { font-size: 0.8rem; color: var(--muted); }
.card__buttons { display: flex; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }
.fake-btn {
  padding: 0.45rem 0.9rem; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
  border: 1px solid var(--line); color: var(--muted);
}
.fake-btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.stack { list-style: none; margin: 0.9rem 0 0; padding: 0; display: grid; gap: 0; }
.stack li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.25rem 0.75rem; align-items: center;
  padding: 0.7rem 0 0.7rem 1.1rem; border-left: 2px solid var(--line); position: relative;
}
.stack li::before {
  content: ""; position: absolute; left: -6px; top: 1.05rem; width: 10px; height: 10px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line);
}
.stack li.done::before { border-color: var(--ok); background: var(--ok); }
.stack li.hot::before { border-color: var(--ember); }
.stack .pr { font-weight: 600; font-size: 0.93rem; }
.stack .br { grid-column: 1 / -1; font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted); overflow-wrap: anywhere; }
.card__foot { margin-top: 0.75rem; font-size: 0.82rem; color: var(--muted); }

/* Sections */
section.block { padding-block: clamp(3rem, 7vw, 5.5rem); border-top: 1px solid var(--line); }
.kicker { font: 500 0.78rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.block h2 {
  margin-top: 0.8rem; font: 800 clamp(1.75rem, 3.2vw, 2.5rem)/1.05 var(--font-display);
  text-transform: uppercase; letter-spacing: -0.015em; max-width: 26ch;
}
.block .intro { margin-top: 1rem; color: var(--muted); max-width: 40rem; font-size: 1.05rem; }

/* How it works: a real sequence, so it is numbered */
.flow { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; counter-reset: step; }
.flow li {
  counter-increment: step; display: grid; gap: 0.6rem; align-content: start; padding-top: calc(1rem + 3px);
  /* The rule above each step is a background, so it can be drawn in. */
  background: linear-gradient(var(--accent), var(--accent)) top left / 100% 3px no-repeat;
}
.flow li::before { content: counter(step, decimal-leading-zero); font: 800 2rem/1 var(--font-display); letter-spacing: -0.02em; color: var(--accent); }
.flow h3 { font-size: 1.15rem; }
.flow p { color: var(--muted); font-size: 0.95rem; }
.press { font-size: 0.84rem; color: var(--muted); }
.press code { color: var(--fg); background: var(--surface-2); padding: 0.1rem 0.4rem; border-radius: 5px; }

/* What you control */
.controls { margin-top: 2.5rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; }
.control { padding-block: 1.4rem; border-bottom: 1px solid var(--line); display: grid; gap: 0.4rem; min-width: 0; }
.control h3 { font-size: 1.12rem; }
.control p { color: var(--muted); font-size: 0.97rem; max-width: 34rem; }
.control .ui { font: 500 0.76rem/1.4 var(--font-mono); color: var(--accent); }

/* Ranks */
.ranks { margin-top: 2.2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.rank {
  padding: 0.55rem 0.9rem; border-radius: 8px; border: 1px solid var(--line); background: var(--surface);
  font-family: var(--font-mono); font-size: 0.85rem;
}
.rank--base { background: var(--accent-soft); border-color: transparent; }
.arrow { color: var(--muted); font-size: 0.9rem; }
.two { margin-top: 2.5rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.two p { color: var(--muted); }
.two p + p { margin-top: 0.8rem; }
.record { display: grid; gap: 0.75rem; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.fact { background: var(--surface-2); border-radius: 8px; padding: 0.6rem 0.7rem; min-width: 0; }
.fact small { display: block; font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.fact b { font-weight: 600; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.call { margin-top: 0.6rem; font: 0.76rem/1.5 var(--font-mono); color: var(--muted); overflow-wrap: anywhere; }
.call b { color: var(--fg); font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; font-family: var(--font-mono); font-size: 0.8rem; }
.timeline li { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: 0.6rem; color: var(--muted); }
.timeline time { color: var(--fg); font-variant-numeric: tabular-nums; }

/* Rules strip */
.rules { margin-top: 2.5rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
.rules div { display: grid; gap: 0.4rem; }
.rules b { font: 800 1.1rem/1.15 var(--font-display); text-transform: uppercase; letter-spacing: -0.005em; }
.rules p { color: var(--muted); font-size: 0.94rem; }

/* Get started */
.start { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; counter-reset: c; }
.checklist li {
  counter-increment: c; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 0.75rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1rem;
}
.checklist li::before {
  content: counter(c); display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font: 600 0.9rem/1 var(--font-mono);
}
.checklist b { display: block; }
.start .note { margin-top: 1rem; color: var(--muted); font-size: 0.9rem; }
.checklist span { color: var(--muted); font-size: 0.93rem; }

footer { padding-block: 2rem 3rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: 0.88rem; }
footer nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
footer a { text-decoration: none; }
footer a:hover { color: var(--fg); }

@media (max-width: 960px) {
  .hero, .two, .start { grid-template-columns: minmax(0, 1fr); }
  .flow, .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .flow, .rules, .controls { grid-template-columns: minmax(0, 1fr); }
  .top nav { gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pill--hot .dot { animation: none; }
}

/* Motion. Everything below runs only for a reader whose system has not
   asked for less of it. The hero tells its one story as the page loads:
   the headline and the draft plan arrive, Approve & run is pressed, and
   the stack of pull requests fills in. Further down, what scrolls into
   view rises into place once; landing.js marks it, and nothing is hidden
   unless that script is running (.reveal-ready). */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
  @keyframes pop { from { transform: scale(0); } }
  @keyframes press {
    40% { transform: scale(0.93); box-shadow: 0 0 0 0 var(--accent-soft); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px var(--accent-soft); }
    100% { box-shadow: 0 0 0 12px transparent; }
  }

  .hero h1 { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .lede { animation: rise 0.7s 0.12s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero .actions { animation: rise 0.7s 0.22s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .vendors { animation: rise 0.7s 0.32s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

  .demo .example-tag { animation: rise 0.5s 0.2s ease-out both; }
  .demo .card:first-of-type { animation: rise 0.6s 0.3s ease-out both; }
  .demo .steps li { animation: rise 0.45s ease-out both; }
  .demo .steps li:nth-child(1) { animation-delay: 0.5s; }
  .demo .steps li:nth-child(2) { animation-delay: 0.62s; }
  .demo .steps li:nth-child(3) { animation-delay: 0.74s; }
  .demo .fake-btn--primary { animation: press 0.7s 1.05s ease-out both; }
  .demo .card:last-of-type { animation: rise 0.6s 1.35s ease-out both; }
  .demo .stack li { animation: rise 0.45s ease-out both; }
  .demo .stack li::before { animation: pop 0.35s ease-out both; }
  .demo .stack li:nth-child(1), .demo .stack li:nth-child(1)::before { animation-delay: 1.55s; }
  .demo .stack li:nth-child(2), .demo .stack li:nth-child(2)::before { animation-delay: 1.75s; }
  .demo .stack li:nth-child(3), .demo .stack li:nth-child(3)::before { animation-delay: 1.95s; }
  .demo .card__foot { animation: rise 0.45s 2.15s ease-out both; }

  .btn { transition: transform 0.15s ease, filter 0.15s ease, background-color 0.15s ease; }
  .btn:hover { transform: translateY(-1px); }

  /* What scrolls into view. A single [data-reveal] rises as one; a group
     rises child by child. */
  [data-reveal], [data-reveal="group"] > * {
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .reveal-ready [data-reveal]:not([data-reveal="group"]):not(.is-visible),
  .reveal-ready [data-reveal="group"]:not(.is-visible) > * {
    opacity: 0; transform: translateY(18px);
  }
  [data-reveal="group"] > :nth-child(2) { transition-delay: 0.08s; }
  [data-reveal="group"] > :nth-child(3) { transition-delay: 0.16s; }
  [data-reveal="group"] > :nth-child(4) { transition-delay: 0.24s; }
  [data-reveal="group"] > :nth-child(5) { transition-delay: 0.32s; }
  [data-reveal="group"] > :nth-child(n+6) { transition-delay: 0.4s; }
  h2[data-reveal] { transition-delay: 0.06s; }
  .intro[data-reveal] { transition-delay: 0.12s; }

  /* Each step's rule is drawn left to right as the steps arrive. */
  .flow li { transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), background-size 0.8s cubic-bezier(0.6, 0, 0.2, 1); }
  .reveal-ready .flow:not(.is-visible) li { background-size: 0% 3px; }
}

