/**
 * Landing Page - Common Styles
 * Shared design tokens, typography, and base components
 */

/* ==========================================================================
   Font Fallback with Size Adjustment
   Minimizes layout shift (FOUT) during web font loading
   ========================================================================== */

@font-face {
  font-family: 'Roboto Flex Fallback';
  src: local('Arial');
  size-adjust: 100.5%;
  ascent-override: 92%;
  descent-override: 23%;
  line-gap-override: 0%;
}

/* ==========================================================================
   CSS Variables (Design Tokens)
   ========================================================================== */

:root {
  /* ==========================================================================
     BREAKPOINTS (for reference - use in media queries)
     Desktop: >= 1200px
     Tablet:  768px - 1199px
     Mobile:  <= 767px
     ========================================================================== */

  /* ==========================================================================
     COLORS - Static (don't change with breakpoints)
     ========================================================================== */

  /* Colors - Background */
  --color-bg-start: #ffffff;
  --color-bg-end: #e3e3e3;

  /* Colors - Text */
  --color-text-dark: #151515;
  --color-text-gray: #5f5f5f;
  --color-text-white: #ffffff;
  --color-text-black: #000000;

  /* Colors - UI */
  --color-button-bg: #151515;
  --color-button-text: #efefef;
  --color-card-dark: #e3e3e3;
  --color-card-very-dark: #2f2f2f;
  --color-card-light: #ffffff;
  --color-border: #a6a6a6;
  --color-border-dark: #5d5d5d;
  --color-border-hero-mobile: #5f5f5f;
  --color-border-form-mobile: #000000;
  --color-text-light-gray: #a4a4a4;

  /* Colors - Decorative Shapes */
  --color-shape-blue-hex: #81A6EB;
  --color-shape-blue-tri: #3BBFF0;
  --color-shape-green: #6FCF97;
  --color-shape-yellow: #F5C342;
  --color-shape-purple: #8B6FC0;
  --color-shape-pink: #E94FE8;
  --color-shape-peach: #D9B896;

  /* ==========================================================================
     TYPOGRAPHY - Font Family & Weights (static)
     ========================================================================== */

  /* Font stack with size-adjusted fallbacks to minimize layout shift (FOUT) */
  --font-family: 'Roboto Flex', 'Roboto Flex Fallback', Arial, sans-serif;

  /* Font Weights */
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  --font-weight-black: 900;

  /* ==========================================================================
     TYPOGRAPHY - Font Sizes (responsive)
     Desktop defaults - will be overridden at breakpoints
     ========================================================================== */

  /* Hero title */
  --font-size-hero-light: 96px;
  --font-size-hero-bold: 96px;

  /* Section titles */
  --font-size-section-xl: 96px;   /* Q&A, THINK ABOUT, CONTACT */
  --font-size-section-lg: 64px;   /* Best fit, What you get, etc. */
  --font-size-section-md: 52px;   /* Solution title */

  /* Body text */
  --font-size-h1: 40px;           /* Subheadings, badges */
  --font-size-h2: 28px;           /* Body emphasis, cards */
  --font-size-h3: 24px;           /* Smaller headings */
  --font-size-body: 20px;         /* Body text */
  --font-size-caption: 16px;      /* Captions, taglines */

  /* Legacy aliases for compatibility */
  --font-size-hero: 96px;

  /* ==========================================================================
     SPACING (responsive)
     ========================================================================== */

  /* Section padding */
  --section-padding-x: 124px;     /* Horizontal padding for sections */
  --section-padding-y: 60px;      /* Vertical padding for sections */

  /* Content width */
  --content-max-width: 876px;     /* Max width for content cards */

  /* Component spacing */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 40px;
  --spacing-xl: 60px;
  --spacing-xxl: 100px;

  /* Card padding */
  --card-padding-x: 48px;
  --card-padding-y: 35px;

  /* ==========================================================================
     LAYOUT (responsive)
     ========================================================================== */

  --page-max-width: 1728px;

  /* Grid columns for details section */
  --grid-columns: 2;

  /* Form grid */
  --form-grid-columns: 419px 393px;

  /* Logo size */
  --logo-width: 116px;
  --logo-height: 25px;

  /* ==========================================================================
     BORDERS & RADIUS (static)
     ========================================================================== */

  --radius-button: 10px;
  --radius-card: 22px;
  --radius-input-pill: 61px;
  --radius-input-section: 32px;

  /* ==========================================================================
     SHADOWS (static)
     ========================================================================== */

  --shadow-button: 4px 6px 11.9px 0px rgba(0, 0, 0, 0.25);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-card-gray: 9px 10px 30.3px 0px rgba(0, 0, 0, 0.25);
  --shadow-card-white: 9px 19px 27.1px 0px rgba(0, 0, 0, 0.12);
  --shadow-mockup: 11px 9px 13.1px 0px rgba(0, 0, 0, 0.25);

  /* ==========================================================================
     TRANSITIONS (static)
     ========================================================================== */

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;

  /* ==========================================================================
     DECORATIVE SHAPES - Scale factors (responsive)
     ========================================================================== */

  --shape-scale: 1;
}

