/* CiiWaves coming-soon page. Colours and motion come from brand/brand.json. */
@font-face { font-family: "Hanken Grotesk"; src: url("/assets/fonts/hanken-grotesk-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader-italic-latin.woff2") format("woff2"); font-style: italic; font-weight: 200 800; font-display: swap; }

:root {
  --paper: #EEF3F1;
  --paper-deep: #DCE9E6;
  --ink: #0B2A33;
  --muted: #455B61;
  --mark: #0F6B6B;
  --tile: #0B2A33;
  --tile-mark: #7CCFC1;
  --rule: rgba(11, 42, 51, .14);
  --chip: rgba(255, 255, 255, .62);
  --s1: rgba(15, 107, 107, .10); --s2: rgba(15, 107, 107, .16); --s3: rgba(15, 107, 107, .22);
  --glow: rgba(124, 207, 193, .45);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --text: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --gutter: max(22px, env(safe-area-inset-left), env(safe-area-inset-right));
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #08171C;
    --paper-deep: #0D2A31;
    --ink: #EAF2F1;
    --muted: #9DB1B5;
    --mark: #7CCFC1;
    --tile: #0F3A42;
    --rule: rgba(232, 240, 239, .16);
    --chip: rgba(232, 240, 239, .08);
    --s1: rgba(124, 207, 193, .07); --s2: rgba(124, 207, 193, .11); --s3: rgba(124, 207, 193, .17);
    --glow: rgba(124, 207, 193, .20);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--paper); }
body {
  margin: 0; color: var(--ink);
  font: 400 16px/1.55 var(--text);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

.app {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-rows: auto 1fr auto;
  padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  background:
    radial-gradient(120% 60% at 50% 0%, var(--glow), transparent 60%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper) 45%, var(--paper-deep) 100%);
}

/* the sea: three swells at the foot of the page */
.sea { position: absolute; inset: auto 0 0 0; height: 46%; z-index: -1; pointer-events: none; }
/* each swell is its own layer, 14.8% wider than the sea and padded past both edges, so it can move without showing an edge */
.swell { position: absolute; left: -7.42%; bottom: 0; width: 114.84%; max-width: none; height: 100%; display: block; }
.s1 { fill: var(--s1); } .s2 { fill: var(--s2); } .s3 { fill: var(--s3); }

/* top bar, like a native navigation bar */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.home { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); border-radius: 10px; padding: 6px 0; text-decoration: none; }
.home:focus-visible { outline: 2px solid var(--mark); outline-offset: 4px; }
.sym { width: 28px; height: 28px; display: block; color: var(--mark); }
.word { height: 15px; width: auto; display: block; fill: var(--ink); }
.status {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 13px; border-radius: 999px;
  background: var(--chip); border: 1px solid var(--rule); color: var(--ink);
  font-size: 13px; font-weight: 500; letter-spacing: .01em; white-space: nowrap;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mark); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mark) 22%, transparent); }

/* the stage: an app's welcome screen. Centred, calm. */
.stage { align-self: center; justify-self: center; width: 100%; max-width: 40rem; text-align: center; padding: 8px 0 12vh; display: flex; flex-direction: column; align-items: center; }
.tile {
  width: 104px; height: 104px; border-radius: 24.4%; display: grid; place-items: center; margin-bottom: 36px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--tile) 84%, #fff) 0%, var(--tile) 70%);
  color: var(--tile-mark);
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 20px 44px -14px rgba(11, 42, 51, .45), 0 2px 6px rgba(11,42,51,.18);
}
.tile svg { width: 58%; height: 58%; display: block; }
.line {
  margin: 0; font: italic 400 clamp(2.9rem, 13.2vw, 4.4rem)/1.02 var(--display);
  letter-spacing: -.02em; text-wrap: balance; font-variation-settings: "opsz" 72;
}
.note { margin: 26px 0 0; max-width: 24rem; color: var(--muted); font-size: 16.5px; line-height: 1.6; text-wrap: balance; }
.note em { font-style: normal; color: var(--ink); font-weight: 500; }

.foot {
  position: relative; display: flex; justify-content: space-between; gap: 16px;
  padding: 18px 0 22px; color: var(--ink); font-size: 13px;
}


@media (min-width: 760px) {
  :root { --gutter: 56px; }
  .bar { height: 92px; }
  .sym { width: 34px; height: 34px; }
  .word { height: 18px; }
  .tile { width: 128px; height: 128px; margin-bottom: 44px; }
  .line { font-size: clamp(4.2rem, 7vw, 6.6rem); }
  .note { font-size: 19px; max-width: 30rem; margin-top: 32px; }
  .stage { padding-bottom: 14vh; }
  .sea { height: 52%; }
  .foot { padding: 22px 0 30px; font-size: 14px; }
}
@media (min-width: 1280px) {
  .app { padding-left: max(64px, calc((100vw - 1200px) / 2)); padding-right: max(64px, calc((100vw - 1200px) / 2)); }
}

/* motion: only the sea moves. Each swell rolls sideways and rises and falls on its own calm cycle, out of step with the others:
   the back layer is slowest and travels least, the front one is quickest and travels most, which gives depth. The travel stays inside
   the 7.42% each layer is padded by, so no edge ever shows. Transforms only (composited, no repaint), off for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .swell { --dx: 4%; --dy: 12px; will-change: transform; animation: swell 11s ease-in-out infinite; }
  .swell.s1 { --dx: 3%; --dy: 9px; animation-duration: 14s; animation-delay: -5s; }
  .swell.s2 { --dx: 4%; --dy: 13px; animation-duration: 11s; animation-delay: -3s; animation-direction: reverse; }
  .swell.s3 { --dx: 5%; --dy: 17px; animation-duration: 8.5s; animation-delay: -2s; }
}
@keyframes swell {
  0%, 100% { transform: translate3d(calc(var(--dx) * -1), 0, 0); }
  50% { transform: translate3d(var(--dx), var(--dy), 0); }
}
