/* Heima Eluvia · coming soon. Phones first: most visitors come on one.

   Type (the brand rules): the name only as the wordmark (capitals, Commissioner 100, wide
   tracking, never wrapping); the claim in Slabo, in curly quotes; the small line in light
   Commissioner. Colour: no shadow, outline or box behind the type; each line takes the colour
   of what is behind it, lighter or darker, until it stands out at least 7:1. */
@font-face {
  font-family: "Commissioner";
  src: url("../fonts/Commissioner.woff2") format("woff2");
  font-weight: 100 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Slabo 27px";
  src: url("../fonts/Slabo27px.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --sky: #cde5f9;       /* the picture's own flat sky, carried on above it */
  --ink-sky: #424950;   /* the sky's colour, darkened to 7:1 */
  --ink-sea: #e2e8ef;   /* the sea's colour, lightened to 7:1 on its lightest water */
  --lift: 30vh;         /* how far down the picture starts */
  --screen: 100vh;
}
@supports (height: 100dvh) {
  :root { --lift: 30dvh; --screen: 100dvh; }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--sky); overflow: hidden; }
body { font-family: Commissioner, sans-serif; font-weight: 300; color: var(--ink-sky); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
main { position: fixed; left: 0; right: 0; top: 0; height: var(--screen); overflow: hidden; }

/* ---------- The picture ----------
   Upright screens: the whole height of the picture, from the lift to the bottom, cut to the
   part with the whale. */
.view {
  position: absolute; left: 0; top: var(--lift); width: 100%; height: calc(var(--screen) - var(--lift));
  object-fit: cover; object-position: 31% 0;
  transform-origin: 50% 0; animation: settle 20s ease-out both;
}
@keyframes settle { from { transform: scale(1.035); } to { transform: scale(1); } }

/* ---------- The name and the claim, in the sky ---------- */
.sky {
  position: absolute; left: 0; right: 0; top: 0; height: calc(var(--lift) + 9vh);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: max(2vh, env(safe-area-inset-top)) 6vw 0;
  animation: arrive 2.4s ease both;
}
.wm {
  margin: 0; font-weight: 100; text-transform: uppercase; letter-spacing: .32em; margin-right: -.32em;
  line-height: 1.1; white-space: nowrap; font-size: clamp(20px, 7.2vw, 46px);
}
.verse {
  font-family: "Slabo 27px", serif; line-height: 1.6; margin: 2.6vh 0 0;
  font-size: clamp(17px, 4.9vw, 30px);
}

/* ---------- The line at the bottom, on the sea ---------- */
.foot {
  position: absolute; left: 0; right: 0; bottom: max(7vh, calc(env(safe-area-inset-bottom) + 20px));
  margin: 0; text-align: center; color: var(--ink-sea);
  font-weight: 300; letter-spacing: .14em; font-size: clamp(13px, 3.6vw, 18px);
  animation: arrive 2.4s ease .6s both;
}
@keyframes arrive { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Wide screens: the layout of the presentation ----------
   The picture at full screen size, lowered, its lower part running off the bottom. */
@media (min-aspect-ratio: 1/1) {
  .view { height: var(--screen); object-position: 50% 50%; }
  .sky { height: calc(var(--lift) + 13vh); padding: 2vh 14vw 0; }
  .wm { font-size: clamp(26px, 3.6vw, 68px); }
  .verse { font-size: clamp(18px, 1.9vw, 36px); margin-top: 3.4vh; }
  .foot { bottom: 9vh; font-size: clamp(12px, .95vw, 18px); }
}

/* ---------- A phone on its side: very little height ----------
   The name and the claim (on one line) keep to a thin band of sky; the picture is cut so that
   its own sky still starts it and the bottom line stays on dark water. */
@media (orientation: landscape) and (max-height: 480px) {
  :root { --lift: 24vh; }
  .view { object-position: 50% 35%; }
  .sky { height: var(--lift); padding: max(3vh, env(safe-area-inset-top)) 6vw 0; }
  .wm { font-size: clamp(18px, 6.6vh, 30px); }
  .verse { font-size: clamp(14px, 4.6vh, 20px); line-height: 1.3; margin-top: 2.4vh; }
  .verse br { display: none; }
  .foot { bottom: max(5vh, env(safe-area-inset-bottom)); font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .view, .sky, .foot { animation: none; }
}
