/* ==========================================================================
   Bois&Archi
   ========================================================================== */

:root {
  --teal: #00373d;
  --teal-2: #0b4147;
  --teal-3: #15656e;
  --cream: #fff6eb;
  --brown: #3d2a23;
  --salmon: #f5a68d;
  --grey: #99948d;
  --dark: #2a2523;
  --line: rgba(255, 246, 235, 0.55);

  --serif: 'Inknut Antiqua', Georgia, serif;
  --sans: 'Nunito Sans', 'Avenir Next', Avenir, 'Helvetica Neue', sans-serif;
  --condensed: 'Oswald', 'Arial Narrow', sans-serif;
  --italic: 'Playfair Display', Georgia, serif;

  --header-h: 88px;
  --frame: min(1140px, calc(100% - 2 * var(--gutter)));
  --gutter: 16px;
}

@media (min-width: 768px) {
  :root { --gutter: 48px; }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--teal);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; margin: 0; line-height: 1.4; }
p { margin: 0; }
svg { display: block; }

.amp { font-family: var(--sans); font-weight: 300; font-size: 0.92em; }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--cream); color: var(--teal); padding: 8px 12px;
}
.skip-link:focus { top: 8px; }

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

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

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  height: var(--header-h);
  background: var(--teal);
  border-bottom: 1px solid var(--line);
  transition: background-color .4s;
}
.page-home .site-header:not(.is-scrolled) { background: transparent; }

.site-header__inner {
  height: 100%;
  width: var(--frame);
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cream); }
.logo__mark { width: 50px; height: 50px; }
.logo__text { font-family: var(--serif); font-size: 19px; font-weight: 500; letter-spacing: .01em; }

.burger {
  width: 42px; height: 32px; padding: 0;
  background: none; border: 0; color: var(--cream); cursor: pointer;
}
.burger svg { width: 100%; height: 100%; }

/* ----------------------------------------------------------------- Menu */

.menu {
  position: fixed; inset: 0; z-index: 60;
  background: var(--teal);
  display: grid; place-items: center;
  padding: var(--gutter);
  opacity: 0; transition: opacity .35s;
}
.menu[hidden] { display: none; }
.menu.is-open { opacity: 1; }

.menu__panel { width: min(930px, 100%); }

.menu__head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid #5f9ea0;
  width: min(720px, 100%);
}
.menu__title { display: flex; align-items: center; gap: 18px; font-family: var(--serif); font-size: 19px; }
.menu__mark { width: 44px; height: 44px; color: var(--salmon); opacity: .8; }

.menu__close {
  position: relative; width: 26px; height: 26px; margin-right: -210px;
  background: none; border: 0; cursor: pointer; color: var(--cream);
}
.menu__close span, .lightbox__close span {
  position: absolute; left: 50%; top: 50%; width: 30px; height: 1.5px; background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}
.menu__close span + span, .lightbox__close span + span { transform: translate(-50%, -50%) rotate(-45deg); }

.menu__body {
  display: grid; grid-template-columns: 1fr; gap: 24px;
  padding: 10px 0 48px;
  border-bottom: 1px solid #5f9ea0;
  width: min(720px, 100%);
}
.menu__nav ul { list-style: none; margin: 0; padding: 0; }
.menu__nav a {
  display: inline-block; padding: 9px 0;
  font-family: var(--serif); font-size: 15px; text-decoration: none;
  transition: color .2s;
}
.menu__nav a:hover, .menu__nav a[aria-current="page"] { color: var(--salmon); }
.menu__image { display: none; }

@media (min-width: 900px) {
  .menu__body { grid-template-columns: 265px 1fr; width: 100%; border-bottom: 0; position: relative; padding-bottom: 0; }
  .menu__body::after {
    content: ''; position: absolute; left: 0; bottom: -48px; width: min(720px, 100%);
    border-bottom: 1px solid #5f9ea0;
  }
  .menu__image { display: block; margin-top: 2px; }
  .menu__image img { width: 100%; aspect-ratio: 662 / 440; object-fit: cover; filter: grayscale(1) contrast(1.05); }
}
@media (max-width: 899px) {
  .menu__close { margin-right: 0; }
}

