/* ==========================================================================
   Furiner website

   The app's "Fresh" colours (Furiner/FurinerTheme.swift) set as an editorial
   page: New York for headlines, San Francisco for reading, Furiner's green
   used sparingly, real screens shown large, and the mark's ring as the one
   graphic device. Nothing is downloaded: both typefaces are built in, so the
   site still loads no third-party fonts (see the Privacy Policy).

   Dark-first like the app; every token has a light variant.
   ========================================================================== */

:root {
  color-scheme: dark light;

  /* Surfaces (FurinerTheme: canvas, surface, tile, hairline) */
  --canvas: #0c0f0e;
  --surface: #171d1b;
  --tile: #252d2a;
  --hairline: #27302d;

  /* Text: a slightly warm white, so long passages read like paper, not UI */
  --text: #f3f0e9;
  --text-2: #a2aca7;

  /* Accent: Furiner's own green. Text on it is dark (FurinerTheme.onAccent). */
  --accent: #3dd68c;
  --accent-hover: #5ae0a0;
  --accent-text: #3dd68c;
  --ring: #3dd68c;
  --on-accent: #0c0f0e;

  /* Type: both faces are built into the device */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", var(--font);
  --font-display: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  /* Shape (cardRadius, tileRadius, pillRadius) */
  --r-card: 18px;
  --r-tile: 12px;
  --r-pill: 8px;
  --r-plate: clamp(18px, 2.4vw, 28px);

  /* Layout. The gutter also clears the notch on phones held sideways. */
  --gutter: max(20px, env(safe-area-inset-left), env(safe-area-inset-right));
  --beat: clamp(96px, 13vw, 184px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 720px) {
  :root { --gutter: max(40px, env(safe-area-inset-left), env(safe-area-inset-right)); }
}

@media (prefers-color-scheme: light) {
  :root {
    --canvas: #f4f3ee;
    --surface: #fffefb;
    --tile: #eae8e1;
    --hairline: #dfddd3;

    --text: #101412;
    --text-2: #56605b;

    --accent-hover: #34c47f;
    /* The green fill is too light for text on a light page, so text uses a
       deeper shade of the same hue. */
    --accent-text: #137a49;
    --ring: #1fae6b;
  }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.06;
  text-wrap: balance;
}
p { text-wrap: pretty; }

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

.container { width: min(100% - 2 * var(--gutter), 1200px); margin-inline: auto; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--r-tile);
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

.lead {
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.5;
  color: var(--text-2);
  max-width: 33rem;
}

/* Small italic line that opens a passage, in place of uppercase labels. */
.kicker {
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--accent-text);
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: underline;
  text-decoration-color: var(--hairline);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}
.text-link:hover { text-decoration-color: currentColor; }

/* ---------- Buttons (FurinerPrimaryButtonStyle: filled capsule, dark label) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font: 600 1.0625rem/1 var(--font);
  white-space: nowrap;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 0.9375rem; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }

/* ---------- Brand ---------- */

.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
.brand-name {
  font-family: var(--font-rounded);
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-mark { width: 32px; height: 32px; flex: none; border-radius: 8px; }
.brand-mark--lg { width: 72px; height: 72px; border-radius: 17px; }

/* The mark has a dark and a light version, like the app's BrandMark asset. */
.mark-light { display: none; }
@media (prefers-color-scheme: light) {
  .mark-dark { display: none; }
  .mark-light { display: block; }
}

/* ---------- Header / navigation ----------
   A few short links, all of them visible at every width: no menu to open. */

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 32px); }
.nav ul { display: flex; gap: clamp(16px, 3vw, 32px); }
.nav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9375rem;
  white-space: nowrap;
  color: var(--text-2);
  transition: color 0.15s ease;
}
.nav a:not(.btn):hover,
.nav a[aria-current="page"] { color: var(--text); }

.nav-wide { display: none; }
@media (min-width: 560px) { .nav-wide { display: list-item; } }

/* The narrowest phones, and phones using larger page zoom: keep one row. */
@media (max-width: 359px) {
  .header-bar { gap: 8px; }
  .nav { gap: 12px; }
  .nav ul { gap: 12px; }
  .nav a:not(.btn) { font-size: 0.875rem; }
  .nav .btn-sm { padding: 0 12px; font-size: 0.875rem; }
}

/* Once the app is live the header also carries the button (see script.js):
   on phones it takes the place of "What's inside". */
