/*
  Tocamoufy — stylesheet
  Design system: soft geometric shapes, muted dusty-blue / clay / sage
  palette, rounded corners used as a consistent structural language,
  layered depth via tinted surfaces and soft shadows rather than borders.
  Grid-heavy layout. No external assets, no webfonts, no JS.
*/

/* -------------------------------------------------------------- */
/* Tokens                                                          */
/* -------------------------------------------------------------- */

:root {
  color-scheme: light dark;

  /* palette — light */
  --paper: #f3f1ea;
  --surface: #ffffff;
  --surface-tint: #eae7dd;
  --surface-tint-2: #e3e9e1;
  --ink: #292722;
  --ink-soft: #5c584e;
  --ink-faint: #655f52;
  --line: #e4e0d4;

  --blue: #5d7c90;
  --blue-ink: #33505f;
  --blue-soft: #dbe6e8;
  --clay: #bd6e4a;
  --clay-ink: #8a4a2c;
  --clay-soft: #f0dac9;
  --sage: #708363;
  --sage-ink: #4c5c3f;
  --sage-soft: #e1e6d6;

  --focus-ring: #2f6f8f;
  --shadow-1: 0 1px 2px rgba(41, 39, 34, 0.07), 0 1px 1px rgba(41, 39, 34, 0.05);
  --shadow-2: 0 14px 32px -18px rgba(41, 39, 34, 0.35);
  --shadow-3: 0 24px 56px -20px rgba(41, 39, 34, 0.32);

  /* radius system */
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --radius-pill: 999px;

  /* type */
  --font-display: "Century Gothic", "Avenir Next", "Poppins", ui-rounded,
    "Segoe UI", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo,
    Consolas, monospace;

  /* spacing */
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1.15rem;
  --space-4: 1.75rem;
  --space-5: 2.5rem;
  --space-6: 3.75rem;
  --space-7: 5.5rem;
  --space-8: 7.5rem;

  --measure: 62ch;
  --page-max: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1c1f1a;
    --surface: #262924;
    --surface-tint: #2e322b;
    --surface-tint-2: #2a3128;
    --ink: #ede9de;
    --ink-soft: #bdb8aa;
    --ink-faint: #afaa99;
    --line: #3a3d34;

    --blue: #8fb2c2;
    --blue-ink: #bfdce6;
    --blue-soft: #2b3a3e;
    --clay: #e0996e;
    --clay-ink: #f0c1a1;
    --clay-soft: #3d3126;
    --sage: #a3bb8f;
    --sage-ink: #cddcbf;
    --sage-soft: #323e2a;

    --focus-ring: #9ad1e8;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35), 0 1px 1px rgba(0, 0, 0, 0.25);
    --shadow-2: 0 14px 32px -18px rgba(0, 0, 0, 0.55);
    --shadow-3: 0 24px 56px -20px rgba(0, 0, 0, 0.6);
  }
}

/* -------------------------------------------------------------- */
/* Reset & base                                                    */
/* -------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--blue-ink);
  text-underline-offset: 0.15em;
}

a:not([class]) {
  text-decoration-thickness: 1px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

table {
  border-collapse: collapse;
}

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

.wrap {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}

.skip-link {
  position: absolute;
  left: var(--space-3);
  top: -3rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6em 1em;
  border-radius: var(--radius-sm);
  z-index: 100;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: var(--space-3);
}

/* -------------------------------------------------------------- */
/* Nav                                                              */
/* -------------------------------------------------------------- */

.site-nav {
  padding-block: var(--space-4);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.wordmark:focus-visible {
  outline-offset: 5px;
}

.wordmark-mark {
  width: 30px;
  height: 30px;
  flex: none;
}

.wordmark-mark .mark-source {
  fill: var(--ink);
}

.wordmark-mark .mark-line {
  stroke: var(--ink-faint);
  stroke-width: 1.4;
  opacity: 0.65;
}

.wordmark-mark .mark-a {
  fill: var(--blue);
}

.wordmark-mark .mark-b {
  fill: var(--clay);
}

.wordmark-mark .mark-c {
  fill: var(--sage);
}

.nav-links {
  display: flex;
  gap: var(--space-4);
  list-style: none;
  font-size: 0.96rem;
}

.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.3em 0.15em;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover {
  color: var(--ink);
  border-bottom-color: var(--clay);
}

/* -------------------------------------------------------------- */
/* Hero                                                             */
/* -------------------------------------------------------------- */

.hero {
  padding-block: var(--space-5) var(--space-7);
}

.hero-intro {
  max-width: 44rem;
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  background: var(--sage-soft);
  color: var(--sage-ink);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.42em 1em;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-3);
}

.hero h1 {
  font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem);
  margin-bottom: var(--space-3);
}

.hero-lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 42rem;
  margin-inline: auto;
}

