/* Salt Meridian: the game's own faces (IM FELL, EB Garamond, both SIL OFL, see fonts/) */
@font-face { font-family: "Fell SC"; src: url("fonts/IMFeENsc28P.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Fell"; src: url("fonts/IMFeENit28P.ttf") format("truetype"); font-style: italic; font-display: swap; }
@font-face { font-family: "Garamond"; src: url("fonts/EBGaramond-Variable.ttf") format("truetype"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Garamond"; src: url("fonts/EBGaramond-Italic-Variable.ttf") format("truetype"); font-weight: 400 800; font-style: italic; font-display: swap; }

:root {
  --deep: #0b141c;
  --deep-2: #101c27;
  --deep-3: #16283a;
  --parch: #ece2cb;
  --parch-2: #c9bda2;
  --parch-3: #8f8672;
  --brass: #c9a35a;
  --brass-2: #e6c887;
  --blood: #9e2a1e;
  --line: rgba(236, 226, 203, .14);
  --serif: "Garamond", Georgia, "Times New Roman", serif;
  --title: "Fell SC", "Garamond", Georgia, serif;
  --fell: "Fell", "Garamond", Georgia, serif;
  --gutter: clamp(16px, 4vw, 64px);
  --max: 1240px;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--deep); color: var(--parch);
  font: 400 19px/1.6 var(--serif);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

h2 { font: 400 clamp(32px, 4.6vw, 58px)/1.05 var(--title); letter-spacing: .005em; color: var(--parch); }
h3 { font: 400 26px/1.15 var(--title); color: var(--parch); }
.kicker {
  font: italic 400 18px/1 var(--fell); color: var(--brass);
  display: flex; align-items: center; gap: 14px; margin-bottom: 18px;
}
.kicker::before { content: ""; width: 36px; height: 1px; background: var(--brass); opacity: .7; }

/* top bar */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px var(--gutter);
  background: linear-gradient(rgba(11, 20, 28, .92), rgba(11, 20, 28, 0));
  transition: background .3s;
}
.bar.is-solid { background: rgba(11, 20, 28, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar__home { text-decoration: none; font: 400 16px/1 var(--title); letter-spacing: .04em; color: var(--parch-2); white-space: nowrap; }
.bar__home:hover { color: var(--parch); }
.bar__nav { display: flex; gap: clamp(14px, 2.4vw, 30px); }
.bar__nav a { text-decoration: none; font: 400 17px/1 var(--title); color: var(--parch-2); transition: color .2s; }
.bar__nav a:hover { color: var(--brass-2); }
.theme-btn {
  display: flex; align-items: center; gap: 10px; white-space: nowrap;
  font: italic 400 16px/1 var(--fell); color: var(--brass-2);
  border: 1px solid rgba(201, 163, 90, .45); padding: 9px 14px; border-radius: 2px;
  transition: background .2s, border-color .2s;
}
.theme-btn:hover { background: rgba(201, 163, 90, .1); border-color: var(--brass); }
.theme-btn__icon { width: 14px; height: 12px; display: flex; gap: 2px; align-items: flex-end; }
.theme-btn__icon::before, .theme-btn__icon::after { content: ""; flex: 1; background: currentColor; height: 40%; }
.theme-btn[aria-pressed="true"] .theme-btn__icon::before { animation: eq .9s ease-in-out infinite; }
.theme-btn[aria-pressed="true"] .theme-btn__icon::after { animation: eq .9s .3s ease-in-out infinite; }
@keyframes eq { 0%, 100% { height: 30%; } 50% { height: 100%; } }

/* hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 55% 50%; animation: drift 30s ease-out both; }
@keyframes drift { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero__shade { position: absolute; inset: 0; background:
  linear-gradient(to top, var(--deep) 0%, rgba(11, 20, 28, .75) 28%, rgba(11, 20, 28, 0) 62%),
  linear-gradient(to right, rgba(11, 20, 28, .55), rgba(11, 20, 28, 0) 55%); }
.hero__copy { position: relative; padding: 0 var(--gutter) clamp(56px, 10vh, 110px); max-width: 900px; }
.hero__pre { font: italic 400 clamp(17px, 1.6vw, 21px)/1 var(--fell); color: var(--brass-2); margin-bottom: 14px; animation: up 1.2s .2s both; }
.hero__title {
  font: 400 clamp(58px, 11vw, 150px)/.92 var(--title); letter-spacing: -.005em;
  text-shadow: 0 2px 40px rgba(0, 0, 0, .45); animation: up 1.2s .35s both;
}
.hero__tag { margin-top: 18px; font-size: clamp(18px, 1.8vw, 23px); font-style: italic; color: var(--parch); max-width: 34ch; animation: up 1.2s .5s both; }
.hero__status { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-style: italic; color: var(--parch-2); font-size: 17px; animation: up 1.2s .65s both; }
.seal {
  font: 400 15px/1 var(--title); font-style: normal; letter-spacing: .06em; color: var(--parch);
  background: var(--blood); padding: 9px 14px 8px; border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(236, 226, 203, .2);
}
.hero__note { position: absolute; right: var(--gutter); bottom: 28px; font: italic 400 14px/1 var(--fell); color: var(--parch-3); }
@keyframes up { from { opacity: 0; transform: translateY(20px); } }

section { padding: clamp(80px, 11vw, 150px) var(--gutter); }

/* intro */
.intro { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.intro__text h2 { margin-bottom: 26px; }
.intro__text p + p { margin-top: 16px; }
.intro__text p:not(.kicker) { color: var(--parch-2); }
.intro__fig img { border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.intro__fig figcaption, .fleet__pics figcaption { margin-top: 12px; font: italic 400 15px/1.3 var(--fell); color: var(--parch-3); }

/* pillars */
.pillars {
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding-top: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.4vw, 32px);
}
.pillar { background: var(--deep-2); border: 1px solid var(--line); display: flex; flex-direction: column; transition: border-color .3s, transform .3s; }
.pillar:hover { border-color: rgba(201, 163, 90, .45); transform: translateY(-3px); }
.pillar img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
.pillar > div { padding: 24px 26px 30px; }
.pillar h3 { margin-bottom: 10px; }
.pillar p { color: var(--parch-2); font-size: 17px; }

/* fleet: a parchment ledger */
.fleet { background: var(--parch); color: #2b2418; position: relative; }
.fleet::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: radial-gradient(ellipse at 20% 10%, rgba(255, 250, 235, .7), transparent 60%), radial-gradient(ellipse at 90% 100%, rgba(120, 92, 50, .22), transparent 60%); }
.fleet > * { position: relative; max-width: var(--max); margin-left: auto; margin-right: auto; }
.fleet h2, .fleet h3 { color: #22190e; }
.fleet .kicker { color: #8a5f1e; }
.fleet .kicker::before { background: #8a5f1e; }
.fleet__head { margin-bottom: clamp(36px, 5vw, 60px); }
.fleet__head h2 { max-width: 20ch; }
.fleet__list { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(43, 36, 24, .3); }
.fleet__list li { padding: 26px 24px 28px 0; border-bottom: 1px solid rgba(43, 36, 24, .3); display: grid; grid-template-columns: 48px 1fr; column-gap: 8px; row-gap: 6px; align-content: start; }
.fleet__n { font: 400 22px/1.2 var(--title); color: #9e2a1e; grid-row: span 2; }
.fleet__list p { color: #5a4d38; font-size: 17px; }
.fleet__pics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: clamp(40px, 5vw, 64px); }
.fleet__pics img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; box-shadow: 0 16px 40px rgba(43, 36, 24, .3); }
.fleet__pics figcaption { color: #6d6150; }

/* film */
.film { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }
.film__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.film__head > .kicker { width: 100%; margin-bottom: -10px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { font: 400 17px/1 var(--title); padding: 11px 16px 10px; border: 1px solid var(--line); color: var(--parch-2); transition: all .2s; }
.tabs button:hover { color: var(--parch); border-color: var(--parch-3); }
.tabs button[aria-selected="true"] { color: var(--deep); background: var(--brass-2); border-color: var(--brass-2); }
.film__frame { aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line); box-shadow: 0 40px 100px rgba(0, 0, 0, .5); }
.film__frame video { width: 100%; height: 100%; display: block; }
.film__caption { margin-top: 16px; font-style: italic; color: var(--parch-2); max-width: 70ch; }

/* deep */
.deep { background: linear-gradient(var(--deep), #07101a); }
.deep { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.deep > * { max-width: 620px; }
.deep__text { justify-self: end; }
.deep__stats { margin-top: 36px; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.deep__stats div { background: #0a1520; padding: 20px 24px; display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; }
.deep__stats dt { font: 400 22px/1.2 var(--title); }
.deep__stats dd { font: 400 32px/1 var(--title); color: var(--brass-2); grid-row: span 2; align-self: center; }
.deep__stats p { color: var(--parch-2); font-size: 16px; }
.deep__fig img { border: 1px solid var(--line); }

/* gallery */
.gallery { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }
.gallery__head { margin-bottom: 36px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(140px, 15vw, 210px); grid-auto-flow: dense; gap: 12px; }
.g { overflow: hidden; border: 1px solid var(--line); background: var(--deep-2); }
.g--wide { grid-column: span 2; }
.g--tall { grid-row: span 2; }
.g img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .1, 1), filter .4s; filter: saturate(.9); }
.g:hover img { transform: scale(1.05); filter: saturate(1.05); }
.gallery__note { margin-top: 18px; font: italic 400 15px/1.3 var(--fell); color: var(--parch-3); }

/* horizon */
.horizon { position: relative; min-height: 92svh; display: flex; align-items: center; overflow: hidden; }
.horizon__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 65% 50%; }
.horizon__shade { position: absolute; inset: 0; background: linear-gradient(to right, rgba(5, 9, 14, .94) 0%, rgba(5, 9, 14, .75) 38%, rgba(5, 9, 14, .05) 75%), linear-gradient(to top, var(--deep), transparent 30%), linear-gradient(to bottom, #07101a, transparent 25%); }
.horizon__copy { position: relative; max-width: 560px; }
.horizon__lede { margin: 22px 0 18px; color: var(--parch-2); }
.horizon__list { list-style: none; display: grid; gap: 10px; }
.horizon__list li { padding-left: 26px; position: relative; color: var(--parch); }
.horizon__list li::before { content: "✦"; position: absolute; left: 0; top: 1px; color: var(--brass); font-size: 13px; }

/* theme */
.theme { display: flex; justify-content: center; padding-top: clamp(40px, 6vw, 80px); }
.theme__card {
  width: min(760px, 100%); display: flex; gap: 28px; align-items: center;
  background: var(--parch); color: #2b2418; padding: clamp(22px, 3vw, 34px); border-radius: 3px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(43, 36, 24, .15), inset 0 0 60px rgba(120, 92, 50, .18);
}
.theme__card > img { width: 96px; height: 96px; flex: none; border-radius: 18px; }
.theme__meta { flex: 1; min-width: 0; }
.theme .kicker { color: #8a5f1e; margin-bottom: 10px; }
.theme .kicker::before { background: #8a5f1e; }
.theme h2 { color: #22190e; font-size: clamp(28px, 3.2vw, 38px); }
.theme__by { font-style: italic; color: #6d6150; font-size: 17px; }
.theme__row { margin-top: 16px; display: flex; align-items: center; gap: 16px; }
.theme__play { width: 46px; height: 46px; flex: none; border-radius: 50%; background: #22190e; color: var(--parch); display: grid; place-items: center; transition: background .2s; }
.theme__play:hover { background: var(--blood); }
.theme__play svg { width: 18px; height: 18px; fill: currentColor; }
.theme__play .i-pause, .theme__play[aria-pressed="true"] .i-play { display: none; }
.theme__play[aria-pressed="true"] .i-pause { display: block; }
.theme__track { flex: 1; height: 4px; background: rgba(43, 36, 24, .2); border-radius: 2px; cursor: pointer; position: relative; }
.theme__track::after { content: ""; position: absolute; inset: -10px 0; }
.theme__track span { display: block; height: 100%; width: 0; background: var(--blood); border-radius: 2px; }
.theme__time { font: 400 15px/1 var(--serif); font-variant-numeric: tabular-nums; color: #6d6150; white-space: nowrap; }

/* footer */
.foot { margin-top: clamp(60px, 8vw, 110px); padding: 48px var(--gutter); border-top: 1px solid var(--line); background: #070d13; display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.foot__studio img { width: 140px; height: auto; opacity: .85; transition: opacity .2s; }
.foot__studio:hover img { opacity: 1; }
.foot__text { color: var(--parch-3); font-size: 16px; display: grid; gap: 6px; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(4, 8, 12, .94); display: grid; place-items: center; padding: 56px 16px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1600px, 100%); max-height: 100%; object-fit: contain; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.lightbox__close { position: absolute; top: 12px; right: 18px; font-size: 40px; line-height: 1; color: var(--parch-2); }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 54px; line-height: 1; color: var(--parch-2); padding: 12px; }
.lightbox__prev { left: 6px; } .lightbox__next { right: 6px; }
.lightbox button:hover { color: var(--brass-2); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .1, 1); }
.reveal.is-in { opacity: 1; transform: none; }
.pillar.reveal.is-in:hover { transform: translateY(-3px); }

@media (max-width: 1020px) {
  .bar__nav { display: none; }
  .pillars { grid-template-columns: 1fr 1fr; }
  .fleet__list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 18px; }
  .intro, .deep { grid-template-columns: 1fr; }
  .deep__text { justify-self: start; }
  .pillars { grid-template-columns: 1fr; }
  .fleet__list { grid-template-columns: 1fr; }
  .fleet__pics { grid-template-columns: 1fr 1fr; }
  .fleet__pics figure:last-child { display: none; }
  .grid { grid-template-columns: 1fr 1fr; }
  .g--wide { grid-column: span 2; }
  .hero__note { display: none; }
  .theme__card { flex-direction: column; align-items: flex-start; }
  .theme-btn__text { display: none; }
  .horizon__shade { background: linear-gradient(to top, rgba(5, 9, 14, .96) 30%, rgba(5, 9, 14, .5) 70%, rgba(5, 9, 14, .2)); }
  .horizon { align-items: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

section[id] { scroll-margin-top: 64px; }
