@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@300;400;500;600;700&display=swap');

/* ===========================
   CUSTOM PROPERTIES
=========================== */
:root {
  --paper: #fdfbf7;
  --paper-mid: #f5f5f5;
  --ink: #1a1a1a;
  --ink-muted: #5a5a5a;
  --ink-faint: #9a9a9a;
  --border: #d8d4cc;
  --border-strong: #1a1a1a;
  --primary: #1a1a1a;
  --primary-hover: #3a3a3a;
  --radius-card: 28px;
  --radius-btn: 6px;
  --font-head: 'Fredoka', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;
  --max-content: 760px;
  --max-wide: 1140px;
  --sidebar-w: 220px;
  --gap: 2rem;
}

/* ===========================
   RESET & BASE
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 17px;
  scroll-behavior: auto;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  /* Paper grain texture via SVG data URI */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-attachment: fixed;
}

a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }

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

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }
ul, ol { margin-left: 1.4rem; margin-bottom: 1rem; }
li { margin-bottom: 0.4rem; line-height: 1.6; }

/* ===========================
   EYEBROW / SMALL LABELS
=========================== */
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
}

/* ===========================
   HEADER
=========================== */
.site-header {
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-brand-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: nowrap;
}

.brand-link {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex: 1 1 auto;
}
.brand-link:hover { color: var(--primary-hover); }

.header-ctas {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-btn);
  padding: 0.55rem 0.65rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  flex-shrink: 0;
}
.toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.header-nav::-webkit-scrollbar { display: none; }

.header-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  letter-spacing: 0.01em;
  min-height: 44px;
}
.header-nav a:hover,
.header-nav a[aria-current="page"] {
  border-bottom-color: var(--ink);
}

/* ===========================
   CTA BUTTONS
=========================== */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius-btn);
  padding: 0.55rem 1rem;
  min-height: 44px;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.02em;
  transition: none;
}
.cta-signup {
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--ink);
}
.cta-signup:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--paper);
}
.cta-login {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
}
.cta-login:hover {
  background: var(--paper-mid);
}

