/* Velify webfonts — self-hosted, no external CDN request.
   ----------------------------------------------------------------
   NOTE: Velify has no licensed brand fonts yet. These are Google Fonts
   substitutions chosen to match the brief (warm, humanist, editorial):
     - Hanken Grotesk  -> primary UI + body (warm humanist grotesque)
     - Bricolage Grotesque -> editorial display / hero headlines
     - Geist Mono -> small data, timestamps, tabular figures
   All are SIL Open Font License — self-hosting is permitted.
   Swap these for licensed binaries when available; keep the variable names. */

@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/hanken-grotesk-variable.woff2') format('woff2');
}

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/bricolage-grotesque-variable.woff2') format('woff2');
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/geist-mono-variable.woff2') format('woff2');
}

/* ============================================================
   VELIFY · COLOR TOKENS
   ------------------------------------------------------------
   "Grove" is the primary direction: a calm, premium green system
   anchored by the lime brand signature (#8AC926). Deep forest
   greens carry text and depth; warm paper neutrals keep it quiet
   and editorial; sage and mist soften surfaces.
   ============================================================ */

:root {
  /* --- Brand signature (the logo lime) --- */
  --lime-50:  #f3f9e6;
  --lime-100: #e3f1c6;
  --lime-200: #cfe79e;
  --lime-300: #b6da6f;
  --lime-400: #9fce46;
  --lime-500: #8ac926;  /* brand primary — the logo color */
  --lime-600: #6fa81d;
  --lime-700: #588219;
  --lime-800: #45631a;
  --lime-900: #38501b;

  /* --- Forest / evergreen (depth, ink-on-green, deep surfaces) --- */
  --forest-50:  #eef3ef;
  --forest-100: #d6e2da;
  --forest-200: #aec6b8;
  --forest-300: #7fa490;
  --forest-400: #4f7c64;
  --forest-500: #2f6048;
  --forest-600: #234b39;
  --forest-700: #1b3a2c;  /* primary deep green */
  --forest-800: #142c21;
  --forest-900: #0e2018;

  /* --- Sage (muted secondary greens) --- */
  --sage-50:  #f4f7f3;
  --sage-100: #e8efe6;
  --sage-200: #d3e0cf;
  --sage-300: #b3c8ad;
  --sage-400: #8fac87;
  --sage-500: #6f9066;

  /* --- Warm neutrals (paper / ink) --- */
  --paper-0:   #ffffff;
  --paper-50:  #faf9f4;  /* app background — warm paper */
  --paper-100: #f3f1e9;
  --paper-200: #e8e5d9;
  --paper-300: #d8d4c4;
  --ink-300:   #9a9b90;
  --ink-400:   #71746a;
  --ink-500:   #54574e;
  --ink-700:   #2c302a;
  --ink-900:   #181b16;  /* near-black, green-tinted */

  /* --- Emotion / mood spectrum (for check-in + journal) --- */
  --mood-joy:    #f2b134;  /* warm amber */
  --mood-calm:   #6fb3c9;  /* soft teal-blue */
  --mood-content:#8ac926;  /* lime */
  --mood-tender: #d98aa6;  /* rose */
  --mood-low:    #7e8cc4;  /* muted periwinkle */
  --mood-anxious:#e08a5b;  /* coral */
  --mood-angry:  #cf6b5a;  /* clay red */

  /* --- Semantic status --- */
  --green-success: #3f9d6b;
  --amber-warning: #d99a2b;
  --red-danger:    #cf5a4e;
  --blue-info:     #5a86c4;

  /* ============================================================
     SEMANTIC ALIASES — reference these in product code
     ============================================================ */

  /* Surfaces & backgrounds */
  --surface-app:        var(--paper-50);
  --surface-card:       var(--paper-0);
  --surface-sunken:     var(--paper-100);
  --surface-raised:     var(--paper-0);
  --surface-inverse:    var(--forest-800);
  --surface-brand-soft: var(--lime-50);
  --surface-forest-soft:var(--forest-50);

  /* Text */
  --text-strong:   var(--ink-900);
  --text-body:     var(--ink-700);
  --text-muted:    var(--ink-400);
  --text-subtle:   var(--ink-300);
  --text-on-brand: var(--forest-900);
  --text-on-dark:  var(--paper-50);
  --text-brand:    var(--lime-700);
  --text-forest:   var(--forest-700);

  /* Brand / primary action */
  --brand:          var(--lime-500);
  --brand-hover:    var(--lime-400);
  --brand-press:    var(--lime-600);
  --brand-contrast: var(--forest-900);

  /* Secondary (forest) action */
  --accent:         var(--forest-700);
  --accent-hover:   var(--forest-600);
  --accent-press:   var(--forest-800);

  /* Borders & lines */
  --border-subtle:  var(--paper-200);
  --border-default: var(--paper-300);
  --border-strong:  var(--ink-300);
  --border-brand:   var(--lime-300);
  --ring-focus:     color-mix(in oklab, var(--lime-500) 55%, transparent);

  /* Field surfaces */
  --field-bg:       var(--paper-0);
  --field-border:   var(--paper-300);
  --field-placeholder: var(--ink-300);
}

