/* ============================================================
   HYPER ROOFING — Shared Stylesheet
   Built on the Hyperlinked design system
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@800&family=Caveat:wght@400;700&family=Inter:wght@400;500;600&display=swap');

/* ---- CSS Variables ---- */
:root {
  --orange: #F97316;
  --orange-dark: #EA6C0A;
  --orange-light: rgba(249,115,22,0.12);
  --dark-bg: #111827;
  --dark-surface: #1F2937;
  --dark-border: #374151;
  --light-bg: #FFFFFF;
  --warm-bg: #F9FAFB;
  --warm-alt: #F3F4F6;
  --text-primary: #111827;
  --text-secondary: #6B7280;
  --text-on-dark: #F9FAFB;
  --text-muted-dark: #9CA3AF;
  --green: #10B981;
  --red: #EF4444;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
}

/* ---- Demo Banner ---- */
.demo-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--orange);
  color: #fff;
  text-align: center;
  padding: 9px 16px;
  font-size: 0.82rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  line-height: 1.4;
}

.demo-banner a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.demo-banner a:hover { opacity: 0.85; }

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--light-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 80px 0; }

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  line-height: 1.15;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.25rem; }

.accent {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  color: var(--orange);
  font-size: 1.35em;
  display: block;
  line-height: 1.05;
  margin-top: 2px;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 12px;
}

.section-header {
  margin-bottom: 56px;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-top: 14px;
  max-width: 580px;
}

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

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--orange);
  color: #fff;
}
.btn-primary:hover {
  background: var(--orange-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(249,115,22,0.35);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.5);
}
.btn-ghost:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.08);
}

.btn-outline {
  background: transparent;
  color: var(--orange);
  border: 2px solid var(--orange);
}
.btn-outline:hover {
  background: var(--orange);
  color: #fff;
}

/* ---- Navigation ---- */
.logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  border: 2px dashed rgba(255,255,255,0.35);
  border-radius: 6px;
  color: rgba(255,255,255,0.6);
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  min-width: 120px;
  text-align: center;
}

.nav {
  position: fixed;
  top: 36px;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--dark-bg);
  border-bottom: 1px solid var(--dark-border);
  height: 68px;
  display: flex;
  align-items: center;
}

.nav > .container {
  width: 100%;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--orange);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo-text {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
}

.nav-logo-text span { color: var(--orange); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted-dark);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: #fff; }

.nav-links a.active { color: var(--orange); }

.nav-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-on-dark);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-phone svg { color: var(--orange); }

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}

/* ---- Page Hero (interior pages) ---- */
.page-hero {
  padding: 144px 0 60px;
  background: var(--dark-bg);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 20 L20 0 L40 20' fill='none' stroke='%23374151' stroke-width='1'/%3E%3C/svg%3E") repeat;
  opacity: 0.3;
}

.page-hero .container { position: relative; z-index: 1; }

.page-hero h1 { color: var(--text-on-dark); margin-bottom: 16px; }
.page-hero p { color: var(--text-muted-dark); font-size: 1.1rem; max-width: 520px; }

/* ---- Stat Bar ---- */
.stat-bar {
  background: var(--dark-surface);
  border-top: 1px solid var(--dark-border);
  border-bottom: 1px solid var(--dark-border);
  padding: 20px 0;
}

.stat-bar-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat-item {
  text-align: center;
  padding: 12px;
}

.stat-number {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--orange);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted-dark);
  margin-top: 4px;
}

/* ---- Cards ---- */
.card {
  background: var(--light-bg);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-dark {
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

/* ---- Icon Box ---- */
.icon-box {
  width: 48px;
  height: 48px;
  background: var(--orange-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--orange);
  flex-shrink: 0;
}

/* ---- Grid layouts ---- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  align-items: center;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ---- Trust badges ---- */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted-dark);
}

.trust-badge svg { color: var(--green); flex-shrink: 0; }

/* ---- Testimonials ---- */
.testimonial {
  background: var(--warm-bg);
  border-left: 3px solid var(--orange);
  padding: 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.testimonial-text {
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.testimonial-author {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.stars {
  color: var(--orange);
  font-size: 0.9rem;
  margin-bottom: 10px;
  letter-spacing: 2px;
}

/* ---- CTA Banner ---- */
.cta-banner {
  background: var(--dark-bg);
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 20 L20 0 L40 20' fill='none' stroke='%23374151' stroke-width='1'/%3E%3C/svg%3E") repeat;
  opacity: 0.2;
}

.cta-banner .container { position: relative; z-index: 1; text-align: center; }
.cta-banner h2 { color: var(--text-on-dark); }
.cta-banner p { color: var(--text-muted-dark); font-size: 1.1rem; margin: 16px 0 32px; }

.cta-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cta-phone-big {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--orange);
}

/* ---- Coverage list ---- */
.coverage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 32px;
}

.coverage-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.coverage-item svg { color: var(--orange); flex-shrink: 0; }

/* ---- Footer ---- */
.footer {
  background: var(--dark-bg);
  border-top: 1px solid var(--dark-border);
  padding: 56px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand p {
  color: var(--text-muted-dark);
  font-size: 0.9rem;
  margin-top: 14px;
  line-height: 1.7;
  max-width: 260px;
}

.footer-col h4 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-on-dark);
  margin-bottom: 18px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: var(--text-muted-dark);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-col ul li a:hover { color: var(--orange); }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--text-muted-dark);
  font-size: 0.9rem;
}

