/* ===============================
   MAM ROOFING SERVICES
   Design Tokens — from Figma (1920px canvas)
   Source: node 172:89
================================ */


/* ===============================
   RESET
================================ */

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

html {
  font-size: 62.5%; /* 1rem = 10px — fixed, never clamp */
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  font-size: max(1.4rem, 1.04vw); /* 20px ÷ 19.2 = 1.04vw */
  line-height: 1.6;
  color: var(--color-text-body);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  max-width: 100%;
}

main {
  overflow-x: clip;
  max-width: 100%;
}

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

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

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

ul,
ol {
  list-style: none;
}

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


/* ===============================
   DESIGN TOKENS — :root
================================ */

:root {
  /* ---- Brand colours ---- */
  --color-primary:        #0b4f8c; /* Navy — footer, header bar, btn icon bg */
  --color-accent:         #f97316; /* Orange — CTAs, highlights, active nav */
  --color-white:          #ffffff;
  --color-black:          #000000;

  /* ---- Text colours ---- */
  --color-text-heading:   #1e293b; /* Section headings, card titles */
  --color-text-body:      #5b6675; /* Paragraphs, list items */
  --color-text-dark:      #0a0f15; /* Testimonial name */
  --color-text-muted:     #4e5669; /* Testimonial quote */
  --color-text-subtle:    #919191; /* Client designation */
  --color-text-eyebrow:   #a2adba; /* Eyebrow labels, borders */
  --color-text-nav:       #5b6675; /* Inactive nav links */
  --color-text-nav-active:#f97316; /* Active nav link (HOME) */
  --color-text-on-dark:   #ffffff; /* Text on navy/dark overlays */
  --color-text-on-accent: #ffffff; /* Text on orange buttons */
  --color-text-badge:     #0b4f8c; /* About badge "Since 2012" */

  /* ---- Background colours ---- */
  --color-bg-white:       #ffffff;
  --color-bg-cream:       #fff8ee; /* About, Testimonials sections */
  --color-bg-light:       #f8fafc; /* Gallery section */
  --color-bg-card:        #ebebf3; /* Commitment cards (inactive) */
  --color-bg-card-accent: #f97316; /* Commitment card 1 (active) */

  /* ---- Border colours ---- */
  --color-border-eyebrow: #a2adba;
  --color-border-icon:    #5b6675;
  --color-border-white:   #ffffff;
  --color-border-input:   rgba(255, 255, 255, 0.5);

  /* ---- Overlay & gradient colours ---- */
  --color-overlay-dark:         rgba(0, 0, 0, 0.7);   /* Stats, CTA sections */
  --color-overlay-service:      rgba(0, 0, 0, 0.6);   /* Service card gradient base */
  --color-overlay-service-deep: rgba(0, 0, 0, 0.75);  /* Featured service card */
  --color-overlay-hero-blue:    rgba(39, 89, 134, 0.3); /* Hero left gradient */
  --color-overlay-transparent:  rgba(0, 0, 0, 0);
  --color-overlay-commitment:   rgba(0, 0, 0, 0);       /* Image gradient start */
  --color-overlay-commitment-end: #000000;              /* Image gradient end */

  /* ---- Typography — font families ---- */
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* ---- Typography — font weights ---- */
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;
  --weight-extrabold:800;

  /* ---- Typography — Figma reference sizes (px at 1920) ---- */
  /* Use with max(min-rem, px÷19.2 vw) in main-style.css */
  --figma-size-hero-title:     80; /* Hero H1, CTA banner title */
  --figma-size-stat-number:    80; /* Stats large numbers */
  --figma-size-stat-suffix:    52; /* Stats + / % suffix (~51.6px) */
  --figma-size-success-rate:  100; /* 100% overlay on commitment image */
  --figma-size-section-title:  50; /* Section H2 headings */
  --figma-size-footer-contact: 40; /* Footer email / phone */
  --figma-size-service-title:  35; /* Service card titles */
  --figma-size-footer-heading: 30; /* Footer column headings */
  --figma-size-accordion-title:25; /* Accordion item titles */
  --figma-size-badge:          25; /* About "Since 2012" badge */
  --figma-size-body-lg:        22; /* Body large, button text, stats labels */
  --figma-size-body:           20; /* Footer links, testimonial designation */
  --figma-size-nav:            18; /* Nav links, card body, link text */
  --figma-size-eyebrow:        16; /* Eyebrow pills, top bar, copyright */
  --figma-size-topbar:         16; /* Address / email in top bar */

  /* ---- Typography — line heights (Figma px at 1920) ---- */
  --figma-lh-hero-title:   95;
  --figma-lh-section-title:60;
  --figma-lh-body:         32;
  --figma-lh-service-title:45;
  --figma-lh-footer-heading:30;
  --figma-lh-topbar:       26;
  --figma-lh-card-body:    23;

  /* ---- Spacing — Figma reference (px at 1920) ---- */
  --figma-space-section-y:    100; /* Section padding-block */
  --figma-space-section-x:     92; /* Section padding-inline */
  --figma-space-container-x:  240; /* Stats section horizontal padding */
  --figma-space-gap-section:   85; /* Gap between section header & content */
  --figma-space-gap-content:   45; /* Standard content gap */
  --figma-space-gap-cards:     73; /* Commitment card grid gap-x */
  --figma-space-gap-gallery:   40; /* Gallery column gap */
  --figma-space-gap-stats:    120; /* Stats column gap */

  /* ---- Component sizes — Figma reference (px at 1920) ---- */
  --figma-height-topbar:       40;
  --figma-height-header:       93;
  --figma-height-nav-item:     70;
  --figma-height-btn:          70;
  --figma-height-btn-icon:     70;
  --figma-height-eyebrow:      40;
  --figma-height-hero:        850;
  --figma-height-page-banner: 500;
  --figma-height-logo:         84;
  --figma-width-logo:         227;
  --figma-size-btn-icon-inner: 35;
  --figma-size-icon-circle:    45;
  --figma-size-nav-arrow:      24;

  /* ---- Border radius — Figma reference (px at 1920) ---- */
  --figma-radius-pill:    100; /* Buttons, eyebrow pills */
  --figma-radius-card:     20; /* Cards, images, accordion */
  --figma-radius-btn-icon: 35; /* Orange/blue icon circle on buttons */
  --figma-radius-icon:   22.5; /* About list icon circles */
  --figma-radius-newsletter: 24.5; /* Footer newsletter submit btn */

  /* ---- Shadows ---- */
  --shadow-accordion: 0 0 9.796px rgba(0, 0, 0, 0.1),
                      0 5.224px 3.918px rgba(0, 0, 0, 0.1);
  --shadow-card:      0 4px 24px rgba(0, 0, 0, 0.12);

  /* ---- Gradients ---- */
  --gradient-page-banner: linear-gradient(
    -0.19deg,
    rgba(0, 0, 0, 0.5) 29.55%,
    rgba(0, 37, 71, 0) 72.13%
  );
  --gradient-hero: linear-gradient(
    89.74deg,
    var(--color-overlay-hero-blue) 16.32%,
    var(--color-overlay-transparent) 51.84%
  );
  --gradient-service-card: linear-gradient(
    to top,
    var(--color-overlay-service) 0%,
    var(--color-overlay-transparent) 68.81%
  );
  --gradient-service-card-featured: linear-gradient(
    to top,
    var(--color-overlay-service-deep) 8.66%,
    var(--color-overlay-transparent) 68.81%
  );
  --gradient-commitment-image: linear-gradient(
    to bottom,
    var(--color-overlay-commitment) 34.85%,
    var(--color-overlay-commitment-end) 100%
  );
  --gradient-overlay-dark: linear-gradient(
    var(--color-overlay-dark),
    var(--color-overlay-dark)
  );

  /* ---- Transitions ---- */
  --transition-color:    color 0.2s ease;
  --transition-bg:       background-color 0.25s ease;
  --transition-transform:transform 0.25s ease;
  --transition-opacity:  opacity 0.3s ease-in-out;
  --transition-btn:      background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;

  /* ---- Z-index scale ---- */
  --z-header:     100;
  --z-topbar:     110;
  --z-overlay:     10;
  --z-content:     20;
  --z-dropdown:   200;

  /* ---- Layout ---- */
  --container-max: 90.8%;
  --canvas-width:  1920;
  --vw-divisor:    19.2; /* canvas-width ÷ 100 */
}


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

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
  color: var(--color-text-heading);
  line-height: 1.2;
}