/* ============================================================
   THEME VARIANT · "Dusk" — a cooler, calmer direction.
   Keeps the lime signature, shifts neutrals to slate and the
   secondary toward soft blue. Apply with [data-theme="dusk"].
   ============================================================ */

[data-theme="dusk"] {
  --paper-0:   #ffffff;
  --paper-50:  #f5f6f8;  /* cool mist */
  --paper-100: #eceef2;
  --paper-200: #dde0e7;
  --paper-300: #c8ccd6;
  --ink-300:   #9296a3;
  --ink-400:   #686d7b;
  --ink-500:   #4c5260;
  --ink-700:   #2a2f3a;
  --ink-900:   #161a24;

  --accent:       #3f6f8c;  /* slate blue */
  --accent-hover: #4f7f9c;
  --accent-press: #335a73;
  --text-forest:  #355d77;
  --surface-forest-soft: #eaf1f5;
  --surface-inverse: #1b2532;
}

/* ============================================================
   VELIFY · TYPOGRAPHY TOKENS
   ------------------------------------------------------------
   Bricolage Grotesque for editorial display moments; Hanken
   Grotesque for everything else; Geist Mono for small data.
   Type is set generously — quiet, spacious, editorial.
   ============================================================ */

:root {
  /* Families */
  --font-display: 'Bricolage Grotesque', 'Hanken Grotesk', system-ui, sans-serif;
  --font-sans:    'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* Weights */
  --weight-light:    300;
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;
  --weight-extra:    800;

  /* Fluid display scale (editorial headlines) */
  --text-display-xl: 4.25rem;  /* 68px — hero */
  --text-hero-fluid: clamp(2.25rem, 1.3rem + 4.3vw, var(--text-display-xl));
  --text-display-lg: 3.25rem;  /* 52px */
  --text-display-md: 2.5rem;   /* 40px */
  --text-display-sm: 2rem;     /* 32px */

  /* UI / body scale */
  --text-3xl: 1.625rem;  /* 26px */
  --text-2xl: 1.375rem;  /* 22px */
  --text-xl:  1.1875rem; /* 19px */
  --text-lg:  1.0625rem; /* 17px */
  --text-md:  0.9375rem; /* 15px — base UI */
  --text-sm:  0.8125rem; /* 13px */
  --text-xs:  0.6875rem; /* 11px — labels / overline */

  /* Line heights */
  --leading-tight:   1.08;
  --leading-snug:    1.22;
  --leading-normal:  1.5;
  --leading-relaxed: 1.65;

  /* Letter spacing */
  --tracking-tight:  -0.02em;
  --tracking-snug:   -0.01em;
  --tracking-normal: 0;
  --tracking-wide:   0.04em;
  --tracking-caps:   0.12em;  /* overlines / eyebrows */

  /* Semantic roles */
  --type-hero-size:    var(--text-display-xl);
  --type-hero-weight:  var(--weight-regular);
  --type-h1-size:      var(--text-display-md);
  --type-h2-size:      var(--text-3xl);
  --type-h3-size:      var(--text-xl);
  --type-body-size:    var(--text-md);
  --type-body-leading: var(--leading-relaxed);
  --type-label-size:   var(--text-xs);
  --type-label-weight: var(--weight-semibold);
}

