/* Rovyn marketing site — editorial, serif-led, quiet.
   Serif is the editor's voice; the system sans is the app's.

   Colour comes from one place: assets/rovyn-logo.png — but only as the ribbon.
   The page itself is ink and paper, warmed and pulled slightly green, so the
   tile stays the one colourful object. The ribbon is rationed —
   it is allowed on the mark itself, the nav's current/hover tick, the primary
   CTA's ring, the edition card's spine, and one blurred ambient wash behind
   the hero card. It never sits under text and never carries text: no single
   text colour clears AA across the whole ramp (white fails on the ember and
   cyan ends, ink fails on the violet), so anything legible sits on a solid. */

:root {
  /* --- the ribbon, sampled from assets/rovyn-logo.png --- */
  --brand-ember: #fbad60;
  --brand-coral: #fb5e78;
  --brand-magenta: #ff29b7;
  --brand-violet: #722af0;
  --brand-blue: #2e83fd;
  --brand-cyan: #04b3ff;
  --brand-navy: #0a0f3a; /* the tile ground */

  --ribbon: linear-gradient(
    100deg,
    var(--brand-ember) 0%,
    var(--brand-coral) 20%,
    var(--brand-magenta) 40%,
    var(--brand-violet) 62%,
    var(--brand-blue) 83%,
    var(--brand-cyan) 100%
  );

  /* --- surfaces + ink (light) --- */
  --paper: #faf8f4; /* warm paper */
  --paper-tint: #f4f1ea; /* the one alternate band */
  --ink: #1d221f; /* near-black, pulled warm — ink, not screen-navy */
  --ink-secondary: #5b615c;
  --hairline: rgba(29, 34, 31, 0.13);
  --card: #ffffff;
  --card-ghost: rgba(29, 34, 31, 0.035);
  --card-shadow: 0 14px 36px rgba(22, 30, 26, 0.09);

  /* --- accent: the app's Relay Cyan, one shade deeper for paper --- */
  --accent: #056373;
  --accent-strong: #04505c;

  --btn-fill: #16211d;
  --btn-ink: #faf8f4;
  --glow-opacity: 0.5;

  --serif: "Iowan Old Style", "Palatino Nova", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  --mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d1211; /* warm ink — the logo tile stays the only navy object */
    --paper-tint: #111715;
    --ink: #ebe8e0;
    --ink-secondary: #9ba39d;
    --hairline: rgba(235, 232, 224, 0.15);
    --card: #16201c;
    --card-ghost: rgba(235, 232, 224, 0.045);
    --card-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);

    --accent: #4cd9e4; /* exactly the app's dark Relay Cyan */
    --accent-strong: #7fe6ee;

    --btn-fill: #1b2a26;
    --btn-ink: #ffffff;
    --glow-opacity: 0.42;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* The hero wash reaches past the container on purpose; nothing should be able
   to scroll sideways because of it.
   Must stay `hidden`, not `clip`: overflow clip on the root makes the
   whole viewport unscrollable in Chrome. */
html,
body {
  overflow-x: hidden;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

.container.wide {
  max-width: 980px;
}

/* ---------- the mark ---------- */

/* The asset is the full uncropped tile, whose squircle corners sit on white.
   Clipping at 25% — a hair wider than Apple's 0.2237 icon ratio — trims into
   the navy so no white survives at any size (same trick as RovynMark.swift). */
.mark {
  display: block;
  border-radius: 25%;
  flex-shrink: 0;
}

/* ---------- nav ---------- */

nav {
  border-bottom: 1px solid var(--hairline);
}

nav .container.wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  padding-bottom: 15px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}

.wordmark .mark {
  width: 28px;
  height: 28px;
}

nav .links {
  display: inline-flex;
  align-items: center;
  gap: 22px;
}

nav .links a {
  position: relative;
  color: var(--ink-secondary);
  text-decoration: none;
  font-size: 14.5px;
  padding-bottom: 2px;
}

/* The ribbon marks where you are. */
nav .links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--ribbon);
  opacity: 0;
  transition: opacity 0.15s ease;
}

nav .links a:hover,
nav .links a[aria-current="page"] {
  color: var(--ink);
}

nav .links a:hover::after,
nav .links a[aria-current="page"]::after {
  opacity: 1;
}

@media (max-width: 420px) {
  nav .links {
    gap: 16px;
  }
  nav .links a {
    font-size: 14px;
  }
  .wordmark {
    font-size: 20px;
    gap: 8px;
  }
  .wordmark .mark {
    width: 25px;
    height: 25px;
  }
}

