/* Manosque (Ariel Martín Pérez, SIL OFL — license in assets/fonts/) is the
   display face. It ships as a single weight; declaring the full weight range
   stops browsers from faux-bolding it. */
@font-face {
  font-family: 'Manosque';
  src: url('fonts/Manosque-Regular.woff2') format('woff2'),
       url('fonts/Manosque-Regular.woff') format('woff');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

html { scroll-behavior: smooth; }
body { margin: 0; background: #0C0D0F; }
input, select, textarea, button { font-family: 'Inter', sans-serif; }

/* ---------- Curved wave section dividers ---------- */
/* Sits at the bottom of a section, rotated 180deg, so the NEXT section's
   color rises into the current one as a wave. Fill is set per-instance. */
.wave-divider {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  transform: rotate(180deg);
  pointer-events: none;
}
.wave-divider svg {
  position: relative;
  display: block;
  width: calc(142% + 1.3px);
  /* 72px floor keeps the curve clearly visible on phones (and the -2px
     overlap kills sub-pixel seam lines at high-DPR phone rendering). */
  height: clamp(72px, 8.5vw, 120px);
}
.wave-divider.wave-sm svg { height: clamp(52px, 6vw, 84px); }
/* Top variant: unrotated, hugging the section's top edge — the PREVIOUS
   section's color flows down into this one (used over the CTA video). */
.wave-divider-top {
  position: absolute;
  top: -2px;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  pointer-events: none;
}
.wave-divider-top svg {
  position: relative;
  display: block;
  width: calc(142% + 1.3px);
  height: clamp(72px, 8.5vw, 120px);
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-screen-label="CTA"] svg { animation: none !important; }
}

[data-reveal] { will-change: opacity, transform; }

/* SVG-noise overlay for large dark fills — breaks up flat dark color so the
   display pipeline's spatial dithering has nothing to latch onto. Keep opacity
   0.025–0.04 and pair with a real (even if subtle) background gradient. */
.noise-overlay {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/></svg>");
}

/* ---------- Services "see more" (phones only) ---------- */
.services-more-wrap { display: none; text-align: center; margin-top: 26px; }
.services-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 2px solid #101114;
  color: #101114;
  font-weight: 800;
  font-size: 15.5px;
  padding: 13px 26px;
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.services-more:hover { color: #B31D1D; border-color: #B31D1D; }
.services-more svg { height: 18px; width: 18px; transition: transform 0.25s ease; }
.services-more[aria-expanded="true"] svg { transform: rotate(180deg); }
@media (max-width: 600px) {
  .services-grid[data-collapsed="true"] > div:nth-child(n+4) { display: none !important; }
  .services-more-wrap { display: block; }
}

/* Honeypot field — visually gone, still in the form for bots. */
.hp-field {
  position: absolute;
  left: -9999px;
  top: auto;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* ---------- Mobile nav ---------- */
.nav-mobile-panel {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: #0C0D0F;
  border-bottom: 1px solid rgba(217, 35, 35, 0.25);
  padding: 10px 24px 20px;
}
.nav-mobile-panel.is-open { display: flex; }
.nav-mobile-panel a {
  color: #D7DBE0;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  padding: 12px 4px;
  border-bottom: 1px solid rgba(242, 243, 245, 0.08);
}
.nav-mobile-panel a:last-child { border-bottom: none; }
.nav-mobile-panel .nav-mobile-phone { color: #FF6B6B; font-weight: 700; }
.nav-mobile-panel .nav-mobile-cta {
  margin-top: 8px;
  background: #D92323;
  color: #FFFFFF;
  font-weight: 800;
  border-radius: 10px;
  text-align: center;
  padding: 14px;
}

/* ---------- Footer ---------- */
.ft {
  position: relative;
  overflow: hidden;
  background: linear-gradient(to bottom, #121316, #09090B);
  color: rgba(242, 243, 245, 0.8);
  font-size: 15.5px;
}
/* The black door texture bleeding in from the right, masked to nothing on the left. */
.ft-door {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("img/footer-door.jpg");
  background-position: right center;
  background-size: cover;
  background-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(to left, #000 0%, rgba(0, 0, 0, 0.5) 46%, transparent 82%);
  mask-image: linear-gradient(to left, #000 0%, rgba(0, 0, 0, 0.5) 46%, transparent 82%);
  opacity: 0.9;
}
/* Brighten the slats enough to read as a garage door, not just darkness. */
.ft-door { filter: brightness(1.35); }
/* Phones: the side-mask crop only showed an ambiguous corner — use the door
   slats straight-on across the full width, faded in from the top instead. */
@media (max-width: 900px) {
  .ft-door {
    background-position: center bottom;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.75) 35%, #000 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.75) 35%, #000 100%);
    opacity: 1;
    filter: brightness(1.9) contrast(1.05);
  }
  .ft-tint { background: rgba(12, 13, 15, 0.18); }
  /* Lighter scrims on phones — the portrait crop was drowning the hero video. */
  .hero-scrim-side { opacity: 0.72; }
  .hero-scrim-bottom { opacity: 0.85; }
}
.ft-tint { position: absolute; inset: 0; pointer-events: none; background: rgba(12, 13, 15, 0.35); }
/* Fades the footer's top into the CTA's wave color so the door texture never
   starts on a hard horizontal edge. */
.ft-topfade {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 170px;
  pointer-events: none;
  background: linear-gradient(to bottom, #121316 0%, rgba(18, 19, 22, 0) 100%);
}
.ft-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/></svg>");
}
.ft-inner { position: relative; z-index: 10; max-width: 1240px; margin: 0 auto; padding: 90px 24px 40px; }
.ft-grid { display: grid; grid-template-columns: 1.15fr 0.85fr 0.95fr; gap: 64px; }

.ft-pill {
  display: inline-flex;
  align-items: center;
  margin: 0;
  background: #D92323;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 14px;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.ft-heading {
  margin: 20px 0 0;
  font-family: 'Manosque', 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  line-height: 1.04;
  color: #F2F3F5;
}
.ft-copy { margin: 16px 0 0; max-width: 420px; color: rgba(242, 243, 245, 0.7); line-height: 1.6; }

.ft-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  background: #D92323;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 17px;
  text-decoration: none;
  border-radius: 999px;
  padding: 8px 8px 8px 24px;
  box-shadow: 0 12px 32px -4px rgba(217, 35, 35, 0.3);
  transition: background 0.2s ease;
}
.ft-cta:hover { background: #E93B3B; }
.ft-cta-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  width: 36px;
  border-radius: 50%;
  background: #0C0D0F;
  color: #F2F3F5;
  transition: transform 0.2s ease;
}
.ft-cta-circle svg { height: 20px; width: 20px; }
.ft-cta:hover .ft-cta-circle { transform: rotate(45deg); }

.ft-nav { display: block; margin-top: 40px; max-width: 420px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.ft-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #F2F3F5;
  text-decoration: none;
  font-weight: 600;
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}
.ft-nav-row svg {
  height: 20px;
  width: 20px;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.4);
  transition: transform 0.2s ease, color 0.2s ease;
}
.ft-nav-row:hover { color: #FF6B6B; }
.ft-nav-row:hover svg { color: #FF6B6B; transform: translate(2px, -2px); }

.ft-col-title { margin: 0 0 16px; font-size: 17px; font-weight: 700; color: #F2F3F5; }
.ft-links { margin: 16px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.ft-links a { color: rgba(242, 243, 245, 0.7); text-decoration: none; transition: color 0.2s ease; }
.ft-links a:hover { color: #FF6B6B; }

.ft-contact { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; font-size: 14.5px; }
.ft-contact li { display: block; }
.ft-contact li > span:not(.ft-ico),
.ft-contact li { color: rgba(242, 243, 245, 0.8); }
.ft-contact li, .ft-contact a { display: inline-flex; align-items: flex-start; gap: 8px; }
.ft-contact a { color: rgba(242, 243, 245, 0.8); text-decoration: none; transition: color 0.2s ease; }
.ft-contact a:hover { color: #FF6B6B; }
.ft-ico { display: inline-flex; flex-shrink: 0; margin-top: 1px; color: #E93B3B; }
.ft-ico svg { height: 16px; width: 16px; }

.ft-cred { display: inline-flex; align-items: center; gap: 8px; margin: 24px 0 0; font-size: 14.5px; color: rgba(242, 243, 245, 0.8); }
.ft-pay-label { margin: 24px 0 0; font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(242, 243, 245, 0.5); }
.ft-pay { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.ft-pay li {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 4px 10px;
  color: rgba(242, 243, 245, 0.8);
}

.ft-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: rgba(242, 243, 245, 0.5);
}
.ft-bottom p { margin: 0; }
.ft-bottom-right { display: flex; align-items: center; gap: 16px; }
.ft-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  width: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(242, 243, 245, 0.7);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease, color 0.2s ease;
}
.ft-social svg { height: 16px; width: 16px; }
.ft-social:hover { background: #D92323; color: #FFFFFF; }
.ft-legal { margin-left: 4px; display: flex; align-items: center; gap: 12px; }
.ft-legal a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
.ft-legal a:hover { color: #FF6B6B; }

/* Giant brand watermark — desktop: sits in the open space beside the nav rows;
   mobile: hidden (reads glitchy small). */
.ft-wm-wrap { pointer-events: none; position: relative; z-index: 0; margin-top: -8px; overflow: hidden; }
.footer-watermark {
  display: block;
  user-select: none;
  white-space: nowrap;
  text-align: center;
  font-family: 'Manosque', 'Inter', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.8;
  letter-spacing: -0.01em;
  transform: translateY(12%);
  font-size: clamp(2.75rem, 14.5vw, 12rem);
}
.ft-wm-gap { display: inline-block; width: 0.28em; }
.ft-wm-br { display: none; }
@media (min-width: 901px) {
  .ft-wm-wrap { position: absolute; inset: 0; margin-top: 0; overflow: visible; }
  /* Sits just to the right of the stacked footer nav rows (Home/Services/…),
     not pinned to the far right edge. */
  .footer-watermark {
    position: absolute;
    bottom: 7%;
    left: 38%;
    transform: none;
    text-align: left;
    line-height: 0.85;
    font-size: clamp(2.4rem, 4.6vw, 4.4rem);
  }
  .ft-wm-l1 { font-size: 1.9em; }
  .ft-wm-br { display: block; }
  .ft-wm-gap { display: none; }
  .ft-wm-l2 .ft-wm-gap { display: inline-block; }
}
.fw-letter { display: inline-block; }
/* Watermark colors: "AR" brand red, "GARAGE DOORS" steel gray */
.ft-wm-l1 .fw-letter { color: rgba(217, 35, 35, 0.55); }
.ft-wm-l2 .fw-letter { color: rgba(138, 144, 153, 0.45); }

/* Footer entrance animation — hidden states are gated behind .footer-anim-ready
   (added by JS) so the footer stays fully visible with JS disabled. */
.footer-anim-ready .foot-rise {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 0.06s);
}
.footer-anim-ready .fw-letter {
  opacity: 0;
  transform: translateY(110px) scale(0.4) rotate(16deg);
  transition: opacity 0.9s cubic-bezier(0.34, 1.4, 0.5, 1), transform 0.9s cubic-bezier(0.34, 1.4, 0.5, 1);
  transition-delay: calc(var(--i, 0) * 0.05s);
  will-change: transform, opacity;
}
.footer-anim-ready.footer-in .foot-rise { opacity: 1; transform: none; }
.footer-anim-ready .wm-in .fw-letter { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .footer-anim-ready .foot-rise,
  .footer-anim-ready .fw-letter { opacity: 1 !important; transform: none !important; transition: none !important; }
}
@media (max-width: 900px) {
  .footer-watermark { display: none !important; }
}

/* ---------- Responsive ---------- */

/* Global safety: never let anything cause sideways scroll, on any device. */
html, body { overflow-x: hidden; max-width: 100%; }
body { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, svg, video, canvas { max-width: 100%; }

/* Short-but-wide desktop viewports (small laptops): tighten the hero so it
   still fits the fold. */
@media (min-width: 901px) and (max-height: 820px) {
  header[data-hero] h1 { font-size: 50px !important; }
  header[data-hero] .hero-grid { padding-top: 92px !important; padding-bottom: 92px !important; }
  header[data-hero] .hero-highlights img { height: 40px !important; width: 40px !important; }
  header[data-hero] .hero-highlights span { font-size: 14.5px !important; }
  header[data-hero] .hero-grid > div[data-reveal="left"] > p { font-size: 17.5px !important; margin-bottom: 20px !important; }
}

/* Tablet and below (<=900px): stack to one column, tighten the rhythm. */
@media (max-width: 900px) {
  .nav-links,
  .nav-phone { display: none !important; }
  .hamburger-btn { display: flex !important; }
  .nav-actions { margin-left: auto !important; }

  .hero-grid,
  .services-grid,
  .about-grid,
  .gallery-grid,
  .reviews-grid {
    grid-template-columns: 1fr !important;
  }

  .gallery-slot.featured {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }

  /* Hero — the left column fills the first screen; the form lands just below. */
  header[data-hero] { min-height: 0 !important; display: block !important; }
  header[data-hero] .hero-grid {
    padding: 108px 20px 100px !important;
    gap: 40px !important;
  }
  header[data-hero] h1 { font-size: clamp(2.15rem, 8.4vw, 3.3rem) !important; }
  .hero-grid > div[data-reveal="left"] > p { font-size: 17px !important; }

  section h2 { font-size: clamp(1.85rem, 6vw, 2.6rem) !important; line-height: 1.15 !important; }

  #services, #why, #gallery, #reviews {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  #services { padding-top: 60px !important; padding-bottom: 130px !important; }
  #why      { padding-top: 64px !important; padding-bottom: 140px !important; }
  #gallery  { padding-top: 60px !important; padding-bottom: 72px !important; }
  #reviews  { padding-top: 60px !important; padding-bottom: 130px !important; }
  section[data-screen-label="CTA"] > div[data-reveal="up"] {
    padding: 118px 20px 130px !important;
  }

  /* The why-section photo shrinks and its geometric accents tuck in. */
  .about-grid img { height: 320px !important; }

  /* Larger form controls so iOS doesn't zoom the page on focus. */
  input, select, textarea { font-size: 16px !important; }

  .ft-inner { padding-left: 20px !important; padding-right: 20px !important; }
  .ft-grid { grid-template-columns: 1fr; gap: 44px; }

  /* On phones the nav-row borders span the full screen and read as stray
     horizontal separator lines — drop them; spacing alone separates rows. */
  .ft-nav { border-top: none; }
  .ft-nav-row { border-bottom: none; padding: 11px 0; }
  .ft-bottom { border-top: none; }
}

/* Tablet only (601-900px): 2 columns look better than 1 for the card grids. */
@media (min-width: 601px) and (max-width: 900px) {
  .services-grid,
  .reviews-grid,
  .gallery-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* Phones (<=600px). */
@media (max-width: 600px) {
  /* Quote card breathes better edge-to-edge on phones. */
  #quote > div { padding: 24px 18px 20px !important; }

  header[data-hero] h1 { font-size: clamp(1.95rem, 8.8vw, 2.6rem) !important; }
  .hero-grid > div[data-reveal="left"] > p { font-size: 16.5px !important; }

  /* Drop the nav CTA — it's in the hamburger menu; keeps the bar uncluttered. */
  .nav-actions a[href="#quote"] { display: none !important; }

  .hero-highlights { column-gap: 16px !important; row-gap: 14px !important; }
  .hero-highlights img { height: 38px !important; width: 38px !important; }
  .hero-highlights span { font-size: 13.5px !important; }

  .about-features { grid-template-columns: 1fr !important; gap: 20px !important; }
}

/* Small phones (<=400px): tighten gutters further. */
@media (max-width: 400px) {
  nav [style*="padding: 0 24px"] { padding-left: 16px !important; padding-right: 16px !important; }
  #services, #why, #gallery, #reviews {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  header[data-hero] .hero-grid { padding-left: 16px !important; padding-right: 16px !important; }
  section[data-screen-label="CTA"] > div[data-reveal="up"] { padding-left: 16px !important; padding-right: 16px !important; }
  .ft-inner { padding-left: 16px !important; padding-right: 16px !important; }
}

/* ============================================================
   MOBILE STICKY CTA BAR
   Floating Call + Get Quote pills, phones & tablets only.
   Hidden by default; JS toggles .is-visible once the hero
   scrolls out of view. Desktop (>=1024px) never shows it.
   ============================================================ */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  padding: 0 14px calc(env(safe-area-inset-bottom, 0px) + 14px);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
.sticky-cta.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.sticky-cta-inner {
  display: flex;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto;
}
.sticky-cta-btn {
  flex: 1;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 18px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.3px;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(0,0,0,0.28);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.sticky-cta-btn svg {
  height: 20px;
  width: 20px;
  flex-shrink: 0;
}
.sticky-cta-btn:active { transform: scale(0.97); }
/* SECONDARY — Call: white pill, brand-red text + thin ring */
.sticky-cta-call {
  background: #ffffff;
  color: #B31D1D;
  box-shadow: 0 10px 26px rgba(0,0,0,0.22), inset 0 0 0 1.5px rgba(217,35,35,0.3);
}
/* PRIMARY — Get Quote: solid red pill, white text (matches site CTA) */
.sticky-cta-quote {
  background: #D92323;
  color: #FFFFFF;
}

@media (min-width: 1024px) {
  .sticky-cta { display: none !important; }
}