/* ============================================================
   VELIFY · SPACING TOKENS · 4px base, generous rhythm
   ============================================================ */

:root {
  --space-0:   0;
  --space-1:   0.25rem;  /* 4 */
  --space-2:   0.5rem;   /* 8 */
  --space-3:   0.75rem;  /* 12 */
  --space-4:   1rem;     /* 16 */
  --space-5:   1.25rem;  /* 20 */
  --space-6:   1.5rem;   /* 24 */
  --space-8:   2rem;     /* 32 */
  --space-10:  2.5rem;   /* 40 */
  --space-12:  3rem;     /* 48 */
  --space-16:  4rem;     /* 64 */
  --space-20:  5rem;     /* 80 */
  --space-24:  6rem;     /* 96 */
  --space-32:  8rem;     /* 128 */

  /* Layout */
  --gutter:       var(--space-6);
  --section-y:    var(--space-24);
  --container-max: 1180px;
  --content-max:   680px;   /* editorial reading measure */
}

/* ============================================================
   VELIFY · RADIUS TOKENS · gently rounded, medium radii
   ============================================================ */

:root {
  --radius-xs:  6px;
  --radius-sm:  10px;
  --radius-md:  14px;   /* default — buttons, inputs, chips */
  --radius-lg:  20px;   /* cards */
  --radius-xl:  28px;   /* large panels, sheets */
  --radius-2xl: 36px;   /* hero surfaces, blobs */
  --radius-pill: 999px; /* avatars, tags, toggles */

  --radius-card:  var(--radius-lg);
  --radius-field: var(--radius-md);
  --radius-sheet: var(--radius-xl);
}

/* ============================================================
   VELIFY · ELEVATION · soft, low-contrast, green-tinted shadows
   ------------------------------------------------------------
   Shadows are quiet: large blur, low opacity, a faint forest
   tint rather than neutral black. Cards lift gently, never hard.
   ============================================================ */

:root {
  --shadow-xs:  0 1px 2px rgba(20, 44, 33, 0.05);
  --shadow-sm:  0 2px 8px rgba(20, 44, 33, 0.06);
  --shadow-md:  0 8px 24px rgba(20, 44, 33, 0.08);
  --shadow-lg:  0 18px 48px rgba(20, 44, 33, 0.10);
  --shadow-xl:  0 30px 80px rgba(20, 44, 33, 0.14);

  /* Brand glow — used sparingly on primary moments */
  --shadow-brand: 0 10px 30px rgba(138, 201, 38, 0.28);

  /* Inset / pressed */
  --shadow-inset: inset 0 1px 2px rgba(20, 44, 33, 0.08);

  /* Focus ring (paired with --ring-focus color) */
  --ring-width: 3px;

  --elevation-card:  var(--shadow-sm);
  --elevation-raised:var(--shadow-md);
  --elevation-overlay: var(--shadow-xl);
}

/* ============================================================
   VELIFY · MOTION · slow, soft, decelerating.
   ------------------------------------------------------------
   Velify slows you down. Transitions ease out gently — no
   bounce, no snap. Calm fades and soft rises are the vocabulary.
   ============================================================ */

:root {
  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out:cubic-bezier(0.65, 0, 0.35, 1);
  --ease-soft:  cubic-bezier(0.4, 0, 0.2, 1);

  --dur-fast:   140ms;
  --dur-base:   240ms;
  --dur-slow:   420ms;
  --dur-breathe: 4200ms;

  --transition-base: all var(--dur-base) var(--ease-out);
  --transition-color: color var(--dur-fast) var(--ease-soft),
                      background-color var(--dur-fast) var(--ease-soft),
                      border-color var(--dur-fast) var(--ease-soft);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 0ms;
    --dur-base: 0ms;
    --dur-slow: 0ms;
  }
}

/* ============================================================
   VELIFY · BASE ELEMENT DEFAULTS
   Lightweight resets + brand defaults. Safe for cards & kits.
   ============================================================ */

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--text-body);
  background: var(--surface-app);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-strong);
  font-weight: var(--weight-regular);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--text-display-md); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); letter-spacing: var(--tracking-snug); }

