/* =============================================================================
   base.css — Venture Factory Shared Design System — Version: 3.0

   RULE: Never edit this file per venture. Zero hardcoded colours or fonts.
   All venture values live in tokens.css.

   Load order in index.html — non-negotiable:
     <link rel="stylesheet" href="tokens.css" />   ← first
     <link rel="stylesheet" href="base.css" />     ← second

   FONT NOTE: --font-primary and --font-secondary are declared ONLY in tokens.css.
   This file uses var(--font-primary) without declaring the variable, so tokens.css
   always provides the value and base.css never overwrites it.
   ============================================================================= */


/* =============================================================================
   1. RESET
   ============================================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select  { font: inherit; }
p, h1, h2, h3, h4, h5, h6       { overflow-wrap: break-word; }
ul, ol                           { list-style: none; }
a                                { text-decoration: none; color: inherit; }


/* =============================================================================
   2. FLUID TYPE SCALE
   Ratio: √2 (1.414). Hero = H1 × 1.2. Units: rem. No fixed breakpoints.
   ============================================================================= */

:root {
  --text-hero:    clamp(2.375rem, 4vw   + 1.1rem,   3.625rem);  /* hero headline only                  */
  --text-display: clamp(2rem,     5vw   + 0.5rem,   3.8rem);    /* section openers — S3, S5            */
  --text-statement: clamp(2.05rem, 3.9vw + 0.75rem, 4.1rem);    /* large sequential statements         */
  --text-feature: clamp(1.9rem,   2.8vw + 0.95rem,  3.25rem);   /* repeated feature/list titles        */
  --text-accent:  clamp(2.35rem,  5vw   + 0.75rem,  5rem);      /* accent interstitial statements      */
  --text-h1:      clamp(2rem,     3.2vw + 1.1rem,   3rem);      /* standard H1                         */
  --text-h2:      clamp(1.5rem,   2vw   + 0.9rem,   2.125rem);
  --text-h3:      clamp(1.125rem, 1.2vw + 0.75rem,  1.5rem);
  --text-body:    clamp(0.938rem, 0.5vw + 0.813rem, 1.125rem);
  --text-small:   clamp(0.813rem, 0.4vw + 0.7rem,   0.938rem);
  --text-label:   clamp(0.688rem, 0.3vw + 0.613rem, 0.813rem);
}


/* =============================================================================
   3. FLUID SPACING SCALE
   ============================================================================= */

:root {
  --space-2xs: clamp(0.25rem,  0.3vw  + 0.15rem, 0.375rem);
  --space-xs:  clamp(0.5rem,   0.5vw  + 0.3rem,  0.75rem);
  --space-sm:  clamp(0.75rem,  0.8vw  + 0.45rem, 1.25rem);
  --space-md:  clamp(1rem,     1.5vw  + 0.5rem,  2rem);
  --space-lg:  clamp(1.5rem,   2.5vw  + 0.75rem, 3rem);
  --space-xl:  clamp(2.5rem,   4vw    + 1rem,    5rem);
  --space-2xl: clamp(4rem,     6vw    + 1.5rem,  8rem);
  --space-3xl: clamp(6rem,     8vw    + 2rem,    12rem);

  --section-sm: clamp(3rem,  5vw,  4rem);
  --section-md: clamp(5rem,  8vw,  8rem);
  --section-lg: clamp(8rem,  12vw, 12rem);
  --section-xl: clamp(12rem, 16vw, 18rem);
}


/* =============================================================================
   4. TYPOGRAPHY TOKENS
   --font-primary and --font-secondary are NOT declared here.
   They are declared only in tokens.css so base.css never overwrites them.
   ============================================================================= */

:root {
  --weight-light:  300;
  --weight-medium: 500;
  --weight-bold:   700;

  --leading-heading: 1.15;
  --leading-body:    1.65;
  --leading-label:   1.3;

  --tracking-heading: -0.02em;
  --tracking-body:     0em;
  --tracking-label:    0.12em;

  --measure-body: 68ch;
}


