/* site.css — the shell every public page wears, in the VIDEO's poster
   language: one face (Orbitron), ink and paper, and the one orange spent on
   the thing a block is about, always with black type on it. Every page is a
   full-window picture (the live sea, the sea alone, the chart) with the words
   standing on it the way the banner's do: flat plates, no shadows, hard
   pixels. Phone first: the design is the phone's, the desktop has room. The
   pages' own parts live beside this file (journey.css, store.css, about.css). */

:root {
  --paper: #ffffff;
  --ink: #12151a;
  --accent: #f77622;      /* Endesga's orange: black type on it, never bare type */
  --sea: #2a90cf;         /* the day sea, what shows before the picture does */
  --dim: #5c646e;
  --panel: #eceff3;
  --gutter: 16px;
  --top: 68px;            /* the header's height: what a page keeps clear under it */
  --face: "Orbitron", "Eurostile", "Bank Gothic", Arial, sans-serif;
  /* Bayer tiles: the dither as a surface, two screen px a dot */
  --d25: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Crect width='1' height='1' fill='%2312151a'/%3E%3C/svg%3E");
  --d50: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Crect width='1' height='1' fill='%2312151a'/%3E%3Crect x='1' y='1' width='1' height='1' fill='%2312151a'/%3E%3C/svg%3E");
  --d75: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Crect width='2' height='2' fill='%2312151a'/%3E%3Crect x='1' width='1' height='1' fill='%23ffffff' fill-opacity='0'/%3E%3C/svg%3E");
  --d50p: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Crect width='1' height='1' fill='%23ffffff'/%3E%3Crect x='1' y='1' width='1' height='1' fill='%23ffffff'/%3E%3C/svg%3E");
  --d25p: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Crect width='1' height='1' fill='%23ffffff'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--sea); color: var(--ink); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--face); font-weight: 400; font-size: 14px; line-height: 1.6;
  min-height: 100vh; min-height: 100dvh; overflow-x: hidden;
}
canvas, img.px { image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.glyph { display: inline-block; width: 48px; height: 48px; shape-rendering: crispEdges; vertical-align: middle; }
svg.glyph.s { width: 24px; height: 24px; flex: 0 0 24px; }

/* ---------------------------------------------------------------- the picture
   Every page stands on one full-window canvas, drawn at a few pixels a dot
   and blown up whole-pixel. It is behind everything and takes no clicks
   unless the page says so (the journey's boat turns by hand). */
.sea { position: fixed; inset: 0; z-index: 0; display: block; background: var(--sea); }
.sea canvas { display: block; transform-origin: 0 0; }
.sea.live { touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.sea.live:active { cursor: grabbing; }
/* the water is the whole window: its focus ring has to sit inside it */
.sea.live:focus-visible { outline: 3px solid var(--accent); outline-offset: -6px; }

/* ---------------------------------------------------------------- type */
.tag {
  display: inline-block; font-weight: 500; font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  line-height: 1; padding: 7px 9px 6px; background: var(--ink); color: var(--paper); white-space: nowrap; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; vertical-align: middle;
}
.tag.acc { background: var(--accent); color: var(--ink); font-weight: 700; }
.tag.paper { background: var(--paper); color: var(--ink); }
.kick { font-weight: 500; font-size: 10px; letter-spacing: 3px; text-transform: uppercase; }
/* the video's rimmed type: paper with an ink edge all round, so it stands
   straight on the picture with no plate under it */
.rim { color: var(--paper); text-shadow: 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 2px 0 var(--ink), 0 -2px 0 var(--ink), 2px 2px 0 var(--ink), -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink); }
h1, h2, h3 { font-weight: 900; text-transform: uppercase; line-height: 1.15; }
h2 { font-size: 16px; letter-spacing: 2px; }
p { max-width: 36em; }
.small { font-size: 12px; }
/* the wordmark, as the banner prints it: the biggest line on the page */
.word { font-weight: 900; font-size: clamp(44px, 13vw, 128px); letter-spacing: 0.02em; line-height: 1; text-transform: uppercase; }
/* the video's ruler: a rule with ticks */
.ruler { flex: 1; height: 12px; min-width: 24px; align-self: center;
  background:
    linear-gradient(var(--ink), var(--ink)) 0 100% / 100% 2px no-repeat,
    repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 10px) 0 100% / 100% 7px no-repeat; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  min-height: 44px; padding: 12px 16px; background: var(--ink); color: var(--paper); text-decoration: none; border: 2px solid var(--ink); }
.btn.acc { background: var(--accent); color: var(--ink); border-color: var(--ink); }
.btn.paper { background: var(--paper); color: var(--ink); }
.btn:hover { background-image: var(--d25p); background-size: 4px 4px; }
.btn.acc:hover, .btn.paper:hover { background-image: var(--d25); }

