/* PrivacyFinance site. No third-party requests: fonts are self-hosted. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("assets/fonts/bricolage-grotesque-var.woff2") format("woff2");
  font-weight: 500 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("assets/fonts/atkinson-hyperlegible-next-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand teal: #0d9488 and #0f766e, expressed in OKLCH */
  --teal-500: oklch(0.600 0.104 185);   /* brand primary #0d9488 */
  --teal-700: oklch(0.511 0.086 186);   /* brand hover   #0f766e */
  --teal-900: oklch(0.300 0.050 190);
  --teal-50:  oklch(0.977 0.014 185);
  --teal-100: oklch(0.950 0.032 185);
  --teal-200: oklch(0.905 0.055 185);

  /* Neutrals, tinted a hair toward the brand hue */
  --bg:       oklch(0.992 0.004 185);
  --surface:  oklch(1 0 0);
  --ink:      oklch(0.240 0.030 195);
  --ink-soft: oklch(0.400 0.030 195);
  --line:     oklch(0.895 0.016 190);

  /* The one warm accent: sunshine */
  --sun:      oklch(0.860 0.165 88);
  --sun-deep: oklch(0.800 0.160 82);

  --font-display: "Bricolage Grotesque", ui-rounded, "Avenir Next", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* type scale, ratio about 1.25 and up */
  --step-0: 1.125rem;
  --step-1: clamp(1.25rem, 1.1rem + 0.5vw, 1.4rem);
  --step-2: clamp(1.45rem, 1.2rem + 0.9vw, 1.85rem);
  --step-3: clamp(1.9rem, 1.4rem + 2vw, 2.9rem);
  --step-4: clamp(2.4rem, 1.5rem + 4.2vw, 4.6rem);

  --radius: 10px;
  --radius-lg: 16px;
  --space-section: clamp(4rem, 3rem + 5vw, 8rem);
  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  --z-header: 10;
  --z-skip: 20;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
  -webkit-text-size-adjust: 100%;
}

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

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
  color: var(--ink);
}
h1 { font-size: var(--step-4); letter-spacing: -0.03em; line-height: 1.02; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); line-height: 1.15; }

p { margin: 0; text-wrap: pretty; }
p + p { margin-top: 1em; }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); max-width: 40rem; }

a {
  color: var(--teal-700);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--teal-900); }

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--teal-100);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: var(--z-skip);
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: top 0.15s ease-out;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font: 600 1.0625rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease-out, color 0.18s ease-out, border-color 0.18s ease-out, transform 0.18s ease-out;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal-700); color: #fff; }
.btn-primary:hover { background: var(--teal-900); color: #fff; }
.btn-ghost { background: transparent; color: var(--teal-700); border-color: var(--teal-700); }
.btn-ghost:hover { background: var(--teal-100); color: var(--teal-900); border-color: var(--teal-900); }
.btn-quiet { background: var(--teal-100); color: var(--teal-900); }
.btn-quiet:hover { background: var(--teal-200); color: var(--teal-900); }
.btn-sun { background: var(--sun); color: var(--ink); }
.btn-sun:hover { background: var(--sun-deep); color: var(--ink); }
.btn-small { min-height: 2.5rem; padding: 0.45rem 1rem; font-size: 1rem; }

/* ---------- Header ---------- */
.site-header { padding-block: 1rem; background: var(--bg); position: relative; z-index: var(--z-header); }
.header-row { display: flex; align-items: center; gap: 1.5rem; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font: 700 1.35rem/1 var(--font-display);
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand-accent { color: var(--teal-700); }

.site-nav { display: flex; gap: 0.25rem; margin-left: auto; }
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  font-weight: 500;
}
.site-nav a:hover { background: var(--teal-100); color: var(--teal-900); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2rem, 1rem + 4vw, 4.5rem) clamp(3rem, 2rem + 4vw, 6rem); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}
.hero-tag {
  display: inline-block;
  background: var(--sun);
  color: var(--ink);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}
