/* Longoria Insulation — one stylesheet for every page. */

@font-face {
  font-family: "Big Shoulders";
  src: url("../fonts/big-shoulders-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --bg: #f7f9f8;
  --surface: #ebf0ee;
  --ink: #06525c;
  --muted: #2f737d;
  --accent: #06525c;
  --accent-ink: #f7f9f8;
  --field: #06525c;
  --field-ink: #f7f9f8;
  --foam: #ecd27f;
  --error: #9b1c1c;

  --display: "Big Shoulders", "Arial Narrow", Impact, sans-serif;
  --text: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2.75rem, 1.4rem + 5.4vw, 6rem);
  --step-hero: clamp(4rem, 0.6rem + 10.2vw, 11rem);

  --m: clamp(16px, 2.4vw, 32px);
  --gap: clamp(16px, 2vw, 28px);
  --section: clamp(120px, 14vw, 200px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--step-body);
  line-height: 1.55;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { text-decoration-thickness: 0.14em; }
:focus-visible { outline: 3px solid var(--foam); outline-offset: 3px; }
::selection { background: var(--foam); color: var(--ink); }
p { margin: 0 0 1em; max-width: 62ch; }
h1, h2, h3 { margin: 0; font-weight: 800; }

.display {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  line-height: 0.88;
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; /* taste-skill-ignore */
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; left: var(--m); top: 12px; z-index: 50;
  background: var(--ink); color: var(--bg); padding: 12px 16px;
  clip-path: inset(50%); /* hidden until focused */
}
.skip:focus { clip-path: none; }

.wrap { padding-inline: var(--m); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }

/* Buttons: square-cornered, one fill, decided once. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0.7em 1.3em;
  background: var(--accent); color: var(--accent-ink);
  font: 600 var(--step-body)/1.1 var(--text);
  text-decoration: none; border: 0; border-radius: 0; cursor: pointer;
  transition: transform 160ms var(--ease), background-color 160ms var(--ease);
}
.btn:hover { background: #043f47; }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn--paper { background: var(--bg); color: var(--ink); }
.btn--paper:hover { background: var(--foam); }

/* ---------- Header ---------- */
.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 24px var(--m);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font: 800 1.6rem/1 var(--display); text-transform: uppercase; text-decoration: none;
}
.wordmark img { width: 32px; height: 32px; }
.nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 40px); }
.nav a:not(.btn) { text-decoration: none; font-weight: 600; }
.nav a:not(.btn):hover { text-decoration: underline; }
.menu-toggle {
  display: none; background: none; border: 0; color: var(--ink);
  font: 600 var(--step-body) var(--text); padding: 12px 0; cursor: pointer;
}

/* ---------- Hero: title in the sky, line on the horizon ---------- */
.hero {
  position: relative; min-height: max(100svh, 720px);
  display: flex; flex-direction: column; overflow: hidden;
}
.hero__title {
  padding: clamp(108px, 14vh, 150px) var(--m) 0;
  text-align: center; font-size: var(--step-hero);
}
.hero__title .line { display: block; white-space: nowrap; }
.slot {
  position: relative; display: inline-block;
  width: 2.15em; height: 0.74em; margin-inline: 0.06em 0.14em;
  vertical-align: baseline; overflow: hidden;
  background: var(--surface);
  border-inline: 0.1em solid var(--ink);
}
.slot__foam {
  position: absolute; inset: 0;
  background: url("../img/foam-slot.svg") center bottom / 100% 100% no-repeat;
  transform-origin: bottom;
}
.hero__horizon {
  position: relative; z-index: 2; margin: clamp(24px, 3vw, 40px) 0 0; max-width: none;
  padding-inline: var(--m); font-size: var(--step-lead); font-weight: 600; line-height: 1.25;
}
.hero__horizon span:first-child { grid-column: 1 / 6; text-align: right; }
.hero__horizon span:last-child { grid-column: 8 / 13; }
.hero__picture {
  position: relative; flex: 1 0 34svh; margin-top: clamp(16px, 2vw, 32px);
  overflow: hidden;
}
.hero__picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.hero__cta { position: absolute; z-index: 3; left: var(--m); right: var(--m); bottom: 24px; display: none; }

