/* xertainty — site styles
   Brand: deep green #003625 · coral #ff6f64 · white · Chakra Petch

   Two modes share this file:
   · default — an ordinary page (no script, no WebGL, or reduced motion)
   · .live   — the stage: the film fills the screen, logo and line sit in its corner */

@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/chakra-petch-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/chakra-petch-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/chakra-petch-latin-600-normal.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --green: #003625;
  --green-deep: #002419;
  --green-ink: #001a12;
  --coral: #ff6f64;
  --white: #fff;
  --text: rgba(255, 255, 255, .84);
  --muted: rgba(255, 255, 255, .62);
  --line: rgba(159, 227, 198, .34);
  --font: "Chakra Petch", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 2.4vw, 34px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--green); color: var(--text);
  font-family: var(--font); font-size: 1.0625rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, h3, p, ul { margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--coral); color: var(--green-ink); }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }
.boot main, .boot .top { visibility: hidden; }

/* ───────── the film ───────── */
.film {
  position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 60% 40%, #064a34 0%, var(--green) 45%, var(--green-deep) 100%);
}
.film canvas { width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .8s linear; }
.has-film .film canvas { opacity: 1; }
.film-lost .film canvas { display: none; }
.probe { position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; z-index: 20; pointer-events: none; display: none; }
.has-film .probe { display: block; }
.film-lost .probe { display: none; }
.film__shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(130% 100% at 50% 45%, transparent 42%, rgba(0, 20, 14, .62) 100%),
    linear-gradient(to bottom, rgba(0, 26, 18, .4) 0, transparent 12%, transparent 84%, rgba(0, 26, 18, .6) 100%);
}
main { position: relative; z-index: 1; }

/* ───────── logo and one line ───────── */
.brand { padding: 22vh var(--gutter) 10vh; }
.brand__logo img { width: clamp(150px, 15vw, 212px); height: auto; }
.brand__line { margin-top: 8px; max-width: 32em; font-size: clamp(1rem, 1.3vw, 1.2rem); font-weight: 500; line-height: 1.45; color: var(--white); text-wrap: balance; }

/* ───────── the top row: the two legal texts and contact ───────── */
.top {
  position: absolute; z-index: 30; top: 16px; left: var(--gutter); right: var(--gutter);
  display: flex; align-items: center; justify-content: flex-end; gap: 24px; pointer-events: none;
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
}
.top a { pointer-events: auto; text-decoration: none; color: var(--muted); white-space: nowrap; transition: color .25s, box-shadow .25s; }
.top a:hover { color: var(--coral); }
.top .contact {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 20px;
  color: var(--white); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .42);
  font-size: .78rem; font-weight: 600; letter-spacing: .14em;
}
.top .contact:hover { box-shadow: inset 0 0 0 1px var(--coral); }
.live .top { position: fixed; }

/* ───────── the legal texts: dialogs that scroll in themselves ───────── */
.doc {
  width: min(760px, calc(100vw - 28px)); max-height: min(88vh, 860px); max-height: min(88dvh, 860px); padding: clamp(22px, 4vw, 46px);
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  color: var(--text); background: rgba(0, 28, 20, .97); border: 1px solid var(--line);
}
.doc::backdrop { background: rgba(0, 16, 11, .72); }
.doc__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.doc__title { font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.05; font-weight: 600; text-transform: uppercase; color: var(--white); }
.doc__close {
  flex: none; padding: 9px 16px; background: none; border: 1px solid rgba(255, 255, 255, .42); color: var(--white); cursor: pointer;
  font: 600 .72rem/1 var(--font); letter-spacing: .14em; text-transform: uppercase;
}
.doc__close:hover { color: var(--coral); border-color: var(--coral); }
.doc__sub { margin-top: 10px; color: var(--muted); letter-spacing: .04em; }
.doc__rule { width: 60px; height: 3px; margin: 20px 0 26px; background: var(--coral); }
.doc__body h3 { margin: 30px 0 8px; font-size: 1.05rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--white); }
.doc__body h3:first-child { margin-top: 0; }
.doc__body p { margin-top: 12px; }
.doc__body ul { margin: 12px 0 12px 1.2em; list-style: square; }
.doc__body ul li::marker { color: var(--coral); }
.doc__body strong { color: var(--white); font-weight: 600; }
/* without script they are ordinary text at the end of the page */
html:not(.js) .doc { display: block; position: static; max-height: none; margin: 0 auto 8vh; }
html:not(.js) .doc__close { display: none; }

/* ───────── the stage ───────── */
html.live, .live body { height: 100%; overflow: hidden; overscroll-behavior: none; }
.live .stage { position: fixed; inset: 0; pointer-events: none; }
.live .stage::before {                       /* keeps the words readable in front of the picture */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(52% 62% at 0% 100%, rgba(0, 26, 18, .92) 0%, rgba(0, 26, 18, .58) 45%, rgba(0, 26, 18, 0) 100%);
}
.live .brand { position: absolute; left: 0; bottom: 0; padding: 0 var(--gutter) 20px; pointer-events: auto; }

/* the shape can be taken hold of and turned, and pressed */
.has-film.live body { cursor: grab; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.has-film.live a, .has-film.live button { cursor: pointer; }
.has-film.live .brand, .has-film.live .doc { cursor: auto; -webkit-user-select: text; user-select: text; }
.is-grabbing body, .is-grabbing body * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }

/* ───────── narrow screens ───────── */
@media (max-width: 899px) {
  body { font-size: 1rem; }
  .brand__line { font-size: .98rem; }
  .live .stage::before { background: linear-gradient(to bottom, rgba(0, 26, 18, 0) 56%, rgba(0, 26, 18, .85) 80%, rgba(0, 26, 18, .95)); }
  .brand__line { margin-top: 6px; }
  .live .brand { padding-bottom: 18px; }
  .top { top: 10px; gap: 16px; font-size: .6rem; letter-spacing: .13em; }      /* the two texts on the left, contact on the right */
  .top .contact { margin-left: auto; font-size: .72rem; padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}