/* ---------- typography ---------- */

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.18;
}

h1 {
  font-size: clamp(34px, 6vw, 52px);
  letter-spacing: -0.01em;
}
h2 {
  font-size: 26px;
  margin-bottom: 14px;
}
h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

p {
  margin-bottom: 1em;
}

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

a:hover {
  color: var(--accent-strong);
}

.secondary {
  color: var(--ink-secondary);
}
.small {
  font-size: 14.5px;
}

em.editorial {
  font-family: var(--serif);
  font-style: italic;
}

/* ---------- hero ---------- */

.hero {
  padding: 76px 0 68px;
}

.hero .container.wide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: 48px;
  align-items: center;
}

@media (max-width: 800px) {
  .hero {
    padding: 52px 0 56px;
  }
  .hero .container.wide {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  /* Stacked, the demo would otherwise stretch to a tablet's full measure. */
  .hero .shelf {
    max-width: 420px;
    margin: 0 auto;
  }
}

.hero p.lede {
  font-size: 19px;
  color: var(--ink-secondary);
  margin-top: 20px;
  max-width: 34em;
}

.hero .cta-row {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn {
  display: inline-block;
  font-size: 15.5px;
  font-weight: 500;
  text-decoration: none;
  padding: 11px 20px;
  border-radius: 11px;
  border: 1.5px solid transparent;
}

/* The live CTA wears the ribbon — as a ring, never as a text ground. */
.btn.primary {
  background: linear-gradient(var(--btn-fill), var(--btn-fill)) padding-box, var(--ribbon)
    border-box;
  color: var(--btn-ink);
  box-shadow: 0 10px 24px -14px rgba(8, 72, 82, 0.6);
}

.btn.primary:hover {
  color: var(--btn-ink);
  box-shadow: 0 12px 28px -12px rgba(8, 72, 82, 0.75);
}

.btn.quiet {
  color: var(--ink);
  border: 1px solid var(--hairline);
}

.btn.quiet:hover {
  color: var(--ink);
  border-color: var(--ink-secondary);
}

.cta-note {
  font-size: 13.5px;
  color: var(--ink-secondary);
  width: 100%;
}

/* ---------- the edition card ---------- */

.shelf {
  position: relative;
}

/* The one ambient use of the ribbon: a soft wash behind the card, never
   behind text. Softness comes from the gradients' own falloff — a filter
   blur here creates a huge composited layer that hangs Chrome on scroll. */
.shelf .glow {
  position: absolute;
  inset: -16% -10%;
  z-index: 0;
  pointer-events: none;
  opacity: var(--glow-opacity);
  background: radial-gradient(58% 52% at 26% 22%, rgba(240, 178, 90, 0.38), transparent 62%),
    radial-gradient(52% 48% at 78% 26%, rgba(10, 150, 165, 0.3), transparent 62%),
    radial-gradient(54% 52% at 60% 88%, rgba(122, 188, 150, 0.28), transparent 62%);
}

/* The hero demo: a real screen recording, cropped to the phone. The video
   file mats the phone on the dark theme's paper (#0d1211); .demo-crop crops
   that matting off so the device sits directly on the page — one frame, not
   two. Numbers are the baked geometry: phone = 816x1660 at (132,48) inside
   1080x1920, so width 1080/816, left 132/816, top (48/1920)x(1920/1080)x(1080/816). */
.hero-demo {
  position: relative;
  z-index: 2;
  max-width: 420px;
  margin: 0 auto;
}

.demo-crop {
  aspect-ratio: 816 / 1660;
  overflow: hidden;
  border-radius: 20px;
  background: #0d1211;
  box-shadow: var(--card-shadow);
}

.demo-crop .demo-video {
  display: block;
  width: 132.353%;
  max-width: none;
  margin: -5.882% 0 0 -16.176%;
}

.edition {
  position: relative;
  z-index: 2;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 24px 22px 18px;
  box-shadow: var(--card-shadow);
}

/* The issue's spine. */
.edition::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--ribbon);
}

.edition .goal {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.25;
}

.edition .credit {
  font-size: 13px;
  color: var(--ink-secondary);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 7px;
}

/* Monochrome, like the app's AssistantMonogram — this is the assistant's
   letter, not Rovyn's mark. */
.monogram {
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px 6px;
}

.edition .episodes {
  margin-top: 16px;
  border-top: 1px solid var(--hairline);
}

.edition .ep {
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
}

.edition .ep:last-child {
  border-bottom: none;
}