.mark {
  background-image: linear-gradient(var(--sun), var(--sun));
  background-repeat: no-repeat;
  background-size: 100% 0.28em;
  background-position: 0 92%;
}
.hero-copy .lede { margin-top: 1.5rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.hero-note { margin-top: 1.25rem; font-size: 1rem; color: var(--ink-soft); max-width: 30rem; }

.hero-visual {
  background: var(--teal-500);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 3vw, 2.25rem);
  overflow: hidden;
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-shot {
  display: block;
  width: 100%;
  border-radius: var(--radius);
}
@keyframes rise {
  from { transform: translateY(14px); }
  to   { transform: none; }
}

/* ---------- Promise strip ---------- */
.promises { background: var(--teal-100); padding-block: 1.25rem; }
.promise-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 2rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--teal-900);
}
.promise-list li { display: inline-flex; align-items: center; gap: 0.5rem; }
.tick { color: var(--teal-700); flex: none; }

/* ---------- Sections ---------- */
.section { padding-block: var(--space-section); }
.section-tint { background: var(--teal-50); }
.section-head { max-width: 44rem; margin-bottom: clamp(2.5rem, 2rem + 3vw, 5rem); }
.section-head .lede { margin-top: 1.1rem; }

/* ---------- Features ---------- */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  margin-bottom: clamp(4rem, 3rem + 5vw, 8rem);
}
.feature-flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.feature-text p { margin-top: 1rem; max-width: 34rem; }
.feature-text h3 + p { margin-top: 1rem; }

.plain-list { margin: 1.25rem 0 0; padding: 0; list-style: none; max-width: 34rem; }
.plain-list li {
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}
.plain-list li:last-child { border-bottom: 1px solid var(--line); }

.shot {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}
.stage {
  background: var(--teal-100);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 3vw, 2.5rem);
}

.feature-wide { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
.feature-wide .feature-text { order: -1; }

/* two screenshots, cropped to the useful part */
.duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem) clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: clamp(4rem, 3rem + 5vw, 8rem);
}
.duo-intro { grid-column: 1 / -1; max-width: 36rem; }
.duo-intro p { margin-top: 0.9rem; color: var(--ink-soft); font-size: var(--step-1); line-height: 1.5; }
.duo-item { margin: 0; }
.shot-crop { aspect-ratio: 1200 / 560; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.shot-crop .shot { border: 0; border-radius: 0; height: 100%; object-fit: cover; object-position: left top; }
.duo-item figcaption { margin-top: 1rem; max-width: 30rem; }

/* committed teal band */
.band-teal {
  background: var(--teal-700);
  color: #fff;
  padding-block: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
  margin-bottom: clamp(4rem, 3rem + 5vw, 8rem);
}
.band-teal h3 { color: #fff; }
.band-teal .feature { margin-bottom: 0; }
.feature-band { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.band-teal .shot { border-color: oklch(1 0 0 / 0.25); }
.band-teal .plain-list li { border-color: oklch(1 0 0 / 0.35); }
.band-teal :focus-visible { outline-color: #fff; }

.more {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 1.5rem clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.more h3 { font-size: var(--step-2); }
.more-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 3rem;
}
.more-list div { padding: 1rem 0; border-top: 1px solid var(--line); }
.more-list dt { font-weight: 700; }
.more-list dd { margin: 0.2rem 0 0; color: var(--ink-soft); }

/* ---------- AI search ---------- */
.ai-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 2rem clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.ai-intro .lede { margin-top: 1.1rem; }
.ask {
  margin-top: 2rem;
  background: var(--surface);
  border: 2px solid var(--teal-500);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem 1.15rem;
}
.ask-label { display: block; font-size: 0.95rem; color: var(--ink-soft); }
.ask-text { display: block; margin-top: 0.2rem; font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); line-height: 1.3; }

.ai-steps { list-style: none; margin: 0; padding: 0; }
.ai-steps li { padding: 1.5rem 0; border-top: 1px solid var(--teal-200); }
.ai-steps li:first-child { padding-top: 0; border-top: 0; }
.ai-steps h3 { font-size: var(--step-1); }
.ai-steps p { margin-top: 0.5rem; max-width: 36rem; }
.ai-foot {
  grid-column: 1 / -1;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-1);
  line-height: 1.35;
  color: var(--teal-900);
  background: var(--teal-100);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
}

/* ---------- Open source ---------- */
.oss-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.oss-copy .lede { margin-top: 1.1rem; }
.oss-copy h3 { margin-top: 2.5rem; font-size: var(--step-1); }
.oss-copy h3 + p { margin-top: 0.6rem; max-width: 36rem; }
.oss-build {
  background: var(--teal-50);
  border: 1px solid var(--teal-200);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
}
.oss-build h3 { font-size: var(--step-1); }
.oss-build > p { margin-top: 0.6rem; }
.small { font-size: 1rem; color: var(--ink-soft); margin-top: 1rem; }

.code-wrap { position: relative; margin-top: 1.1rem; }
.code {
  margin: 0;
  background: var(--ink);
  color: oklch(0.96 0.01 185);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 1.1rem 1.1rem 1.1rem 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
}
.code code { background: none; padding: 0; font-size: inherit; color: inherit; }
.ps { color: oklch(0.80 0.10 185); user-select: none; }
.copy-btn {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  min-height: 2.25rem;
  padding: 0.3rem 0.9rem;
  border: 0;
  border-radius: 999px;
  background: var(--sun);
  color: var(--ink);
  font: 600 0.95rem/1 var(--font-body);
  cursor: pointer;
  transition: background-color 0.18s ease-out;
}
.copy-btn:hover { background: var(--sun-deep); }
.copy-btn[hidden] { display: none; }
.code-wrap:has(.copy-btn:not([hidden])) .code { padding-top: 3.1rem; }

/* ---------- Founder note ---------- */
.section-note { background: var(--teal-100); }
.note-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 2rem clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.note-body { font-size: var(--step-1); line-height: 1.6; max-width: 38rem; }
.note-body p + p { margin-top: 1.1em; }
.signoff {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-3);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--teal-700);
}

