/* ================================================================
   MAIN.CSS — Design System, Reset, Typography, Layout
   Leith Walk Dental Practice
   ================================================================ */

/* ---------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   --------------------------------------------------------------- */
:root {
  /* Core Palette */
  --color-primary:        #1B3A5C;
  --color-primary-light:  #2A5D8F;
  --color-primary-dark:   #0F2338;
  --color-accent:         #C4975A;
  --color-accent-light:   #D9B47C;
  --color-accent-dark:    #A07840;

  /* Surfaces */
  --color-white:       #FFFFFF;
  --color-off-white:   #F9F7F4;
  --color-surface:     #F2EDE7;
  --color-surface-alt: #E8E1D9;
  --color-border:      #E0D9CF;

  /* Text */
  --color-text:       #1A1A2E;
  --color-text-mid:   #4A4A5E;
  --color-text-light: #7A7A8E;

  /* Typography */
  --font-heading: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  /* Font Scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-md:   1.125rem;
  --text-lg:   1.25rem;
  --text-xl:   1.5rem;
  --text-2xl:  1.875rem;
  --text-3xl:  2.25rem;
  --text-4xl:  3rem;
  --text-5xl:  3.75rem;
  --text-6xl:  4.5rem;

  /* Spacing Scale */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

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

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.10), 0 4px 16px rgba(0,0,0,0.06);
  --shadow-xl: 0 24px 60px rgba(0,0,0,0.12), 0 8px 24px rgba(0,0,0,0.08);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Layout */
  --container-max:  1200px;
  --container-wide: 1440px;
  --nav-height:      80px;
  --info-bar-height: 38px;

  /* Z-index */
  --z-base:    0;
  --z-raised:  10;
  --z-overlay: 100;
  --z-nav:     1000;
  --z-modal:   2000;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background-color: #0B1E30;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: #0B1E30;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

ul,
ol {
  list-style: none;
}

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

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

/* ---------------------------------------------------------------
   Typography System
   --------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.15;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, var(--text-6xl)); }
h2 { font-size: clamp(2rem,   4vw, var(--text-5xl)); }
h3 { font-size: clamp(1.5rem, 3vw, var(--text-3xl)); }
h4 { font-size: clamp(1.25rem, 2.5vw, var(--text-2xl)); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

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

.lead {
  font-size: var(--text-lg);
  line-height: 1.65;
  color: var(--color-text-mid);
}

/* ---------------------------------------------------------------
   Layout Utilities
   --------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.container--narrow { max-width: 720px; }

.section {
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
}

.section--sm {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

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

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

/* ---------------------------------------------------------------
   Section Label / Header
   --------------------------------------------------------------- */
.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

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

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

.section-header p {
  max-width: 560px;
}

.section-header.text-center p {
  margin-left: auto;
  margin-right: auto;
}

.divider {
  width: 48px;
  height: 2px;
  background: var(--color-accent);
  margin-bottom: var(--space-6);
}

.text-center .divider {
  margin-left: auto;
  margin-right: auto;
}

/* ---------------------------------------------------------------
   Scroll Animations
   --------------------------------------------------------------- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 80ms;  }
.fade-in-delay-2 { transition-delay: 160ms; }
.fade-in-delay-3 { transition-delay: 240ms; }
.fade-in-delay-4 { transition-delay: 320ms; }
.fade-in-delay-5 { transition-delay: 400ms; }

/* ---------------------------------------------------------------
   Accessibility
   --------------------------------------------------------------- */
.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;
}

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

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  padding: var(--space-2) var(--space-5);
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-md);
  z-index: var(--z-modal);
  font-size: var(--text-sm);
  font-weight: 600;
}

.skip-link:focus {
  top: var(--space-4);
}

/* ---------------------------------------------------------------
   Responsive Breakpoints
   --------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root { --nav-height: 72px; }
}

@media (max-width: 768px) {
  .section {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
  }

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

  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

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