/*
 * Landing page styles. No framework, no build step, no webfonts — the whole
 * page is two files and a favicon, which is why the CSP can be as strict as it
 * is and why it loads instantly on a phone.
 *
 * Palette matches the app itself, so the site and the product feel like one
 * thing. Contrast ratios on text colours are kept above 4.5:1 against their
 * backgrounds.
 */

:root {
  --bg: #141413;
  --bg-raised: #1c1c1a;
  --bg-sunken: #100f0f;
  --border: #2e2e29;
  --border-bright: #3d3d36;
  --text: #f5f4ef;
  --text-dim: #a8a49b;      /* 7.2:1 on --bg */
  --text-faint: #78746c;    /* 4.6:1 on --bg */
  --accent: #d97757;
  --accent-soft: #e89a80;
  --green: #7fb069;
  --radius: 14px;
  --radius-lg: 22px;
  --measure: 62ch;
  --page: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

code, pre, .fake-input { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; }

a { color: var(--accent-soft); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: -9999px;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 10;
}
.skip:focus { left: 0; top: 0; }

/* ── Nav ──────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  max-width: var(--page); margin: 0 auto; padding: 16px 24px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
}
.nav nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.nav nav a { color: var(--text-dim); text-decoration: none; font-size: 14.5px; }
.nav nav a:hover { color: var(--text); }
.nav nav a.ghost {
  color: var(--text); border: 1px solid var(--border-bright);
  padding: 7px 14px; border-radius: 999px;
}
.nav nav a.ghost:hover { border-color: var(--accent); color: var(--accent); }

.wordmark { font-weight: 650; letter-spacing: -.02em; font-size: 17px; }
/* Claude, Code, Cloud — and the cloud is the one this project adds, so it is the
   C that gets the accent. */
.wordmark .mark { color: var(--accent); }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  max-width: var(--page); margin: 0 auto; padding: 64px 24px 84px;
  /* Weighted towards the copy so the full `git clone` command and the button
     share one row, and so the headline doesn't wrap to an orphan word. The
     mockup still gets more than its 320px max. */
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr);
  gap: 56px; align-items: center;
}

.eyebrow {
  margin: 0 0 18px; font-size: 13px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-faint);
}

h1 {
  margin: 0 0 22px;
  font-size: clamp(2.1rem, 4.6vw, 3.3rem);
  line-height: 1.08; letter-spacing: -.035em; font-weight: 660;
  /* Distributes words evenly instead of leaving one stranded on the last line.
     Ignored by browsers that don't support it, which just get the default wrap. */
  text-wrap: balance;
}
h1 .accent { color: var(--accent); }

.lede {
  margin: 0 0 30px; max-width: var(--measure);
  font-size: clamp(1.02rem, 1.6vw, 1.16rem); color: var(--text-dim);
}

.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 22px; }

.btn {
  display: inline-block; padding: 12px 20px; border-radius: 999px;
  border: 1px solid var(--border-bright); color: var(--text);
  text-decoration: none; font-size: 15px; font-weight: 550;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: #241a15; }

/* The signup's control is a <summary>, which brings a disclosure triangle and a
   list-item display mode with it. Both have to go for it to read as a button —
   the second one in two spellings, because Safari still wants the pseudo-element. */
summary.btn { cursor: pointer; list-style: none; text-align: center; }
summary.btn::-webkit-details-marker { display: none; }
summary.btn::marker { content: ''; }

/* Click-to-copy install command. */
.copy {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 11px 14px 11px 18px;
  background: var(--bg-sunken); border: 1px solid var(--border); border-radius: 999px;
  color: var(--text); font: inherit; cursor: pointer;
  /* A <button> centres its text by default, which looks wrong once the command
     wraps to a second line on a narrow screen. */
  text-align: left;
}
.copy:hover { border-color: var(--border-bright); }
/* `anywhere` rather than nowrap: this is a 56-character URL, and on a narrow
   screen an unbreakable string sets the page's minimum width and pushes every
   section sideways. Wrapping it is ugly; a horizontally scrolling page is worse. */
.copy code { font-size: 13.5px; color: var(--text-dim); overflow-wrap: anywhere; min-width: 0; }
.copy-hint {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-faint); border-left: 1px solid var(--border); padding-left: 12px;
}
.copy.copied { border-color: var(--green); }
.copy.copied .copy-hint { color: var(--green); }

