/* ================================================================
   Optimizely 2026 Design System — Tokens & Typography Only
   ================================================================
   Portable design tokens for the Optimizely 2026 brand.
   Component styles (sections 4+) are excluded to avoid class name
   collisions with existing World CSS (.cta, .footer, .card, etc.).
   ================================================================ */


/* ================================================================
   0. FONT FACE DECLARATIONS
   ================================================================ */

@font-face {
  font-family: 'Die Grotesk B';
  src: url('https://certification.optimizely.com/fonts/DieGroteskB/die-grotesk-b-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Die Grotesk B';
  src: url('https://certification.optimizely.com/fonts/DieGroteskB/die-grotesk-b-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Die Grotesk B';
  src: url('https://certification.optimizely.com/fonts/DieGroteskB/die-grotesk-b-medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Die Grotesk B';
  src: url('https://certification.optimizely.com/fonts/DieGroteskB/die-grotesk-b-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Die Grotesk B';
  src: url('https://certification.optimizely.com/fonts/DieGroteskB/die-grotesk-b-bold-italic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Nudge SemiNormal';
  src: url('https://certification.optimizely.com/fonts/NudgeSemiNormal/NudgeSemiNormal-SemiNormalRegular.woff2') format('woff2'),
       url('https://certification.optimizely.com/fonts/NudgeSemiNormal/NudgeSemiNormal-SemiNormalRegular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nudge SemiNormal';
  src: url('https://certification.optimizely.com/fonts/NudgeSemiNormal/NudgeSemiNormal-SemiNormalSemiBold.woff2') format('woff2'),
       url('https://certification.optimizely.com/fonts/NudgeSemiNormal/NudgeSemiNormal-SemiNormalSemiBold.woff') format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nudge SemiNormal';
  src: url('https://certification.optimizely.com/fonts/NudgeSemiNormal/NudgeSemiNormal-SemiNormalExtraBold.woff2') format('woff2'),
       url('https://certification.optimizely.com/fonts/NudgeSemiNormal/NudgeSemiNormal-SemiNormalExtraBold.woff') format('woff');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}


/* ================================================================
   1. DESIGN TOKENS — Light (default)
   ================================================================ */

:root {
  /* ── Brand Colors ──────────────────────────────────────────── */
  --t-primary: #aaff42;           /* Leaf Green — PANTONE 3529 C */
  --t-primary-hover: #91ec41;
  --t-primary-text: #197151;      /* Readable brand green on light bg */
  --t-on-primary: #08251a;        /* Dark Fir — PANTONE 627 C */
  --t-secondary: #197151;         /* Fir Green */
  --t-secondary-hover: #0d3a29;

  /* ── Surfaces ──────────────────────────────────────────────── */
  --t-bg: #ffffff;
  --t-surface: #eff6e9;
  --t-surface-alt: #e4f0db;
  --t-surface-raised: #d9e5cd;
  --t-surface-inverted: #08251a;
  --t-surface-inverted-hover: #0d3a29;
  --t-surface-deep: #061d15;

  /* ── Text ──────────────────────────────────────────────────── */
  --t-text: #08251a;
  --t-text-secondary: #114b36;
  --t-text-muted: #717963;
  --t-text-inverted: #eff6e9;
  --t-text-inverted-muted: #a0ab8c;

  /* ── Borders ───────────────────────────────────────────────── */
  --t-border: #d9e5cd;
  --t-border-strong: #c4cfb0;
  --t-border-focus: rgba(170, 255, 66, 0.35);

  /* ── Accent Palette ────────────────────────────────────────── */
  --t-accent-1: #aaff42;          /* Leaf Green */
  --t-accent-1-bg: #e4f0db;
  --t-accent-2: #91dbda;          /* Light Blue — PANTONE 629 C */
  --t-accent-2-bg: #e0f5f5;
  --t-accent-3: #ff99b6;          /* Light Pink */
  --t-accent-3-bg: #fde5ec;
  --t-accent-4: #7cdd3c;          /* Grass Green */
  --t-accent-4-bg: #e4f0db;
  --t-accent-5: #904764;          /* Dark Pink */
  --t-accent-5-bg: #f5e0ea;
  --t-accent-6: #007a78;          /* Dark Teal */
  --t-accent-6-bg: #e0f0f0;

  /* ── Status / Semantic ─────────────────────────────────────── */
  --t-status-success: #228B22;
  --t-status-warning: #FF9702;
  --t-status-danger: #F13030;

  /* ── Typography ────────────────────────────────────────────── */
  --t-font: 'Die Grotesk B', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --t-font-headline: 'Nudge SemiNormal', 'Die Grotesk B', sans-serif;
  --t-font-mono: 'Roboto Mono', 'JetBrains Mono', 'Fira Code', monospace;
  --t-font-size-xs: 10px;
  --t-font-size-sm: 12px;
  --t-font-size-base: 16px;
  --t-font-size-md: 18px;
  --t-font-size-lg: 20px;
  --t-font-size-xl: 24px;
  --t-font-size-2xl: 28px;
  --t-font-size-3xl: 36px;
  --t-font-size-4xl: 48px;
  --t-weight-regular: 400;
  --t-weight-medium: 500;
  --t-weight-semibold: 600;
  --t-weight-bold: 700;
  --t-weight-extrabold: 800;
  --t-weight-button: 500;
  --t-leading-tight: 1.25;
  --t-leading-snug: 1.3;
  --t-leading-normal: 1.5;

  /* ── Spacing ───────────────────────────────────────────────── */
  --t-space-2xs: 4px;
  --t-space-xs: 8px;
  --t-space-sm: 12px;
  --t-space-md: 16px;
  --t-space-lg: 24px;
  --t-space-xl: 32px;
  --t-space-2xl: 48px;
  --t-space-3xl: 64px;
  --t-space-4xl: 96px;

  /* ── Radii ─────────────────────────────────────────────────── */
  --t-radius-sm: 12px;
  --t-radius-md: 16px;
  --t-radius-lg: 20px;
  --t-radius-pill: 40px;

  /* ── Shadows ───────────────────────────────────────────────── */
  --t-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --t-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.07);
  --t-shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.10);

  /* ── Transitions ───────────────────────────────────────────── */
  --t-transition-fast: 0.12s ease;
  --t-transition: 0.2s ease;
  --t-transition-slow: 0.3s ease;
}


/* ================================================================
   2. DESIGN TOKENS — Dark
   ================================================================ */

[data-theme="dark"] {
  --t-primary: #aaff42;
  --t-primary-hover: #91ec41;
  --t-primary-text: #7cdd3c;
  --t-on-primary: #08251a;
  --t-secondary: #91dbda;
  --t-secondary-hover: #007a78;

  --t-bg: #08251a;
  --t-surface: #0d3a29;
  --t-surface-alt: #114b36;
  --t-surface-raised: #197151;
  --t-surface-inverted: #eff6e9;
  --t-surface-inverted-hover: #d9e5cd;
  --t-surface-deep: #061d15;

  --t-text: #eff6e9;
  --t-text-secondary: #c4cfb0;
  --t-text-muted: #a0ab8c;
  --t-text-inverted: #08251a;
  --t-text-inverted-muted: #114b36;

  --t-border: #114b36;
  --t-border-strong: #197151;
  --t-border-focus: rgba(170, 255, 66, 0.3);

  --t-accent-1: #aaff42;
  --t-accent-1-bg: rgba(170, 255, 66, 0.1);
  --t-accent-2: #91dbda;
  --t-accent-2-bg: rgba(145, 219, 218, 0.1);
  --t-accent-3: #ff99b6;
  --t-accent-3-bg: rgba(255, 153, 182, 0.1);
  --t-accent-4: #7cdd3c;
  --t-accent-4-bg: rgba(124, 221, 60, 0.1);
  --t-accent-5: #904764;
  --t-accent-5-bg: rgba(144, 71, 100, 0.15);
  --t-accent-6: #007a78;
  --t-accent-6-bg: rgba(0, 122, 120, 0.15);

  --t-status-success: #228B22;
  --t-status-warning: #FF9702;
  --t-status-danger: #F13030;

  --t-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --t-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.25);
  --t-shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.3);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --t-primary: #aaff42;
    --t-primary-hover: #91ec41;
    --t-primary-text: #7cdd3c;
    --t-on-primary: #08251a;
    --t-secondary: #91dbda;
    --t-secondary-hover: #007a78;

    --t-bg: #08251a;
    --t-surface: #0d3a29;
    --t-surface-alt: #114b36;
    --t-surface-raised: #197151;
    --t-surface-inverted: #eff6e9;
    --t-surface-inverted-hover: #d9e5cd;
    --t-surface-deep: #061d15;

    --t-text: #eff6e9;
    --t-text-secondary: #c4cfb0;
    --t-text-muted: #a0ab8c;
    --t-text-inverted: #08251a;
    --t-text-inverted-muted: #114b36;

    --t-border: #114b36;
    --t-border-strong: #197151;
    --t-border-focus: rgba(170, 255, 66, 0.3);

    --t-accent-1: #aaff42;
    --t-accent-1-bg: rgba(170, 255, 66, 0.1);
    --t-accent-2: #91dbda;
    --t-accent-2-bg: rgba(145, 219, 218, 0.1);
    --t-accent-3: #ff99b6;
    --t-accent-3-bg: rgba(255, 153, 182, 0.1);
    --t-accent-4: #7cdd3c;
    --t-accent-4-bg: rgba(124, 221, 60, 0.1);
    --t-accent-5: #904764;
    --t-accent-5-bg: rgba(144, 71, 100, 0.15);
    --t-accent-6: #007a78;
    --t-accent-6-bg: rgba(0, 122, 120, 0.15);

    --t-status-success: #228B22;
    --t-status-warning: #FF9702;
    --t-status-danger: #F13030;

    --t-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --t-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.25);
    --t-shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.3);
  }
}