h1 {
  /* 80px ÷ 19.2 = 4.17vw */
  font-size: max(3.2rem, 4.17vw);
  line-height: max(3.8rem, 4.95vw); /* 95px ÷ 19.2 */
}

h2 {
  /* 50px ÷ 19.2 = 2.6vw */
  font-size: max(2.8rem, 2.6vw);
  line-height: max(3rem, 3.13vw); /* 60px ÷ 19.2 */
}

h3 {
  /* 35px ÷ 19.2 = 1.82vw */
  font-size: max(2.2rem, 1.82vw);
  line-height: max(2.4rem, 2.34vw); /* 45px ÷ 19.2 */
}

h4 {
  /* 25px ÷ 19.2 = 1.3vw */
  font-size: max(1.8rem, 1.3vw);
  line-height: max(2rem, 1.67vw); /* 32px ÷ 19.2 */
}

p {
  /* 22px ÷ 19.2 = 1.15vw */
  font-size: max(1.4rem, 1.15vw);
  line-height: max(2rem, 1.67vw); /* 32px ÷ 19.2 */
  color: var(--color-text-body);
}

strong {
  font-weight: var(--weight-bold);
}

em {
  font-style: italic;
}


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

.text-heading  { color: var(--color-text-heading); }
.text-body     { color: var(--color-text-body); }
.text-accent   { color: var(--color-accent); }
.text-primary  { color: var(--color-primary); }
.text-white    { color: var(--color-white); }
.text-eyebrow  { color: var(--color-text-eyebrow); }

.bg-white      { background-color: var(--color-bg-white); }
.bg-cream      { background-color: var(--color-bg-cream); }
.bg-light      { background-color: var(--color-bg-light); }
.bg-primary    { background-color: var(--color-primary); }
.bg-accent     { background-color: var(--color-accent); }

.font-heading  { font-family: var(--font-heading); }
.font-body     { font-family: var(--font-body); }

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

.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ===============================
   REDUCED MOTION
================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