.hero-lede strong {
  color: var(--ink);
  font-weight: 600;
}

.fanout-figure {
  margin: var(--space-6) auto 0;
  max-width: 920px;
}

.fanout-figure figcaption {
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.85rem;
  margin-top: var(--space-2);
}

.fanout-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.fanout-block {
  filter: drop-shadow(0 10px 20px rgba(41, 39, 34, 0.14));
}

.fanout-source {
  fill: var(--surface);
  stroke: var(--line);
  stroke-width: 1.5;
}

.fanout-block--blue {
  fill: var(--blue-soft);
}

.fanout-block--clay {
  fill: var(--clay-soft);
}

.fanout-block--sage {
  fill: var(--sage-soft);
}

.quote-glyph {
  font-family: var(--font-display);
  font-size: 56px;
  fill: var(--clay-ink);
}

.fanout-label {
  font-family: var(--font-body);
  fill: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.fanout-sublabel {
  font-family: var(--font-body);
  fill: var(--ink-soft);
  font-size: 11.5px;
}

.fanout-connector {
  fill: none;
  stroke: var(--ink-faint);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.55;
}

@media (prefers-reduced-motion: no-preference) {
  .fanout-connector {
    stroke-dasharray: 6 7;
    animation: dash-flow 26s linear infinite;
  }

  .fanout-block {
    animation: block-in 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  }

  .fanout-block:nth-of-type(1) { animation-delay: 0.05s; }
  .fanout-block:nth-of-type(2) { animation-delay: 0.15s; }
  .fanout-block:nth-of-type(3) { animation-delay: 0.25s; }
  .fanout-block:nth-of-type(4) { animation-delay: 0.35s; }
  .fanout-block:nth-of-type(5) { animation-delay: 0.45s; }
  .fanout-block:nth-of-type(6) { animation-delay: 0.55s; }
  .fanout-block:nth-of-type(7) { animation-delay: 0s; }
}

@keyframes dash-flow {
  to {
    stroke-dashoffset: -520;
  }
}

@keyframes block-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* -------------------------------------------------------------- */
/* Section shell                                                    */
/* -------------------------------------------------------------- */

section {
  padding-block: var(--space-7);
}

.section-head {
  max-width: 40rem;
  margin-bottom: var(--space-5);
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--clay-ink);
  margin-bottom: 0.8em;
}

.section-head h2 {
  font-size: clamp(1.55rem, 1.3rem + 1vw, 2.1rem);
  margin-bottom: 0.5em;
}

.section-head p {
  color: var(--ink-soft);
  font-size: 1.03rem;
  margin: 0;
}

/* -------------------------------------------------------------- */
/* Outputs — asymmetric grid                                        */
/* -------------------------------------------------------------- */

.outputs {
  background: var(--surface-tint);
  border-radius: var(--radius-xl);
}

.outputs .wrap {
  padding-block: var(--space-6);
}

.output-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-3);
}

.tile {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.tile-icon {
  width: 34px;
  height: 34px;
  flex: none;
}

.tile h3 {
  font-size: 1.06rem;
}

.tile p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0;
}

.tile--clips {
  grid-column: span 3;
  grid-row: span 2;
  background: var(--blue-soft);
  justify-content: flex-end;
}

.tile--clips .tile-icon {
  width: 44px;
  height: 44px;
}

.tile--clips h3 {
  font-size: 1.3rem;
}

.tile--clips p {
  font-size: 1rem;
  max-width: 34ch;
}

.tile--summary {
  grid-column: span 3;
  grid-row: span 1;
}

.tile--quote {
  grid-column: span 2;
  grid-row: span 1;
  background: var(--clay-soft);
}

.tile--thread {
  grid-column: span 1;
  grid-row: span 1;
}

.tile--notes {
  grid-column: span 3;
  grid-row: span 1;
  background: var(--sage-soft);
}

.tile--chapters {
  grid-column: span 3;
  grid-row: span 1;
}

/* -------------------------------------------------------------- */
/* Prose sections (clip selection / editing pass)                   */
/* -------------------------------------------------------------- */

.prose-section .wrap {
  max-width: 46rem;
}

.prose-section p {
  color: var(--ink-soft);
  font-size: 1.04rem;
}

.prose-section p strong {
  color: var(--ink);
}

.pull-note {
  background: var(--surface-tint-2);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: 0.98rem;
  color: var(--ink);
  margin-top: var(--space-4);
}

.pull-note strong {
  color: var(--sage-ink);
  font-weight: 700;
}

/* -------------------------------------------------------------- */
/* Spec table                                                       */
/* -------------------------------------------------------------- */

.specs .wrap {
  max-width: var(--page-max);
}

.spec-block {
  margin-bottom: var(--space-5);
}

.spec-block:last-child {
  margin-bottom: 0;
}

.spec-block h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-2);
  font-family: var(--font-body);
  font-weight: 700;
}

