@font-face {
  font-family: "Overpass";
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/overpass.woff2") format("woff2");
}

/* Blue from the logo, steel grey from the roofs, a pale gum leaf green between them */
:root {
  --font: "Overpass", system-ui, sans-serif;
  --ink: #1b2026;
  --blue: #2b5a98;
  --blue-dark: #1f4475;
  --gum: #e3ebdd;
  --steel: #33383d;
  --line: #b9c4b3;
  --header-height: 5.5rem;
  --slat: clamp(2.5rem, 5vw, 5rem);
  --ease: cubic-bezier(0.3, 0.7, 0.2, 1);
}

/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}
body {
  margin: 0;
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--font);
}
img,
iframe {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
}
h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}
h1,
h2 {
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h2 {
  font-size: clamp(2rem, 1.5rem + 2.2vw, 3.375rem);
}
h3 {
  font-size: 1.375rem;
  line-height: 1.25;
}
p {
  text-wrap: pretty;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}
.text p + p {
  margin-top: 1em;
}
.container {
  width: min(100% - 2.5rem, 82rem);
  margin-inline: auto;
}
.section {
  padding-block: clamp(4rem, 9vw, 8rem);
}
.section--gum {
  background: var(--gum);
}
.section--steel {
  background: var(--steel);
  color: #fff;
}
.intro {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem 4rem;
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.skip-link {
  position: absolute;
  z-index: 60;
  left: 1rem;
  top: -5rem;
  padding: 0.75rem 1rem;
  background: #fff;
}
.skip-link:focus {
  top: 1rem;
}
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.button {
  --back: var(--blue);
  --front: #fff;
  display: inline-block;
  padding: 1.05rem 1.5rem 0.9rem;
  border: 2px solid var(--back);
  border-radius: 0.25rem;
  background: var(--back);
  color: var(--front);
  font: 700 1.0625rem/1.2 var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.button:hover,
.button--ghost {
  background: transparent;
  color: var(--back);
}
.button--ghost:hover {
  background: var(--back);
  color: var(--front);
}
.hero .button,
.section--steel .button {
  --back: #fff;
  --front: var(--blue-dark);
}
.facts > div {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0.25rem 1.5rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}
.facts dt {
  font-weight: 700;
}

/* Photos open like the slats of a louvre roof */
@property --open {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}
.louvre {
  --open: calc(var(--slat) + 1px);
}
.swiper-slide-active .louvre,
.range__item[open] .louvre {
  mask: repeating-linear-gradient(100deg, #000 0 var(--open), transparent var(--open) var(--slat));
  animation: louvre 1.3s var(--ease);
}
@keyframes louvre {
  from {
    --open: 0px;
  }
}

/* Header */
.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  background: #fff;
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: var(--header-height);
}
.site-header__logo {
  margin-right: auto;
}
.site-header__logo img {
  width: auto;
  height: 4.25rem;
}
.site-header__phone {
  padding: 0.8rem 1.1rem 0.65rem;
}
.menu {
  display: flex;
  gap: 1.75rem;
}
.menu a {
  padding-block: 0.4rem;
  background: linear-gradient(var(--blue), var(--blue)) 0 100% / 0 3px no-repeat;
  font-weight: 600;
  text-decoration: none;
  transition: background-size 0.3s var(--ease);
}
.menu a:hover,
.menu a:focus-visible {
  background-size: 100% 3px;
}
.menu-button {
  display: none;
}

/* Hero */
.hero {
  background: var(--blue);
  color: #fff;
}
.hero__slide {
  height: auto;
  background: var(--blue);
}
.hero__photo {
  height: clamp(16rem, 100svh - var(--header-height) - 23rem, 44rem);
}
.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__copy {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem 4rem;
  padding-block: 2.75rem 2.25rem;
}
.hero__title {
  font-size: clamp(2.25rem, 1.4rem + 3.2vw, 4.25rem);
  line-height: 1;
}
.hero__copy p {
  margin-bottom: 1.5rem;
}
.has-moved .swiper-slide-active .hero__copy {
  animation: rise 0.7s var(--ease);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
}
.hero__controls {
  display: flex;
  align-items: stretch;
  gap: 2rem;
  padding-bottom: 1.5rem;
}
.hero .hero__tabs {
  display: grid;
  flex: 1;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 1rem;
  width: auto;
}
.hero__tabs button {
  width: auto;
  height: auto;
  margin: 0 !important;
  padding: 0.9rem 0 0.5rem;
  border: 0;
  border-top: 3px solid #7f9cc1;
  border-radius: 0;
  background: none;
  color: inherit;
  font: 600 1rem/1.3 var(--font);
  text-align: left;
  opacity: 1;
  cursor: pointer;
  transition: border-color 0.4s;
}
.hero__tabs button:hover,
.hero__tabs .swiper-pagination-bullet-active {
  border-color: #fff;
}
.hero__pause {
  min-width: 3.5rem;
  padding: 0.4rem 0 0;
  border: 0;
  background: none;
  color: inherit;
  font: 600 1rem/1 var(--font);
  text-align: right;
  text-decoration: underline;
  text-underline-offset: 0.25em;
  cursor: pointer;
}

/* The active slide lies on top and opens above the one that leaves */
.hero .swiper-initialized .hero__slide {
  z-index: 0;
  visibility: hidden;
  opacity: 1 !important;
}
.hero .swiper-initialized .is-leaving {
  z-index: 1;
  visibility: visible;
}
.hero .swiper-initialized .swiper-slide-active {
  z-index: 2;
  visibility: visible;
  background: none;
}
.hero .is-leaving .hero__copy {
  visibility: hidden;
}

/* About */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 7vw, 7rem);
}
.about__text {
  max-width: 36rem;
  margin-top: 2rem;
}
.about__text p:first-child {
  font-size: 1.375rem;
  line-height: 1.45;
}
.about .facts {
  margin-top: 1rem;
}

/* Range: names on the left, the open product on the right */
.range {
  position: relative;
  margin-bottom: 2.5rem;
}
.range__item summary {
  padding: 0.7rem 0 0.5rem;
  color: var(--blue-dark);
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  list-style: none;
  cursor: pointer;
  transition: translate 0.3s var(--ease);
}
.range__item summary::-webkit-details-marker {
  display: none;
}
.range__photo {
  background: var(--blue);
}
.range__panel img {
  width: 100%;
}
.range__panel p {
  max-width: 38rem;
  margin-top: 1.25rem;
}
@media (min-width: 60.01rem) {
  .range {
    min-height: 39rem;
  }
  .range__item {
    width: 34%;
  }
  .range__item summary:hover {
    translate: 0.5rem;
  }
  .range__item[open] summary {
    color: var(--ink);
    translate: 1.5rem;
  }
  .range__item summary::before {
    content: "";
    position: absolute;
    width: 0.75rem;
    height: 0.75rem;
    margin: 0.5rem 0 0 -1.5rem;
    border-radius: 50% 0 50% 50%;
    background: var(--blue);
    scale: 0;
    transition: scale 0.3s var(--ease);
  }
  .range__item[open] summary::before {
    scale: 1;
  }
  .range__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 62%;
  }
}

