/* ============================================================
   Receivos Learn Center — Shared Styles
   Tokens mirror src/index.css from the main app exactly.
   If you update brand colors there, update them here too.
   ============================================================ */

/* Fonts loaded via <link> in each HTML file's <head> */

/* ── Reset (matches main app) ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Design Tokens (copied from src/index.css) ── */
:root {
  /* Color System */
  --color-primary: #0f172a;
  --color-primary-light: #334155;
  --color-primary-dark: #020617;
  --color-accent: #3b82f6;
  --color-accent-hover: #2563eb;
  --color-success: #10b981;
  --color-success-light: #d1fae5;
  --color-warning: #f59e0b;
  --color-warning-light: #fef3c7;
  --color-error: #ef4444;
  --color-error-light: #fee2e2;

  /* Neutral Colors */
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
  --color-white: #ffffff;
  --color-background: #fafdf6;

  /* Brand — from Header.css and Auth.css in main app */
  --brand-lime:        #C1FF72;   /* header bg, capture buttons */
  --brand-lime-soft:   #cbff83;   /* profile bg, modal accents  */
  --brand-green:       #2D5016;   /* header text, links          */
  --brand-green-dark:  #2D4A1C;   /* primary buttons, CTAs       */

  /* Webflow receivos.com tokens — from dev tools + confirmed on design call */
  --wf-footer-bg:        #122000; /* super dark green — footer only        */
  --wf-hero-bg:          #294900; /* medium green — hero / doc-header      */
  --wf-cta:              #cbff84; /* CTA accent                            */
  --wf-avocado-green:    #9ab872; /* muted green                           */
  --wf-line-color:       #ffffff3b; /* divider lines ~23% white            */

  /* Typography */
  --font-sans:    "Wix Madefor Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif:   Georgia, serif;
  --font-ui:      "Wix Madefor Display", system-ui, sans-serif;
  --font-webflow: "Wix Madefor Display", system-ui, sans-serif;
  --font-brand:   "Alfa Slab One", Georgia, serif; /* Receivos wordmark font */

  /* Font Sizes */
  --font-size-xs:   0.75rem;
  --font-size-sm:   0.875rem;
  --font-size-base: 1rem;
  --font-size-lg:   1.125rem;
  --font-size-xl:   1.25rem;
  --font-size-2xl:  1.5rem;
  --font-size-3xl:  1.875rem;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* Border Radius */
  --radius-sm:   0.25rem;
  --radius-md:   0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 200ms ease-in-out;
  --transition-slow: 300ms ease-in-out;
}