/* =============================================================================
   5. BRAND TONAL SCALE
   --brand-500 set in tokens.css. 100–900 auto-computes here via color-mix().
   ============================================================================= */

:root {
  --brand-400: color-mix(in srgb, var(--brand-500) 80%, white);
  --brand-300: color-mix(in srgb, var(--brand-500) 60%, white);
  --brand-200: color-mix(in srgb, var(--brand-500) 40%, white);
  --brand-100: color-mix(in srgb, var(--brand-500) 20%, white);
  --brand-600: color-mix(in srgb, var(--brand-500) 80%, black);
  --brand-700: color-mix(in srgb, var(--brand-500) 60%, black);
  --brand-800: color-mix(in srgb, var(--brand-500) 40%, black);
  --brand-900: color-mix(in srgb, var(--brand-500) 20%, black);
}


/* =============================================================================
   6. BORDER RADIUS
   ============================================================================= */

:root {
  --radius-sm:   0.25rem;
  --radius-lg:   1rem;
  --radius-full: 9999px;
}


/* =============================================================================
   7. THEME CLASSES
   Structural defaults only — base.css sets no colours here.
   All theme colours (bg, text, cta) are set in tokens.css Layer 5.
   This keeps base.css venture-agnostic.

   Available themes (defined in tokens.css):
     .theme-brand        brand green bg    → btn--primary = accent fill
     .theme-brand-light  lighter green bg  → btn--primary = accent fill
     .theme-brand-dark   deep green bg     → btn--primary = accent fill
     .theme-light        linen bg          → btn--primary = brand fill
     .theme-dark         near-black bg     → btn--primary = sand fill
   ============================================================================= */

/* Structural shell only — colours come from tokens.css */
.theme-brand,
.theme-brand-light,
.theme-brand-dark,
.theme-light,
.theme-dark {
  background-color: var(--color-bg);
  color: var(--color-text);
}


/* =============================================================================
   8. CONTAINER + GRID
   ============================================================================= */

.section        { width: 100%; padding-block: var(--section-md); }
.section--sm    { padding-block: var(--section-sm); }
.section--lg    { padding-block: var(--section-lg); }
.section--xl    { padding-block: var(--section-xl); }
.section--flush { padding-block: 0; }

.container {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 6rem);
}

.container--narrow {
  width: 100%;
  max-width: 780px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-md);
}

.col-1  { grid-column: span 1; }
.col-2  { grid-column: span 2; }
.col-3  { grid-column: span 3; }
.col-4  { grid-column: span 4; }
.col-5  { grid-column: span 5; }
.col-6  { grid-column: span 6; }
.col-7  { grid-column: span 7; }
.col-8  { grid-column: span 8; }
.col-9  { grid-column: span 9; }
.col-10 { grid-column: span 10; }
.col-11 { grid-column: span 11; }
.col-12 { grid-column: span 12; }

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--min-col-width, 280px), 1fr));
  gap: var(--space-md);
}

.cq-wrapper { container-type: inline-size; container-name: wrapper; }


/* =============================================================================
   9. BASE TYPOGRAPHY
   Uses var(--font-primary) — value comes from tokens.css, never overwritten here.
   ============================================================================= */

body {
  font-family: var(--font-primary);
  font-size: var(--text-body);
  font-weight: var(--weight-light);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
  color: var(--color-text);
  background-color: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: var(--weight-medium);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
  color: var(--color-text);
}

.text-hero         { font-size: var(--text-hero); }
h1, .text-h1       { font-size: var(--text-h1); }
h2, .text-h2       { font-size: var(--text-h2); }
h3, .text-h3       { font-size: var(--text-h3); }

p {
  font-size: var(--text-body);
  font-weight: var(--weight-light);
  line-height: var(--leading-body);
  max-width: var(--measure-body);
  color: var(--color-text);
}

.text-small { font-size: var(--text-small); line-height: var(--leading-body); }

.text-label {
  font-size: var(--text-label);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  line-height: var(--leading-label);
}

.text-muted          { color: var(--color-text-muted); }
.text-secondary-font { font-family: var(--font-secondary); }