@media (max-width: 479px) {
  .nav:has(.is-live) li:first-child { display: none; }
}
@media (max-width: 719px) {
  .nav:has(.is-live) .nav-wide { display: none; }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--beat); }
.section--ruled { border-top: 1px solid var(--hairline); }

.section-intro { max-width: 46rem; }
.section-intro h2 { font-size: clamp(2.5rem, 6.2vw, 4.75rem); line-height: 1.02; }
.section-intro .lead { margin-top: clamp(16px, 2.4vw, 28px); }

/* ---------- Hero ----------
   The phone stands on the line that ends the hero, cropped above the tab bar,
   so the goals are shown large and the first screen has a clear ground. */

.hero {
  padding-top: clamp(28px, 6vw, 72px);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
}

.hero-grid { display: grid; gap: clamp(48px, 9vw, 72px); }

.hero .kicker { margin-bottom: clamp(12px, 2vw, 20px); }

/* The tagline: the page's largest line. The H1 above it says what Furiner is. */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 14vw, 4.75rem);
  letter-spacing: -0.016em;
  line-height: 1.02;
  text-wrap: balance;
}
.hero-title span { display: block; }

.hero .lead { margin-top: clamp(20px, 3vw, 32px); }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  margin-top: clamp(20px, 3vw, 32px);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 1rem;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.hero-phone {
  width: min(100%, 390px);
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-bottom: 0;
  border-radius: clamp(38px, 11vw, 54px) clamp(38px, 11vw, 54px) 0 0;
  margin-bottom: -1px;
  background: #0c0f0e;
}
.hero-phone img { width: 100%; height: auto; }

@media (min-width: 760px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) min(40%, 430px);
    align-items: end;
    column-gap: clamp(32px, 6vw, 96px);
  }
  .hero-title { font-size: clamp(3.5rem, 7.5vw, 7rem); }
  .hero-copy { padding-bottom: clamp(48px, 8vw, 120px); }
  .hero-phone { width: 100%; }
}

/* ---------- The thesis ----------
   The mark's arc and four dots, drawn to the scale of the page, with the
   sentence in place of the check. */

.thesis {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 620px);
  aspect-ratio: 1;
  margin-inline: auto;
}
.thesis h2 {
  width: 72%;
  text-align: center;
  font-size: clamp(1.875rem, 7.4vw, 3.5rem);
  line-height: 1.08;
}

.ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ring-arc {
  fill: none;
  stroke: var(--ring);
  stroke-width: 1.05;
  stroke-linecap: round;
}
.ring-dot { fill: var(--ring); }

.thesis-note {
  max-width: 34rem;
  margin: clamp(36px, 6vw, 64px) auto 0;
  text-align: center;
}

.thesis-more { margin-top: 12px; text-align: center; }

.section--thesis { padding-bottom: 0; }

/* ---------- The three parts ---------- */

.chapter {
  display: grid;
  gap: clamp(40px, 7vw, 96px);
  align-items: center;
  padding-top: var(--beat);
}

.chapter h3 { font-size: clamp(2.25rem, 5vw, 3.75rem); line-height: 1.04; }

.chapter-copy > p:not(.kicker):not(.aside) {
  margin-top: clamp(16px, 2vw, 24px);
  max-width: 30rem;
  font-size: 1.125rem;
  color: var(--text-2);
}

.aside {
  margin-top: 16px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.375rem, 2.2vw, 1.625rem);
  line-height: 1.25;
}

.facts { margin-top: clamp(24px, 3vw, 36px); max-width: 30rem; border-top: 1px solid var(--hairline); }
.facts li {
  padding: 13px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.96875rem;
  line-height: 1.45;
}

