/* Thinking out loud. One page, phone first.
   The look is the one ruled on 22 Nov 2026 (brand/README.md): the lit sky is the banner, the logo
   leads in Tide, the palette comes from the sunset photo, and granite stays the everyday ground.
   One face, Schibsted Grotesk, at 700 and 400. One corner radius. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/SchibstedGrotesk-latin.ttf") format("truetype");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --granite: #25282b;
  --bone: #ecebe6;
  --ink: #121417;
  --tide: #1f6b7f;            /* the logo's colour, the sea, and buttons */
  --tide-deep: #185a6b;
  --ember: #fca08c;           /* the light on the horizon; the full stop on a dark ground */
  --soft: #a9afb3;            /* the quiet line on granite */
  --ground: var(--bone);      /* the one light section; dark mode swaps these two */
  --text: var(--ink);
  --radius: 6px;
  --gutter: 16px;
  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --ground: var(--ink); --text: var(--bone); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--granite);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  font-weight: 400;
}
h1, h2, p, dl, dt, dd { margin: 0; }

.in {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px));
}

a:focus-visible {
  outline: 3px solid var(--bone);
  outline-offset: 3px;
  box-shadow: 0 0 0 9px var(--ink);
}

/* The logo: bone on Tide, the name beside the mark, the gap between them one hole wide. */
.top { background: var(--tide); }
.top .in { padding-block: 16px; }
.brand { display: flex; align-items: center; gap: 16px; font-size: clamp(18px, 5.6vw, 21px); line-height: 1; font-weight: 700; letter-spacing: -0.03em; white-space: nowrap; }
.mark { width: 64px; height: auto; flex: none; }
.stop { color: var(--ember); }

/* The first screen is the living sky, drawn by sky.js from the visitor's own clock. The still sky
   here is what shows first, and what stays if the device cannot draw the live one.
   The words turn from bone to ink when the sky is a light one. */
.open {
  position: relative; isolation: isolate; display: flex; overflow: hidden;
  min-height: calc(100svh - 61px); color: var(--bone); transition: color 0.6s;
  background: linear-gradient(to top, #1f6b7f 0, #164a58 15%, transparent 15%), radial-gradient(ellipse 80% 30% at 55% 85%, #fca08c 0%, #ef4f62 36%, rgba(239,79,98,0) 100%), linear-gradient(to top, #5a2c56 15%, #432b58 50%, #2c2140 100%);
}
.open.lt { color: var(--ink); }
.sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: -1; }
.open:not(.live) .sky { display: none; }
.open .in { display: flex; flex-direction: column; align-items: flex-start; padding-block: 28px max(24px, env(safe-area-inset-bottom, 0px)); }
.promise { font-size: clamp(38px, 5.2vw + 20px, 76px); line-height: 1.02; font-weight: 700; letter-spacing: -0.035em; max-width: 9em; text-wrap: balance; }
.welcome { font-size: clamp(20px, 1.2vw + 16px, 28px); line-height: 1.3; margin-top: 0.6em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 24px;
  background: var(--tide); color: #ffffff;
  border-radius: var(--radius);
  font-size: 17px; font-weight: 700; text-decoration: none;
  transition: background-color 120ms ease;
}
.btn:hover { background: var(--tide-deep); }
.open .btn { margin-top: auto; width: 100%; }

/* Who is behind it, and what the firm does. The one light section. */
.does { background: var(--ground); color: var(--text); padding-block: 56px 64px; }
.does .in { display: grid; gap: 28px; }
.beats { display: grid; gap: 0.34em; max-width: 17em; font-size: clamp(26px, 2.4vw + 17px, 42px); line-height: 1.1; font-weight: 700; letter-spacing: -0.025em; text-wrap: balance; }
.does h2 { font-size: clamp(19px, 0.8vw + 16px, 24px); line-height: 1.35; font-weight: 400; max-width: 30em; }
.loop { display: grid; }
.loop > div { display: grid; gap: 4px; padding-block: 18px; border-top: 2px solid var(--text); }
.loop dt { font-size: clamp(32px, 2.4vw + 23px, 46px); line-height: 1; font-weight: 700; letter-spacing: -0.04em; }
.loop dd { max-width: 24em; }

/* The one way to reach him, said once more on the logo's own colour. */
.ask { background: var(--tide); color: var(--bone); padding-block: 56px 64px; }
.ask .in { display: grid; gap: 24px; justify-items: start; }
.ask h2 { font-size: clamp(28px, 2.6vw + 18px, 44px); line-height: 1.1; font-weight: 700; letter-spacing: -0.025em; max-width: 13em; text-wrap: balance; }
.ask .btn { background: var(--bone); color: var(--ink); width: 100%; }
.ask .btn:hover { background: #ffffff; }

.foot { padding-block: 28px 40px; font-size: 14.5px; color: var(--soft); }
.foot .in { display: grid; gap: 6px; }
.foot p:first-child { color: var(--bone); font-weight: 700; }
.foot a { color: var(--bone); text-underline-offset: 3px; }

/* Wider than a phone: the three words in a row, the button under the words. */
@media (min-width: 600px) {
  :root { --gutter: 32px; }
  .top .in { padding-block: 20px; }
  .brand { font-size: 24px; gap: 19px; }
  .mark { width: 76px; }
  .open { min-height: calc(100svh - 72px); }
  .open .in { padding-block: 64px 48px; }
  .open .btn { margin-top: 36px; width: auto; }
  .ask .btn { width: auto; }
  .does, .ask { padding-block: 80px 88px; }
  .does .in { gap: 36px; }
  .loop { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; }
  .loop > div { align-content: start; gap: 10px; padding-bottom: 26px; }
}

@media (prefers-reduced-motion: reduce) { .btn, .open { transition: none; } }
