/* Isologique · header and hero, from G1 « La photo de l'équipe » of the hero round */

:root {
  --brown: #694237;
  --brown-dark: #553429;
  --ink: #4a2e26;
  --lime: #C8D200;
  --lime-pale: #F4F7D2;
  --heat: #D9480F;
  --hedge: #2f3a22;
  /* Content 1440 wide at most, centred on larger screens */
  --gutter: max(clamp(16px, 5.556vw, 80px), calc((100vw - 1440px) / 2 + 80px));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: "Recursive", system-ui, sans-serif;
  font-variation-settings: "CASL" 0;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--brown); }
a:hover { color: #3b241e; }
:where(a:not([href])) { cursor: pointer; text-decoration: underline; }
.hand { border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px; }

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

.site-header { position: relative; z-index: 20; background: #ffffff; }
.hd {
  display: flex;
  align-items: center;
  gap: 30px;
  height: 84px;
  padding: 0 var(--gutter);
}
.brand { display: block; margin-right: auto; }
.brand img { width: 280px; }
.brand-white { display: none; }
.nav { display: flex; align-items: center; gap: 30px; font-size: 17px; font-weight: 600; }
.nav a, .trades a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.tel, .menu-btn {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border: 2px solid var(--brown);
  background: #ffffff;
  color: var(--brown);
  font: 600 16px "Recursive", sans-serif;
  font-variation-settings: "CASL" 1;
  text-decoration: none;
}
.tel-ico { display: none; }
.menu-btn { display: none; cursor: pointer; }
.menu-btn[aria-expanded="true"] { background: var(--brown); color: #ffffff; }
.trades {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
  white-space: nowrap;
  height: 48px;
  padding: 0 var(--gutter);
  font-size: 16px;
  font-weight: 600;
}
.menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  max-height: calc(100vh - 100%);
  overflow-y: auto;
  padding: 8px var(--gutter) 24px;
  background: #ffffff;
  border-top: 1.5px solid rgba(105, 66, 55, .22);
  border-bottom: 2px solid var(--brown);
  box-shadow: 0 7px 0 var(--lime);
}
.menu[hidden] { display: none; }
.menu-title {
  margin: 12px 0 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brown);
  font-variation-settings: "CASL" .55;
}
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu a {
  display: flex;
  align-items: center;
  min-height: 48px;
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(105, 66, 55, .15);
}
.menu-more { margin-top: 16px !important; }
.menu-more a { font-weight: 600; }

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

.hero { position: relative; background: var(--hedge); }
.photo { width: 100%; }
.glass { display: none; }

/* The band along the bottom: identity, subheadline, actions, video */
.foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 20px 22px 20px 30px;
  background: #ffffff;
  border: 2px solid var(--brown);
  box-shadow: 6px 6px 0 var(--lime);
}
/* From 1440 down to 1280, the logo and the video shrink, the actions keep their width */
.foot h1 { flex: none; width: clamp(220px, calc(220px + (100vw - 1280px) * .375), 280px); margin: 0; }
.sub { flex: 0 1 396px; margin: 0; font-size: 17px; line-height: 1.5; }
.act { flex: none; display: flex; flex-direction: column; gap: 10px; width: 290px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 16px;
  border: 2px solid var(--brown);
  font: 600 16px "Recursive", sans-serif;
  font-variation-settings: "CASL" 1;
  text-decoration: none;
}
.btn-p { background: var(--brown); color: #ffffff; }
.btn-p:hover { background: var(--brown-dark); color: #ffffff; }
.btn-s { background: #ffffff; color: var(--brown); }
.rge {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 600;
  text-decoration: none;
}
.rge img { flex: none; width: 80px; height: 44px; object-fit: cover; object-position: 50% 54%; }
.video {
  position: relative;
  display: block;
  flex: none;
  width: clamp(250px, calc(250px + (100vw - 1280px) * .3125), 300px);
  aspect-ratio: 300 / 169;
  overflow: hidden;
  border: 2px solid var(--brown);
  background: #d8d2c4;
  text-decoration: none;
}
.video img { width: 100%; height: 100%; object-fit: cover; }
/* YouTube's player, in place of the poster once clicked */
iframe.video { height: auto; }
.play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--brown);
  display: flex;
  align-items: center;
  justify-content: center;
}
.play svg { width: 24px; height: 24px; margin-left: 4px; }
.vlab {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 4px 10px;
  background: #ffffff;
  color: var(--brown);
  font-size: 13px;
  font-weight: 600;
  font-variation-settings: "CASL" 1;
}

/* The white square buttons and the play button take the pale lime on hover */
.btn-s:hover, .tel:hover, .menu-btn:not([aria-expanded="true"]):hover, .video:hover .play {
  background: var(--lime-pale);
  color: var(--brown);
}

a:focus-visible, button:focus-visible { outline: 3px solid var(--heat); outline-offset: 2px; }

/* ---------- From 1280: G1, the photo over the whole screen, header included ---------- */

@media (min-width: 1280px) {
  /* The header stays on screen. Over the photo, white on a frosted glass that fades out down to 240 px;
     once the page scrolls (.is-solid, set by main.js), white with a brown text, as below 1280 */
  .site-header { position: fixed; left: 0; right: 0; top: 0; background: transparent; transition: background-color .2s, box-shadow .2s; }
  .site-header:not(.is-solid) .nav a, .site-header:not(.is-solid) .trades a { color: #ffffff; }
  .site-header:not(.is-solid) .nav a:hover, .site-header:not(.is-solid) .trades a:hover { color: var(--lime-pale); }
  .site-header:not(.is-solid) .tel { border-color: #ffffff; }
  .site-header:not(.is-solid) .brand-brown { display: none; }
  .site-header:not(.is-solid) .brand-white { display: block; }
  .trades { border-top: 1px solid rgba(255, 255, 255, .2); }
  .site-header.is-solid { background: #ffffff; box-shadow: 0 1.5px 0 rgba(105, 66, 55, .22); }
  .is-solid .trades { border-top-color: rgba(105, 66, 55, .22); }

  /* The screen's height, but never wider than 16:10, so the team keeps its seven people at either end */
  .hero { height: max(720px, min(100vh, 62.5vw)); height: max(720px, min(100svh, 62.5vw)); overflow: hidden; }
  .photo { position: absolute; inset: 0; height: 100%; object-fit: cover; }
  .foot {
    position: absolute;
    left: max(24px, calc((100vw - 1440px) / 2 + 24px));
    right: max(24px, calc((100vw - 1440px) / 2 + 24px));
    bottom: 20px;
  }

  /* Full glass down to --s, under the trades row's text, then each layer fades within the rest of the height,
     the strongest first. Five layers, each twice as blurred as the one under it (G1's « flou » at 4 px) */
  .glass { --s: 116px; display: block; position: absolute; z-index: 1; left: 0; top: 0; width: 100%; height: 240px; pointer-events: none; }
  .glass span { position: absolute; inset: 0; }
  .glass .b0 {
    -webkit-backdrop-filter: blur(.25px); backdrop-filter: blur(.25px);
    -webkit-mask-image: linear-gradient(#000 calc(var(--s) + (100% - var(--s)) * .4), rgba(0, 0, 0, .5) calc(var(--s) + (100% - var(--s)) * .7), transparent 100%);
    mask-image: linear-gradient(#000 calc(var(--s) + (100% - var(--s)) * .4), rgba(0, 0, 0, .5) calc(var(--s) + (100% - var(--s)) * .7), transparent 100%);
  }
  .glass .b1 {
    -webkit-backdrop-filter: blur(.5px); backdrop-filter: blur(.5px);
    -webkit-mask-image: linear-gradient(#000 calc(var(--s) + (100% - var(--s)) * .3), rgba(0, 0, 0, .5) calc(var(--s) + (100% - var(--s)) * .55), transparent calc(var(--s) + (100% - var(--s)) * .8));
    mask-image: linear-gradient(#000 calc(var(--s) + (100% - var(--s)) * .3), rgba(0, 0, 0, .5) calc(var(--s) + (100% - var(--s)) * .55), transparent calc(var(--s) + (100% - var(--s)) * .8));
  }
  .glass .b2 {
    -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px);
    -webkit-mask-image: linear-gradient(#000 calc(var(--s) + (100% - var(--s)) * .2), rgba(0, 0, 0, .5) calc(var(--s) + (100% - var(--s)) * .45), transparent calc(var(--s) + (100% - var(--s)) * .7));
    mask-image: linear-gradient(#000 calc(var(--s) + (100% - var(--s)) * .2), rgba(0, 0, 0, .5) calc(var(--s) + (100% - var(--s)) * .45), transparent calc(var(--s) + (100% - var(--s)) * .7));
  }
  .glass .b3 {
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    -webkit-mask-image: linear-gradient(#000 calc(var(--s) + (100% - var(--s)) * .1), rgba(0, 0, 0, .5) calc(var(--s) + (100% - var(--s)) * .35), transparent calc(var(--s) + (100% - var(--s)) * .6));
    mask-image: linear-gradient(#000 calc(var(--s) + (100% - var(--s)) * .1), rgba(0, 0, 0, .5) calc(var(--s) + (100% - var(--s)) * .35), transparent calc(var(--s) + (100% - var(--s)) * .6));
  }
  .glass .b4 {
    -webkit-backdrop-filter: blur(4px) saturate(1.1); backdrop-filter: blur(4px) saturate(1.1);
    -webkit-mask-image: linear-gradient(#000 var(--s), rgba(0, 0, 0, .5) calc(var(--s) + (100% - var(--s)) * .25), transparent calc(var(--s) + (100% - var(--s)) * .5));
    mask-image: linear-gradient(#000 var(--s), rgba(0, 0, 0, .5) calc(var(--s) + (100% - var(--s)) * .25), transparent calc(var(--s) + (100% - var(--s)) * .5));
  }
  .glass .tint { background: linear-gradient(rgba(26, 34, 16, .34) 0, rgba(26, 34, 16, .26) var(--s), rgba(26, 34, 16, .12) calc(var(--s) + (100% - var(--s)) * .45), rgba(26, 34, 16, .04) calc(var(--s) + (100% - var(--s)) * .75), rgba(26, 34, 16, 0) 100%); }
}

/* ---------- Below 1280: the compact header of v1, the band under the photo ---------- */

@media (max-width: 1279.98px) {
  .nav, .trades { display: none; }
  .menu-btn { display: inline-flex; }
  /* The compact header stays on screen */
  .site-header { position: sticky; top: 0; }
  .hd { gap: 12px; border-bottom: 1.5px solid rgba(105, 66, 55, .22); }

  .hero { padding-bottom: 48px; background: #ffffff; }
  /* The band in two columns, over the bottom of the photo: the hands, the faces clear */
  .foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
    gap: 24px 40px;
    align-items: start;
    /* Up over the bodies, to just under the faces: 18 % of the screen's width is 30 % of the photo's height */
    margin: -18vw var(--gutter) 0;
    padding: 28px 30px 30px;
  }
  /* The logo over the subheadline, the actions over the video */
  .foot h1 { grid-area: 1 / 1; width: 280px; }
  .sub { grid-area: 2 / 1; }
  .act { grid-area: 1 / 2; width: auto; }
  .video { grid-area: 2 / 2; width: 100%; }
}

/* ---------- Below 760: one column ---------- */

@media (max-width: 759.98px) {
  .hd { height: 64px; }
  .brand img { width: 180px; }
  /* The phone as an icon beside « Menu », always on screen with the header */
  .tel { justify-content: center; width: 44px; min-height: 44px; padding: 0; }
  .tel-ico { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .tel-num {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .menu-btn { min-height: 44px; padding: 0 16px; }
  .menu { max-height: calc(100vh - 64px); }

  .hero { padding-bottom: 40px; }
  .foot {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    margin-top: -24px;
    padding: 22px 20px 24px;
  }
  .foot h1 { width: min(100%, 260px); }
  .sub { flex: none; }
  .act { align-self: stretch; }
  .btn { min-height: 52px; }
  .video { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header { transition: none; }
}
