/* ==========================================================================
   1. FONTS — self-hosted, variable, latin subset only (zero external requests)
   ========================================================================== */

@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/SourceSerif4-Variable.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 350 700;
  font-display: swap;
  src: url('../assets/fonts/SourceSans3-Variable.woff2') format('woff2');
}

/* ==========================================================================
   2. DESIGN TOKENS — sampled from the real Verdalyne logo, distinct from
   Convita's warm/rounded consumer palette (restrained, institutional)
   ========================================================================== */

:root {
  /* Brand — deep forest green sampled directly from the provided logo */
  --color-brand: #145A3A;
  --color-brand-light: #4A7856;     /* mid sage — hover states, secondary UI */
  --color-brand-tint: #EAF2ED;      /* pale sage — section backgrounds, cards */

  /* Neutrals — cooler/near-white, distinct from Convita's Warm Cream */
  --color-bg: #FAFAF8;
  --color-surface: #FFFFFF;
  --color-text: #1F2937;
  --color-text-secondary: #5C6F65;  /* green-tinted slate, ties to brand */
  --color-border: #E1E7E3;

  /* Typography */
  --font-display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --text-display: 600 2.5rem/1.2 var(--font-display);
  --text-h1: 600 2rem/1.25 var(--font-display);
  --text-h2: 600 1.5rem/1.3 var(--font-display);
  --text-h3: 600 1.125rem/1.4 var(--font-body);
  --text-body: 400 1rem/1.6 var(--font-body);
  --text-body-sm: 400 0.9rem/1.5 var(--font-body);
  --text-caption: 500 0.75rem/1.3 var(--font-body);

  /* Spacing — 4px base grid, same scale convention as the Convita site */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;

  /* Shape — tighter/sharper than Convita's playful 16px cards */
  --radius-card: 8px;
  --radius-button: 6px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(20, 30, 25, 0.04), 0 6px 20px rgba(20, 30, 25, 0.06);
}

/* ==========================================================================
   3. RESET
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: hidden; }
body, h1, h2, h3, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, picture, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select, button { font: inherit; }

@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; }
}

/* ==========================================================================
   4. BASE TYPOGRAPHY
   ========================================================================== */

body {
  background: var(--color-bg);
  color: var(--color-text);
  font: var(--text-body);
  -webkit-font-smoothing: antialiased;
}

h1 { font: var(--text-h1); }
h2 { font: var(--text-h2); }
h3 { font: var(--text-h3); }

.eyebrow {
  display: inline-block;
  font: var(--text-caption);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: var(--space-2);
}

/* ==========================================================================
   5. LAYOUT PRIMITIVES
   ========================================================================== */

.container {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.section { padding-block: var(--space-16); }
.section--tight { padding-block: var(--space-8); }

.section-head {
  max-width: 60ch;
  margin-bottom: var(--space-8);
}
.section-head--center { margin-inline: auto; text-align: center; }

.grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid--4 { grid-template-columns: repeat(4, 1fr); } }

.split {
  display: grid;
  gap: var(--space-8);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 768px) { .split { grid-template-columns: 1fr 1fr; } }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; top: -100%; left: var(--space-4); z-index: 100;
  background: var(--color-brand); color: #fff;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-button);
  font: var(--text-body-sm); font-weight: 600;
  transition: top 0.15s ease;
}
.skip-link:focus { top: var(--space-4); }

a:focus-visible, button:focus-visible, .btn:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--color-brand-light);
  outline-offset: 2px;
  border-radius: var(--radius-button);
}

/* ==========================================================================
   6. COMPONENTS
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2); min-height: 44px;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-button);
  font: var(--text-body); font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn--primary { background: var(--color-brand); color: #fff; }
.btn--primary:hover { background: #0F452C; }
.btn--outline {
  background: transparent; color: var(--color-brand);
  border: 1.5px solid var(--color-brand);
}
.btn--outline:hover { background: var(--color-brand-tint); }

/* --- Header / nav --- */
.site-header {
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}
.nav {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--space-3) var(--space-4);
}
.nav__brand {
  display: flex; align-items: center; gap: var(--space-3); min-height: 44px;
}
.nav__brand img { height: 40px; width: auto; }
.nav__brand-name {
  font: var(--text-h3); color: var(--color-text); line-height: 1.15;
}
.nav__brand-name small {
  display: block; font: var(--text-caption); color: var(--color-text-secondary);
  letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500;
}
.nav__links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-6); }
.nav__links a {
  font: var(--text-body-sm); font-weight: 600; color: var(--color-text-secondary);
  min-height: 44px; display: inline-flex; align-items: center;
}
.nav__links a:hover { color: var(--color-brand); }

