/* HYDRA landing page
   Palette is taken from the approved anchor: night umber, dusk mauve, horizon apricot,
   plateau sandstone, basalt, and the machine's yellow (used only for actions and the depth gauge). */
:root {
  --umber: #171210;
  --mauve: #4d3836;
  --apricot: #e9a55c;
  --sand: #eadfcd;
  --ochre: #dcc09a;
  --clay: #c59a72;
  --shale: #44342e;
  --basalt: #1f1c1b;
  --ink: #2a1c18;
  --yellow: #f2b21d;

  --bore: 190px;            /* the rock column with the drill string: one fixed width, the narrowest it used to reach */
  --bitw: 78px;
  --bith: calc(var(--bitw) * 6.17);
  --tip: 66vh;
  --pad: clamp(1.25rem, 5vw, 5rem);
  --wide: "wdth" 118;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--umber);
  color: var(--sand);
  font-family: "Archivo", system-ui, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; }
h1, h2 { font-variation-settings: var(--wide); font-weight: 650; line-height: 1.04; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.75rem); }
p { margin: 0; max-width: 62ch; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

/* ---------- top bar ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 2rem;
  padding: 0.9rem var(--pad);
  transition: background-color 0.3s;
}
.top.solid { background: rgba(23, 18, 16, 0.9); backdrop-filter: blur(8px); }
.brand img { width: 200px; }
.nav { display: flex; gap: 1.75rem; margin-left: auto; font-size: 0.95rem; }
.nav a { text-decoration: none; opacity: 0.86; }
.nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 0.3em; }
.btn {
  display: inline-block; padding: 0.85em 1.4em; border-radius: 3px;
  background: var(--yellow); color: #1b1307; text-decoration: none;
  font-weight: 650; font-variation-settings: "wdth" 108;
}
.btn:hover { background: #ffc53a; }
.btn-small { padding: 0.6em 1em; font-size: 0.92rem; }

/* ---------- hero ---------- */
.hero { height: 420vh; position: relative; }
.stage {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  background: linear-gradient(#2a1d20 0%, #4d3836 38%, #8a6a58 56%, #5b4a42 64%, #2c2320 100%);
}
#film { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage.tall #film {
  -webkit-mask-image: linear-gradient(transparent 12%, #000 30%, #000 70%, transparent 90%);
          mask-image: linear-gradient(transparent 12%, #000 30%, #000 70%, transparent 90%);
}
.anchor { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 53% 50%; display: none; }
.no-film .anchor { display: block; }
.no-film #film { display: none; }

.line { position: absolute; left: var(--pad); right: var(--pad); margin: 0; text-shadow: 0 1px 24px rgba(23, 18, 16, 0.55); will-change: opacity, transform; }
.line-open {
  top: 19vh; max-width: 13ch;
  font-size: clamp(2.1rem, 4.6vw, 4.6rem); line-height: 1.03;
  font-variation-settings: var(--wide); font-weight: 600; letter-spacing: -0.015em;
}
.line-land { top: 15vh; opacity: 0; }
.line-land h1 { font-size: clamp(3.2rem, 8.4vw, 8rem); font-variation-settings: "wdth" 125; font-weight: 700; letter-spacing: -0.02em; }
.kind { font-size: clamp(1.05rem, 1.7vw, 1.5rem); margin-top: 0.6rem; font-variation-settings: "wdth" 110; }
.facts { margin-top: 0.7rem; color: #f6c487; font-size: clamp(1rem, 1.35vw, 1.2rem); font-weight: 500; font-variant-numeric: tabular-nums; }
.cue { position: absolute; left: 0; right: 0; bottom: 4vh; margin: 0 auto; max-width: none; text-align: center; font-size: 0.92rem; opacity: 0.8; }
.no-film .line-open, .no-film .cue { display: none; }
.no-film .line-land { opacity: 1; }
.no-film.hero, .hero.no-film { height: 100vh; }

/* ---------- the descent ---------- */
.descent { position: relative; background: var(--sand); color: var(--ink); }
.bore {
  position: absolute; top: 0; bottom: 0; left: 0; width: var(--bore);
  background: #b89a78 url("../assets/img/strata.jpg") center top / auto 100% no-repeat;
  clip-path: inset(0);
  box-shadow: inset -18px 0 26px -18px rgba(23, 18, 16, 0.55);
}
.string { position: sticky; top: 0; height: 100vh; will-change: transform; }
.hole, .rod, .bit { position: absolute; left: 50%; transform: translateX(-50%); }
.hole {
  top: 0; height: calc(var(--tip) - 6px); width: calc(var(--bitw) + 10px);
  background: rgba(23, 14, 11, 0.62);
  box-shadow: inset 7px 0 9px -4px rgba(0, 0, 0, 0.7), inset -7px 0 9px -4px rgba(0, 0, 0, 0.7);
}
.rod {
  top: 0; bottom: calc(100vh - var(--tip) + var(--bith) - 4px); width: var(--bitw);
  background: url("../assets/img/rod.png") center bottom / 100% auto repeat-y;
}
.bit { bottom: calc(100vh - var(--tip)); width: var(--bitw); height: auto; max-width: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45)); }
.gauge {
  position: absolute; top: calc(var(--tip) - 2.1rem); left: calc(50% + var(--bitw) / 2 + 12px);
  padding: 0.25em 0.6em; border-radius: 3px; white-space: nowrap;
  background: var(--yellow); color: #1b1307;
  font-weight: 700; font-variant-numeric: tabular-nums; font-variation-settings: "wdth" 108; font-size: 0.95rem;
}
.mark {
  position: absolute; left: 0; right: 0; top: calc((100% - (100vh - var(--tip))) * var(--d));
  padding: 0.3rem 0.7rem; border-top: 2px solid rgba(234, 223, 205, 0.85);
  color: var(--sand); font-size: 0.82rem; font-variant-numeric: tabular-nums; text-shadow: 0 1px 6px #000;
}
.mark b { font-variation-settings: var(--wide); margin-right: 0.35em; }
.mark-end { border-top-color: var(--yellow); }

.log { margin-left: var(--bore); }
.block { padding: clamp(4.5rem, 12vh, 9rem) var(--pad); background: linear-gradient(var(--from) 0, var(--bg) 16rem); }
.block > h2 + .lead, .block > h2 + .mosaic { margin-top: 1.5rem; }
.sand   { --from: var(--sand);  --bg: var(--sand); }
.ochre  { --from: var(--sand);  --bg: var(--ochre); }
.clay   { --from: var(--ochre); --bg: var(--clay); color: #24150e; }
.shale  { --from: var(--clay);  --bg: var(--shale); color: var(--sand); }
.shale + .shale { --from: var(--shale); }
.basalt { --from: var(--shale); --bg: var(--basalt); color: var(--sand); padding-bottom: 46vh; }
.lead { font-size: clamp(1.15rem, 1.7vw, 1.45rem); line-height: 1.45; max-width: 46ch; }
.at { font-size: 0.9rem; font-weight: 650; font-variant-numeric: tabular-nums; opacity: 0.72; margin-bottom: 0.9rem; }

.wide img { width: 100%; border-radius: 2px; }
figcaption { font-size: 0.86rem; opacity: 0.78; margin-top: 0.5rem; max-width: 50ch; }
.cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 1.5rem 3rem; margin-top: 2.2rem; align-items: start; }

.mosaic { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: clamp(220px, 25vw, 400px); gap: 2.6rem 1.1rem; }
.mosaic figure { display: flex; flex-direction: column; min-height: 0; }
.mosaic img { flex: 1; min-height: 0; width: 100%; object-fit: cover; border-radius: 2px; }
.m-a { grid-column: span 4; } .m-b { grid-column: span 2; }
.m-c, .m-d, .m-e { grid-column: span 2; }

.pair { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 2rem 3rem; align-items: center; }
.pair img { border-radius: 2px; }
.pair h2 + p { margin-top: 1.2rem; }
.screens { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; margin-top: 2.6rem; }
.screens img { border-radius: 6px; }

.range { list-style: none; margin: 2.4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0; border-top: 1px solid rgba(234, 223, 205, 0.3); }
.range li { padding: 1.3rem 1rem 1.5rem 0; border-bottom: 1px solid rgba(234, 223, 205, 0.3); font-size: 1.2rem; font-variation-settings: "wdth" 112; font-weight: 600; }
.range span { display: block; font-size: 0.9rem; font-weight: 400; font-variation-settings: "wdth" 100; opacity: 0.75; margin-top: 0.25rem; }

.depths { width: 100%; max-width: 46rem; border-collapse: collapse; margin-top: 2.2rem; font-variant-numeric: tabular-nums; }
.depths th, .depths td { text-align: left; padding: 0.9rem 1rem 0.9rem 0; border-bottom: 1px solid rgba(234, 223, 205, 0.25); vertical-align: baseline; }
.depths thead th { font-size: 0.86rem; font-weight: 500; opacity: 0.72; }
.depths tbody th { font-weight: 600; }
.depths td:last-child { font-size: 1.6rem; font-weight: 650; font-variation-settings: "wdth" 114; color: var(--apricot); }
.depths td span { font-size: 0.86rem; font-weight: 400; color: var(--sand); opacity: 0.7; margin-left: 0.5em; }
.spec { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1.4rem 2rem; margin: 2.8rem 0 0; max-width: 46rem; }
.spec dt { font-size: 0.86rem; opacity: 0.72; }
.spec dd { margin: 0.15rem 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.note { font-size: 0.86rem; opacity: 0.72; margin-top: 2.4rem; max-width: 56ch; }

/* ---------- after the hole ---------- */
.cores { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 2rem clamp(2rem, 6vw, 6rem); align-items: center; padding: clamp(4rem, 12vh, 9rem) var(--pad); background: linear-gradient(var(--basalt), var(--umber) 14rem); }
.cores img { border-radius: 2px; }
.cores h2 + p { margin-top: 1.2rem; font-size: clamp(1.1rem, 1.6vw, 1.35rem); }
.news { padding: clamp(3.5rem, 9vh, 6rem) var(--pad); border-top: 1px solid rgba(234, 223, 205, 0.16); }
.news h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.news p { margin-top: 0.8rem; opacity: 0.78; }

.closing { position: relative; min-height: 92vh; display: flex; align-items: center; justify-content: flex-end; overflow: hidden; }
.closing > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 60%; }
.closing-copy { position: relative; width: min(100%, 34rem); margin: 0 var(--pad); padding: 3rem 0; }
.closing-copy h2 + p { margin-top: 1.1rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-top: 2rem; }
.plain { font-weight: 600; font-variant-numeric: tabular-nums; text-underline-offset: 0.3em; }

.foot { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 2rem 4rem; padding: 3.5rem var(--pad) 4rem; background: #0f0c0b; font-size: 0.95rem; }
.foot img { width: 150px; margin-bottom: 1.2rem; }
.foot address { font-style: normal; opacity: 0.85; }
.foot p { margin-bottom: 0.9rem; }
.small { font-size: 0.84rem; opacity: 0.65; }

/* ---------- small screens: the borehole moves to the right edge ---------- */
@media (max-width: 820px) {
  :root { --bore: 62px; --bitw: 34px; }
  .nav { display: none; }
  .top { gap: 1rem; justify-content: space-between; }
  .brand img { width: 150px; }
  .bore { left: auto; right: 0; box-shadow: inset 14px 0 20px -14px rgba(23, 18, 16, 0.55); }
  .log { margin-left: 0; margin-right: var(--bore); }
  .gauge { left: 50%; transform: translateX(-50%); top: calc(var(--tip) + 8px); font-size: 0.72rem; padding: 0.2em 0.4em; }
  .mark { padding: 0.2rem 0.25rem; font-size: 0.66rem; text-align: center; }
  .mark b { display: block; margin: 0; }
  .cols, .pair, .cores { grid-template-columns: minmax(0, 1fr); }
  .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; gap: 1.6rem 0.8rem; }
  .mosaic img { aspect-ratio: 4 / 3; flex: none; }
  .m-a { grid-column: span 2; } .m-b, .m-c, .m-d, .m-e { grid-column: span 1; }
  .m-b img, .m-e img { aspect-ratio: 3 / 4; }
  .screens { grid-template-columns: minmax(0, 1fr); }
  .closing { align-items: flex-end; }
  .closing > img { object-position: 36% 50%; }
  .line-open { top: 14vh; }
  .line-land { top: 11vh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* small-screen refinements */
@media (max-width: 820px) {
  .depths th, .depths td { padding-right: 0.6rem; }
  .depths td:last-child { font-size: 1.2rem; white-space: nowrap; }
  .depths td span { display: block; margin-left: 0; }
  .closing { display: block; min-height: 0; }
  .closing > img { position: static; height: auto; aspect-ratio: 4 / 3; object-position: 32% 60%; }
  .closing-copy { width: auto; margin: 0; padding: 2.2rem var(--pad) 3.5rem; }
  .stage.tall #film {
    -webkit-mask-image: linear-gradient(transparent 14%, #000 40%, #000 66%, transparent 88%);
            mask-image: linear-gradient(transparent 14%, #000 40%, #000 66%, transparent 88%);
  }
}