/* ===========================
   LAYOUT HELPERS
=========================== */
.content-with-sidebar {
  display: flex;
  gap: var(--gap);
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  align-items: flex-start;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: 100px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  background: var(--paper-mid);
  order: -1;
}
.sidebar h3 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.sidebar nav a {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.5rem;
  text-decoration: none;
  color: var(--ink);
  border-radius: 4px;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.sidebar nav a:hover {
  background: var(--border);
}
.sidebar-cta {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.sidebar-cta .cta { width: 100%; margin-top: 0.5rem; }
.sidebar-tips {
  font-size: 0.82rem;
  margin-left: 1rem;
  margin-bottom: 1rem;
}

.content-body {
  flex: 1 1 0;
  min-width: 0;
  max-width: var(--max-content);
}
.content-body h2 { margin-top: 2rem; margin-bottom: 0.75rem; }
.content-body h3 { margin-top: 1.5rem; margin-bottom: 0.5rem; }
.content-body a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.content-body a:hover { opacity: 0.75; }
.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}
.content-body table th,
.content-body table td {
  border: 1px solid var(--border);
  padding: 0.6rem 0.75rem;
  text-align: left;
}
.content-body table th { background: var(--paper-mid); font-weight: 700; }
.content-body details { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 1rem; }
.content-body summary { padding: 0.75rem 1rem; font-weight: 700; cursor: pointer; font-size: 0.95rem; }
.content-body details > *:not(summary) { padding: 0 1rem 0.75rem; }

/* ===========================
   BYLINE
=========================== */
.byline {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

/* ===========================
   STAGE LABEL
=========================== */
.stage-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--ink);
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

/* ===========================
   OCTAGON DECORATION
=========================== */
.octagon-decoration {
  width: 80px;
  height: 80px;
  background: var(--ink);
  clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
  opacity: 0.08;
}
.octagon-small {
  width: 48px;
  height: 48px;
  background: var(--ink);
  clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
  opacity: 0.12;
}

/* ===========================
   CHIP STACK
=========================== */
.chip-stack { position: relative; width: 60px; height: 48px; }
.chip { position: absolute; width: 54px; height: 14px; border-radius: 999px; border: 2px solid var(--border-strong); }
.chip-1 { bottom: 28px; background: var(--paper); }
.chip-2 { bottom: 14px; background: var(--paper-mid); }
.chip-3 { bottom: 0; background: var(--ink); opacity: 0.15; }

/* ===========================
   HOME LAYOUT
=========================== */
.main-home {}

.hero-section {
  display: flex;
  gap: 2rem;
  align-items: center;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 3rem 1.5rem 2.5rem;
  min-height: 45vh;
  border-bottom: 1px solid var(--border);
}
.hero-copy {
  flex: 1 1 0;
  min-width: 0;
}
.hero-figure, .hero-aside {
  flex: 0 0 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-figure img, .hero-img { width: 100%; border-radius: var(--radius-card); border: 1px solid var(--border); }
.hero-labels {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.hero-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  color: var(--ink-muted);
}
.hero-intro {
  font-size: 1.05rem;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
  max-width: 52ch;
}
.hero-cta { margin-top: 0.25rem; }

.content-section {
  display: flex;
  gap: var(--gap);
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  align-items: flex-start;
}

.child-pages-section {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--border);
}
.child-pages-section h2 { margin-bottom: 1.5rem; }

.child-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.child-list li {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.25rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: var(--paper);
  margin: 0;
}
.child-list li a {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  line-height: 1.3;
}
.child-list li a:hover { text-decoration: underline; }
.child-list li small { font-size: 0.8rem; color: var(--ink-muted); line-height: 1.4; }

/* ===========================
   FEATURE LAYOUT
=========================== */
.main-feature {}

.feature-intro-section {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
}
.feature-eyebrow-aside {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.feature-figure {
  margin-left: auto;
}
.feature-figure img, .feature-hero-img {
  max-width: 360px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
}

.feature-content-section {
  display: flex;
  gap: var(--gap);
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  align-items: flex-start;
}

/* ===========================
   PRICING LAYOUT
=========================== */
.main-pricing {}

.pricing-header-section {
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2rem 1.5rem 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
}
.pricing-aside { display: flex; flex-direction: column; gap: 0.75rem; }
.pricing-figure { margin-left: auto; }

.pricing-content-section {
  display: flex;
  gap: var(--gap);
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  align-items: flex-start;
}

/* ===========================
   FAQ LAYOUT
=========================== */
.main-faq {}

.faq-header-section {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.faq-header-aside { flex: 1 1 0; }
.faq-figure { flex-shrink: 0; display: flex; align-items: center; justify-content: center; padding: 1rem; }

.faq-content-section {
  display: flex;
  gap: var(--gap);
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  align-items: flex-start;
}

.faq-body details { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 0.75rem; }
.faq-body summary { padding: 0.85rem 1rem; font-weight: 600; cursor: pointer; font-size: 0.95rem; list-style: none; }
.faq-body summary::marker, .faq-body summary::-webkit-details-marker { display: none; }
.faq-body summary::after { content: '+'; float: right; font-weight: 700; font-size: 1.1rem; }
.faq-body details[open] summary::after { content: '\2212'; }
.faq-body details > *:not(summary) { padding: 0 1rem 0.85rem; font-size: 0.92rem; }

/* ===========================
   ABOUT LAYOUT
=========================== */
.main-about {}

.about-intro-section {
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
}
.about-aside { display: flex; flex-direction: column; gap: 0.75rem; }
.about-figure { margin-left: auto; }

.about-content-section {
  display: flex;
  gap: var(--gap);
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  align-items: flex-start;
}

.author-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-strong);
}
.author-section h2 { margin-bottom: 0.3rem; }
.author-credentials {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
}
.author-bio { max-width: 60ch; }

/* ===========================
   CONTACT LAYOUT
=========================== */
.main-contact {}

.contact-header-section {
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
}
.contact-aside { display: flex; flex-direction: column; gap: 0.5rem; }
.contact-figure { margin-left: auto; }

.contact-content-section {
  display: flex;
  gap: var(--gap);
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  align-items: flex-start;
}

/* ===========================
   PRIVACY LAYOUT
=========================== */
.main-privacy {}

.privacy-header-section {
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
}
.privacy-aside { display: flex; flex-direction: column; gap: 0.5rem; }
.privacy-figure { margin-left: auto; }

.privacy-content-section {
  display: flex;
  gap: var(--gap);
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  align-items: flex-start;
}

/* ===========================
   FOOTER
=========================== */
.site-footer {
  background: var(--paper-mid);
  border-top: 2px solid var(--ink);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 0;
  align-items: start;
  max-width: 100%;
}

.site-footer > section {
  padding: 2.5rem 2rem;
  border-right: 1px solid var(--border);
}
.site-footer > section:last-child { border-right: none; }

.footer-wordmark {
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 0.75rem;
}
.footer-desc { font-size: 0.85rem; color: var(--ink-muted); max-width: 30ch; }

.footer-nav-section nav dl { list-style: none; margin: 0; padding: 0; }
.footer-nav-section nav dt { margin-bottom: 0.35rem; }
.footer-nav-section nav dt a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.2rem 0;
}
.footer-nav-section nav dt a:hover { text-decoration: underline; }