/* =============================================================================
   10. NAVIGATION
   ============================================================================= */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  width: 100%;
  padding-block: var(--space-sm);
  background-color: transparent;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.3s ease,
              backdrop-filter 0.3s ease;
}

.nav--hidden   { transform: translateY(-100%); }

.nav--scrolled {
  /* Default: no background — venture tokens.css sets the scrolled colour.
     This prevents base.css from fighting token overrides on ventures
     that use a dark nav. Override in tokens.css or post-base <style>. */
  background-color: transparent;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 6rem);
}

.nav__logo {
  font-family: var(--font-primary);
  font-size: var(--text-h3);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-heading);
  color: var(--color-text);
  line-height: 1;
}

.nav-logo-img                          { display: block; height: 2rem; width: auto; }
.nav__logo--text-active .nav-logo-img  { display: none; }
.nav__logo--img-active  .nav-logo-text { display: none; }

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}

.nav__link {
  position: relative;
  font-size: var(--text-small);
  font-weight: var(--weight-light);
  color: var(--color-text);
  padding-block: 0.25rem;
  transition: font-weight 0.2s ease;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background-color: currentColor;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav__link:hover           { font-weight: var(--weight-medium); }
.nav__link:hover::after    { width: 100%; }
.nav__cta                  { margin-left: var(--space-md); }

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.nav__hamburger span {
  display: block;
  width: 22px; height: 1.5px;
  background-color: var(--color-text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav__panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding-inline: clamp(1.25rem, 5vw, 6rem);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), padding 0.35s ease;
}

@media (max-width: 768px) {
  .nav__links { display: none; }
}

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

  .nav--has-hamburger.nav--open .nav__panel {
    max-height: 400px;
    padding-block: var(--space-md);
  }

  .nav--has-hamburger.nav--open .nav__hamburger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav--has-hamburger.nav--open .nav__hamburger span:nth-child(2) { opacity: 0; }
  .nav--has-hamburger.nav--open .nav__hamburger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
}


/* =============================================================================
   11. BUTTONS
   ============================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-primary);
  font-size: var(--text-label);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  border: 1.5px solid transparent;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
            color 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
            border-color 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
            filter 0.35s ease,
            transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94),
            box-shadow 0.35s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.98); }

.btn--primary {
  background-color: var(--color-cta-bg);
  color: var(--color-cta-text);
  border-color: var(--color-cta-bg);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-cta-bg);
  border-color: var(--color-cta-bg);
}

.btn--secondary:hover {
  background-color: var(--color-cta-bg);
  color: var(--color-cta-text);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn--ghost {
  background-color: transparent;
  color: var(--color-text);
  border-color: transparent;
}
.btn--ghost:hover { color: var(--color-cta-bg); }

.btn--sm { padding: var(--space-xs) var(--space-md); }
.btn--lg { padding: var(--space-md) var(--space-xl); font-size: var(--text-small); }


/* =============================================================================
   12. FORMS
   ============================================================================= */

.form-capture {
  display: flex;
  gap: var(--space-sm);
  width: 100%;
  max-width: 520px;
  container-type: inline-size;
}

.form-capture__input {
  flex: 1;
  min-width: 0;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-primary);
  font-size: var(--text-body);
  font-weight: var(--weight-light);
  color: var(--color-text);
  background-color: transparent;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  outline: none;
  transition: border-color 0.2s ease;
}

.form-capture__input::placeholder { color: var(--color-text-muted); }
.form-capture__input:focus        { border-color: var(--color-cta-bg); }

@container (max-width: 420px) {
  .form-capture { flex-direction: column; }
}


/* =============================================================================
   13. CARDS
   ============================================================================= */

.card                { border-radius: var(--radius-lg); background-color: var(--sand-200); overflow: hidden; }
.card__body          { padding: var(--space-lg); }
.card__label         { font-size: var(--text-label); font-weight: var(--weight-medium); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-text-muted); margin-bottom: var(--space-sm); }
.card__title         { font-size: var(--text-h3); font-weight: var(--weight-medium); line-height: var(--leading-heading); color: var(--color-text); margin-bottom: var(--space-sm); }
.card__text          { font-size: var(--text-body); font-weight: var(--weight-light); color: var(--color-text-muted); }


