/*
Theme Name: Flavor Starter
Theme URI: https://yoursite.com/
Description: Modern Flatsome Child Theme Boilerplate - Clean, Scalable, Performance-focused
Author: Your Name
Author URI: https://yoursite.com/
Template: flatsome
Version: 1.0.0
Text Domain: flavor-starter
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* ==========================================================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   Organized by category for easy customization
   ========================================================================== */

:root {
  /* ========================================
     COLOR PALETTE
     ======================================== */

  /* Primary Brand Colors */
  --primary: #1A3A5B;
  --primary-light: #2a4a6b;
  --primary-dark: #0a2a4b;
  --primary-50: #e8edf3;
  --primary-100: #d1dbe7;
  --primary-500: #1A3A5B;
  --primary-600: #15304d;
  --primary-700: #10263f;

  /* Secondary Colors */
  --secondary: #ECB71C;
  --secondary-light: #f0c74c;
  --secondary-dark: #d9a500;

  /* Neutral Colors (Gray Scale) */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --gray-950: #030712;

  /* Semantic Colors */
  --success: #10b981;
  --success-light: #34d399;
  --success-dark: #059669;

  --warning: #f59e0b;
  --warning-light: #fbbf24;
  --warning-dark: #d97706;

  --danger: #ef4444;
  --danger-light: #f87171;
  --danger-dark: #dc2626;

  --info: #3b82f6;
  --info-light: #60a5fa;
  --info-dark: #2563eb;

  /* Background & Surface Colors */
  --bg-body: #ffffff;
  --bg-surface: #ffffff;
  --bg-muted: var(--gray-50);
  --bg-subtle: var(--gray-100);

  /* Text Colors */
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-muted: var(--gray-400);
  --text-inverse: #ffffff;

  /* Border Colors */
  --border-default: var(--gray-200);
  --border-subtle: var(--gray-100);
  --border-strong: var(--gray-300);

  /* ========================================
     TYPOGRAPHY
     ======================================== */

  /* Font Families */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-heading: var(--font-sans);
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, 'Courier New', monospace;

  /* Font Sizes - Fluid Typography */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */
  --text-6xl: 3.75rem;     /* 60px */

  /* Font Weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  /* Letter Spacing */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;

  /* ========================================
     SPACING & LAYOUT
     ======================================== */

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

  /* Container */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1536px;
  --container-padding: var(--space-4);

  /* Section Spacing */
  --section-gap: var(--space-16);
  --section-gap-lg: var(--space-24);

  /* ========================================
     BORDERS & EFFECTS
     ======================================== */

  /* Border Radius */
  --radius-none: 0;
  --radius-sm: 0.25rem;    /* 4px */
  --radius-md: 0.375rem;   /* 6px */
  --radius-lg: 0.5rem;     /* 8px */
  --radius-xl: 0.75rem;    /* 12px */
  --radius-2xl: 1rem;      /* 16px */
  --radius-3xl: 1.5rem;    /* 24px */
  --radius-full: 9999px;

  /* Box Shadows */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);

  /* Transitions */
  --transition-fast: 150ms;
  --transition-normal: 200ms;
  --transition-slow: 300ms;
  --transition-slower: 500ms;
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);

  /* Z-Index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;

  /* ========================================
     LEGACY ALIASES (Flatsome Compatibility)
     ======================================== */
  --tp-primary: var(--primary);
  --tp-secondary: var(--secondary);
  --tp-success: var(--success);
  --tp-warning: var(--warning);
  --tp-danger: var(--danger);
  --tp-info: var(--info);
  --tp-gray-50: var(--gray-50);
  --tp-gray-100: var(--gray-100);
  --tp-gray-200: var(--gray-200);
  --tp-gray-300: var(--gray-300);
  --tp-gray-400: var(--gray-400);
  --tp-gray-500: var(--gray-500);
  --tp-gray-600: var(--gray-600);
  --tp-gray-700: var(--gray-700);
  --tp-gray-800: var(--gray-800);
  --tp-gray-900: var(--gray-900);
}

/* ==========================================================================
   GLOBAL RESET & BASE STYLES
   Modern CSS Reset with Performance Optimizations
   ========================================================================== */

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

/* App Container (Required) */
#app {
  width: 100%;
  position: relative;
}

/* Root Elements - Performance & Layout Fixes */
html,
body {
  overscroll-behavior-y: none;
  overscroll-behavior-x: auto;
  overflow-x: clip;
  width: 100%;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-body);
}

/* Typography Reset */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

p {
  margin: 0 0 var(--space-4);
}

/* Links */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast) var(--ease-in-out);
}

a:hover {
  color: var(--primary-dark);
}

/* Images */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Form Elements */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

/* Lists */
ul, ol {
  margin: 0;
  padding: 0;
}

/* Tables */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Misc */
hr {
  border: none;
  border-top: 1px solid var(--border-default);
  margin: var(--space-6) 0;
}

/* Focus Visible */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background-color: var(--primary);
  color: var(--text-inverse);
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

/* Screen Reader Only */
.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;
}

/* Container */
.container-custom {
  width: 100%;
  max-width: var(--container-xl);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* ==========================================================================
   FLATSOME OVERRIDES
   Customize Flatsome defaults using CSS Variables
   ========================================================================== */

/* Override Flatsome Primary Color */
.primary,
.button.primary,
.badge-primary {
  background-color: var(--primary);
}

.button.primary:hover {
  background-color: var(--primary-dark);
}

/* Override Flatsome Secondary Color */
.secondary,
.button.secondary {
  background-color: var(--secondary);
}

/* Override Text Colors */
.text-primary {
  color: var(--primary);
}

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

/* Fix Flatsome Button Styles */
.button,
button.button,
input[type="submit"] {
  font-family: var(--font-sans);
  font-weight: var(--font-medium);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal) var(--ease-in-out);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS REFERENCE

   Mobile First Approach:
   - xs: 0 - 549px (mobile)
   - sm: 550px - 767px (large mobile)
   - md: 768px - 991px (tablet)
   - lg: 992px - 1199px (desktop)
   - xl: 1200px+ (large desktop)
   ========================================================================== */

@media (max-width: 549px) {
  :root {
    --container-padding: var(--space-4);
    --section-gap: var(--space-10);
  }
}

@media (min-width: 550px) and (max-width: 767px) {
  :root {
    --container-padding: var(--space-5);
    --section-gap: var(--space-12);
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  :root {
    --container-padding: var(--space-6);
    --section-gap: var(--space-14);
  }
}

@media (min-width: 992px) {
  :root {
    --container-padding: var(--space-8);
    --section-gap: var(--space-16);
  }
}