.footer-contact-item svg { color: var(--orange); margin-top: 2px; flex-shrink: 0; }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--dark-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p { color: var(--text-muted-dark); font-size: 0.8rem; }

.footer-byline {
  font-size: 0.8rem;
  color: var(--text-muted-dark);
}

.footer-byline a {
  color: var(--orange);
  font-weight: 600;
}

/* ---- Animations ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp 0.6s ease both;
}

.fade-up-1 { animation-delay: 0.1s; }
.fade-up-2 { animation-delay: 0.2s; }
.fade-up-3 { animation-delay: 0.3s; }
.fade-up-4 { animation-delay: 0.4s; }

/* ---- Process steps ---- */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

.process-steps::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: var(--warm-alt);
  z-index: 0;
}

.process-step {
  text-align: center;
  position: relative;
  z-index: 1;
}

.step-number {
  width: 48px;
  height: 48px;
  background: var(--orange);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 0 0 6px var(--warm-bg);
}

.process-step h3 { font-size: 1rem; margin-bottom: 8px; }
.process-step p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }

/* ---- Gallery grid ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-item:hover img { transform: scale(1.04); }

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: linear-gradient(transparent, rgba(17,24,39,0.85));
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
}

/* ---- Accreditations ---- */
.accred-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.accred-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--warm-alt);
  border: 1px solid #E5E7EB;
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.accred-badge svg { color: var(--green); }

/* ---- Contact form ---- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px 16px;
  border: 2px solid #E5E7EB;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--light-bg);
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--orange);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stat-bar-inner { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .process-steps::before { display: none; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  section { padding: 56px 0; }

  /* Stack banner + nav naturally on mobile — no fixed positioning so wrapping text can't overlap nav */
  .demo-banner {
    position: static;
    font-size: 0.78rem;
    padding: 8px 16px;
  }

  .nav {
    position: sticky;
    top: 0;
  }

  /* Hero section needs no extra top padding on mobile since nav is no longer fixed */
  .page-hero {
    padding-top: 48px;
  }

  .nav-links, .nav-phone { display: none; }
  .nav-toggle { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--dark-bg);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--dark-border);
    z-index: 99;
  }

  .grid-2 { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .cta-phone-big { font-size: 1.3rem; }
  .stat-bar-inner { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   PARALLAX HERO
   ============================================================ */
.hero-parallax {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  /* background-image set via inline style on the element for reliable path resolution */
  background-color: var(--dark-bg);
  background-attachment: fixed;
}

/* Fallback for mobile — fixed attachment causes bugs on iOS */
@media (max-width: 768px) {
  .hero-parallax {
    background-attachment: scroll;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 172px;
  padding-bottom: 80px;
}

/* ============================================================
   HERO ENTRANCE ANIMATIONS (CSS only, on load)
   ============================================================ */
.hero-fade-1,
.hero-fade-2,
.hero-fade-3,
.hero-fade-4,
.hero-fade-5 {
  opacity: 0;
  transform: translateY(28px);
  animation: heroFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-fade-1 { animation-delay: 0.1s; }
.hero-fade-2 { animation-delay: 0.25s; }
.hero-fade-3 { animation-delay: 0.4s; }
.hero-fade-4 { animation-delay: 0.55s; }
.hero-fade-5 { animation-delay: 0.7s; }

@keyframes heroFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SCROLL ANIMATIONS — driven by IntersectionObserver JS
   ============================================================ */

/* Default hidden state */
[data-animate] {
  opacity: 0;
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-animate="fade-up"]   { transform: translateY(40px); }
[data-animate="fade-left"] { transform: translateX(-32px); }
[data-animate="fade-in"]   { transform: none; }

/* Delay variants */
[data-delay="100"] { transition-delay: 0.1s; }
[data-delay="200"] { transition-delay: 0.2s; }
[data-delay="300"] { transition-delay: 0.3s; }
[data-delay="400"] { transition-delay: 0.4s; }
[data-delay="500"] { transition-delay: 0.5s; }

/* Visible state — JS adds this class */
[data-animate].is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   NAV — subtle scroll shrink effect
   ============================================================ */
.nav {
  transition: height 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
  height: 56px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}

/* ============================================================
   STAT NUMBERS — count-up handled in JS, just style here
   ============================================================ */
.stat-number {
  transition: color 0.3s;
}