.spec-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-1);
}

table.spec-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 0.88rem;
}

.spec-table caption {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  font-size: 0.8rem;
  color: var(--ink-faint);
}

.spec-table th,
.spec-table td {
  text-align: left;
  padding: 0.65em 0.9em;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.spec-table thead th {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  background: var(--surface-tint);
  border-bottom: 1px solid var(--line);
}

.spec-table td {
  font-family: var(--font-mono);
  color: var(--ink-soft);
}

.spec-table td:first-child {
  font-family: var(--font-body);
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}

.spec-table tbody tr:last-child td {
  border-bottom: none;
}

.spec-table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--surface-tint) 40%, transparent);
}

/* -------------------------------------------------------------- */
/* Pricing                                                          */
/* -------------------------------------------------------------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--space-4);
}

.plan {
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-4);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.plan--mid {
  background: var(--surface-tint-2);
  box-shadow: var(--shadow-2);
}

.plan-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}

.plan-price {
  font-size: 2.1rem;
  font-weight: 700;
  font-family: var(--font-display);
}

.plan-price span {
  font-size: 0.95rem;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--ink-faint);
}

.plan-desc {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0;
}

.plan-specs {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55em;
  font-size: 0.92rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: var(--space-3);
  margin-top: auto;
}

.plan-specs li {
  display: flex;
  gap: 0.6em;
}

.plan-specs li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clay);
  flex: none;
  margin-top: 0.55em;
}

.pricing-foot {
  color: var(--ink-faint);
  font-size: 0.92rem;
  margin-top: var(--space-4);
  text-align: center;
}

/* -------------------------------------------------------------- */
/* FAQ                                                              */
/* -------------------------------------------------------------- */

.faq-list {
  max-width: 44rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.faq-item {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
  padding: 0.2em var(--space-4);
}

.faq-item summary {
  cursor: pointer;
  padding: var(--space-3) 0;
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--clay);
  flex: none;
  font-weight: 400;
  transition: transform 0.18s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  color: var(--ink-soft);
  padding-bottom: var(--space-3);
  margin: 0;
}

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

.site-footer {
  background: var(--surface-tint);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  margin-top: var(--space-7);
}

.site-footer .wrap {
  padding-block: var(--space-6) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  justify-content: space-between;
}

.footer-brand .wordmark {
  margin-bottom: var(--space-2);
}

.footer-brand address {
  font-style: normal;
  color: var(--ink-soft);
  font-size: 0.93rem;
  line-height: 1.7;
  max-width: 26rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
}

.footer-nav h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  margin: 0 0 0.8em;
  font-weight: 600;
}

.footer-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55em;
  font-size: 0.93rem;
}

.footer-nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer-bottom {
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* -------------------------------------------------------------- */
/* Simple pages (privacy / terms / unsubscribe)                     */
/* -------------------------------------------------------------- */

.doc {
  padding-block: var(--space-6) var(--space-7);
}

.doc .wrap {
  max-width: 42rem;
}

.doc h1 {
  font-size: clamp(1.7rem, 1.4rem + 1vw, 2.2rem);
  margin-bottom: 0.3em;
}

.doc .updated {
  color: var(--ink-faint);
  font-size: 0.9rem;
  margin-bottom: var(--space-5);
}

.doc h2 {
  font-size: 1.2rem;
  margin-top: var(--space-5);
  margin-bottom: 0.6em;
}

.doc p,
.doc li {
  color: var(--ink-soft);
  font-size: 1rem;
}

.doc ul {
  list-style: disc;
  padding-left: 1.3em;
  margin-bottom: 1em;
}

.doc li {
  margin-bottom: 0.4em;
}

.doc a {
  color: var(--blue-ink);
}

.unsub-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-1);
  margin-top: var(--space-4);
}

.unsub-mark {
  width: 44px;
  height: 44px;
  margin-bottom: var(--space-3);
}

/* -------------------------------------------------------------- */
/* Responsive                                                       */
/* -------------------------------------------------------------- */

@media (max-width: 900px) {
  .output-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tile--clips {
    grid-column: span 2;
    grid-row: span 1;
  }

  .tile--summary,
  .tile--notes,
  .tile--chapters {
    grid-column: span 2;
  }

  .tile--quote,
  .tile--thread {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding-inline: var(--space-3);
  }

  section {
    padding-block: var(--space-6);
  }

  .nav-links {
    gap: var(--space-3);
    font-size: 0.9rem;
  }

  .output-grid {
    grid-template-columns: 1fr;
  }

  .tile--clips,
  .tile--summary,
  .tile--quote,
  .tile--thread,
  .tile--notes,
  .tile--chapters {
    grid-column: span 1;
    grid-row: auto;
  }

  .footer-top {
    gap: var(--space-4);
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: 1.85rem;
  }
}