.fineprint { margin: 0; font-size: 14px; color: var(--text-faint); max-width: 52ch; }
.fineprint code { color: var(--text-dim); font-size: 13px; }

/* ── Phone mockup ─────────────────────────────────────────────────────── */
.phone-wrap { display: flex; justify-content: center; }
.phone {
  width: 100%; max-width: 320px;
  background: var(--bg-sunken);
  border: 1px solid var(--border-bright);
  border-radius: 30px; padding: 10px;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .02) inset;
  display: flex; flex-direction: column; gap: 8px;
}

.phone-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px 12px; border-bottom: 1px solid var(--border);
  color: var(--text-faint); font-size: 15px;
}
.phone-title {
  display: flex; flex-direction: column; align-items: center; line-height: 1.25;
  color: var(--text); font-size: 13.5px; font-weight: 560;
}
.phone-title em { font-style: normal; font-size: 10.5px; color: var(--text-faint); }

.phone-thread { display: flex; flex-direction: column; gap: 7px; padding: 4px 4px 8px; }

.bubble {
  padding: 9px 12px; border-radius: 14px; font-size: 12.5px; line-height: 1.5;
  max-width: 92%;
}
.bubble code { font-size: 11.5px; color: var(--accent-soft); }
.bubble.user {
  align-self: flex-end; background: #2d4a3e; color: #eaf3ee;
  border-bottom-right-radius: 5px;
}
.bubble.claude {
  align-self: flex-start; background: var(--bg-raised); color: var(--text-dim);
  border: 1px solid var(--border); border-bottom-left-radius: 5px;
}

.tool {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 10px; border-radius: 9px;
  background: var(--bg-raised); border: 1px solid var(--border);
  font-size: 11px; color: var(--text-faint);
  overflow: hidden;
}
.tool span { color: var(--text-dim); font-weight: 560; flex: none; }
/* min-width: 0 is what makes the ellipsis work. A flex item defaults to
   min-width: auto, so a nowrap string refuses to shrink below its full width and
   widens the whole mockup — and with it the page — instead of truncating. */
.tool code {
  font-size: 10.5px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
}
.tool.ok { border-color: color-mix(in srgb, var(--green) 40%, var(--border)); }
.tool.ok span { color: var(--green); }

.phone-composer {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; margin-top: auto;
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: 999px;
  font-size: 13px;
}
.phone-composer .fake-input { flex: 1; color: var(--text-faint); font-size: 11.5px; }
.phone-composer .send { color: var(--accent); }

/* ── Sections ─────────────────────────────────────────────────────────── */
.section, .band { max-width: var(--page); margin: 0 auto; padding: 76px 24px; }
.band {
  max-width: none; background: var(--bg-sunken);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.band > * { max-width: var(--page); margin-left: auto; margin-right: auto; }

h2 {
  text-wrap: balance;
  margin: 0 0 16px; font-size: clamp(1.6rem, 3.2vw, 2.15rem);
  letter-spacing: -.028em; font-weight: 640; line-height: 1.15;
}
h2.small { font-size: 1.3rem; color: var(--text-dim); margin-bottom: 28px; }

.section-lede { margin: 0 0 34px; max-width: var(--measure); color: var(--text-dim); }
.section-lede code { font-size: 13.5px; color: var(--text); }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

.card {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px 24px;
}
.card.plain { background: none; border-color: transparent; padding: 0; }
.card h3 {
  margin: 0 0 10px; font-size: 1.02rem; font-weight: 600; letter-spacing: -.012em;
}
.card p { margin: 0; color: var(--text-dim); font-size: 14.8px; }
.card p + p { margin-top: 12px; }
.card code { font-size: 13px; color: var(--accent-soft); }

.card ul { margin: 0; padding-left: 18px; color: var(--text-dim); font-size: 14.8px; }
.card li + li { margin-top: 9px; }
.card li strong { color: var(--text); font-weight: 600; }
.card .muted { margin-top: 16px; font-size: 13.5px; color: var(--text-faint); }

/* ── Pricing ──────────────────────────────────────────────────────────── */
.plan-eyebrow {
  margin: 0 0 4px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-faint);
}

