/*
  rainn.works — shared chrome for every page.

  Implemented from the claude.ai/design project "rainn.works"
  (bff857ab-daf4-45e0-ba95-3e5578cb12ec). The design ran on the dc runtime,
  which pulls React and Babel from unpkg before anything paints; this site is
  the same pages as plain HTML and CSS, with a little vanilla JS where a page
  has a live demo. The design had desktop widths only — the phone layout under
  the media queries at the bottom is ours.

  Each app page sets its own palette on <body>:
    --accent  the app colour        --well  the app's dark background
    --pale    text on the well      (rgb triplet, so alphas can be derived)
*/

:root {
  --paper: #F5F4F1;
  --ink: #151513;
  --ink-rgb: 21,21,19;
  --hover: #ECEAE3;
  --gutter: 64px;
  --sans: 'Instrument Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink); font-family: var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--ink); }
a:hover { color: #000; }
img { max-width: 100%; }
.wrap { max-width: 1200px; width: 100%; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.mono { font-family: var(--mono); }
.kicker { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; color: rgba(var(--ink-rgb),0.45); text-transform: uppercase; }
.gh { display: block; width: 17px; height: 17px; fill: currentColor; flex: none; }
.gh.sm { width: 15px; height: 15px; }

/* ── nav ───────────────────────────────────────────────────────────────── */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px var(--gutter); border-bottom: 1px solid rgba(var(--ink-rgb),0.08); position: relative; z-index: 10; background: var(--paper); }
.crumbs { display: flex; align-items: center; gap: 11px; min-width: 0; font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand span { color: var(--ink); }
.crumbs .brand span { color: rgba(var(--ink-rgb),0.5); transition: color 150ms; }
.crumbs .brand:hover span { color: var(--ink); }
.mark { width: 22px; height: 22px; border-radius: 7px; background: var(--ink); position: relative; flex: none; }
.mark::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--paper); }
.sep { color: rgba(var(--ink-rgb),0.3); font-weight: 400; }
.here { white-space: nowrap; }
.here-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }
.links { display: flex; align-items: center; gap: 32px; font-size: 14px; }
.links a, .foot a { text-decoration: none; color: rgba(var(--ink-rgb),0.65); transition: color 150ms; }
.links a:hover, .foot a:hover { color: var(--ink); }

/* ── footer ────────────────────────────────────────────────────────────── */
.site-foot { border-top: 1px solid rgba(var(--ink-rgb),0.1); margin-top: auto; background: var(--paper); }
.foot { padding-top: 28px; padding-bottom: 28px; display: flex; justify-content: space-between; align-items: center; gap: 12px 26px; flex-wrap: wrap; font-size: 13px; color: rgba(var(--ink-rgb),0.5); }
.foot div { display: flex; gap: 26px; flex-wrap: wrap; }
.foot a { color: rgba(var(--ink-rgb),0.5); }

/* ── app pages: the well and its pieces ────────────────────────────────── */
.app-body { flex: 1; background: var(--well); color: rgb(var(--pale)); }
.app-body .kicker { color: var(--accent); }
.app-body .hi { color: var(--accent); }
.sub { color: rgba(var(--pale),0.6); }
.faint { color: rgba(var(--pale),0.4); }
.rule { border-top: 1px solid rgba(var(--pale),0.08); }
.hero { padding-top: 96px; padding-bottom: 64px; }
.hero.center { text-align: center; padding-bottom: 0; }
.hero h1 { margin: 0; font-size: 68px; line-height: 1.0; letter-spacing: -0.035em; font-weight: 600; max-width: 18ch; text-wrap: balance; }
.hero.center h1 { margin: 0 auto; font-size: 66px; line-height: 1.02; max-width: 16ch; }
.hero .kicker { margin-bottom: 24px; }
.hero .lede { margin: 26px 0 0; font-size: 18px; line-height: 1.6; max-width: 52ch; text-wrap: pretty; }
.hero.center .lede { margin: 24px auto 0; line-height: 1.55; max-width: 46ch; }
.actions { margin-top: 36px; display: flex; align-items: center; flex-wrap: wrap; gap: 14px 26px; }
.hero.center .actions { justify-content: center; gap: 14px; margin-top: 32px; }
.btn { display: inline-block; font-size: 14.5px; font-weight: 600; color: var(--well); background: var(--accent); padding: 13px 24px; border-radius: 8px; text-decoration: none; transition: transform 150ms; }
.btn:hover { color: var(--well); transform: translateY(-1px); }
.btn.spring { transition: transform 250ms var(--spring); }
.btn.spring:hover { transform: scale(1.03); }
.btn.ghost { color: rgba(var(--pale),0.7); background: none; border: 1px solid rgba(var(--pale),0.2); padding: 12px 23px; transition: color 200ms, border-color 200ms; }
.btn.ghost:hover { color: rgb(var(--pale)); border-color: rgba(var(--pale),0.4); transform: none; }
.meta { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; color: rgba(var(--pale),0.4); text-transform: uppercase; }
a.meta { display: flex; align-items: center; gap: 8px; text-decoration: none; transition: color 150ms; }
a.meta:hover { color: var(--accent); }
.caption { margin: 18px 0 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: rgba(var(--pale),0.35); }