@media (min-width: 720px) {
  .chapter { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .chapter--flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .chapter--flip .chapter-copy { order: 2; }
}

/* ---------- App screens ----------
   Real captures, cropped to what each passage is about and shown large. They
   share the app's canvas, so in dark mode they sit directly on the page. */

.plate img {
  width: 100%;
  height: auto;
  border-radius: var(--r-plate);
  background: #0c0f0e;
}
.plate figcaption { margin-top: 14px; font-size: 0.9375rem; color: var(--text-2); }
.plate figcaption strong { margin-right: 0.35em; font-weight: 600; color: var(--text); }

/* On phones the screens run edge to edge: the app's own margins then line its
   cards up with the page's text, and everything in them reads larger. */
@media (max-width: 719px) {
  .plate { margin-inline: calc(-1 * var(--gutter)); }
  .plate img { border-radius: 0; }
  .plate figcaption { padding-inline: var(--gutter); }
}

/* The timer's ring on its own, echoing the mark. */
.dial { width: min(100%, 480px); margin-inline: auto; }
.dial img { width: 100%; height: auto; border-radius: 50%; background: #0c0f0e; }

/* ---------- Widgets ---------- */

.section--widgets { padding-bottom: 0; }

.widgets { display: grid; gap: clamp(36px, 6vw, 72px); align-items: center; }
.widgets-copy h2 { font-size: clamp(2.25rem, 5vw, 3.75rem); line-height: 1.04; }
.widgets-copy p:not(.kicker) {
  margin-top: clamp(16px, 2vw, 24px);
  max-width: 30rem;
  font-size: 1.125rem;
  color: var(--text-2);
}

.widgets-art { display: grid; gap: clamp(14px, 2vw, 20px); }
/* Rounded a touch past the widget's own corner, to leave the wallpaper out. */
.widgets-art img { width: 100%; height: auto; border-radius: 7.6% / 16.4%; }

@media (min-width: 720px) {
  .widgets { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
}

/* ---------- Calendar & Insights ---------- */

.spread {
  display: grid;
  gap: clamp(40px, 5vw, 64px);
  margin-top: clamp(48px, 7vw, 96px);
}

@media (min-width: 720px) {
  .spread { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; }
}

/* ---------- Getting started ---------- */

.steps { display: grid; gap: 36px; margin-top: clamp(48px, 6vw, 72px); }
.step { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 20px; align-content: start; }
.step-ring { width: 44px; height: 44px; }
.step-track, .step-fill { fill: none; stroke-width: 3; }
.step-track { stroke: var(--hairline); }
.step-fill { stroke: var(--ring); stroke-linecap: round; }
.step-check { fill: none; stroke: var(--ring); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

.step h3 { font-size: clamp(1.5rem, 2.4vw, 1.875rem); line-height: 1.2; }
.step p { margin-top: 8px; max-width: 24rem; color: var(--text-2); }

@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(40px, 6vw, 80px); }
  .step { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

/* ---------- Principles: the one section on paper ---------- */

.paper {
  --canvas: #f3f1ea;
  --text: #101412;
  --text-2: #56605b;
  --hairline: #d9d6cb;
  background: var(--canvas);
  color: var(--text);
}

@media (prefers-color-scheme: light) {
  .paper {
    --canvas: #0c0f0e;
    --text: #f3f0e9;
    --text-2: #a2aca7;
    --hairline: #27302d;
  }
}

.paper-grid { display: grid; gap: clamp(36px, 6vw, 80px); }
.paper-title h2 { font-size: clamp(2.75rem, 7vw, 5.25rem); line-height: 1; }
.paper-title .text-link { margin-top: 14px; margin-right: 24px; text-decoration-color: currentColor; }

.principles { border-top: 1px solid var(--hairline); }
.principle { padding: clamp(20px, 2.4vw, 28px) 0; border-bottom: 1px solid var(--hairline); }
.principle h3 { font-size: clamp(1.5rem, 2.4vw, 1.875rem); line-height: 1.2; }
.principle p { margin-top: 8px; max-width: 32rem; color: var(--text-2); }

@media (min-width: 720px) {
  .paper-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
}

/* ---------- Questions (home page and Support) ----------
   Plain visible text: answers are never hidden behind a tap. */

.faq-grid { display: grid; gap: clamp(36px, 6vw, 80px); }
.faq-title h2 { font-size: clamp(2.5rem, 6.2vw, 4.75rem); line-height: 1.02; }

.faq-list { border-top: 1px solid var(--hairline); }
.faq-item { padding: clamp(20px, 2.4vw, 28px) 0; border-bottom: 1px solid var(--hairline); }
.faq-item h3 { font-size: clamp(1.375rem, 2.2vw, 1.625rem); line-height: 1.2; }
.faq-item p { margin-top: 8px; max-width: 34rem; color: var(--text-2); }
.faq-item a {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (min-width: 720px) {
  .faq-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
}

/* ---------- Closing ---------- */

.closing { display: grid; justify-items: center; gap: 20px; text-align: center; }
.closing h2 { font-size: clamp(2.5rem, 7vw, 5rem); line-height: 1.02; }
.closing p { max-width: 28rem; color: var(--text-2); }
.closing a:not(.btn) {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--hairline); padding: 56px 0 28px; }

.footer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand p {
  margin-top: 14px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--text-2);
}

.footer-h {
  margin-bottom: 6px;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.3;
  color: var(--text-2);
}
.site-footer li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9375rem;
}
.site-footer li a:hover { color: var(--accent-text); }
.site-footer a[aria-current="page"] { color: var(--text-2); }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2px 24px;
  margin-top: 36px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
  font-size: 0.8125rem;
  color: var(--text-2);
}
.footer-base a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-base a:hover { color: var(--accent-text); }
.footer-base--solo { margin-top: 0; padding-top: 0; border-top: 0; }

@media (min-width: 720px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
  .footer-grid { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: auto; }
}

/* ---------- Inner pages (Privacy Policy, Terms, Support) ---------- */

.container--narrow { width: min(100% - 2 * var(--gutter), 44rem); }

.page-head { padding: clamp(40px, 8vw, 96px) 0 clamp(32px, 5vw, 56px); }
.page-head .kicker { margin-bottom: 12px; }
.page-head h1 { font-size: clamp(2.75rem, 8vw, 4.75rem); letter-spacing: -0.016em; line-height: 1.04; }
.page-head .lead { margin-top: clamp(16px, 2.4vw, 24px); }
.page-meta { margin-top: 16px; font-size: 0.875rem; color: var(--text-2); }

.page-body { padding: 0 0 var(--beat); }

/* Support */
.contact-list { border-top: 1px solid var(--hairline); }
.contact-row { padding: clamp(20px, 3vw, 28px) 0; border-bottom: 1px solid var(--hairline); }
.contact-label {
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.4;
  color: var(--text-2);
}
.contact-email {
  display: inline-block;
  padding: 6px 0;
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 6.4vw, 2.5rem);
  letter-spacing: -0.01em;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: var(--hairline);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  transition: text-decoration-color 0.15s ease;
}
.contact-email:hover { text-decoration-color: currentColor; }