/* ---------- Support ---------- */
.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}
.support {
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
}
.support p { max-width: 28rem; flex: 1; }
.support .btn { margin-top: 0.75rem; }
.support-coffee { background: var(--teal-100); }
.support-help { border: 2px solid var(--teal-200); }

/* ---------- FAQ ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 2rem clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.faq-list details { border-bottom: 1px solid var(--teal-200); }
.faq-list details:first-child { border-top: 1px solid var(--teal-200); }
.faq-list summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 2.5rem 1.1rem 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-1);
  line-height: 1.25;
  position: relative;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "";
  position: absolute;
  right: 0.35rem;
  top: 50%;
  width: 0.65rem; height: 0.65rem;
  border-right: 2.5px solid var(--teal-700);
  border-bottom: 2.5px solid var(--teal-700);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease-out;
}
.faq-list details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-list summary:hover { color: var(--teal-700); }
.faq-list details p { padding: 0 0 1.4rem; max-width: 38rem; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 3.5rem 3rem; border-top: 1px solid var(--line); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr);
  gap: 2rem 3rem;
  align-items: start;
}
.footer-brand p { margin-top: 0.9rem; color: var(--ink-soft); max-width: 22rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }
.footer-links a { color: var(--ink); text-underline-offset: 0.2em; }
.footer-links a:hover { color: var(--teal-700); }
.footer-fine { font-size: 0.95rem; color: var(--ink-soft); }
.footer-fine p + p { margin-top: 0.5rem; }

/* ---------- Responsive ---------- */
@media (max-width: 62rem) {
  .hero-grid,
  .feature, .feature-flip, .feature-wide, .feature-band,
  .ai-grid, .oss-grid, .note-grid, .faq-grid, .more {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature-wide .feature-text { order: 0; }
  .feature-flip .feature-media { order: 2; }
  .hero-copy { max-width: 40rem; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .promise-list { justify-content: flex-start; }
}

@media (max-width: 48rem) {
  .site-nav { display: none; }
  .header-row { justify-content: space-between; }
  .duo, .support-grid, .more-list { grid-template-columns: minmax(0, 1fr); }
  .shot-crop { aspect-ratio: 1200 / 620; }
  .promise-list { font-size: 1.1rem; gap: 0.5rem 1.5rem; }
  .cta-row .btn { flex: 1 1 100%; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
