/* ---------------------------------------------------------
   Vinyl Link Windows & Doors — design tokens
   navy #16273F / sky #2AAAE2 / slate #5C6670
   paper #F4F6F8 / ink #131C24 / charcoal #21262B
   Signature element: window-mullion grid motif + glass-sheen
   hover on gallery cards (see .hero-grid, .gallery-media::after)
--------------------------------------------------------- */

:root {
  --navy: #16273f;
  --sky: #2aaae2;
  --sky-deep: #1c6fa8;
  --slate: #5c6670;
  --paper: #f4f6f8;
  --ink: #131c24;
  --charcoal: #21262b;

  --white: #ffffff;
  --line: #dde2e6;

  --font-display: "Archivo", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;

  --wrap: 1160px;
  --radius: 6px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sky-deep);
}

.eyebrow {
  margin: 0 0 10px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 12px 18px;
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.12;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.2rem, 5vw + 1rem, 3.6rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.7rem, 3vw + 1rem, 2.4rem);
  font-weight: 700;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-lede,
.hero-lede {
  color: var(--slate);
  max-width: 56ch;
  font-size: 1.05rem;
}

.section-head {
  max-width: 640px;
  margin-bottom: 40px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease);
  border: 1.5px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--sky);
  color: var(--navy);
}

.btn-primary:hover {
  background: var(--white);
  transform: translateY(-1px);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--white);
}

.btn-ghost:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.btn-call {
  background: var(--navy);
  color: var(--white);
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 18px;
}

.btn-call .mono-tag {
  color: var(--sky);
}

.btn-call:hover {
  background: var(--charcoal);
}

/* ---------------- Header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 246, 248, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 12px;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo {
  height: 40px;
  width: auto;
}

.site-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  text-decoration: none;
  font-weight: 500;
  color: var(--ink);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}

.nav-menu a:hover {
  color: var(--sky-deep);
  border-color: var(--sky);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  position: relative;
  transition: transform 0.2s var(--ease);
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bar::before {
  top: -7px;
}

.nav-toggle-bar::after {
  top: 7px;
}

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  min-height: min(88vh, 780px);
  display: flex;
  align-items: flex-end;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(19, 28, 36, 0.35) 0%, rgba(19, 28, 36, 0.55) 45%, rgba(15, 22, 30, 0.92) 100%);
}

/* Signature motif: a faint window-mullion grid laid over the hero photo */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.14) 0, rgba(255, 255, 255, 0.14) 1px, transparent 1px, transparent 12.5%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.14) 0, rgba(255, 255, 255, 0.14) 1px, transparent 1px, transparent 25%);
  mix-blend-mode: overlay;
  opacity: 0.8;
}

.hero-inner {
  position: relative;
  color: var(--white);
  padding-block: 64px 72px;
}

.hero h1 {
  color: var(--white);
  max-width: 16ch;
}

.hero-lede {
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 32px;
}

.hero .eyebrow {
  color: var(--sky);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---------------- Gallery ---------------- */

.work {
  padding-block: 88px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.gallery-item {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.gallery-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--charcoal);
}

.gallery-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

/* Signature interaction: a diagonal sheen sweeps the glass on hover/focus,
   plus a mullion cross marks the corner — reads as light on a window pane. */
.gallery-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.35) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
  pointer-events: none;
}

.gallery-media::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 14px;
  width: 22px;
  height: 22px;
  border-top: 2px solid rgba(255, 255, 255, 0.85);
  border-left: 2px solid rgba(255, 255, 255, 0.85);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}

.gallery-item:hover .gallery-media img,
.gallery-item:focus-within .gallery-media img {
  transform: scale(1.04);
}

.gallery-item:hover .gallery-media::after,
.gallery-item:focus-within .gallery-media::after {
  transform: translateX(120%);
}

.gallery-item:hover .gallery-media::before,
.gallery-item:focus-within .gallery-media::before {
  opacity: 1;
}

.gallery-item figcaption {
  padding: 20px 22px 24px;
}

.gallery-item figcaption p {
  margin: 0;
  color: var(--slate);
  font-size: 0.95rem;
}

/* ---------------- Window/door types ---------------- */

.types {
  padding-block: 88px;
  background: var(--white);
  border-block: 1px solid var(--line);
}

/* Masonry-style column flow: photos keep their true proportions (no crop,
   no letterboxing), so cards of very different heights just pack in without
   leaving gaps the way a strict grid would. */
.type-grid {
  column-count: 4;
  column-gap: 24px;
}

.type-card {
  break-inside: avoid;
  margin-bottom: 24px;
}

.type-caption {
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  font-size: 1rem;
}

/* Show the full photo exactly as shot, uncropped */
.type-card .gallery-media:not(.gallery-media--pending) {
  aspect-ratio: auto;
}

.type-card .gallery-media:not(.gallery-media--pending) img {
  height: auto;
}

/* Placeholder cards for window types awaiting a photo */
.gallery-media--pending {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--paper);
  border: 1.5px dashed var(--line);
}

.type-card--pending .gallery-media::after,
.type-card--pending .gallery-media::before {
  content: none;
}

.pending-mark {
  position: relative;
  width: 34px;
  height: 34px;
  border: 2px solid var(--line);
  opacity: 0.9;
}

.pending-mark::before,
.pending-mark::after {
  content: "";
  position: absolute;
  background: var(--line);
}

.pending-mark::before {
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  transform: translateY(-50%);
}

.pending-mark::after {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
}

.pending-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
}

/* ---------------- Why us ---------------- */

.why {
  padding-block: 88px;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.why-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--sky);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.why-card p:last-child {
  color: var(--slate);
  margin: 0;
}

.why-card .mono-tag {
  display: block;
  margin-bottom: 14px;
}

/* ---------------- CTA / contact ---------------- */

.cta {
  background: var(--charcoal);
  color: var(--white);
  padding-block: 88px;
}

.cta-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.cta h2 {
  color: var(--white);
}

.cta .eyebrow {
  color: var(--sky);
}

.cta .section-lede {
  color: rgba(255, 255, 255, 0.72);
}

.cta-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}

.cta-phone {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  font-weight: 800;
  color: var(--sky);
  text-decoration: none;
  margin-bottom: 12px;
}

.cta-phone:hover {
  color: var(--white);
}

.cta-email {
  display: block;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  margin-bottom: 20px;
}

.cta-email:hover {
  color: var(--white);
}

.cta-address {
  font-style: normal;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 20px;
}

/* ---------------- Footer ---------------- */

.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding-block: 32px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-logo {
  height: 28px;
  width: auto;
}

.footer-meta,
.footer-copy {
  margin: 0;
  color: var(--slate);
  font-size: 0.9rem;
}

.footer-meta a {
  text-decoration: none;
  color: var(--sky-deep);
  font-weight: 600;
}

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

@media (max-width: 860px) {
  .gallery {
    grid-template-columns: 1fr;
  }

  .type-grid {
    column-count: 2;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }

  .cta-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .header-call {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    justify-content: flex-end;
  }

  .type-grid {
    column-count: 1;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s var(--ease);
  }

  .nav-menu.is-open {
    max-height: 320px;
  }

  .nav-menu li {
    border-top: 1px solid var(--line);
  }

  .nav-menu a {
    display: block;
    padding: 16px 24px;
    border-bottom: none;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar {
    background: transparent;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
    top: 0;
    transform: rotate(45deg);
    background: var(--navy);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
    top: 0;
    transform: rotate(-45deg);
    background: var(--navy);
  }
}
