/* styx-projet.fr: one stylesheet for the whole site. */

:root {
  --bg: #0b0b0c;
  --bg-raised: #141416;
  --line: #2a2a2e;
  --text: #f2f2ef;
  --muted: #a9a9a4;
  --focus: #7cc4ff;
  --wrap: 1360px;
  --gutter: 40px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Archivo, system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video, iframe { display: block; max-width: 100%; }
video { width: 100%; height: auto; background: #000; }
img { height: auto; }

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

h1, h2, h3 { font-weight: 500; letter-spacing: -.02em; line-height: 1.05; margin: 0; }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--text); color: var(--bg); padding: 10px 16px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Header */

.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(11, 11, 12, .94);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.site-header__bar { display: flex; justify-content: space-between; align-items: center; height: 72px; }

.site-name { font-weight: 600; font-size: 16px; text-decoration: none; }

.site-nav { display: flex; gap: 32px; font-size: 15px; }
.site-nav a { text-decoration: none; color: #d6d6d2; padding: 6px 0; border-bottom: 1px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--text); border-bottom-color: currentColor; }

.menu-toggle {
  display: none; width: 44px; height: 44px; margin-right: -10px;
  background: none; border: 0; color: var(--text); cursor: pointer;
  align-items: center; justify-content: center;
}

/* Styx sub-navigation */

.subnav { border-bottom: 1px solid var(--line); }
.subnav__bar { display: flex; align-items: center; gap: 48px; min-height: 64px; flex-wrap: wrap; }
.subnav__logo img { height: 22px; width: auto; }
.subnav__links { display: flex; gap: 28px; font-size: 15px; flex-wrap: wrap; }
.subnav__links a { text-decoration: none; color: var(--muted); padding: 8px 0; }
.subnav__links a:hover, .subnav__links a[aria-current] { color: var(--text); }

/* Buttons and links */

.btn {
  display: inline-block; align-self: flex-start; justify-self: start;
  padding: 13px 26px; border: 1px solid var(--text);
  font: inherit; font-size: 15px; line-height: 1.2; color: var(--text);
  background: transparent; text-decoration: none; cursor: pointer;
  transition: background .25s, color .25s;
}
.btn:hover { background: var(--text); color: var(--bg); }
.btn--solid { background: var(--text); color: var(--bg); }
.btn--solid:hover { background: transparent; color: var(--text); }

.link { color: var(--text); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.link:hover { text-decoration-thickness: 2px; }

/* Home: one section per project */

.project {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 64px; align-items: center; padding-top: 72px; padding-bottom: 72px;
}
.project--rev { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.project--rev .project__media { order: 2; }
.project__media { display: block; overflow: hidden; }
.project__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 1.2s var(--ease); }
.project__media:hover img { transform: scale(1.03); }
.project__text { display: flex; flex-direction: column; gap: 18px; }
.project__name { font-size: clamp(52px, 6vw, 80px); line-height: 1; }
.project__name img { height: .62em; width: auto; }
.project__text p { color: #c8c8c4; max-width: 440px; }

/* Project pages */

.page-head { padding-top: 88px; padding-bottom: 48px; display: grid; gap: 22px; }
.page-head h1 { font-size: clamp(48px, 7vw, 104px); line-height: .98; }
.page-head .lead { font-size: clamp(20px, 2vw, 26px); line-height: 1.4; max-width: 760px; color: #dcdcd8; }

.lead { font-size: 22px; line-height: 1.45; color: #dcdcd8; }

.figure { margin: 0; }
.figure img, .figure video { width: 100%; }
.figure figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
.figure--wide img { aspect-ratio: 16 / 9; object-fit: cover; }

.section { padding-top: 88px; padding-bottom: 88px; }
.section + .section {
  background: linear-gradient(var(--line), var(--line)) no-repeat center top / calc(100% - 2 * var(--gutter)) 1px;
}
.section__title { font-size: clamp(34px, 4vw, 52px); margin-bottom: 28px; }

.split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px; align-items: center;
}
.split--rev > :first-child { order: 2; }
.split--top { align-items: start; }

.prose { max-width: 680px; display: grid; gap: 20px; color: #d6d6d2; }
.prose h3 { font-size: 26px; color: var(--text); margin-top: 16px; }
.prose ul, .prose ol { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.prose li::marker { color: var(--muted); }
.prose strong { color: var(--text); font-weight: 600; }

blockquote.quote {
  margin: 0; font-size: clamp(26px, 3vw, 38px); line-height: 1.25; letter-spacing: -.01em; max-width: 960px;
}

.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gallery img, .gallery video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin: 0; }
.facts div { border-top: 1px solid var(--line); padding-top: 16px; }
.facts dt { color: var(--muted); font-size: 15px; }
.facts dd { margin: 4px 0 0; font-size: 26px; letter-spacing: -.01em; line-height: 1.15; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.steps > li { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; padding: 28px 0; border-top: 1px solid var(--line); }
.steps time { color: var(--muted); }
.steps h3 { font-size: 26px; margin-bottom: 8px; }
.steps p { color: #d6d6d2; max-width: 680px; }

.note { padding: 24px 28px; background: var(--bg-raised); color: #d6d6d2; max-width: 760px; }

/* Full-screen images (game pages) */

.hero { position: relative; }
.hero > img, .hero > video { width: 100%; height: min(calc(100vh - 72px), 56.25vw); min-height: 420px; object-fit: cover; }
.hero__text {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 120px 0 56px;
  background: linear-gradient(transparent, rgba(11, 11, 12, .85));
}
.hero__text h1 { font-size: clamp(56px, 8vw, 120px); line-height: .95; margin-bottom: 16px; }
.hero__text .lead { max-width: 720px; color: #f2f2ef; }

.bleed { margin: 0; }
.shot { margin-top: 0; margin-bottom: 0; }
.shot img { width: 100%; border: 1px solid var(--line); }
.bleed img, .bleed video { width: 100%; height: min(100vh, 56.25vw); object-fit: cover; }

/* Video: a poster that loads the player on click */

.video { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .8; transition: opacity .3s; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__play {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; color: #fff; cursor: pointer; font: inherit;
}
.video__play span {
  display: flex; align-items: center; gap: 12px; padding: 14px 24px;
  background: rgba(0, 0, 0, .6); border: 1px solid rgba(255, 255, 255, .7); font-size: 16px;
}
.video:hover img { opacity: 1; }

/* Home popup: "a particular project?" */

.chooser {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(5, 5, 6, .84);
  animation: fade .4s ease both;
}
.chooser[hidden] { display: none; }
.chooser.is-closing { animation: fade .25s ease reverse both; }
.chooser__box { width: 100%; max-width: 1180px; display: flex; flex-direction: column; gap: 22px; animation: rise .5s .05s var(--ease) both; }
.chooser__title { text-align: center; font-size: clamp(26px, 3vw, 36px); }
.chooser__close {
  position: absolute; top: 16px; right: 16px; width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--text); cursor: pointer;
}
.chooser__skip {
  align-self: center; background: none; border: 0; padding: 12px 16px; cursor: pointer;
  font: inherit; font-size: 16px; color: #d6d6d2; text-decoration: underline; text-underline-offset: 4px;
}
.chooser__skip:hover { color: var(--text); }

.panels { display: flex; gap: 10px; height: min(520px, 62vh); }
.panel {
  position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; border-radius: 14px;
  display: flex; align-items: flex-end; text-decoration: none; color: #fff;
  transition: flex-grow .55s var(--ease);
}
.panels:hover .panel { flex-grow: 1; }
.panels .panel:hover, .panels .panel:focus-visible, .panel.is-open { flex-grow: 2.6; }
.panels:hover .panel.is-open:not(:hover) { flex-grow: 1; }
.panel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.panel::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .4); transition: background .4s; }
.panel:hover::after, .panel:focus-visible::after, .panel.is-open::after { background: rgba(0, 0, 0, .15); }
.panels:hover .panel.is-open:not(:hover)::after { background: rgba(0, 0, 0, .4); }
.panel__text { position: relative; z-index: 1; padding: 26px; display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.panel__name { font-size: 40px; font-weight: 500; letter-spacing: -.02em; }
.panel__line { font-size: 16px; opacity: 0; transition: opacity .3s; }
.panel:hover .panel__line, .panel:focus-visible .panel__line, .panel.is-open .panel__line { opacity: 1; transition-delay: .2s; }
.panels:hover .panel.is-open:not(:hover) .panel__line { opacity: 0; transition-delay: 0s; }

/* Contact form */

.form { display: grid; gap: 20px; max-width: 640px; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 15px; color: #d6d6d2; }
.field input, .field textarea, .field select {
  width: 100%; padding: 14px 16px; font: inherit; font-size: 17px; color: var(--text);
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 0;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--text); }
.field textarea { min-height: 200px; resize: vertical; }
.form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__status { padding: 16px 20px; background: var(--bg-raised); border-left: 0; }
.form__status--ok { color: #9fe0b5; }
.form__status--err { color: #ffb4a8; }

/* Embedded dashboard */

.dashboard { width: 100%; border: 0; background: #fff; height: 1500px; }

/* Footer */

.site-footer { border-top: 1px solid var(--line); margin-top: 40px; }
.site-footer__bar { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-top: 32px; padding-bottom: 40px; font-size: 14px; color: var(--muted); }
.site-footer__nav { display: flex; gap: 24px; }
.site-footer__nav a { text-decoration: none; }
.site-footer__nav a:hover { color: var(--text); }

/* Reveal on scroll (enabled by site.js) */

.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Narrow screens */

@media (max-width: 900px) {
  :root { --gutter: 20px; }
  body { font-size: 17px; }
  .menu-toggle { display: flex; }
  .site-nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px var(--gutter) 20px;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 14px 0; font-size: 20px; border-bottom: 0; }
  .project, .project--rev, .split { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 48px; padding-bottom: 48px; }
  .project--rev .project__media, .split--rev > :first-child { order: 0; }
  .split { padding: 0; }
  .section { padding-top: 56px; padding-bottom: 56px; }
  .page-head { padding-top: 56px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps > li { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .panels { flex-direction: column; height: auto; }
  .panel { min-height: 140px; }
  .panel__line { opacity: 1; }
  .subnav__bar { gap: 16px; padding-top: 14px; padding-bottom: 6px; }
  .subnav__links { gap: 20px; }
}

/* Perdix sub-pages: aircraft picker, map viewer, comparisons */

.subnav__title { font-weight: 600; font-size: 18px; text-decoration: none; letter-spacing: -.01em; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
  padding: 10px 18px; min-height: 44px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: #d6d6d2; font: inherit; font-size: 15px; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--text); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

.picker { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; align-items: start; }

.viewer { position: sticky; top: 96px; background: var(--bg-raised); }
.viewer__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: opacity .25s; }
.viewer__img.is-swapping, .mapview__img.is-swapping { opacity: 0; }
.viewer__text { padding: 24px 28px 28px; display: grid; gap: 12px; }
.viewer__kind { color: var(--muted); font-size: 15px; }
.viewer__name, .mapview__name { font-size: clamp(30px, 3vw, 44px); }
.viewer__desc, .mapview__desc { color: #d6d6d2; max-width: 640px; }
.viewer__specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 8px 0 0; }
.viewer__specs div { border-top: 1px solid var(--line); padding-top: 12px; }
.viewer__specs dt { color: var(--muted); font-size: 14px; }
.viewer__specs dd { margin: 4px 0 0; font-size: 19px; line-height: 1.35; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cards li[hidden] { display: none; }
.card {
  width: 100%; padding: 0; border: 1px solid transparent; background: var(--bg-raised); color: var(--text);
  font: inherit; text-align: left; cursor: pointer; display: grid; transition: border-color .2s, transform .2s;
}
.card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card__name { padding: 10px 12px 0; font-size: 15px; font-weight: 500; line-height: 1.3; }
.card__kind { padding: 2px 12px 12px; font-size: 13px; color: var(--muted); }
.card:hover { border-color: #5a5a5e; }
.card[aria-pressed="true"] { border-color: var(--text); }

.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bar {
  width: 100%; display: grid; grid-template-columns: 220px minmax(0, 1fr) 80px; gap: 16px; align-items: center;
  padding: 8px 0; min-height: 44px; background: none; border: 0; color: #d6d6d2; font: inherit; font-size: 15px;
  text-align: left; cursor: pointer;
}
.bar__track { height: 10px; background: var(--bg-raised); }
.bar__fill { display: block; height: 100%; background: #6c6c70; transform-origin: left; transition: background .2s; }
.js .bars .bar__fill { transform: scaleX(0); transition: transform 1s var(--ease), background .2s; }
.js .bars.is-in .bar__fill { transform: scaleX(1); }
.bar__value { text-align: right; font-variant-numeric: tabular-nums; }
.bar:hover, .bar[aria-pressed="true"] { color: var(--text); }
.bar:hover .bar__fill { background: #a9a9a4; }
.bar[aria-pressed="true"] .bar__fill { background: var(--text); }

.tabs { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.tab {
  width: 100%; padding: 0; border: 1px solid transparent; background: var(--bg-raised); color: #d6d6d2;
  font: inherit; font-size: 14px; text-align: left; cursor: pointer; display: grid; transition: border-color .2s;
}
.tab img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.tab span { padding: 8px 10px 10px; }
.tab:hover { border-color: #5a5a5e; color: var(--text); }
.tab[aria-pressed="true"] { border-color: var(--text); color: var(--text); }

.mapview { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.mapview__media { position: relative; }
.mapview__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: opacity .25s; cursor: pointer; }
.mapview__dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 4px; }
.dot { width: 44px; height: 44px; border: 0; background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.dot::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .45); box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
.dot[aria-pressed="true"]::before { background: #fff; }
.mapview__text { display: grid; gap: 14px; }

.areas { position: relative; width: min(100%, 720px); aspect-ratio: 1; }
.area {
  position: absolute; left: 0; bottom: 0; aspect-ratio: 1; padding: 0; border: 1px solid #5a5a5e;
  background: rgba(255, 255, 255, .02); color: #d6d6d2; font: inherit; font-size: 13px; cursor: pointer;
  display: flex; align-items: flex-start; justify-content: flex-end; transition: border-color .2s, background .2s;
}
.area span { padding: 6px 8px; text-align: right; line-height: 1.3; max-width: 100%; overflow-wrap: anywhere; }
.area:hover { border-color: var(--text); color: var(--text); }
.area[aria-pressed="true"] { border-color: var(--text); background: rgba(255, 255, 255, .08); color: var(--text); }

@media (max-width: 1100px) {
  .tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .picker, .mapview { grid-template-columns: minmax(0, 1fr); }
  .viewer { position: static; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bar { grid-template-columns: 130px minmax(0, 1fr) 64px; gap: 10px; font-size: 14px; }
  .viewer__specs { grid-template-columns: minmax(0, 1fr); }
}
