/* ==========================================================================
   TAMMUZ GLOBAL MEDICAL SUPPLY — Design System
   style.css: Tokens, Reset, Typography, Layout Grid
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* ── Brand Color Palette (White-Blue Medical) ── */
  /* Dark steel blue — hero bg, dark sections, nav */
  --color-navy-900:    #2a4558;
  --color-navy-800:    #3f6f95;
  --color-navy-700:    #4a7fa8;
  --color-navy-600:    #749dbf;
  --color-navy-400:    #95aeba;
  --color-navy-200:    #b8d4e3;
  --color-navy-100:    #d7effa;

  /* Sky blue accent — replaces gold for CTAs, eyebrows, highlights */
  --color-gold-500:    #3f6f95;
  --color-gold-400:    #749dbf;
  --color-gold-300:    #95aeba;
  --color-gold-100:    #d7effa;

  /* Page surfaces — white and very-light-blue (medical clean) */
  --color-cream-100:   #f0f8ff;
  --color-cream-200:   #e1f0f8;
  --color-cream-300:   #d7effa;

  --color-white:       #FFFFFF;
  --color-text-dark:   #1c2e3e;
  --color-text-mid:    #3a5468;
  --color-text-light:  #5d7a8f;
  --color-text-muted:  #95aeba;

  --color-success:     #2D8C5E;
  --color-error:       #C0392B;
  --color-border:      #d0e6f2;
  --color-border-dark: #b8d4e3;

  /* Sky blue accent for focus rings, shimmer */
  --color-accent-sky:  #7dd3ff;

  /* Semantic Surface Colors */
  --surface-page:      var(--color-cream-100);
  --surface-card:      var(--color-white);
  --surface-dark:      var(--color-navy-800);
  --surface-overlay:   rgba(42, 69, 88, 0.75);

  /* Typography Scale */
  --font-sans:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif:        'Playfair Display', 'Georgia', serif;

  --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-weight-normal:  400;
  --font-weight-medium:  500;
  --font-weight-semi:    600;
  --font-weight-bold:    700;

  --line-height-tight:   1.2;
  --line-height-snug:    1.4;
  --line-height-normal:  1.6;
  --line-height-relaxed: 1.75;

  --letter-spacing-tight: -0.02em;
  --letter-spacing-wide:   0.05em;
  --letter-spacing-wider:  0.1em;

  /* Spacing Scale (8pt grid) */
  --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 */

  /* Border Radius */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(63, 111, 149, 0.08), 0 1px 2px rgba(63, 111, 149, 0.06);
  --shadow-md:   0 4px 12px rgba(63, 111, 149, 0.12), 0 2px 6px rgba(63, 111, 149, 0.06);
  --shadow-lg:   0 10px 30px rgba(63, 111, 149, 0.15), 0 4px 12px rgba(63, 111, 149, 0.08);
  --shadow-xl:   0 20px 50px rgba(63, 111, 149, 0.18), 0 8px 20px rgba(63, 111, 149, 0.10);
  --shadow-gold: 0 4px 20px rgba(125, 211, 255, 0.25);

  /* Layout */
  --container-max:     1240px;
  --container-padding: var(--space-6);
  --nav-height:        72px;

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;
  --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text-dark);
  background-color: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--color-text-dark);
}

p {
  line-height: var(--line-height-relaxed);
  color: var(--color-text-mid);
}

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY UTILITIES
   -------------------------------------------------------------------------- */
.font-sans   { font-family: var(--font-sans); }
.font-serif  { font-family: var(--font-serif); }

.text-xs     { font-size: var(--text-xs); }
.text-sm     { font-size: var(--text-sm); }
.text-base   { font-size: var(--text-base); }
.text-lg     { font-size: var(--text-lg); }
.text-xl     { font-size: var(--text-xl); }
.text-2xl    { font-size: var(--text-2xl); }
.text-3xl    { font-size: var(--text-3xl); }
.text-4xl    { font-size: var(--text-4xl); }
.text-5xl    { font-size: var(--text-5xl); }