/* Process: the drawing gets built while the steps scroll past */
.process {
  padding-block: clamp(4rem, 9vw, 8rem);
  background: var(--blue);
  color: #fff;
}
.process__inner {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 0 clamp(2rem, 6vw, 6rem);
}
.process h2 {
  grid-column: 1 / -1;
  max-width: 20ch;
}
.process__drawing {
  position: sticky;
  top: var(--header-height);
  align-self: start;
  display: grid;
  align-items: center;
  height: calc(100svh - var(--header-height));
  max-height: 46rem;
}
.process__drawing svg {
  width: 100%;
  max-height: 100%;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
}
.process__drawing text {
  fill: #fff;
  stroke: none;
  font: 600 1rem var(--font);
  text-anchor: middle;
}
.process__drawing .beam {
  stroke-width: 6;
  stroke-linejoin: round;
}
.process__drawing .dashed {
  stroke-dasharray: 7 6;
}
.process__drawing .roof {
  fill: var(--blue-dark);
  stroke: none;
}
.process__drawing .glow {
  fill: rgb(255 255 255 / 0.22);
  stroke: none;
}
.js [data-stage] .line {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.6s var(--ease);
}
.js [data-stage] .fade {
  opacity: 0;
  transition: opacity 0.9s;
}
.js .is-drawn .line {
  stroke-dashoffset: 0;
}
.js .is-drawn .fade {
  opacity: 1;
}
.process__steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.process__steps li {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: min(60svh, 30rem);
  counter-increment: step;
}
.process__steps h3 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem);
  font-weight: 800;
  letter-spacing: -0.015em;
}
.process__steps h3::before {
  content: counter(step) ". ";
}