.edition .ep .title {
  font-size: 14.5px;
  font-weight: 600;
}

.edition .ep .meta {
  font-size: 12.5px;
  color: var(--ink-secondary);
}

/* The quote bar stays monochrome — the app's accent constitution keeps it so. */
.edition .ep .why {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink);
  margin-top: 5px;
  padding-left: 10px;
  border-left: 2px solid var(--hairline);
}

/* ---------- the player strip ---------- */

/* What the edition becomes once it is playing. Same card material as the
   edition, no spine — the spine belongs to the object your assistant made. */
.player {
  position: relative;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 13px 15px 14px;
}

.player .now {
  display: flex;
  align-items: center;
  gap: 11px;
}

.player .pbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border: 1px solid var(--hairline);
  border-radius: 999px;
}

/* A pure-CSS play triangle: no asset, no icon font. */
.player .pbtn::before {
  content: "";
  margin-left: 2px;
  border-left: 8px solid var(--ink);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.player .ttitle {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
}

.player .tmeta {
  display: block;
  font-size: 12px;
  color: var(--ink-secondary);
}

.player .bar {
  height: 3px;
  border-radius: 3px;
  margin-top: 12px;
  background: var(--hairline);
}

.player .bar span {
  display: block;
  width: 23%;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
}

/* The line the whole product turns on, so it is labelled rather than implied. */
.player .why-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  margin-top: 13px;
}

.player .why {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink);
  margin-top: 5px;
  padding-left: 10px;
  border-left: 2px solid var(--hairline);
}

/* ---------- the four beats ---------- */

.beats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.beats li {
  padding-top: 13px;
  border-top: 1px solid var(--hairline);
}

.beats .n {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--accent);
}

.beats h3 {
  font-size: 17px;
  margin: 4px 0 5px;
}

.beats p {
  font-size: 14.5px;
  color: var(--ink-secondary);
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .beats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }
}

@media (max-width: 440px) {
  .beats {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* ---------- scenarios: prompt → edition → outcome ---------- */

/* The same edition component, scaled down to sit inside a scenario. It keeps
   the spine (the one rationed ribbon moment) and loses the shadow, so the
   hero card stays the only object that appears to float. */
.edition.mini {
  padding: 16px 16px 14px;
  border-radius: 14px;
  box-shadow: none;
}

/* Thinner spine than the hero card's: same object, quieter, so several of
   them on one screen never out-shout the one they're derived from. */
.edition.mini::before {
  height: 2px;
}

.edition.mini .goal {
  font-size: 17px;
}

.edition.mini .credit {
  font-size: 12px;
  margin-top: 5px;
}

.edition.mini .episodes {
  margin-top: 12px;
}

.edition.mini .ep {
  padding: 10px 0;
}

.edition.mini .ep .title {
  font-size: 13.5px;
}

.edition.mini .ep .meta {
  font-size: 12px;
}

.edition.mini .ep .why {
  font-size: 13.5px;
  line-height: 1.45;
}

/* A card that opens straight into episodes has nothing above to divide from. */
.edition .episodes.bare {
  margin-top: 0;
  border-top: none;
}

.edition .more {
  font-size: 12.5px;
  color: var(--ink-secondary);
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
}

/* The user's own words: a filled block, not the hairline-ruled quote the
   assistant's `why` uses — so the two voices never read as the same voice. */
.edition .note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--card-ghost);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 12px;
}

.scenario {
  margin-top: 26px;
}

/* The ask, in the shape it's actually made in. */
.prompt {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--card-ghost);
  border: 1px solid var(--hairline);
  border-radius: 14px 14px 14px 4px;
  padding: 12px 14px;
}

.prompt .who {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  margin-bottom: 4px;
}

.prompt .said {
  display: block;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
}

/* The hairline that carries the eye from the ask to what came back. */
.flow {
  width: 1px;
  height: 24px;
  margin: 10px auto;
  background: var(--hairline);
}

.scenario .outcome {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-secondary);
  margin: 14px 0 0;
}

/* Ask on the left, what came back on the right — and, in the feedback band,
   the note in and the corrected edition out. */
.loop-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

/* One short ask against one tall card: centre them, rather than leaving the
   bubble stranded at the top of its column. */
.scenario.ask .loop-grid {
  align-items: center;
}

.loop-step .cap {
  font-size: 13px;
  color: var(--ink-secondary);
  margin-bottom: 10px;
}

.loop-arrow {
  align-self: center;
  color: var(--ink-secondary);
  font-size: 20px;
  line-height: 1;
}

