/* ================================
   NAV — Figma node 220:548 Header (1608×52 at canvas y=30)
   ================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  padding: 30px 0;                           /* Figma: header sits 30px from canvas top */
  transition: backdrop-filter var(--t-base), background var(--t-base);
}

.nav.scrolled {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.55);
}

.nav-inner {
  max-width: calc(var(--max-width) + 2 * var(--pad));
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Figma: Logo Mark — 97×52 SVG (button 220:549) */
.nav-logo {
  display: block;
  width: 97px;
  height: 52px;
  flex-shrink: 0;
}

.nav-logo img {
  display: block;
  width: 100%;
  height: 100%;
}

/* Figma: Menu (220:551) — 1059×20 row of 5 items.
   Items use Heading text style: Neue Montreal Medium 20px, line-height 1, letter-spacing 0,
   color black, UPPERCASE. Gap 152px between items. */
.nav-links {
  display: flex;
  align-items: center;
  gap: 152px;
}

.nav-links a {
  font-family: var(--body-font);
  font-weight: 500;
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--color-black);
  position: relative;
  transition: opacity var(--t-fast);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--color-black);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

/* ================================
   PRIMARY BUTTON — Figma 248:686 Button / Primary
   Black pill, padding 20px 26px, border-radius 40px. Text: Heading Small (Clash Display
   Medium 24px, letter-spacing 0.02em, color white). 10px gap to icon. Size 240×64.
   ================================ */

.cta-button {
  background: var(--color-black);
  color: var(--color-white);
  border: none;
  padding: 20px 26px;
  border-radius: var(--radius-button-pill);
  font-family: var(--display-font);
  font-weight: 500;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform var(--t-fast), background var(--t-fast);
  cursor: pointer;
}

.cta-button:hover {
  background: #1a1a1a;
  transform: translateY(-2px);
}

.cta-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.cta-button svg {
  width: 16px;
  height: 16px;
}

/* ================================
   MODAL — Figma 289:43 Get an estimate card (1240×770, border-radius 95)
   Centered on a darkened backdrop. Card has white background.
   ================================ */

.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
}

.modal.open {
  display: flex;
  animation: modalFadeIn 0.25s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 1466px;                           /* Figma 505:2797 Modal Frame */
  background: var(--color-white);
  border-radius: 80px;                         /* Figma rounded-80 */
  padding: 60px 66px 50px;                     /* approx: inner content fits within 1334 wide */
  margin: auto;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.2);
  animation: modalSlideUp 0.35s ease;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-black);
  color: var(--color-white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--t-fast), background var(--t-fast);
  z-index: 1;
}

.modal-close:hover {
  background: #1a1a1a;
  transform: rotate(90deg);
}

.modal .estimate-card {
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

body.modal-open {
  overflow: hidden;
}

/* Netlify Forms honeypot — visually hidden field that traps bots that fill in
   every field. Real users never see it, so a non-empty value = bot submission. */
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ================================
   MOBILE MENU — hamburger toggle (Figma responsive header 561:668) +
   full-screen overlay. Toggle is hidden on desktop; shown ≤767 in responsive.css.
   ================================ */
.nav-menu-toggle {
  display: none;                              /* shown only on mobile */
  width: 36px;
  height: 36px;
  padding: 7px;
  background: transparent;
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--color-black);
}
.nav-menu-toggle img {
  width: 100%;
  height: 100%;
  display: block;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 150;                               /* above nav (100), below modal (200) */
  background: var(--color-white);
  display: flex;
  flex-direction: column;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
}

body.menu-open .mobile-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

body.menu-open {
  overflow: hidden;
}

.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 19px;                           /* aligns with header content top */
  height: 36px;
}
.mobile-menu-head .nav-logo img {
  height: 30px;
  width: auto;
}
.mobile-menu-close {
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--color-black);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.mobile-menu-close svg {
  width: 24px;
  height: 24px;
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 56px;
}
.mobile-menu-links a {
  font-family: var(--display-font);
  font-weight: 500;
  font-size: 44px;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-black);
  text-decoration: none;
}