/* ── Base ── */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: 1.7;
  color: var(--color-gray-900);
  background-color: var(--color-background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

*:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

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

a {
  color: var(--brand-green);
  transition: opacity var(--transition-fast);
}

a:hover { opacity: 0.75; }

/* ── Hero Wrap — one inset green block containing nav + hero (index page) ── */
/* Matches .navbar-primary on receivos.com: 2em radius, 40px side margins */
.hero-wrap {
  background: var(--wf-hero-bg);
  border-radius: 2em;
  margin: 0 40px;
  overflow: hidden;
}

/* ── Site Header — default: standalone floating green pill (legal pages) ── */
.site-header {
  background: var(--wf-hero-bg);
  border-radius: 2em;
  margin: 0 40px;
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 20px 0;
}

/* Inside hero-wrap: header is transparent + non-sticky (part of the block) */
.hero-wrap .site-header {
  background: transparent;
  border-radius: 0;
  margin: 0;
  position: relative;
  top: auto;
  z-index: auto;
}

/* doc-header inside hero-wrap: no own margin/radius (already inside the green card) */
.hero-wrap .doc-header {
  background: transparent;
  margin: 0;
  border-radius: 0;
}

/* The white rounded card — matches .navbar-wrapper (border-radius: 11px) inside .navbar-primary.no-padding (margin: 20px) on receivos.com */
.header-inner {
  background: #ffffff;
  border-radius: 11px;
  margin-left: 20px;
  margin-right: 20px;
  padding: 0 25px;
  min-height: 90px;
  width: 1280px;
  max-width: calc(100% - 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "Wix Madefor Display", sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #555;
  box-sizing: border-box;
}

.header-brand {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* Icon-only logo (nowordlogo.png) — square, no cropping needed */
.brand-logo-wrap {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-logo {
  height: 45px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.header-brand:hover { opacity: 0.9; }

/* "Learn" — left border line separates logo from label */
.header-brand .brand-sub {
  border-left: 1px solid #122000;
  color: #555;
  margin-left: 20px;
  padding: 0 0 0 20px;
  font-family: "Wix Madefor Display", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.625em;
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}

/* "Home" — exact match to .button-primary.is-hidden.log-in on receivos.com */
.header-back {
  font-family: var(--font-webflow);
  font-size: 16px;
  font-weight: 700;
  color: #000;
  background: var(--wf-cta);
  text-decoration: none;
  border: 1px solid var(--wf-hero-bg);
  padding: 10px 20px;
  border-radius: 50px;
  transition: background-color 0.2s, color 0.2s;
  white-space: nowrap;
}

.header-back:hover {
  background: var(--wf-hero-bg);
  color: #fff;
  opacity: 1;
}

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: var(--font-size-xs);
  font-family: var(--font-ui);
  padding: 0.75rem 0;
  margin: 0 40px;
}

.breadcrumb-inner {
  display: flex;
  align-items: center;
  padding: 0 25px;
  margin-left: 20px;
  margin-right: 20px;
}

/* Inside hero-wrap: white text on green bg, reset standalone spacing */
.hero-wrap .breadcrumb {
  color: rgba(255,255,255,0.7);
  margin: 0;
  padding: 0;
}

.hero-wrap .breadcrumb a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
}

.hero-wrap .breadcrumb a:hover { color: #fff; text-decoration: underline; opacity: 1; }

.hero-wrap .breadcrumb span { margin: 0 6px; }

/* Standalone breadcrumb */
.breadcrumb a {
  color: var(--brand-green);
  text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; opacity: 1; }

.breadcrumb span { margin: 0 var(--space-2); }

/* ── Layout ── */
main { flex: 1; }

.container {
  padding: 0 5%;
}

/* ── Hub Hero — transparent inside hero-wrap; the wrap provides the green bg + rounding ── */
.hero {
  background: transparent;
  padding: 5rem 5% 12rem;
  border-radius: 0;
  margin: 0;
}

.hero-inner {
  max-width: 700px;
}

.hero h1 {
  font-family: var(--font-webflow);
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 700;
  color: white;
  margin-bottom: var(--space-4);
  letter-spacing: -1px;
  line-height: 1.1;
}

.hero p {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: rgba(255, 255, 255, 0.75);
  max-width: 540px;
  font-family: var(--font-webflow);
  line-height: 1.7;
}

/* ── Section label (small caps above a proper heading) ── */
.section-label {
  font-family: var(--font-ui);
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-gray-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
}

/* ── Section heading — large, matches Webflow display style ── */
.section-heading {
  font-family: var(--font-webflow);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: 0;
  letter-spacing: -0.3px;
}

/* ── Docs section wrapper — space between hero and cards ── */
.docs-section {
  padding-top: var(--space-12);
}

/* ── Document Card Grid ── */
.card-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-5);
  padding: var(--space-6) 5% var(--space-12);
}

.doc-card {
  flex: 0 1 280px;   /* fixed base, won't grow — keeps cards same width */
  min-width: 220px;
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.doc-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  opacity: 1;
}

.doc-card .card-title {
  font-family: var(--font-webflow);
  font-weight: 700;
  font-size: var(--font-size-base);
  color: var(--color-gray-900);
}

.doc-card .card-desc {
  font-size: var(--font-size-sm);
  color: var(--color-gray-500);
  line-height: 1.5;
}

.doc-card .card-arrow {
  margin-top: auto;
  padding-top: var(--space-3);
  font-size: var(--font-size-sm);
  font-family: var(--font-webflow);
  font-weight: 600;
  color: var(--brand-green);
}

.doc-card.coming-soon {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

/* ── Help Section (index) ── */
.help-section {
  background: var(--color-white);
  border-top: 1px solid var(--color-gray-200);
  padding: var(--space-10) var(--space-6);
}

.help-section .container { padding: 0 5%; }

.help-section p {
  color: var(--color-gray-500);
  font-size: var(--font-size-sm);
  margin-top: var(--space-3);
}

/* ── Legal Document Pages ── */

/* Medium green banner — floating rounded block on page background */
.doc-header {
  background: var(--wf-hero-bg);
  padding: var(--space-8) var(--space-6) var(--space-10);
  border-radius: 2em;
  margin: 0 40px;
  overflow: hidden;
}

.doc-header-inner {
  margin-left: 20px;
  margin-right: 20px;
  padding: 0 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
}

.doc-header h1 {
  font-family: var(--font-webflow);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: white;
  margin-bottom: var(--space-2);
  letter-spacing: -0.02em;
}

.doc-meta {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.7);
}


.doc-body {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--space-10) var(--space-6) var(--space-12);
}

.doc-body h2 {
  font-family: var(--font-webflow);
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--brand-green);
  margin: var(--space-10) 0 var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-gray-200);
}