p { margin: 0 0 1em; text-wrap: pretty; }

a { color: var(--text-forest); text-decoration: none; }
a:hover { color: var(--brand-press); }

/* Brand utility helpers (optional, available to consumers) */
.v-eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-muted);
}

.v-container { max-width: var(--container-max); margin-inline: auto; padding-inline: var(--gutter); }

/* Soft ambient blob — decorative background motif */
.v-blob {
  border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%;
  filter: blur(0.5px);
}

::selection { background: var(--lime-200); color: var(--forest-900); }

/* Lucide icon sizing — Icon component renders an <i data-lucide> placeholder
   that lucide.createIcons() swaps for an <svg>. These rules size & weight it. */
.v-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.v-icon svg { width: 100%; height: 100%; display: block; stroke-width: var(--v-icon-stroke, 1.75px); }

/* ============================================================
   VELIFY · INTERACTIVE STATES (pure CSS, no JS)
   ------------------------------------------------------------
   Hover/press visuals for Button and Card. Originally driven by
   React useState (onMouseEnter/onMouseDown); moved to :hover/:active
   so the marketing site ships with zero client-side JavaScript.
   ============================================================ */

/* ---------------- Button ---------------- */
.v-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-base);
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font-sans);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.005em;
}
.v-btn:disabled { cursor: not-allowed; opacity: 0.5; }
.v-btn-pill { border-radius: var(--radius-pill); }

.v-btn-primary { background: var(--brand); color: var(--brand-contrast); box-shadow: var(--shadow-brand); }
.v-btn-primary:hover { background: var(--brand-hover); }
.v-btn-primary:active { background: var(--brand-press); transform: translateY(0.5px); }

.v-btn-secondary { background: var(--accent); color: var(--text-on-dark); box-shadow: var(--shadow-sm); }
.v-btn-secondary:hover { background: var(--accent-hover); }
.v-btn-secondary:active { background: var(--accent-press); }

.v-btn-soft { background: var(--surface-brand-soft); color: var(--text-brand); border-color: var(--border-brand); }
.v-btn-soft:hover, .v-btn-soft:active { background: var(--lime-100); }

.v-btn-outline { background: transparent; color: var(--text-strong); border-color: var(--border-default); }
.v-btn-outline:hover, .v-btn-outline:active { border-color: var(--border-strong); background: var(--surface-sunken); }

.v-btn-ghost { background: transparent; color: var(--text-body); }
.v-btn-ghost:hover, .v-btn-ghost:active { background: var(--surface-sunken); }

.v-btn-danger { background: var(--red-danger); color: #fff; box-shadow: var(--shadow-sm); }
.v-btn-danger:hover { filter: brightness(1.05); }

/* ---------------- Card ---------------- */
.v-card { transition: var(--transition-base); }
.v-card-default { background: var(--surface-card); box-shadow: var(--elevation-card); border: 1px solid var(--border-subtle); }
.v-card-soft { background: var(--surface-sunken); border: 1px solid transparent; }
.v-card-outline { background: var(--surface-card); border: 1px solid var(--border-default); }
.v-card-flat { background: var(--surface-card); border: 1px solid var(--border-subtle); }
.v-card-forest { background: var(--surface-inverse); color: var(--text-on-dark); border: 1px solid transparent; }
.v-card-brand { background: var(--surface-brand-soft); border: 1px solid var(--border-brand); }

.v-card-interactive { cursor: pointer; }
.v-card-interactive:hover { transform: translateY(-2px); box-shadow: var(--elevation-raised); }

/* ---------------- Datenschutz TOC links ---------------- */
.v-toc-link {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--border-subtle);
  text-decoration: none;
  display: block;
  transition: all 0.15s;
}
.v-toc-link:hover {
  color: var(--text-brand);
  border-left-color: var(--brand);
  background: var(--surface-brand-soft);
}