/* ---------------------------------------------------------------- Shared */

main { padding-top: var(--header-h); }
.page-home main { padding-top: 0; }

/* Frame with thin vertical side rules, used across the original site */
.framed {
  position: relative;
  width: calc(var(--frame) + 2 * 40px);
  max-width: 100%;
  margin: 0 auto;
  border-inline: 1px solid rgba(255, 246, 235, 0.12);
}

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

.btn-outline {
  display: inline-block;
  padding: 10px 9px;
  border: 1px solid var(--cream);
  font-family: var(--condensed); font-weight: 300; font-size: 16px; letter-spacing: .02em;
  text-decoration: none; color: var(--cream);
  transition: background-color .25s, color .25s;
}
.btn-outline:hover { background: var(--cream); color: var(--teal); }

/* ------------------------------------------------------------------ Home */

.hero {
  position: relative;
  min-height: max(560px, 72vh);
  display: grid; place-items: center;
  overflow: hidden;
  text-align: center;
}
.hero__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(.78);
  transform: scale(1.04);
  animation: hero-zoom 14s ease-out forwards;
}
@keyframes hero-zoom { to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .hero__bg { animation: none; transform: none; } }

.hero__content { position: relative; padding: calc(var(--header-h) - 20px) var(--gutter) 60px; }
.hero__title {
  font-size: clamp(44px, 6vw, 70px); font-weight: 500; line-height: 1.3;
  animation: fade-up 1.2s .2s both;
}
.hero__lines {
  margin-top: 26px;
  font-family: var(--serif); font-size: clamp(22px, 2.6vw, 30px); line-height: 1.45;
  animation: fade-up 1.2s .5s both;
}
.hero__lines span { display: block; }
.hero__tagline {
  position: absolute; left: 0; right: 0; bottom: 28px;
  padding: 0 var(--gutter);
  font-size: clamp(12px, 1.4vw, 17px); letter-spacing: .38em;
  animation: fade-up 1.2s .9s both;
}
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } }

.intro { background: var(--teal); }
.framed--intro {
  display: flex; flex-direction: column; align-items: center;
  padding: 14px var(--gutter) 10px;
  border-inline-color: var(--line);
  text-align: center;
}
.intro__mark { width: 56px; height: 56px; color: #c9a77e; margin-bottom: 10px; }
.intro__text {
  max-width: 830px;
  font-size: clamp(20px, 2.3vw, 30px); font-weight: 500; line-height: 1.4;
}
.intro__image { width: min(690px, 100%); aspect-ratio: 1514 / 746; object-fit: cover; margin-top: 18px; }
.scroll-cue { display: block; width: 46px; height: 100px; margin: 12px auto 4px; color: var(--cream); }
.scroll-cue svg { width: 100%; height: 100%; }
.scroll-cue:hover svg { animation: nudge 1s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(6px); } }