.footer-trust-section .trust-links { display: flex; flex-direction: column; gap: 0.35rem; }
.footer-trust-section .trust-links a,
.footer-contact {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer-trust-section .trust-links a:hover,
.footer-contact:hover { text-decoration: underline; }
.footer-contact { margin-top: 0.75rem; }

.footer-legal-section {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border);
  border-right: none !important;
  padding: 1.25rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.rg-notice {
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-weight: 600;
}
.copyright { font-size: 0.75rem; color: var(--ink-faint); }

/* ===========================
   HOVER MICRO-INTERACTIONS
=========================== */
@media (prefers-reduced-motion: no-preference) {
  .child-list li {
    transition: transform 0.15s ease, border-color 0.15s ease;
  }
  .child-list li:hover {
    transform: translateY(-3px);
    border-color: var(--ink);
  }
  .cta {
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
  }
  .header-nav a {
    transition: border-bottom-color 0.12s ease;
  }
  .sidebar nav a {
    transition: background 0.1s ease;
  }
}

/* ===========================
   SCROLL REVEAL (vanilla JS driven)
=========================== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
}
.reveal.revealed {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: no-preference) {
  .reveal { transition: opacity 0.35s ease, transform 0.35s ease; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 960px) {
  .hero-figure, .hero-aside { flex: 0 0 240px; }
  .sidebar { width: 190px; }
  .site-footer { grid-template-columns: 1fr 1fr; }
  .footer-brand-section { grid-column: 1 / -1; border-right: none; border-bottom: 1px solid var(--border); }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .header-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--border);
  }
  .header-nav.nav-open { display: flex; }
  .header-nav a {
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid var(--border);
    border-left: 3px solid transparent;
    font-size: 0.9rem;
  }
  .header-nav a:hover,
  .header-nav a[aria-current="page"] {
    border-bottom-color: var(--border);
    border-left-color: var(--ink);
  }

  .hero-section {
    flex-direction: column;
    min-height: auto;
    padding: 2rem 1rem 1.5rem;
  }
  .hero-figure, .hero-aside { flex: none; width: 100%; max-width: 300px; margin: 0 auto; }

  .content-section,
  .feature-content-section,
  .pricing-content-section,
  .faq-content-section,
  .about-content-section,
  .contact-content-section,
  .privacy-content-section {
    flex-direction: column;
    padding: 1.5rem 1rem 2.5rem;
  }
  .sidebar {
    width: 100%;
    position: static;
    order: 0;
  }
  .content-body { max-width: 100%; }

  .feature-intro-section,
  .pricing-header-section,
  .faq-header-section,
  .about-intro-section,
  .contact-header-section,
  .privacy-header-section {
    flex-wrap: wrap;
    padding: 1.5rem 1rem 1rem;
  }

  .site-footer { grid-template-columns: 1fr; }
  .site-footer > section { border-right: none; border-bottom: 1px solid var(--border); padding: 1.5rem 1rem; }
  .footer-wordmark { font-size: 1.6rem; }

  .child-list { grid-template-columns: 1fr; }

  .header-brand-row { padding: 0.5rem 1rem; }
  .brand-link { font-size: 1.05rem; }
  .cta { font-size: 0.75rem; padding: 0.5rem 0.75rem; }
}

@media (max-width: 480px) {
  html { font-size: 16px; }
  .hero-copy h1 { font-size: 1.6rem; }
  .header-ctas { gap: 0.35rem; }
  .cta { padding: 0.5rem 0.6rem; font-size: 0.72rem; }
}

a[data-cta],button[aria-controls]{min-height:44px;min-width:44px;box-sizing:border-box}main p a{text-decoration:underline}