/* ============================================================
   VELIFY · RESPONSIVE LAYOUT
   ------------------------------------------------------------
   Breakpoints (desktop-first, max-width):
     1023px — tablet: nav collapses to hamburger, 3/4-col grids -> 2
     767px  — mobile: all multi-column grids -> 1 column, hero
              visuals hidden, gutters shrink, hero H1 goes fluid
   Grid classes accept an optional --v-cols custom property (set
   inline) to preserve a page's exact desktop column ratio; the
   media queries below always force a fixed layout with !important
   so that override wins regardless of --v-cols.
   ============================================================ */

/* ---------------- page container ---------------- */
.v-page-container {
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 28px;
}
@media (max-width: 767px) {
  .v-page-container { padding-inline: var(--space-4); }
}

/* ---------------- hero grid ---------------- */
.v-hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; }
.v-hero-grid-wide { display: grid; grid-template-columns: 1.1fr 0.9fr; }
@media (max-width: 767px) {
  .v-hero-grid, .v-hero-grid-wide { grid-template-columns: 1fr !important; }
}

/* decorative / floating hero visuals: drop once the hero stacks to
   a single column, since their absolute positioning assumes the
   two-column composition next to them */
@media (max-width: 767px) {
  .v-hero-visual { display: none !important; }
}

/* fluid hero heading */
.v-hero-h1 { font-size: var(--text-hero-fluid); }

/* ---------------- section grids ---------------- */
.v-grid-2 { display: grid; grid-template-columns: var(--v-cols, 1fr 1fr); }
.v-grid-3 { display: grid; grid-template-columns: var(--v-cols, repeat(3, 1fr)); }
.v-grid-4 { display: grid; grid-template-columns: var(--v-cols, repeat(4, 1fr)); }
.v-grid-sidebar { display: grid; grid-template-columns: 220px 1fr; }
.v-grid-footer { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); }
.v-grid-testimonial { display: grid; grid-template-columns: 1fr auto; }

/* grid items default to min-width:auto, which lets long unwrapped
   text/buttons force a track wider than its column — allow shrinking */
.v-grid-2 > *, .v-grid-3 > *, .v-grid-4 > *,
.v-grid-sidebar > *, .v-grid-footer > *, .v-grid-testimonial > * {
  min-width: 0;
}

@media (max-width: 1023px) {
  .v-grid-3, .v-grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .v-grid-footer { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 767px) {
  .v-grid-2, .v-grid-3, .v-grid-4, .v-grid-sidebar, .v-grid-footer, .v-grid-testimonial {
    grid-template-columns: 1fr !important;
  }
}

/* sticky columns (datenschutz TOC, ueber-uns side rails) only make
   sense next to a second column */
@media (max-width: 767px) {
  .v-toc-nav, .v-sticky-col { position: static !important; }
}

/* CTA / testimonial boxes with generous fixed desktop padding */
@media (max-width: 767px) {
  .v-promo-pad { padding: 32px 24px !important; }
}

/* small floating stat/info badges outside a hero composition —
   absolutely positioned relative to a column that shrinks at mobile */
@media (max-width: 767px) {
  .v-float-badge { display: none !important; }
}

/* long unbroken URLs/compound words (German headings, links) must
   not force horizontal scroll — inherited by all text descendants */
body { overflow-wrap: break-word; }

/* buttons default to white-space:nowrap (interactive.css); on very
   narrow phones a long CTA label can still exceed the viewport */
@media (max-width: 400px) {
  .v-btn { white-space: normal; text-align: center; }
}

/* ---------------- nav: pure-CSS hamburger (no client JS ships) ---------------- */
.v-nav-toggle { display: none; }
.v-nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  flex: none;
}
.v-nav-burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-strong);
  border-radius: 2px;
}

.v-nav-cta { display: flex; align-items: center; gap: 28px; }
.v-nav-cta-mobile { display: none; }

@media (max-width: 1023px) {
  .v-nav-burger { display: flex; }
  .v-nav-links {
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 4px !important;
    margin-left: 0 !important;
    background: var(--surface-card);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .v-nav-links a { padding: 12px 28px; }
  .v-nav-toggle:checked ~ .v-nav-links { max-height: 70vh; overflow-y: auto; }
}
@media (max-width: 767px) {
  .v-nav-cta { display: none; }
  .v-nav-cta-mobile { display: block; padding: 14px 28px 20px; }
}