/* =============================================================================
   14. SCROLL-REVEAL
   ============================================================================= */

.reveal {
  opacity: 0;
  transform: translateY(2.5rem);
  transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal--visible { opacity: 1; transform: translateY(0); }

.reveal-group > * {
  opacity: 0;
  transform: translateY(2.5rem);
  transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.reveal-group--visible > *:nth-child(1) { transition-delay: 0s;    opacity: 1; transform: none; }
.reveal-group--visible > *:nth-child(2) { transition-delay: 0.30s; opacity: 1; transform: none; }
.reveal-group--visible > *:nth-child(3) { transition-delay: 0.60s; opacity: 1; transform: none; }
.reveal-group--visible > *:nth-child(4) { transition-delay: 0.90s; opacity: 1; transform: none; }
.reveal-group--visible > *:nth-child(5) { transition-delay: 1.20s; opacity: 1; transform: none; }
.reveal-group--visible > *:nth-child(6) { transition-delay: 1.50s; opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-group > * { opacity: 1; transform: none; transition: none; }
}

.no-animate { opacity: 1 !important; transform: none !important; transition: none !important; }


/* =============================================================================
   15. UTILITIES
   ============================================================================= */

.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap    { flex-wrap: wrap; }
.items-start  { align-items: flex-start; }
.items-end    { align-items: flex-end; }

.gap-2xs { gap: var(--space-2xs); }
.gap-xs  { gap: var(--space-xs); }
.gap-sm  { gap: var(--space-sm); }
.gap-md  { gap: var(--space-md); }
.gap-lg  { gap: var(--space-lg); }
.gap-xl  { gap: var(--space-xl); }

.text-left   { text-align: left; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

.measure      { max-width: var(--measure-body); }
.measure-none { max-width: none; }

.divider { width: 100%; height: 1px; background-color: var(--color-border); }

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


/* =============================================================================
   16. COOKIE BANNER
   Fixed bar — slides up from bottom. Self-contained tokens (no theme class
   needed). Consent Mode v2 compatible: set analytics_storage before GTM loads.
   ============================================================================= */

.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background-color: var(--sand-100);
  border-top: 1px solid var(--sand-300);
  padding: var(--space-md) clamp(1.25rem, 5vw, 6rem);
  transform: translateY(100%);
  transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.07);
}

.cookie-banner--visible { transform: translateY(0); }

.cookie-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  max-width: 1440px;
  margin-inline: auto;
  flex-wrap: wrap;
}

.cookie-banner__msg {
  font-family: var(--font-primary);
  font-size: var(--text-small);
  font-weight: var(--weight-light);
  line-height: 1.65;
  color: var(--brand-600);
  max-width: 64ch;
  margin: 0;
}

.cookie-banner__msg strong {
  font-weight: var(--weight-medium);
  color: var(--brand-900);
}

.cookie-banner__link {
  color: var(--brand-900);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--brand-300);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
  white-space: nowrap;
}

.cookie-banner__link:hover {
  color: var(--accent-500);
  text-decoration-color: var(--accent-500);
}

.cookie-banner__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.cookie-banner__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xs) var(--space-md);
  font-family: var(--font-primary);
  font-size: var(--text-label);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  border-radius: var(--radius-full);
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.cookie-banner__btn--accept {
  background-color: var(--brand-900);
  border-color: var(--brand-900);
  color: var(--sand-100);
}

.cookie-banner__btn--accept:hover {
  background-color: var(--accent-500);
  border-color: var(--accent-500);
  color: var(--brand-900);
}

.cookie-banner__btn--decline {
  background-color: transparent;
  border-color: var(--sand-300);
  color: var(--brand-400);
}

.cookie-banner__btn--decline:hover {
  border-color: var(--brand-300);
  color: var(--brand-700);
}

@media (max-width: 640px) {
  .cookie-banner__inner { flex-direction: column; align-items: flex-start; }
  .cookie-banner__actions { width: 100%; }
}