/* Roofing: photos are laid next to each other like roof sheets */
.services {
  padding-bottom: 0;
}
.sheets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.sheet__photo {
  overflow: hidden;
}
.sheet__photo img {
  width: 100%;
  transition: transform 1.1s var(--ease);
}
.sheet:nth-child(2) img {
  transition-delay: 0.12s;
}
.sheet:nth-child(3) img {
  transition-delay: 0.24s;
}
.sheet:nth-child(4) img {
  transition-delay: 0.36s;
}
.js .sheets:not(.is-visible) img {
  transform: translateY(101%);
}
.sheet__text {
  padding: 1.75rem clamp(1.25rem, 2vw, 2.5rem) clamp(3rem, 6vw, 5rem);
}
.sheet h3 {
  margin-bottom: 0.5rem;
}

/* Roller shutters */
.shutters {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}
.shutters__text {
  margin-block: 1.5rem 1rem;
}
.shutters .facts {
  --line: #666d74;
  margin-bottom: 2rem;
}
.shutter__window {
  position: relative;
  overflow: hidden;
  margin-bottom: 1.25rem;
  border: solid #d9dcda;
  border-width: 2.5rem 0.75rem 0.75rem;
}
.shutter__window img {
  width: 100%;
}
.shutter__curtain {
  position: absolute;
  inset: 0;
  border-bottom: 0.75rem solid #b9bebc;
  background: repeating-linear-gradient(#aeb4b2 0 2px, #f0f2f0 3px, #dde1de 1.6rem, #c6cbc8 1.75rem);
  transform: translateY(-100%);
  transition: transform 2.6s cubic-bezier(0.45, 0.1, 0.5, 0.95);
}
.is-lowered .shutter__curtain {
  transform: none;
}

/* Contact */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 7vw, 7rem);
}
.contact__text {
  max-width: 34rem;
  margin-block: 1.5rem 2.5rem;
}
/* the speech bubble from the logo */
.bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 17rem;
  aspect-ratio: 1;
  border-radius: 50% 0 50% 50%;
  background: var(--blue);
  color: #fff;
  line-height: 1.3;
  text-decoration: none;
  transform-origin: 100% 0;
  transition: scale 0.4s var(--ease);
}
.bubble:hover {
  scale: 1.04;
}
.bubble strong {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.contact__details {
  display: grid;
  grid-template-columns: repeat(2, auto);
  justify-content: start;
  gap: 1.5rem 3rem;
  margin-top: 2.5rem;
}
.contact__details div:first-child {
  grid-column: 1 / -1;
}
.contact__details dt {
  font-weight: 700;
}
.contact__card {
  align-self: start;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: #fff;
}
.form label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}
.form input,
.form textarea {
  display: block;
  width: 100%;
  margin-bottom: 1.1rem;
  padding: 0.85rem 1rem;
  border: 2px solid #7d8790;
  border-radius: 0.25rem;
  background: #fff;
  color: inherit;
  font: inherit;
}
.form input:focus,
.form textarea:focus {
  border-color: var(--blue);
}
.form [aria-invalid] {
  margin-bottom: 0.35rem;
  border-color: #b3261e;
}
.form__error {
  margin-bottom: 1.1rem;
  color: #b3261e;
}
.form__trap {
  position: absolute;
  left: -100vw;
}
.form__note {
  margin-top: 1.5rem;
  font-size: 0.9375rem;
}
.notice {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--gum);
}
.notice--error {
  background: #fbe6e4;
  color: #8c1d18;
}
.map {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 25rem;
  padding: 1.25rem;
  background: #d3ddcc;
  text-align: center;
}
.map:has(iframe) {
  padding: 0;
}
.map iframe {
  width: 100%;
  height: 25rem;
}