.doc-body h2:first-child { margin-top: 0; }

.doc-body p { margin-bottom: var(--space-4); }

.doc-body ul,
.doc-body ol {
  margin: 0 0 var(--space-4) var(--space-6);
}

.doc-body li { margin-bottom: var(--space-2); }

.doc-body a { color: var(--brand-green); text-decoration: none; }
.doc-body a:hover { text-decoration: underline; opacity: 1; }

.doc-body strong { font-weight: 500; color: var(--color-gray-800); }

/* ── Terms / Privacy — two-column layout with sticky TOC ── */
.doc-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 4rem;
  align-items: start;
}

.toc {
  position: sticky;
  top: 128px; /* accounts for sticky header height */
  font-size: 0.82rem;
}

.toc-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gray-400);
  margin-bottom: 1rem;
  font-family: var(--font-ui);
}

.toc ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.toc ol li a {
  display: flex;
  align-items: baseline;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  color: var(--color-gray-600);
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
  line-height: 1.4;
  font-family: var(--font-ui);
  font-size: 0.82rem;
}

.toc ol li a:hover {
  background: var(--color-success-light);
  color: var(--brand-green);
  opacity: 1;
}

/* Document intro hero block (above section list) */
.doc-intro {
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--color-gray-200);
}

.doc-eyebrow {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-green);
  margin-bottom: 0.75rem;
}

.doc-intro h1 {
  font-family: var(--font-webflow);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.doc-meta-row {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--color-gray-400);
  font-family: var(--font-ui);
  margin-bottom: 0.5rem;
}

.doc-meta-row strong { color: var(--color-gray-600); font-weight: 500; }

.doc-intro-text {
  margin-top: 1rem;
  margin-bottom: 2.5rem;
  font-size: 1rem;
  color: var(--color-gray-600);
  max-width: 620px;
  line-height: 1.7;
}

/* Individual sections */
.tos-section {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--color-gray-200);
}

.tos-section:last-child { border-bottom: none; }

.tos-section-header {
  margin-bottom: 1.25rem;
}

.tos-section h2 {
  font-family: var(--font-webflow);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brand-green-dark);
  line-height: 1.2;
  letter-spacing: -0.015em;
  border-bottom: none;
  margin: 0;
  padding: 0;
}

.tos-section-body {
  color: var(--color-gray-600);
}

.tos-section-body p { margin-bottom: 1rem; }
.tos-section-body p:last-child { margin-bottom: 0; }

.tos-section-body ul,
.tos-section-body ol {
  margin: 0 0 1rem 1.5rem;
}

.tos-section-body li { margin-bottom: 0.4rem; }

.tos-section-body a { color: var(--brand-green); text-decoration: none; }
.tos-section-body a:hover { text-decoration: underline; opacity: 1; }

.tos-subsection { margin-top: 1.5rem; }

.tos-subsection h3 {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gray-400);
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--color-gray-200);
}

/* Legal callout box (all-caps disclaimer text) */
.callout {
  background: var(--color-gray-50);
  border-left: 3px solid var(--brand-green);
  border-radius: 0 6px 6px 0;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--color-gray-600);
}