/* --- Hero --- */
.hero {
  position: relative;
  padding-block: var(--space-16);
  background-size: cover;
  background-position: center;
  color: #fff;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(20,42,32,0.90) 0%, rgba(20,42,32,0.72) 100%);
}
.hero .container { position: relative; z-index: 1; }
.hero__eyebrow {
  font: var(--text-caption); letter-spacing: 0.12em; text-transform: uppercase;
  color: #BFE0CC; margin-bottom: var(--space-4);
}
.hero h1 { max-width: 22ch; margin-bottom: var(--space-4); }
.hero__sub {
  font: var(--text-body); color: rgba(255,255,255,0.92);
  max-width: 60ch; margin-bottom: var(--space-8);
}
.hero .btn--outline { color: #fff; border-color: rgba(255,255,255,0.6); }
.hero .btn--outline:hover { background: rgba(255,255,255,0.12); }

/* --- Cards --- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
}
.card__icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-button);
  background: var(--color-brand-tint);
  color: var(--color-brand);
  margin-bottom: var(--space-4);
}
.card h3 { margin-bottom: var(--space-2); }
.card p { color: var(--color-text-secondary); }

/* --- Split section image --- */
.split img {
  border-radius: var(--radius-card);
  width: 100%;
  height: auto;
  box-shadow: var(--shadow-card);
}

/* --- Apps section --- */
.app-card {
  display: flex; flex-wrap: wrap; gap: var(--space-6);
  align-items: center; justify-content: space-between;
  background: var(--color-brand-tint);
  border-radius: var(--radius-card);
  padding: var(--space-8);
}
.app-card__meta { display: flex; align-items: center; gap: var(--space-4); }
.app-card__meta img { height: 56px; width: auto; border-radius: var(--radius-button); }
.app-card__title { font: var(--text-h2); margin-bottom: var(--space-1); }
.badge {
  display: inline-flex; align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--color-brand);
  color: #fff;
  font: var(--text-caption); font-weight: 700; letter-spacing: 0.04em;
}

/* --- Contact form --- */
.form-field { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.form-field label { font: var(--text-body-sm); font-weight: 600; color: var(--color-text); }
.form-field input, .form-field textarea {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-button);
  padding: var(--space-3);
  background: var(--color-surface);
  color: var(--color-text);
  font: var(--text-body);
}
.form-field textarea { min-height: 120px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus {
  outline: none; border-color: var(--color-brand);
}

/* --- Disclaimer callout --- */
.disclaimer-callout {
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-brand);
  background: var(--color-surface);
  border-radius: var(--radius-card);
  padding: var(--space-6);
}
.disclaimer-callout p { font-weight: 600; }
.disclaimer-callout p + p { font-weight: 400; color: var(--color-text-secondary); margin-top: var(--space-2); }

/* --- Footer --- */
.site-footer { border-top: 1px solid var(--color-border); padding-block: var(--space-8); }
.footer__top {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: center; gap: var(--space-6); margin-bottom: var(--space-6);
}
.footer__wordmark { height: 28px; width: auto; }
.footer__links { display: flex; flex-wrap: wrap; gap: var(--space-6); }
.footer__links a {
  font: var(--text-body-sm); color: var(--color-text-secondary);
  min-height: 44px; display: inline-flex; align-items: center;
}
.footer__links a:hover { color: var(--color-brand); }
.footer__meta {
  font: var(--text-caption); color: var(--color-text-secondary);
  border-top: 1px solid var(--color-border); padding-top: var(--space-6);
}
.footer__meta p + p { margin-top: var(--space-1); }

/* ==========================================================================
   7. LEGAL PAGE (privacy.html)
   ========================================================================== */

.legal-page__header { padding-block: var(--space-12) var(--space-6); border-bottom: 1px solid var(--color-border); }
.legal-page__header h1 { margin-bottom: var(--space-2); }
.legal-page__meta { color: var(--color-text-secondary); font: var(--text-body-sm); }
.legal-page__body { padding-block: var(--space-8) var(--space-12); max-width: 72ch; }
.legal-page__body section + section { margin-top: var(--space-8); }
.legal-page__body h2 { margin-bottom: var(--space-3); color: var(--color-brand); }
.legal-page__body p { margin-bottom: var(--space-3); color: var(--color-text); }
.legal-page__body p:last-child { margin-bottom: 0; }
.legal-page__body ul { list-style: disc; padding-left: 1.25em; margin-bottom: var(--space-3); }
.legal-page__body ul li + li { margin-top: var(--space-1); }
.legal-page__body a { color: var(--color-brand); text-decoration: underline; }
.legal-page__body .callout {
  background: var(--color-brand-tint); border-radius: var(--radius-card);
  padding: var(--space-4) var(--space-6); margin-top: var(--space-4);
}

/* ==========================================================================
   8. RESPONSIVE
   ========================================================================== */

@media (max-width: 639px) {
  .app-card { flex-direction: column; align-items: flex-start; }
  .footer__top { flex-direction: column; align-items: flex-start; }
}