/* label-left / content-right rows ("WHY IT EXISTS", "PRICING") */
.split { padding-top: 88px; padding-bottom: 88px; display: grid; grid-template-columns: 220px 1fr; gap: 28px; }
.split h2, .feature h2 { margin: 0; font-size: 34px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; max-width: 24ch; text-wrap: balance; }
.split p, .feature p { margin: 16px 0 0; font-size: 16px; line-height: 1.6; max-width: 56ch; text-wrap: pretty; }
.split p.note, .feature p.note { margin-top: 14px; font-size: 14px; color: rgba(var(--pale),0.45); }
.feature { padding-top: 88px; padding-bottom: 88px; display: grid; gap: 64px; align-items: center; }
.feature .kicker { margin-bottom: 20px; }

/* the three-up card grid */
.cards { padding-top: 88px; padding-bottom: 88px; display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.card { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); border-radius: 16px; padding: 30px; transition: transform 400ms var(--spring), box-shadow 450ms; }
.card:hover { transform: translateY(-4px); box-shadow: 0 24px 64px -32px rgba(0,0,0,0.85); }
.card .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px; font-size: 20px; color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent); }
.card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; }
.card p { margin: 0; font-size: 14.5px; line-height: 1.55; color: rgba(var(--pale),0.6); }

/* plain principle columns */
.principles { padding-top: 72px; padding-bottom: 88px; display: grid; grid-template-columns: repeat(4,1fr); gap: 40px; }
.principles.three { grid-template-columns: repeat(3,1fr); }
.principles h3 { margin: 0; font-size: 16px; font-weight: 600; }
.principles p { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: rgba(var(--pale),0.55); }

/* demo panels */
.panel { background: var(--panel, rgba(0,0,0,0.25)); border: 1px solid rgba(var(--pale),0.1); border-radius: 12px; }
.duo { padding-bottom: 88px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }

/* archived projects: kept, clearly marked, never presented as current */
.archived-tag { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(var(--ink-rgb),0.55); border: 1px solid rgba(var(--ink-rgb),0.2); border-radius: 4px; padding: 3px 7px; white-space: nowrap; }
.archived-bar { background: #ECEAE3; border-bottom: 1px solid rgba(var(--ink-rgb),0.1); font-size: 14px; line-height: 1.5; color: rgba(var(--ink-rgb),0.7); }
.archived-bar .wrap { padding-top: 14px; padding-bottom: 14px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.archived-bar a { color: var(--ink); text-underline-offset: 3px; }

@keyframes softPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 60%, transparent); animation: softPulse 2.6s var(--ease) infinite; }

/* ── responsive ────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  :root { --gutter: 32px; }
  .hero h1, .hero.center h1 { font-size: 54px; }
  .cards { grid-template-columns: repeat(2,1fr); }
  .principles { grid-template-columns: repeat(2,1fr); }
  .feature { grid-template-columns: 1fr !important; gap: 40px; }
  .duo { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .nav { padding-top: 18px; padding-bottom: 18px; }
  .links { gap: 18px; font-size: 13.5px; }
  .links .opt { display: none; }
  .crumbs { font-size: 15px; gap: 8px; }
  .hero { padding-top: 64px; padding-bottom: 48px; }
  .hero h1, .hero.center h1 { font-size: 40px; }
  .hero .lede { font-size: 16.5px; }
  .split { grid-template-columns: 1fr; gap: 16px; padding-top: 64px; padding-bottom: 64px; }
  .split h2, .feature h2 { font-size: 28px; }
  .feature { padding-top: 64px; padding-bottom: 64px; }
  .cards { grid-template-columns: 1fr; padding-top: 64px; padding-bottom: 64px; }
  .principles, .principles.three { grid-template-columns: 1fr; gap: 28px; padding-top: 56px; padding-bottom: 64px; }
  .duo { padding-bottom: 64px; }
  .foot { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 380px) {
  .crumbs .brand span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