.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semi   { font-weight: var(--font-weight-semi); }
.font-bold   { font-weight: var(--font-weight-bold); }

.text-dark   { color: var(--color-text-dark); }
.text-mid    { color: var(--color-text-mid); }
.text-light  { color: var(--color-text-light); }
.text-muted  { color: var(--color-text-muted); }
.text-white  { color: var(--color-white); }
.text-gold   { color: var(--color-gold-500); }
.text-navy   { color: var(--color-navy-800); }

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

.uppercase   { text-transform: uppercase; }
.tracking-wide  { letter-spacing: var(--letter-spacing-wide); }
.tracking-wider { letter-spacing: var(--letter-spacing-wider); }

/* --------------------------------------------------------------------------
   4. LAYOUT UTILITIES
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.section {
  padding-block: var(--space-20);
}

.section-sm {
  padding-block: var(--space-12);
}

.section-lg {
  padding-block: var(--space-32);
}

/* Flexbox utilities */
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2  { gap: var(--space-2); }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }
.gap-12 { gap: var(--space-12); }

/* Grid utilities */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* --------------------------------------------------------------------------
   5. SECTION HEADINGS
   -------------------------------------------------------------------------- */
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semi);
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
  color: var(--color-gold-500);
  margin-bottom: var(--space-3);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--color-text-dark);
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--text-lg);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-light);
  max-width: 52ch;
}

.section-header {
  margin-bottom: var(--space-12);
}

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

.section-header--center .section-subtitle {
  margin-inline: auto;
}

/* Light section */
.section--light {
  background-color: var(--color-white);
}

/* Cream section */
.section--cream {
  background-color: var(--surface-page);
}

/* Dark section */
.section--dark {
  background-color: var(--surface-dark);
}

.section--dark .section-title,
.section--dark .section-eyebrow {
  color: var(--color-white);
}

.section--dark .section-subtitle {
  color: var(--color-navy-100);
}

/* --------------------------------------------------------------------------
   6. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semi);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent-sky);
  outline-offset: 2px;
}

/* Primary button — Steel Blue */
.btn-primary {
  background-color: var(--color-navy-800);
  color: var(--color-white);
  border-color: var(--color-navy-800);
}

.btn-primary:hover {
  background-color: var(--color-navy-700);
  border-color: var(--color-navy-700);
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

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

/* Secondary button — Outlined */
.btn-secondary {
  background-color: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255, 0.4);
}

.btn-secondary:hover {
  background-color: rgba(255,255,255, 0.1);
  border-color: rgba(255,255,255, 0.7);
}

/* Outline dark — for light backgrounds */
.btn-outline {
  background-color: transparent;
  color: var(--color-navy-800);
  border-color: var(--color-navy-600);
}

.btn-outline:hover {
  background-color: var(--color-navy-800);
  color: var(--color-white);
  border-color: var(--color-navy-800);
}

/* Ghost — subtle */
.btn-ghost {
  background-color: transparent;
  color: var(--color-navy-600);
  border-color: transparent;
  padding-inline: var(--space-3);
}

.btn-ghost:hover {
  color: var(--color-navy-800);
  background-color: var(--color-cream-200);
}

/* Size variants */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

/* Full width */
.btn-full {
  width: 100%;
}

/* --------------------------------------------------------------------------
   7. DIVIDERS & ORNAMENTS
   -------------------------------------------------------------------------- */
/* renamed but kept as .divider-gold for backwards compat with HTML */
.divider-gold {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-navy-800), var(--color-accent-sky));
  border: none;
  border-radius: 2px;
  margin-block: var(--space-4);
}

.divider-gold--center {
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   8. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root {
    --container-padding: var(--space-8);
  }
}

@media (max-width: 768px) {
  :root {
    --container-padding: var(--space-5);
  }

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

  .section-lg {
    padding-block: var(--space-20);
  }

  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  :root {
    --container-padding: var(--space-4);
  }

  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }

  .section {
    padding-block: var(--space-12);
  }
}