.price {
  margin: 0 0 14px; font-size: 2.1rem; font-weight: 660;
  letter-spacing: -.03em; line-height: 1.1;
}
/* The qualifier goes under the number rather than beside it, because it is the
   more load-bearing half: "$0" on its own is a claim this page cannot make, and
   one set in smaller type on the same line is the oldest trick in pricing. */
.price span {
  display: block; margin-top: 4px;
  font-size: 13px; font-weight: 450; letter-spacing: 0; color: var(--text-faint);
}

.card.featured {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-raised));
}
.card.featured .price { color: var(--accent); }

.signup { margin-top: 26px; }
/* Full width so the sentence on it stays one line's worth of thought, and so the
   two routes inside line up under it. */
.signup .btn { display: block; width: 100%; }
/* Both of these are <p> inside .card, which sets `margin: 0` at equal weight —
   hence the doubled class, rather than a lost argument with specificity. */
.signup .signup-routes { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 0; }
.card .signup-note { margin: 10px 0 0; font-size: 13px; color: var(--text-faint); text-align: center; }

.signup-done { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.signup-done p { color: var(--text-dim); font-size: 14.5px; }
.signup-done strong { color: var(--text); }

/* ── Code blocks ──────────────────────────────────────────────────────── */
pre {
  margin: 0 0 34px; padding: 22px;
  background: var(--bg-sunken); border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto; font-size: 12.6px; line-height: 1.72;
  color: var(--text-dim);
  -webkit-overflow-scrolling: touch;
}
pre code { font-size: inherit; }
.diagram { color: var(--text-faint); }
.shell code { color: var(--text); }
.shell .c { color: var(--text-faint); }

/* ── Callouts ─────────────────────────────────────────────────────────── */
/* Shared by the security band and by the note under pricing saying that nobody is
   being charged yet. Both are claims a visitor would be right to be sceptical
   about, so both are stated in the page at full size rather than in small print. */
.warn {
  margin: 0 0 30px; padding: 20px 22px;
  background: color-mix(in srgb, var(--accent) 9%, var(--bg-raised));
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--border));
  border-left-width: 3px;
  border-radius: var(--radius);
}
.warn p { margin: 0; color: var(--text); max-width: var(--measure); font-size: 15.2px; }
/* The pricing one closes its section rather than opening it, and its sentence is
   long enough that the narrow measure above would leave a very tall box. */
.plain-warn { margin: 30px 0 0; }
.plain-warn p { max-width: 82ch; }
.security .more { margin: 30px 0 0; color: var(--text-dim); font-size: 14.8px; }

/* ── Footer ───────────────────────────────────────────────────────────── */
.footer {
  max-width: var(--page); margin: 0 auto; padding: 44px 24px 64px;
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 28px; flex-wrap: wrap;
  border-top: 1px solid var(--border);
}
.footer .muted { margin: 8px 0 0; font-size: 13.5px; color: var(--text-faint); }
.footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer nav a { color: var(--text-dim); text-decoration: none; font-size: 14px; }
.footer nav a:hover { color: var(--text); }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 40px; padding-bottom: 60px; }
  .phone-wrap { order: -1; }
  .phone { max-width: 290px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section, .band { padding: 56px 22px; }
}

@media (max-width: 560px) {
  .nav { flex-wrap: wrap; gap: 12px; padding: 14px 20px; }
  .nav nav { gap: 16px; }
  /* A wrapped command inside a 999px pill looks wrong, so square it off and
     stack the hint under the text. */
  .copy {
    width: 100%; flex-wrap: wrap; gap: 8px;
    border-radius: var(--radius); padding: 13px 15px;
  }
  .copy code { font-size: 12px; }
  .copy-hint { border-left: 0; padding-left: 0; }
  .btn { width: 100%; text-align: center; }
  pre { font-size: 11.4px; padding: 16px; }
}

/* The palette is already dark; this only helps if someone forces light mode. */
@media (prefers-contrast: more) {
  :root { --text-dim: #d3cfc6; --text-faint: #a09b92; --border: #4a4a42; }
}
