/* Custom Window Screens, Parksville B.C. — built 2026-11 */
@font-face {
  font-family: 'Permanent Marker';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/permanent-marker.woff2) format('woff2');
}

:root {
  --sky: #5ad7ff;
  --sky-soft: #e9f8ff;
  --sky-deep: #1f9fd0;
  --navy: #16324f;
  --ink: #1f2933;
  --muted: #5b6b7b;
  --yellow: #f5b400;
  --yellow-dark: #cf9600;
  --cream: #fffaf0;
  --white: #ffffff;
  --line: #dfe7ee;
  --marker: 'Permanent Marker', 'Segoe UI', Arial, sans-serif;
  --body: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(22, 50, 79, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: #176b8f; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h1, h2, .logo { font-family: var(--marker); font-weight: 400; letter-spacing: .01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); color: var(--navy); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); color: var(--navy); }
h3 { font-size: 1.25rem; color: var(--navy); }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.lead { font-size: 1.15rem; color: var(--muted); }
.muted { color: var(--muted); }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .8em 1.3em; border-radius: 999px;
  font-weight: 700; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; font-size: 1rem; line-height: 1.2;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-yellow { background: var(--yellow); color: var(--navy); }
.btn-yellow:hover { background: #ffc21a; }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-white { background: var(--white); color: var(--navy); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.logo { font-size: 1.5rem; color: var(--navy); text-decoration: none; line-height: 1; }
.logo span { color: var(--sky-deep); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a { text-decoration: none; color: var(--navy); font-weight: 600; padding: .55em .9em; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--sky-soft); }
.nav .btn { padding: .6em 1.1em; margin-left: 6px; }
.nav .btn:hover { background: #ffc21a; }
.menu-btn { display: none; margin-left: auto; background: none; border: 2px solid var(--navy); border-radius: 10px; padding: 6px 9px; cursor: pointer; color: var(--navy); }
.menu-btn svg { width: 24px; height: 24px; display: block; }

/* Hero */
.hero { background: linear-gradient(180deg, var(--sky-soft) 0%, #d6f1ff 100%); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: center; padding: 56px 0 24px; }
.hero h1 { margin-bottom: .4em; }
.hero .lead { font-size: 1.25rem; color: #30475e; max-width: 34ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 14px; }
.hero .towns { font-weight: 700; color: var(--navy); margin: 0; }
.hero .towns small { display: block; font-weight: 400; color: var(--muted); }
.house { width: 100%; height: auto; max-width: 620px; margin-inline: auto; filter: drop-shadow(0 18px 24px rgba(22,50,79,.18)); }

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--cream); }
.section-sky { background: var(--sky-soft); }
.section-head { max-width: 62ch; margin-bottom: 32px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.card .photo { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card .photo[width="269"] { object-fit: contain; background: #eef3f7; }
.card .body { padding: 22px 24px 26px; }
.card .body p:last-child { margin-bottom: 0; }

.step { background: var(--white); border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); position: relative; }
.step .num {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--yellow); color: var(--navy); font-weight: 800; font-size: 1.25rem; margin-bottom: 12px;
}
.step h3 { margin-bottom: .3em; }
.step p { margin: 0; color: var(--muted); }
.note {
  margin-top: 28px; padding: 18px 22px; border-left: 6px solid var(--yellow);
  background: var(--white); border-radius: 0 var(--radius) var(--radius) 0; box-shadow: var(--shadow);
}
.note p { margin: 0; }

.why { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.why > div { background: var(--white); border-radius: var(--radius); padding: 28px 22px 24px; box-shadow: inset 0 6px 0 var(--sky), var(--shadow); }
.why .big { font-family: var(--marker); font-size: 2.2rem; color: var(--navy); line-height: 1; margin-bottom: 8px; }
.why h3 { font-size: 1.1rem; }
.why p { margin: 0; color: var(--muted); font-size: .98rem; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery figure { margin: 0; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery .tall img { aspect-ratio: 3 / 4; }
.gallery figcaption { padding: 14px 18px; color: var(--muted); font-size: .97rem; }
.gallery.big { grid-template-columns: repeat(2, 1fr); }
.gallery.big img { aspect-ratio: 3 / 4; }
.gallery.big .wide img { aspect-ratio: auto; object-fit: contain; background: #eef3f7; max-height: 520px; }

/* Contact band */
.band { background: var(--navy); color: var(--white); }
.band .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; padding: 56px 0; }
.band h2 { color: var(--white); }
.band p { color: #cfe3f2; }
.band .contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.band .contact-list a { color: var(--white); font-weight: 700; font-size: 1.25rem; text-decoration: none; display: inline-flex; align-items: center; gap: .5em; }
.band .contact-list a:hover { text-decoration: underline; }
.band .contact-list svg { width: 1.2em; height: 1.2em; }
.band .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.contact-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.contact-card dl { margin: 0; display: grid; gap: 18px; }
.contact-card dt { font-weight: 700; color: var(--navy); }
.contact-card dd { margin: 2px 0 0; }
.contact-card dd a { font-size: 1.2rem; font-weight: 700; text-decoration: none; color: var(--sky-deep); }
.contact-card dd a:hover { text-decoration: underline; }
form.contact { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; display: grid; gap: 16px; }
form.contact label { display: grid; gap: 6px; font-weight: 600; color: var(--navy); }
form.contact input, form.contact select, form.contact textarea {
  font: inherit; padding: .7em .9em; border: 1.5px solid #c9d4de; border-radius: 10px; background: var(--white); width: 100%;
}
form.contact input:focus, form.contact select:focus, form.contact textarea:focus { border-color: var(--sky-deep); outline: none; box-shadow: 0 0 0 3px rgba(90,215,255,.35); }
form.contact textarea { min-height: 140px; resize: vertical; }
form.contact .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
form.contact .hp { position: absolute; left: -9999px; }
.form-msg { margin: 0; padding: 14px 16px; border-radius: 10px; background: var(--sky-soft); color: var(--navy); display: none; }
.form-msg.show { display: block; }
.form-msg.err { background: #ffe9e9; color: #8a1c1c; }

/* Footer */
.site-footer { background: #0f2238; color: #b9cbdc; padding: 32px 0; font-size: .95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; justify-content: space-between; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .logo { font-size: 1.2rem; color: var(--white); }

/* Page hero (inner pages) */
.page-hero { background: linear-gradient(180deg, var(--sky-soft), #d6f1ff); padding: 48px 0 36px; }
.page-hero p { max-width: 60ch; margin-bottom: 0; }

/* ---------- Animated house ---------- */
.house .scr { transform: translateY(-90px); opacity: 0; animation: slideIn 1.1s cubic-bezier(.2,.8,.2,1) forwards; }
.house .scr.s1 { animation-delay: .5s; }
.house .scr.s2 { animation-delay: .9s; }
.house .scr.s3 { animation-delay: 1.3s; }
.house .door-screen { animation: doorSlide 7s ease-in-out 3s infinite; }
.house .cloud { animation: drift 48s linear infinite; }
.house .cloud.c2 { animation-duration: 64s; animation-delay: -30s; }
.house .sun-rays { transform-origin: 548px 74px; animation: spin 90s linear infinite; }
.house .bird { animation: fly 22s linear 4s infinite; opacity: 0; }
.house .smoke { animation: puff 5s ease-out infinite; opacity: 0; }
.house .smoke.k2 { animation-delay: 1.7s; }
.house .smoke.k3 { animation-delay: 3.4s; }
@keyframes slideIn { to { transform: translateY(0); opacity: 1; } }
@keyframes doorSlide { 0%, 20% { transform: translateX(0); } 45%, 60% { transform: translateX(-46px); } 85%, 100% { transform: translateX(0); } }
@keyframes drift { from { transform: translateX(-220px); } to { transform: translateX(700px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fly { 0% { transform: translate(-60px, 30px); opacity: 0; } 5% { opacity: 1; } 95% { opacity: 1; } 100% { transform: translate(720px, -40px); opacity: 0; } }
@keyframes puff { 0% { transform: translate(0,0) scale(.6); opacity: 0; } 20% { opacity: .8; } 100% { transform: translate(14px,-48px) scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .house .scr, .house .door-screen, .house .cloud, .house .sun-rays, .house .bird, .house .smoke { animation: none !important; }
  .house .scr { transform: none; opacity: 1; }
  .house .bird { opacity: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; padding: 40px 0 8px; }
  .house { max-width: 560px; }
  .why, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .band .wrap, .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .menu-btn { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 72px; z-index: 60;
    background: var(--white); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 10px 16px 16px; gap: 4px; box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: .8em 1em; }
  .nav .btn { margin: 8px 0 0; justify-content: center; }
  .grid-2, .grid-3, .why, .grid-4, .gallery, .gallery.big { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  form.contact .row { grid-template-columns: 1fr; }
  .hero .actions .btn { width: 100%; justify-content: center; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}

/* ---------- Facts strip ---------- */
.facts { background: var(--navy); color: var(--white); }
.facts .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 16px 0; }
.facts div { display: grid; gap: 2px; padding: 8px 12px; border-left: 3px solid var(--yellow); }
.facts strong { font-size: 1.02rem; line-height: 1.2; }
.facts span { font-size: .88rem; color: #cfe3f2; }
.head-call { display: none; }
.phone-bar { display: none; }
.nowrap { white-space: nowrap; }

/* ---------- Phone layout (its own design) ---------- */
@media (max-width: 720px) {
  body { padding-bottom: 76px; } /* room for the sticky bar */
  .site-header .wrap { min-height: 60px; gap: 10px; }
  .logo { font-size: 1.25rem; }
  .head-call { display: grid; place-items: center; margin-left: auto; width: 42px; height: 42px; border-radius: 50%; background: var(--yellow); color: var(--navy); }
  .head-call svg { width: 22px; height: 22px; }
  .menu-btn { margin-left: 0; }
  .nav { top: 60px; }
  .nav .btn { display: none; }

  /* hero: the essentials first */
  .hero .wrap { padding: 22px 0 18px; gap: 14px; }
  .hero h1 { font-size: 1.85rem; line-height: 1.12; margin-bottom: .35em; }
  .hero .lead { font-size: 1rem; line-height: 1.45; max-width: none; margin-bottom: .6em; }
  .hero .actions { margin: 10px 0 8px; gap: 8px; }
  .hero .actions .btn { width: auto; flex: 1 1 100%; justify-content: center; padding: .85em 1em; font-size: 1.05rem; }
  .hero .actions .btn-outline { flex: 1 1 45%; padding: .7em .8em; font-size: .95rem; }
  .hero .towns { display: none; }
  .house { max-width: 100%; margin-top: 4px; filter: none; }

  .facts .wrap { grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 0; }
  .facts div { padding: 6px 10px; }
  .facts strong { font-size: .95rem; }
  .facts span { font-size: .82rem; }

  .section { padding: 34px 0; }
  .section-head { margin-bottom: 18px; }
  .section-head .lead { font-size: 1rem; }
  h2 { font-size: 1.55rem; }

  /* services: photo beside the text */
  .grid-2 { gap: 12px; }
  .card { display: grid; grid-template-columns: 110px 1fr; align-items: center; }
  .card .photo { aspect-ratio: 1 / 1; height: 100%; object-fit: cover; }
  .card .photo[width="269"] { object-fit: cover; background: none; }
  .card .body { padding: 12px 14px; }
  .card h3 { font-size: 1.05rem; margin-bottom: .25em; }
  .card p { font-size: .93rem; line-height: 1.45; }

  /* steps: tight list */
  .grid-4 { gap: 10px; }
  .step { display: grid; grid-template-columns: 38px 1fr; column-gap: 12px; padding: 12px 14px; align-items: start; }
  .step .num { width: 38px; height: 38px; font-size: 1.05rem; margin: 0; grid-row: 1 / span 2; }
  .step h3 { font-size: 1.02rem; margin: 0 0 .15em; }
  .step p { font-size: .93rem; line-height: 1.45; }
  .note { margin-top: 16px; padding: 12px 14px; font-size: .95rem; }

  .why { gap: 10px; grid-template-columns: 1fr 1fr; }
  .why > div { padding: 18px 12px 14px; }
  .why .big { font-size: 1.6rem; margin-bottom: 4px; }
  .why h3 { font-size: .98rem; }
  .why p { font-size: .88rem; }

  /* gallery: two columns of squares */
  .gallery, .gallery.big { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gallery img, .gallery .tall img, .gallery.big img { aspect-ratio: 1 / 1; object-fit: cover; }
  .gallery.big .wide img { aspect-ratio: 1 / 1; object-fit: cover; background: none; max-height: none; }
  .gallery figcaption { padding: 8px 10px; font-size: .85rem; }

  .band .wrap { padding: 32px 0; gap: 18px; }
  .band h2 { font-size: 1.5rem; }
  .band .contact-list a { font-size: 1.1rem; }

  .page-hero { padding: 24px 0 20px; }
  .page-hero h1 { font-size: 1.85rem; }
  .page-hero .lead { font-size: 1rem; }
  .contact-grid { gap: 18px; }
  .contact-card, form.contact { padding: 18px; }

  .site-footer { padding: 22px 0; font-size: .88rem; }

  /* sticky call bar */
  .phone-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.96); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(22,50,79,.12);
  }
  .phone-bar .btn { justify-content: center; padding: .8em .6em; font-size: 1rem; border-radius: 12px; }
  .phone-bar .btn:hover { transform: none; }
}