/* ---------- Services: rows with margin pictures ---------- */
.services { padding-block: var(--section) 0; }
.services__intro {
  min-height: 46svh; display: flex; align-items: center;
}
.services__intro > div { margin-left: calc((100% + var(--gap)) * 4 / 12); }
.services__intro h2 { font-size: var(--step-head); }
.services__intro p { margin-top: 28px; font-size: var(--step-lead); line-height: 1.4; max-width: 34ch; }
.service {
  align-items: start; padding-block: clamp(48px, 5vw, 60px);
}
.service__text { grid-column: 5 / 10; }
.service__text h3 { font-family: var(--display); text-transform: uppercase; font-size: clamp(2rem, 1.4rem + 2.2vw, 3.25rem); line-height: 0.95; margin-bottom: 18px; }
.service__text p { max-width: 38ch; }
.service__fact { font-weight: 600; }
.service figure { margin: 0; grid-column: 10 / 13; justify-self: end; background: var(--surface); }
.service figure img { width: 100%; height: auto; }
.service:nth-child(5n+1) figure { width: min(100%, 240px); }
.service:nth-child(5n+2) figure { width: min(100%, 340px); }
.service:nth-child(5n+3) figure { width: min(100%, 200px); }
.service:nth-child(5n+4) figure { width: min(100%, 300px); }
.service:nth-child(5n+5) figure { width: min(100%, 220px); }
.service--tall figure img { aspect-ratio: 4 / 5; object-fit: cover; }