.method { background: var(--cream); color: var(--brown); padding: 80px var(--gutter) 90px; text-align: center; }
.method__title { font-size: clamp(28px, 3vw, 35px); font-weight: 500; }
.method__steps {
  list-style: none; margin: 56px auto 0; padding: 0;
  max-width: 1160px;
  display: grid; gap: 48px 26px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.method__step { color: var(--teal); }
.method__icon { width: 60px; height: 60px; margin: 0 auto 18px; color: var(--teal-3); }
.method__step h3 { font-size: 20px; font-weight: 500; margin-bottom: 18px; line-height: 1.4; }
.method__step p { font-size: 15px; line-height: 1.6; color: var(--teal); max-width: 230px; margin: 0 auto; }
.method__note { margin-top: 48px; font-size: 13px; color: var(--grey); }

.references { padding: 90px var(--gutter) 70px; text-align: center; }
.references__title { font-size: clamp(40px, 4.5vw, 56px); font-weight: 500; }
.references__text { max-width: 560px; margin: 18px auto 0; font-size: 17px; line-height: 1.8; }
.references__grid {
  list-style: none; padding: 0; margin: 64px auto 0;
  max-width: 940px;
  display: grid; gap: 56px 32px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.reference__image { display: block; width: 120px; height: 120px; margin: 0 auto 22px; border-radius: 50%; overflow: hidden; }
.reference__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.reference:hover .reference__image img { transform: scale(1.08); }
.reference h3 { font-size: 20px; font-weight: 500; margin-bottom: 22px; }
.reference h3 a { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.reference h3 a:hover { color: var(--salmon); }
.reference p { font-size: 15px; line-height: 1.8; max-width: 230px; margin: 0 auto; }

.testimonials { padding: 0 0 0; }
.testimonials__frame {
  width: calc(var(--frame) + 2 * 40px); max-width: 100%;
  margin: 0 auto;
  border: 1px solid var(--line); border-bottom: 0;
}
.testimonials__head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 36px clamp(20px, 4vw, 60px);
  border-bottom: 1px solid var(--line);
}
.testimonials__head h2 { font-size: clamp(20px, 2vw, 26px); font-weight: 500; }
.testimonials__pencil { width: 30px; height: 150px; margin: -40px 0 -20px; filter: invert(1) brightness(.9); }
.testimonials__grid { display: grid; grid-template-columns: 1fr; }
.testimonial {
  margin: 0; padding: 54px clamp(20px, 4vw, 64px) 80px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.testimonial p { font-size: 15px; line-height: 1.75; max-width: 250px; margin: 0 auto; }
.testimonial cite {
  display: block; margin-top: 40px;
  font-family: var(--serif); font-style: normal; font-size: 14px; color: #8fa9a9;
  text-align: left; max-width: 250px; margin-inline: auto;
}
@media (min-width: 860px) {
  .testimonials__grid { grid-template-columns: repeat(3, 1fr); }
  .testimonial { border-bottom: 0; }
  .testimonial + .testimonial { border-left: 1px solid var(--line); }
}

.featured {
  position: relative; display: block;
  height: clamp(420px, 52vw, 640px);
  overflow: hidden;
  text-decoration: none;
  border-top: 1px solid var(--line);
}
.featured__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease; }
.featured:hover .featured__bg { transform: scale(1.03); }
.featured__text {
  position: relative; display: block; padding: 40px var(--gutter);
  text-align: center;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .35);
}
.featured__title { display: block; font-family: var(--serif); font-size: clamp(26px, 3vw, 35px); font-weight: 500; }
.featured__subtitle { display: block; max-width: 640px; margin: 4px auto 0; font-size: clamp(13px, 1.4vw, 17px); letter-spacing: .3em; }

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

.site-footer { border-top: 1px solid var(--line); }
.site-footer__contact { width: min(780px, calc(100% - 2 * var(--gutter))); margin: 0 auto; padding: 48px 0 44px; }
.site-footer__title { text-align: center; font-size: clamp(36px, 4vw, 48px); font-weight: 500; margin-bottom: 40px; }
.site-footer__row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer address { font-style: normal; font-size: 17px; line-height: 1.6; }
.site-footer address a { text-decoration: none; }
.site-footer address a:hover { text-decoration: underline; }
.site-footer__bottom {
  border-top: 1px solid var(--line);
  width: calc(var(--frame) + 2 * 40px); max-width: 100%; margin: 0 auto;
  border-inline: 1px solid var(--line);
  padding: 28px var(--gutter) 30px;
  text-align: center; font-size: 12px;
}

.contact-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 22px 8px 9px;
  background: var(--teal); color: var(--cream);
  border: 1px solid rgba(255, 246, 235, .25); border-radius: 999px;
  font-family: var(--serif); font-size: 15px; text-decoration: none;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .25);
  transition: transform .25s;
}
.contact-fab:hover { transform: translateY(-2px); }
.contact-fab__avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--cream); }
/* Phones: round icon only, so it doesn't hide the text */
@media (max-width: 700px) {
  .contact-fab { padding: 7px; right: 14px; bottom: 14px; }
  .contact-fab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .contact-fab__avatar { width: 40px; height: 40px; }
}

/* ------------------------------------------------------- Category pages */