@media (max-width: 800px) {
  .doc-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 2rem 1.25rem;
  }
  .toc {
    position: static;
    background: var(--color-gray-50);
    border: 1px solid var(--color-gray-200);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 2.5rem;
  }
  .tos-section-body { padding-left: 0; }
}

/* ── Full multi-column site footer (matches receivos.com Webflow) ── */
.site-footer-full {
  background: var(--wf-footer-bg);
  color: white;
}

/* Shared centering container — mirrors Webflow's base-container.no-padding */
.sfooter-container {
  width: 100%;
  max-width: 1330px;
  margin-left: auto;
  margin-right: auto;
  padding: 3rem 20px 25px;
}

.sfooter-columns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--wf-line-color);
}

/* Column headings — Wix Madefor Display bold, matches Webflow */
.sfooter-heading {
  font-family: var(--font-webflow);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  color: white;
  line-height: 1.25;
  margin-bottom: 1.75rem;
}

.sfooter-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sfooter-col ul a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 1rem;
  font-family: var(--font-webflow);
  transition: color var(--transition-fast);
}

.sfooter-col ul a:hover { color: var(--wf-cta); opacity: 1; }

.sfooter-quote {
  font-family: var(--font-webflow);
  font-size: var(--font-size-sm);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.65);
  font-style: italic;
  margin-bottom: 1.25rem;
}

/* Search button — Webflow uses white outlined ghost button */
.sfooter-btn {
  display: inline-block;
  background: transparent;
  color: white;
  font-family: var(--font-webflow);
  font-size: var(--font-size-sm);
  font-weight: 600;
  padding: 0.55rem 1.75rem;
  border: 1.5px solid white;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.sfooter-btn:hover {
  background: white;
  color: var(--wf-footer-bg);
  opacity: 1;
}

.sfooter-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 100px;
  padding-top: 3rem;
  font-size: 16px;
}

/* Left block: wordmark stacked above copyright */
.sfooter-brand {
  display: flex;
  flex-direction: column;
  grid-column-gap: 1rem;
  grid-row-gap: 1rem;
  align-self: flex-start;
}

.sfooter-wordmark {
  width: 400px;
  height: auto;
  display: block;
}

.sfooter-copy {
  font-family: var(--font-webflow);
  font-size: 16px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
}

/* Social icons in circular bordered containers — matches Webflow */
.sfooter-social {
  display: flex;
  flex-direction: row;
  grid-column-gap: 15px;
}
.sfooter-social a {
  cursor: pointer;
  border: 1px solid #fff;
  border-radius: 100px;
  justify-content: center;
  align-items: center;
  width: 39px;
  height: 39px;
  display: flex;
  color: rgba(255, 255, 255, 0.65);
  transition: border .2s, background-color .2s;
}
.sfooter-social a:hover { color: var(--wf-cta); border-color: var(--wf-cta); opacity: 1; }

/* ── Responsive — matches Webflow breakpoints ── */

/* ≥ 1280px */
@media (min-width: 1280px) {
  .site-header {
    padding: 16px 40px;
  }
}

/* ≤ 767px: mobile — Webflow collapses nav */
@media (max-width: 767px) {
  .header-inner {
    min-height: 80px;
    padding: 0 16px;
  }

  .header-logo {
    width: auto;
    height: 34px;
  }

  .header-back {
    font-size: 14px;
    padding: 8px 14px;
  }
}

/* ≤ 640px: small mobile */
@media (max-width: 640px) {
  .hero h1 { font-size: var(--font-size-2xl); }

  .hero-wrap,
  .site-header {
    margin: 0 16px;
    border-radius: 1.5em;
  }

  .doc-header {
    margin: 0 16px;
    border-radius: 1.5em;
  }

  .breadcrumb {
    margin: 0 16px;
  }

  .header-inner {
    margin-left: 12px;
    margin-right: 12px;
    max-width: calc(100% - 24px);
    border-radius: 11px;
  }

  .card-grid,
  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .doc-body,
  .help-section {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .sfooter-columns { grid-template-columns: 1fr; gap: 2rem; }
  .sfooter-wordmark { width: 200px; height: auto; }
  .sfooter-bottom-inner { flex-direction: column; align-items: flex-start; }
}