/* ---------- Calculator: object in front of type ---------- */
.calc { position: relative; padding-block: var(--section); overflow: hidden; }
.calc__stack { position: relative; font-size: var(--step-hero); white-space: nowrap; }
.calc__stack span { display: block; }
.calc__stack span:nth-child(1) { color: var(--muted); }
.calc__gun {
  position: absolute; z-index: 2; left: 60%; top: calc(var(--section) - 3vw);
  width: min(26vw, 400px); transform: rotate(-6deg);
  pointer-events: none;
}
.calc__body { margin-top: clamp(40px, 5vw, 72px); row-gap: 40px; align-items: start; }
.calc__figure { grid-column: 1 / 6; display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: end; }
.calc__bay {
  position: relative; width: clamp(120px, 12vw, 170px); aspect-ratio: 1 / 2.4;
  background: var(--surface); border-inline: 14px solid var(--ink); overflow: hidden;
}
.calc__bay-foam {
  position: absolute; inset: auto 0 0 0; height: 50%;
  background: url("../img/foam-slot.svg") center top / 100% 100% no-repeat, var(--foam);
  transition: height 600ms var(--ease);
}
.calc__bay-mark {
  position: absolute; left: 0; right: 0; height: 4px; background: var(--ink);
  transition: bottom 600ms var(--ease);
}
.calc__answer { font-size: var(--step-head); line-height: 0.85; }
.calc__answer { margin: 0; }
.calc__answer-sub { font-weight: 600; font-size: var(--step-lead); line-height: 1.3; margin: 12px 0 0; }
.calc__controls { grid-column: 7 / 13; }
.calc fieldset { border: 0; margin: 0 0 28px; padding: 0; }
.calc legend { font-weight: 600; margin-bottom: 12px; padding: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices label {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0.55em 1.05em;
  background: var(--surface); cursor: pointer; font-weight: 600;
  transition: background-color 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease);
}
.choices label:hover { background: #dbe5e2; }
.choices label:active { transform: scale(0.97); }
.choices input:checked + label { background: var(--ink); color: var(--bg); }
.choices input:focus-visible + label { outline: 3px solid var(--foam); outline-offset: 3px; }
.calc__result { font-size: var(--step-lead); line-height: 1.4; max-width: 40ch; }
.calc__note { font-size: var(--step-small); color: var(--muted); max-width: 52ch; }

/* ---------- Process: one verb at a time ---------- */
.process { background: var(--field); color: var(--field-ink); padding-block: clamp(80px, 9vw, 140px); }
.process__panel {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap);
  grid-template-rows: 1fr auto; padding: 0 var(--m); margin-bottom: clamp(64px, 7vw, 112px); overflow: hidden;
}
.process__panel:last-child { margin-bottom: 0; }
.process__panel img { grid-column: 6 / 13; grid-row: 1 / 3; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.process__verb { grid-column: 1 / 6; align-self: end; font-size: var(--step-hero); color: var(--foam); }
.process__note { grid-column: 1 / 5; margin: 24px 0 0; font-size: var(--step-lead); line-height: 1.35; max-width: 30ch; }

/* ---------- FAQ: large questions, answers beside ---------- */
.faq { padding-block: var(--section) clamp(40px, 5vw, 80px); }
.faq__row { padding-bottom: clamp(56px, 6vw, 84px); align-items: baseline; }
.faq__row h2, .faq__row h3 {
  grid-column: 1 / 7; font: 600 clamp(1.5rem, 1.1rem + 1.6vw, 2.5rem)/1.12 var(--text); letter-spacing: -0.01em;
}
.faq__row h2 { color: var(--muted); }
.faq__row > div { grid-column: 8 / 13; }
.faq__row p { max-width: 42ch; }

/* ---------- Contact ---------- */
.contact { background: var(--surface); padding-block: clamp(96px, 10vw, 160px) clamp(96px, 9vw, 140px); }
.contact__lead { grid-column: 1 / 6; }
.contact__lead h2 { font-size: var(--step-head); margin-bottom: 28px; }
.contact__lead .statement { font-size: clamp(1.375rem, 1.1rem + 1vw, 2.125rem); line-height: 1.2; max-width: 22ch; }
.contact__lead .phone { font-size: var(--step-lead); font-weight: 600; }
.contact__form { grid-column: 7 / 13; }
.field { margin-bottom: 22px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--gap); }
.field label { display: block; font-weight: 600; margin-bottom: 8px; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font: 400 var(--step-body)/1.4 var(--text); color: var(--ink);
  background: var(--bg); border: 2px solid #7fa3a8; border-radius: 0;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); outline: 3px solid var(--foam); outline-offset: 0; }
.field [aria-invalid="true"] { border-color: var(--error); }
.field__error { color: var(--error); font-size: var(--step-small); font-weight: 600; margin: 8px 0 0; min-height: 0; }
.field__error:empty { display: none; }
.form-note { font-size: var(--step-small); color: var(--muted); }
.form-status { font-weight: 600; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* taste-skill-ignore */

/* ---------- Footer: contact as the headline ---------- */
.site-footer {
  background: var(--field); color: var(--field-ink);
  min-height: 82svh; display: flex; flex-direction: column; justify-content: space-between;
  padding: 40px var(--m) 28px;
}
.site-footer a { color: inherit; }
.footer__top { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.footer__notes { display: flex; flex-wrap: wrap; gap: 8px 40px; font-size: 1rem; }
.footer__notes p { margin: 0; }
.footer__phone {
  display: block; margin-block: 80px 40px; text-decoration: none;
  font-size: clamp(3.5rem, 0.5rem + 15.4vw, 20rem); line-height: 0.85; white-space: nowrap;
}
.footer__phone:hover { color: var(--foam); }
.footer__meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 32px; font-size: 1rem; }
.footer__meta p { margin: 0; }
.footer__meta ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.linklike { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }

/* ---------- Cookie banner (floats, so it may carry a shadow) ---------- */
.cookie {
  position: fixed; z-index: 40; left: var(--m); right: var(--m); bottom: var(--m);
  max-width: 640px; padding: 22px 24px; background: var(--ink); color: var(--bg);
  box-shadow: 0 12px 40px rgba(4, 40, 46, 0.35); /* taste-skill-ignore: floating dialog */
}
.cookie[hidden] { display: none; }
.cookie p { margin: 0 0 14px; font-size: 1rem; line-height: 1.45; }
.cookie a { color: var(--foam); }
.cookie__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Inner pages: legal, 404, thanks ---------- */
.page-head { padding: clamp(140px, 18vh, 200px) var(--m) clamp(48px, 6vw, 80px); }
.page-head h1 { font-size: var(--step-head); }
.page-head p { margin-top: 24px; font-size: var(--step-lead); line-height: 1.4; max-width: 44ch; }
.legal { padding: 0 var(--m) var(--section); }
.legal article { grid-column: 3 / 11; max-width: 72ch; }
.legal aside { grid-column: 1 / 3; font-size: var(--step-small); color: var(--muted); }
.legal h2 { font: 600 clamp(1.375rem, 1.1rem + 0.8vw, 1.75rem)/1.2 var(--text); margin: 56px 0 14px; }
.legal li { margin-bottom: 0.5em; }
.legal table { border-collapse: collapse; width: 100%; margin-bottom: 1em; font-size: 0.95rem; }
.legal th, .legal td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 2px solid var(--surface); vertical-align: top; }
.lost { min-height: 100svh; display: grid; grid-template-rows: 1fr auto; }
.lost__body { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: center; padding: 140px var(--m) 64px; }
.lost__text { grid-column: 1 / 7; }
.lost__text h1 { font-size: clamp(4.5rem, 1rem + 12vw, 13rem); }
.lost__text p { font-size: var(--step-lead); line-height: 1.4; margin-top: 24px; }
.lost__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.lost__picture { grid-column: 8 / 13; }

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); }
.js .reveal.in { opacity: 1; transform: none; transition: opacity 700ms var(--ease), transform 800ms var(--ease); transition-delay: var(--d, 0ms); }
.js .hero__picture { clip-path: inset(100% 0 0 0); }
.js .hero__picture img { transform: scale(1.12); }
.js .hero.in .hero__picture { clip-path: inset(0 0 0 0); transition: clip-path 1.1s var(--ease) 150ms; }
.js .hero.in .hero__picture img { transform: scale(1); transition: transform 1.6s var(--ease) 150ms; }
.js .slot__foam { transform: scaleY(0); }
.js .hero.in .slot__foam { transform: scaleY(1); transition: transform 1.4s var(--ease) 700ms; }
.hero.in .hero__picture img { animation: drift 24s ease-in-out 2s infinite alternate; }
@keyframes drift { to { transform: scale(1.04) translateY(-1%); } }
.process__panel img { transition: transform 1.2s var(--ease); }
.js .process__panel:not(.in) img { transform: scale(1.06); }
.service figure img { transition: transform 600ms var(--ease); }
.service figure { overflow: hidden; }
.service:hover figure img { transform: scale(1.04); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .reveal.in { opacity: 1; transform: none; transition: opacity 300ms linear; }
  .js .hero__picture, .js .hero__picture img, .js .slot__foam,
  .js .process__panel:not(.in) img { clip-path: none; transform: none; }
  .hero.in .hero__picture img { animation: none; }
  * { transition-duration: 1ms !important; animation: none !important; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1000px) {
  .services__intro > div { margin-left: 0; }
  .service__text { grid-column: 1 / 8; }
  .service figure { grid-column: 9 / 13; }
  .calc__figure { grid-column: 1 / 13; }
  .calc__controls { grid-column: 1 / 13; }
  .faq__row h2, .faq__row h3 { grid-column: 1 / 7; }
  .faq__row > div { grid-column: 7 / 13; }
  .contact__lead, .contact__form { grid-column: 1 / 13; }
  .contact__form { margin-top: 48px; }
  .legal article { grid-column: 1 / 13; max-width: none; }
  .legal aside { grid-column: 1 / 13; margin-bottom: 24px; }
}

/* ---------- Phone: its own composition ---------- */
@media (max-width: 680px) {
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    position: absolute; top: 72px; left: var(--m); right: var(--m);
    padding: 16px 20px 20px; background: var(--ink);
    box-shadow: 0 12px 40px rgba(4, 40, 46, 0.3); /* taste-skill-ignore: open menu */
  }
  .nav.open a:not(.btn) { color: var(--bg); padding: 10px 0; }
  .nav.open .btn { margin-top: 10px; width: 100%; }
  .nav.open .btn { background: var(--bg); color: var(--ink); }
  .menu-toggle { display: block; }

  .hero { min-height: 100svh; }
  .hero__title { padding-top: 104px; font-size: 16.5vw; }
  .hero__horizon { display: block; text-align: center; font-size: 1.125rem; }
  .hero__horizon span { display: block; text-align: center !important; }
  .hero__picture { flex-basis: 42svh; margin-top: 8px; }
  .hero__picture img { object-position: 38% bottom; }
  .hero__cta { display: flex; }
  .hero__cta .btn { width: 100%; background: var(--bg); color: var(--ink); }

  .services__intro { min-height: 36svh; }
  .service { padding-block: 32px; }
  .service__text, .service figure { grid-column: 1 / 13; }
  .service figure { margin-top: 24px; justify-self: start; }
  .service:nth-child(3n+1) figure { width: 100%; }
  .service:nth-child(3n+2) figure { width: 70%; justify-self: end; }
  .service:nth-child(3n+3) figure { width: 55%; }

  .calc__stack { font-size: 21vw; }
  .calc__gun { display: none; }
  .calc__figure { grid-template-columns: 112px 1fr; gap: 20px; }

  .process__panel { grid-template-rows: auto; }
  .process__panel img, .process__verb, .process__note { grid-column: 1 / 13; grid-row: auto; }
  .process__verb { font-size: 21vw; margin-top: 20px; order: 2; }
  .process__note { order: 3; font-size: 1.125rem; margin-top: 12px; }
  .cookie { padding: 16px; }
  .cookie p { font-size: 1rem; }
  .cookie .btn { min-height: 44px; padding: 0.5em 1em; font-size: 1rem; }

  .faq__row { padding-bottom: 56px; }
  .faq__row h2, .faq__row h3, .faq__row > div { grid-column: 1 / 13; }
  .faq__row > div { margin-top: 12px; }
  .field-row { grid-template-columns: 1fr; }

  .footer__top { flex-direction: column; }
  .footer__notes { flex-direction: column; }
  .footer__phone { font-size: 15vw; margin-block: 64px 32px; }
  .footer__meta { flex-direction: column; }

  .lost__text, .lost__picture { grid-column: 1 / 13; }
  .lost__picture { margin-top: 40px; }
  .lost__body { align-content: start; padding-top: 112px; }
}

.d1 { --d: 120ms; }
.btn--outline { outline: 2px solid var(--bg); outline-offset: -2px; }
.btn--outline:hover { background: #043f47; }
.btn--ring { outline: 2px solid var(--ink); outline-offset: -2px; }