.section-h {
  margin: clamp(56px, 8vw, 88px) 0 20px;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.14;
}

/* Not found */
.notfound-links { display: grid; justify-items: start; gap: 4px; }

/* Long-form text (Terms of Use, Privacy Policy) */
.prose h2 { font-size: clamp(1.75rem, 4vw, 2.25rem); line-height: 1.14; margin: 2em 0 0.45em; }
.prose h3 {
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 1.6em 0 0.35em;
}
.prose p { margin-top: 0.85em; max-width: 40rem; }
.prose h2 + p, .prose h3 + p { margin-top: 0; }
.prose ul, .prose ol { margin-top: 0.85em; padding-left: 1.3em; max-width: 40rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { padding-left: 0.15em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--text-2); }
.prose a {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.prose a:hover { text-decoration-thickness: 2px; }
.prose .plate { margin-block: 2em; }

/* Key facts (About) */
.fact-table {
  width: 100%;
  margin-top: 1em;
  border-collapse: collapse;
  border-top: 1px solid var(--hairline);
}
.fact-table th,
.fact-table td {
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
  text-align: left;
  font-size: 1rem;
  line-height: 1.45;
}
.fact-table th { width: 40%; padding-right: 16px; font-weight: 400; color: var(--text-2); }

.toc,
.glance {
  margin: 0 0 2.75em;
  padding: 22px 0 24px;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.toc + h2 { margin-top: 0; }
.prose .toc-title,
.prose .glance-title {
  margin: 0 0 0.6em;
  font-size: 1.375rem;
  font-style: italic;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.prose .toc-list { margin-top: 0; padding-left: 1.5em; max-width: none; columns: 2 15rem; column-gap: 32px; }
.prose .toc-list li { margin-top: 0; padding: 4px 0; break-inside: avoid; }
.prose .toc-list a { text-decoration: none; }
.prose .toc-list a:hover { text-decoration: underline; }
.prose .glance ul { margin-top: 0; }
.prose .glance p { margin-top: 0.85em; font-size: 0.9375rem; color: var(--text-2); }

/* ---------- Motion ----------
   Content is always shown in place: no scroll-in fades, which left
   sections faded and shifted while scrolling on phones. */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