.loop-arrow::before {
  content: "→";
}

@media (max-width: 760px) {
  .loop-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .loop-arrow {
    justify-self: center;
  }
  .loop-arrow::before {
    content: "↓";
  }
}

/* ---------- sections ---------- */

section.band {
  border-top: 1px solid var(--hairline);
  padding: 60px 0;
}

section.band.tint {
  background: var(--paper-tint);
}

@media (max-width: 700px) {
  section.band {
    padding: 48px 0;
  }
}

/* The trust band: protocol, MCP, and privacy — at the bottom,
   where the people who care about them are already looking, and where they
   never interrupt the pitch. */
.colophon-band {
  padding: 44px 0 40px;
}

.colophon-band h2 {
  font-size: 22px;
  margin-bottom: 16px;
}

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

.colophon-grid p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-secondary);
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .colophon-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- article pages (privacy, connect, docs) ---------- */

main.article {
  padding: 56px 0 72px;
}

main.article header {
  margin-bottom: 36px;
}

main.article header p.dateline {
  font-size: 14px;
  color: var(--ink-secondary);
  margin-top: 10px;
}

main.article h2 {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
}

main.article ul,
main.article ol {
  margin: 0 0 1em 1.3em;
}
main.article li {
  margin-bottom: 0.45em;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  margin-bottom: 1.2em;
}

th,
td {
  text-align: left;
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}

th {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink-secondary);
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--card-ghost);
  border: 1px solid var(--hairline);
  border-radius: 5px;
  padding: 1px 5px;
}

/* copy block on /connect */

.copyblock {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 10px 0 18px;
}

.copyblock code {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  overflow-x: auto;
  white-space: nowrap;
  flex: 1;
}

.copyblock button {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  background: var(--card-ghost);
  border: 1px solid var(--hairline);
  border-radius: 7px;
  padding: 6px 12px;
  cursor: pointer;
  flex-shrink: 0;
}

.copyblock button:hover {
  border-color: var(--ink-secondary);
}

/* the setup companion on /connect (ux-v1 §3.11 Amendment 15): the offer of a
   prompt that walks you through the steps in chat. Quiet and shut by default —
   the numbered steps above it stay the primary path. */

details.chatguide {
  margin: 0 0 18px;
}

details.chatguide summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-secondary);
  padding: 4px 0;
}

details.chatguide summary:hover {
  color: var(--ink);
}

details.chatguide > p {
  margin: 6px 0 0;
}

/* the companion prompt is a paragraph, not an address: it wraps rather than
   scrolling sideways like the URL blocks do, and the button sits at its top.
   (Modifier is `.companion`, not `.prompt` — `.prompt` is the home page's chat
   bubble and would drag its own flex column in here.) */
.copyblock.companion {
  align-items: flex-start;
}

.copyblock.companion code {
  white-space: normal;
  overflow-x: visible;
  line-height: 1.55;
}

/* the FAQ list (/faq): the same disclosure pattern as the setup companion
   above, opened up enough to hold a question. Every row arrives shut — the
   page is a list of questions, and which ones are yours is your business. */

details.faq {
  border-top: 1px solid var(--hairline);
}

details.faq:last-of-type {
  border-bottom: 1px solid var(--hairline);
}

details.faq summary {
  cursor: pointer;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
  padding: 16px 0;
}

details.faq summary:hover {
  color: var(--accent);
}

/* open: the question tightens against its answer rather than floating
   equidistant between two hairlines. */
details.faq[open] summary {
  padding-bottom: 8px;
}

details.faq > p {
  max-width: 36em;
  margin-bottom: 18px;
}

.faq-outro {
  margin-top: 28px;
}

.assistant {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
}

/* `main.article h2` is (0,1,2), so this reset has to out-specify it — otherwise
   the block's own rule and the heading's rule both draw and you get a double
   hairline. */
main.article .assistant h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.todo {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-secondary);
  border: 1px dashed var(--hairline);
  border-radius: 6px;
  padding: 2px 8px;
  vertical-align: 2px;
}

/* ---------- footer ---------- */

footer.site {
  border-top: 1px solid var(--hairline);
  padding: 36px 0 48px;
  font-size: 14px;
  color: var(--ink-secondary);
}

footer.site .container.wide {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  align-items: center;
  justify-content: space-between;
}

footer.site .colophon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

footer.site .colophon .mark {
  width: 22px;
  height: 22px;
}

footer.site a {
  color: var(--ink-secondary);
  text-decoration: none;
  margin-right: 20px;
}
footer.site a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