/* ---------------------------------------------------------------- the header
   The mark at the left, the three pages in the middle of the window on every
   screen: a three-column grid whose outer columns match, so the menu sits on
   the window's own centre line whatever the mark is wide. It floats on the
   picture; the pages keep --top clear under it. */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: var(--top);
  display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; padding: 0 var(--gutter);
  pointer-events: none;
}
.top > * { pointer-events: auto; }
.logo { display: block; width: 40px; height: 40px; justify-self: start; }
.logo img { display: block; width: 40px; height: 40px; }
/* the menu sits on the window's own centre line: the columns either side
   of it match, so the mark never pushes it */
.menu { display: flex; gap: 4px; justify-self: center; }
.menu a {
  display: block; font-weight: 500; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; text-decoration: none;
  line-height: 1; padding: 17px 10px 16px; background: var(--ink); color: var(--paper); white-space: nowrap;
}
/* a page that scrolls carries its header with it and its corner at its foot */
body[data-page="store"] .top, body[data-page="about"] .top, body[data-page="terms"] .top { position: absolute; }
body[data-page="store"] .corner, body[data-page="about"] .corner, body[data-page="terms"] .corner { position: static; margin: 48px 0 0; }
.menu a[aria-current="page"] { background: var(--accent); color: var(--ink); font-weight: 700; }
.menu a:hover:not([aria-current="page"]) { background-image: var(--d25p); background-size: 4px 4px; }

/* ---------------------------------------------------------------- the foot
   A corner line: the terms, and a page's one note beside them. */
.corner { position: fixed; left: var(--gutter); bottom: calc(var(--gutter) + env(safe-area-inset-bottom, 0px)); z-index: 20; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.corner a, .corner span { display: block; font-weight: 500; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; text-decoration: none;
  line-height: 1; padding: 17px 10px 16px; background: var(--ink); color: var(--paper); white-space: nowrap; }
.corner span { padding: 17px 10px 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.corner a:hover { background-image: var(--d25p); background-size: 4px 4px; }

/* ---------------------------------------------------------------- the cookie note
   One plate at the foot of the window until it is answered; the answer is
   kept in the browser, which is the only thing this site keeps there. */
.cookie {
  position: fixed; left: var(--gutter); right: var(--gutter); bottom: calc(var(--gutter) + env(safe-area-inset-bottom, 0px)); z-index: 30;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 14px;
  background: var(--paper); color: var(--ink); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  max-width: 560px; margin: 0 auto;
}
.cookie[hidden] { display: none; }
.cookie p { font-size: 12px; line-height: 1.5; flex: 1 1 220px; max-width: none; }
.cookie p a { font-weight: 700; }
.cookie .btn { min-height: 40px; padding: 10px 14px; }

/* ---------------------------------------------------------------- a text page
   The terms: paper, read top to bottom, the header above it. */
.sheet { position: relative; z-index: 1; max-width: 680px; padding: calc(var(--top) + 24px) var(--gutter) 96px; margin: 0 auto; }
.sheet .card { background: var(--paper); border: 2px solid var(--ink); padding: 18px 16px; }
body[data-page="terms"] { background: var(--sea) var(--d25) 0 0 / 4px 4px; }
.sheet h1 { font-size: 24px; letter-spacing: 1px; margin-bottom: 12px; }
.sheet h2 { margin: 22px 0 8px; }
.sheet p { font-size: 14px; margin: 0 0 10px; }
.sheet ul { margin: 0 0 10px 18px; font-size: 14px; }
.sheet li { margin: 0 0 4px; }

/* ---------------------------------------------------------------- the pop-up
   One window over the page, in the same hand: a paper plate with an ink edge. */
.pop { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; margin: 0; color: var(--ink); }
.pop:not([open]) { display: none; }   /* a browser without <dialog> would show it inline */
.pop::backdrop { background: var(--d50) 0 0 / 4px 4px; }
.pop[open] { display: flex; align-items: center; justify-content: center; padding: var(--gutter); }
.pop .win { position: relative; background: var(--paper); border: 2px solid var(--ink); width: min(100%, 520px); max-height: 100%; overflow: auto; padding: 16px; }
.pop .x { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--ink); color: var(--paper); font-weight: 700; font-size: 16px; }
.pop .x:hover { background-image: var(--d25p); background-size: 4px 4px; }

/* a phone too narrow for the row: the menu drops under the mark */
@media (max-width: 359px) {
  :root { --top: 112px; }
  .top { grid-template-columns: 1fr; grid-template-rows: 40px auto; align-content: start; row-gap: 8px; padding-top: 10px; }
}
@media (min-width: 600px) {
  :root { --gutter: 24px; --top: 72px; }
  .top { grid-template-columns: 44px 1fr 44px; }
  .logo, .logo img { width: 44px; height: 44px; }
  .menu a { font-size: 11px; letter-spacing: 2px; padding: 17px 14px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