/* ================================================================
   3. TYPOGRAPHY (t- prefixed — no collisions)
   ================================================================ */

.t-display-1 {
  font-family: var(--t-font-headline);
  font-size: clamp(48px, 4vw + 24px, 72px);
  font-weight: var(--t-weight-extrabold);
  line-height: var(--t-leading-tight);
  color: var(--t-text);
  letter-spacing: -0.02em;
}
.t-display-2 {
  font-family: var(--t-font-headline);
  font-size: clamp(36px, 3vw + 18px, 56px);
  font-weight: var(--t-weight-extrabold);
  line-height: var(--t-leading-tight);
  color: var(--t-text);
  letter-spacing: -0.01em;
}
.t-display-3 {
  font-family: var(--t-font-headline);
  font-size: clamp(28px, 2vw + 16px, 44px);
  font-weight: var(--t-weight-extrabold);
  line-height: var(--t-leading-tight);
  color: var(--t-text);
}

.t-h1 {
  font-family: var(--t-font-headline);
  font-size: var(--t-font-size-4xl);
  font-weight: var(--t-weight-extrabold);
  line-height: var(--t-leading-tight);
  color: var(--t-text);
}
.t-h2 {
  font-family: var(--t-font-headline);
  font-size: var(--t-font-size-2xl);
  font-weight: var(--t-weight-semibold);
  line-height: var(--t-leading-snug);
  color: var(--t-text);
}
.t-h3 {
  font-family: var(--t-font-headline);
  font-size: var(--t-font-size-xl);
  font-weight: var(--t-weight-bold);
  line-height: var(--t-leading-snug);
  color: var(--t-text);
}
.t-h4 {
  font-size: var(--t-font-size-lg);
  font-weight: var(--t-weight-bold);
  line-height: var(--t-leading-snug);
  color: var(--t-text);
}
.t-h5 {
  font-size: var(--t-font-size-md);
  font-weight: var(--t-weight-semibold);
  line-height: var(--t-leading-snug);
  color: var(--t-text);
}
.t-h6 {
  font-size: var(--t-font-size-base);
  font-weight: var(--t-weight-semibold);
  line-height: var(--t-leading-snug);
  color: var(--t-text);
}

.t-subtitle {
  font-size: var(--t-font-size-md);
  font-weight: var(--t-weight-medium);
  line-height: var(--t-leading-normal);
  color: var(--t-text-secondary);
}
.t-body { font-size: var(--t-font-size-base); line-height: var(--t-leading-normal); color: var(--t-text); }
.t-body-sm { font-size: var(--t-font-size-sm); line-height: var(--t-leading-normal); color: var(--t-text-secondary); }
.t-body-lg { font-size: var(--t-font-size-md); line-height: var(--t-leading-normal); color: var(--t-text); }

.t-overline {
  font-family: var(--t-font-mono);
  font-size: var(--t-font-size-xs);
  font-weight: var(--t-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--t-text-muted);
}

.t-code {
  font-family: var(--t-font-mono);
  font-size: 0.9em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--t-surface-raised);
  color: var(--t-accent-2);
}

.t-link {
  color: var(--t-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--t-transition-fast);
}
.t-link:hover { opacity: 0.8; }
.t-link--arrow::after { content: ' \2192'; }

.t-gradient {
  background: linear-gradient(135deg, var(--t-accent-1), var(--t-accent-6));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.t-em { font-style: italic; color: var(--t-primary); }