/* Footer */
.site-footer {
  padding-block: clamp(3.5rem, 7vw, 6rem) 2rem;
  background: var(--blue-dark);
  color: #fff;
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 2rem clamp(2rem, 6vw, 5rem);
}
.site-footer__phone {
  display: block;
  margin-bottom: 0.5rem;
  font-size: clamp(2rem, 1.5rem + 2.2vw, 3.375rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-decoration: none;
}
.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin-top: 4rem;
  font-size: 0.9375rem;
}
.site-footer__legal button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* Text pages */
.page {
  min-height: 60vh;
  padding-block: clamp(4rem, 9vw, 8rem);
}
.page h1 {
  font-size: clamp(2.25rem, 1.4rem + 3.2vw, 4.25rem);
}
.page .text {
  max-width: 40rem;
  margin-block: 1.5rem 2.5rem;
}

@media (max-width: 72rem) {
  .menu {
    gap: 1.25rem;
    font-size: 1rem;
  }
  .site-header__inner {
    gap: 1.25rem;
  }
}

@media (max-width: 60rem) {
  :root {
    --header-height: 4.75rem;
  }
  .site-header__inner {
    gap: 0.5rem;
  }
  .site-header__logo img {
    height: 3.5rem;
  }
  .site-header__phone,
  .menu-button {
    position: relative;
    z-index: 2;
    padding: 0.8rem 0.9rem 0.65rem;
    font-size: 1rem;
  }
  .menu-button {
    display: block;
    order: 3;
    min-width: 4.75rem;
    border: 2px solid var(--blue);
    border-radius: 0.25rem;
    background: #fff;
    color: var(--blue);
    font: 700 1rem/1.2 var(--font);
  }
  .menu {
    position: fixed;
    inset: var(--header-height) 0 0;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 1.25rem;
    background: var(--blue);
    color: #fff;
    clip-path: inset(0 0 100%);
    visibility: hidden;
    transition: clip-path 0.5s var(--ease), visibility 0.5s;
  }
  .menu.is-open {
    clip-path: inset(0);
    visibility: visible;
  }
  .menu a {
    background: none;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.02em;
  }
  .has-menu {
    overflow: hidden;
  }

  .intro,
  .hero__copy,
  .about,
  .shutters,
  .contact,
  .site-footer__inner {
    grid-template-columns: 1fr;
  }
  .hero__photo {
    height: clamp(14rem, 38svh, 26rem);
  }
  .hero__copy {
    padding-block: 2rem;
  }
  .hero__controls {
    flex-direction: column;
    gap: 0.75rem;
  }
  .hero .hero__tabs {
    grid-template-columns: 1fr 1fr;
    grid-auto-flow: row;
  }
  .hero__pause {
    align-self: start;
    padding-block: 0.5rem;
  }
  .range__item {
    border-bottom: 1px solid var(--line);
  }
  .range__item summary {
    display: flex;
    justify-content: space-between;
  }
  .range__item summary::after {
    content: "+";
  }
  .range__item[open] summary::after {
    content: "\2212";
  }
  .range__panel {
    padding-block: 0.5rem 1.5rem;
  }
  .process__inner {
    grid-template-columns: 1fr;
  }
  .process__drawing {
    z-index: 1;
    height: 42svh;
    padding-block: 1rem;
    background: var(--blue);
  }
  .process__drawing svg {
    height: 100%;
  }
  .process__steps li {
    min-height: 38svh;
  }
  .sheets {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 34rem) {
  .contact__details {
    grid-template-columns: 1fr;
  }
  .facts > div {
    grid-template-columns: 1fr;
  }
  .sheets {
    grid-template-columns: 1fr;
  }
  .sheet {
    display: grid;
    grid-template-columns: 2fr 3fr;
  }
  .sheet__photo img {
    height: 100%;
    object-fit: cover;
  }
  .sheet__text {
    padding-block: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