.framed--page { padding: 60px var(--gutter) 110px; }
.page-head { text-align: center; margin-bottom: 40px; }
.page-head__icon { height: 70px; width: auto; max-width: 140px; margin: 0 auto 18px; color: var(--salmon); }
.page-head h1 { font-size: clamp(34px, 4vw, 48px); font-weight: 500; margin-bottom: 26px; }
.page-head p { font-size: 14px; line-height: 1.85; max-width: 520px; margin-inline: auto; }
.page-head .btn-outline { margin-top: 24px; }

.blocks { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.blocks > * { width: min(858px, 100%); }

.badge { position: relative; width: 84px !important; height: 84px; display: grid; place-items: center; margin-top: 12px; }
.badge__shape { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--dark); }
.badge span { position: relative; font-family: var(--serif); font-size: 22px; color: var(--cream); line-height: 1; padding-top: 6px; }

.caption { text-align: center; font-size: 13px; }
.section-heading { text-align: center; font-size: clamp(26px, 3vw, 35px); font-weight: 500; margin-top: 40px; }

.gallery { display: grid; gap: 14px; }
.gallery__item { margin: 0; position: relative; overflow: hidden; }
.gallery__link { display: block; cursor: zoom-in; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease, opacity .3s; }
.gallery__link:hover img { transform: scale(1.025); }

.gallery--stack { gap: 14px; }
.gallery--row { grid-template-columns: 2fr 1fr; }
.gallery--row .gallery__item img { aspect-ratio: 4 / 3; }
.gallery--pair-then-stack { grid-template-columns: 1fr 1fr; }
.gallery--pair-then-stack .gallery__item:nth-child(-n+2) img { aspect-ratio: 16 / 9; }
.gallery--pair-then-stack .gallery__item:nth-child(n+3) { grid-column: 1 / -1; }
.blocks > .gallery--stack-narrow { width: min(600px, 100%); }

.gallery--masonry { display: block; columns: 3 260px; column-gap: 14px; }
.gallery--masonry .gallery__item { break-inside: avoid; margin-bottom: 14px; }
.gallery__overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px 18px 16px;
  color: #1d4a50;
  background: linear-gradient(to top, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.gallery__overlay strong { display: block; font-family: var(--sans); font-weight: 700; font-size: 19px; line-height: 1.3; }
.gallery__overlay span { display: block; font-size: 12px; font-weight: 400; margin-top: 8px; line-height: 1.5; }

.blocks > .tiles { width: min(980px, 100%); }
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); }
.tile {
  position: relative; display: grid; place-items: center;
  aspect-ratio: 1;
  border: 1px solid var(--cream);
  text-decoration: none; overflow: hidden;
}
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s ease, transform .9s ease; transform: scale(1.06); }
.tile__title { position: relative; padding: 16px; text-align: center; font-family: var(--italic); font-style: italic; font-size: 15px; transition: opacity .3s; }
.tile:hover img, .tile:focus-visible img { opacity: 1; transform: none; }
.tile:hover .tile__title, .tile:focus-visible .tile__title { opacity: 0; }
/* Touch screens / phones: no hover, so the photo is always shown with the title over it */
@media (hover: none), (max-width: 700px) {
  .tile { place-items: end center; aspect-ratio: 4 / 3; }
  .tile img { opacity: 1; transform: none; }
  .tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 35, 39, .85), rgba(0, 35, 39, 0) 55%); }
  .tile__title { z-index: 1; padding-bottom: 14px; font-size: 16px; }
  .tile:hover .tile__title { opacity: 1; }
}

.text-block { font-size: 14px; line-height: 1.75; }
.text-block--center { text-align: center; }
.text-block p + p { margin-top: 1em; }
.text-block__heading { font-size: clamp(22px, 2.4vw, 28px); font-weight: 500; text-align: center; margin-bottom: 18px; }