/* ==========================================================================
   TABLET BREAKPOINT (768px - 1199px)
   Intermediate between desktop and mobile - scaled desktop
   ========================================================================== */

@media (max-width: 1199px) {
  :root {
    /* Typography - scaled down */
    --font-size-hero-light: 72px;
    --font-size-hero-bold: 72px;
    --font-size-section-xl: 72px;
    --font-size-section-lg: 48px;
    --font-size-section-md: 40px;
    --font-size-h1: 32px;
    --font-size-h2: 24px;
    --font-size-hero: 72px;

    /* Spacing - reduced */
    --section-padding-x: 60px;
    --section-padding-y: 50px;
    --content-max-width: 700px;
    --card-padding-x: 32px;
    --card-padding-y: 28px;

    /* Layout */
    --form-grid-columns: 1fr 1fr;
    --logo-width: 100px;
    --logo-height: 22px;

    /* Shapes - scaled down */
    --shape-scale: 0.7;
  }
}

/* ==========================================================================
   MOBILE BREAKPOINT (<= 767px)
   Based on Figma mobile design (440px)
   ========================================================================== */

@media (max-width: 767px) {
  :root {
    /* Typography - from Figma mobile */
    --font-size-hero-light: 40px;
    --font-size-hero-bold: 64px;
    --font-size-section-xl: 58px;
    --font-size-section-lg: 64px;
    --font-size-section-md: 48px;
    --font-size-h1: 28px;
    --font-size-h2: 24px;
    --font-size-h3: 20px;
    --font-size-body: 20px;
    --font-size-caption: 16px;
    --font-size-hero: 64px;

    /* Spacing - mobile values */
    --section-padding-x: 22px;
    --section-padding-y: 40px;
    --content-max-width: 100%;
    --card-padding-x: 24px;
    --card-padding-y: 24px;

    /* Layout */
    --grid-columns: 1;
    --form-grid-columns: 1fr;
    --logo-width: 88px;
    --logo-height: 19px;

    /* Shapes - scaled for mobile */
    --shape-scale: 0.5;
  }
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* ==========================================================================
   Typography
   ========================================================================== */

.text-hero {
  font-size: var(--font-size-hero);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.text-hero--light {
  font-weight: var(--font-weight-medium);
  font-variation-settings: 'wdth' 72;
}

.text-hero--bold {
  font-weight: var(--font-weight-black);
  font-variation-settings: 'wdth' 95;
}

.text-h1 {
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-extrabold);
  font-variation-settings: 'wdth' 59;
  line-height: 1.2;
}

.text-h1--light {
  font-weight: var(--font-weight-medium);
}

.text-h2 {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-medium);
  font-variation-settings: 'wdth' 59;
  line-height: 1.4;
  color: var(--color-text-gray); /* Match non-bold text styling */
}

.text-h2--bold {
  font-weight: var(--font-weight-extrabold);
  color: var(--color-text-dark); /* Bold text is dark */
}

.text-body {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  font-variation-settings: 'wdth' 59;
  line-height: 1.5;
  color: var(--color-text-gray);
}

.text-body--dark {
  color: var(--color-text-dark);
}

.text-body--bold {
  font-weight: var(--font-weight-extrabold);
  color: var(--color-text-dark);
}

.text-caption {
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-medium);
  font-variation-settings: 'wdth' 59;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family);
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-medium);
  font-variation-settings: 'wdth' 59;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn--primary {
  background-color: var(--color-button-bg);
  color: var(--color-button-text);
  padding: 8px 40px;
  border-radius: var(--radius-button);
  box-shadow: var(--shadow-button);
}

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

.btn--primary:active {
  transform: translateY(0);
}

.btn--link {
  background: none;
  color: var(--color-text-dark);
  font-weight: var(--font-weight-extrabold);
  padding: 12px 20px;
}

.btn--link:hover {
  opacity: 0.8;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  border-radius: var(--radius-card);
  border: 1.5px solid var(--color-border);
  padding: var(--spacing-md) var(--spacing-lg);
}

.card--dark {
  background-color: var(--color-card-dark);
}

.card--light {
  background-color: var(--color-card-light);
}

/* ==========================================================================
   Layout Utilities
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-xl) 0;
}

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

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

/* Flex utilities */
.flex {
  display: flex;
}

.flex--center {
  align-items: center;
  justify-content: center;
}

.flex--between {
  justify-content: space-between;
}

.flex--column {
  flex-direction: column;
}

.flex--gap-sm {
  gap: var(--spacing-sm);
}

.flex--gap-md {
  gap: var(--spacing-md);
}

.flex--gap-lg {
  gap: var(--spacing-lg);
}

/* Responsive visibility utilities */
.mobile-only {
  display: none;
}

@media (max-width: 767px) {
  .mobile-only {
    display: inline;
  }
}