/* Horizontal slider (Territoire) */
.blocks > .slider { width: calc(100% + 2 * var(--gutter)); }
.slider { position: relative; }
.slider__track {
  display: flex; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none;
  padding-inline: var(--gutter);
}
.slider__track::-webkit-scrollbar { display: none; }
.slider .gallery__item { flex: 0 0 auto; scroll-snap-align: start; }
.slider .gallery__item img { height: clamp(320px, 42vw, 540px); width: clamp(150px, 15vw, 192px); }
.slider__btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 56px; padding: 10px;
  background: rgba(0, 55, 61, .55); border: 0; color: var(--cream); cursor: pointer;
}
.slider__btn svg { width: 100%; height: 100%; }
.slider__btn--prev { left: 0; }
.slider__btn--prev svg { transform: scaleX(-1); }
.slider__btn--next { right: 0; }

/* -------------------------------------------------------- Project pages */

.project-hero { background: #12454b; padding: 36px var(--gutter); }
.project-card {
  display: grid; grid-template-columns: 1fr;
  max-width: 1160px; margin: 0 auto;
  background: var(--teal);
}
.project-card__image img { width: 100%; height: 100%; object-fit: cover; min-height: 260px; }
.project-card__body { padding: 28px clamp(20px, 3.4vw, 46px) 26px; }
.project-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.project-card h1 { font-size: clamp(24px, 2.5vw, 33px); font-weight: 500; line-height: 1.3; max-width: 560px; }
.project-card .badge { margin: 0; flex: none; }
.project-card p { font-size: 14px; line-height: 2; }
@media (min-width: 860px) {
  .project-card { grid-template-columns: minmax(240px, 25%) 1fr; }
}

.project-gallery { padding: 40px var(--gutter) 90px; max-width: 1316px; margin: 0 auto; }
.project-gallery .gallery--masonry { columns: 3 300px; column-gap: 20px; }
.project-gallery .gallery--masonry .gallery__item { margin-bottom: 20px; }
.back-link { margin-top: 30px; text-align: center; font-family: var(--serif); font-size: 15px; }
.back-link a { text-decoration: none; }
.back-link a:hover { color: var(--salmon); }

/* ------------------------------------------------------------ About page */

.about {
  position: relative;
  padding: 0 var(--gutter);
  background: #1d5c63 var(--about-bg) center / cover;
}
.about::before { content: ''; position: absolute; inset: 0; background: rgba(21, 101, 110, .82); }
.about__card {
  position: relative;
  display: grid; grid-template-columns: 1fr;
  max-width: 1030px; margin: 0 auto;
}
.about__portrait img { width: 100%; height: 100%; max-height: 520px; object-fit: cover; object-position: top; }
.about__body { background: rgba(0, 55, 61, .55); padding: 40px clamp(20px, 3vw, 40px) 50px; }
.about__body h1, .about__body h2 { font-size: clamp(28px, 3.3vw, 42px); font-weight: 500; line-height: 1.35; margin-bottom: 28px; }
.about__body h2 { margin-top: 36px; }
.about__body p { font-size: 14px; line-height: 1.9; text-indent: 2.2em; }
.about__body p + p { margin-top: 1.4em; }
@media (min-width: 860px) {
  .about__card { grid-template-columns: 33% 1fr; }
  .about__portrait img { max-height: none; }
}

/* -------------------------------------------------------------- Lightbox */

.lightbox {
  position: fixed; inset: 0; z-index: 80;
  display: grid; grid-template-columns: 64px 1fr 64px; align-items: center;
  background: rgba(0, 30, 33, .94);
  opacity: 0; transition: opacity .3s;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox__figure { margin: 0; grid-column: 2; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lightbox__figure img { max-height: 82vh; max-width: 100%; width: auto; object-fit: contain; }
.lightbox__figure figcaption { font-size: 14px; text-align: center; }
.lightbox__close {
  position: absolute; top: 18px; right: 18px; width: 40px; height: 40px;
  background: none; border: 0; color: var(--cream); cursor: pointer;
}
.lightbox__prev, .lightbox__next {
  width: 44px; height: 64px; padding: 12px; margin: auto;
  background: none; border: 0; color: var(--cream); cursor: pointer;
}
.lightbox__prev svg, .lightbox__next svg { width: 100%; height: 100%; }
.lightbox__prev { transform: scaleX(-1); }
@media (max-width: 600px) {
  .lightbox { grid-template-columns: 36px 1fr 36px; }
}
