/* dataflywheel.app · launch page.
   Layout: one deep blue world. The df mark draws itself at the top of a centred column, the statement under it,
   «Coming soon» under that, a thin footer at the bottom. A canvas behind carries the data points into the bowl.
   Colours: brand/system/tokens.css. Mark motion: brand/logo-df/df-logo.html (hero), reused as is. */

:root {
  --df-sys-color-primary: #0c4fe4;
  --df-sys-color-on-primary: #ffffff;
  --df-sys-color-on-primary-container: #003ab2;
  --df-sys-color-inverse-primary: #b6c4ff;
  --df-sys-color-primary-fixed: #dce1ff;

  --world: var(--df-sys-color-primary);
  --world-deep: var(--df-sys-color-on-primary-container);
  --ink: var(--df-sys-color-on-primary);
  --ink-soft: var(--df-sys-color-primary-fixed);
  --hair: rgba(255, 255, 255, 0.2);
  --signing: #d0d9ff;              /* the phrase's pale start (4.6:1 on the blue), between inverse-primary and primary-fixed */
  --chalk: var(--df-sys-color-on-primary);
  --mk-ink: var(--df-sys-color-on-primary);

  --f-sans: "Google Sans Flex", "Google Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 64px);
  --dur: 2.8s;
  --delay: 0.25s;

  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  background: var(--world);
  touch-action: manipulation;       /* quick taps release points; no double-tap zoom (pinch zoom stays) */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--world);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* The world: flat brand blue in the middle, deepening to the darker blue at the edges. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 120% 100% at 50% 38%, var(--world) 0%, var(--world) 34%, var(--world-deep) 100%);
}

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* The column: mark, statement, label. */
.stage {
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  row-gap: clamp(24px, 4.6vh, 52px);
  padding-block: clamp(36px, 9vh, 112px) clamp(28px, 6vh, 80px);
  min-width: 0;
}

h1 { margin: 0; font-size: inherit; line-height: 0; }
p { margin: 0; }
svg { display: block; }

.hero-mark { width: clamp(150px, min(52vw, 36vh), 520px); }
.hero-mark svg { width: 100%; height: auto; overflow: visible; }

.statement {
  max-width: min(20em, 100%);
  font-size: clamp(1.375rem, 0.9rem + 1.5vw + 0.6vh, 3.5rem);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.statement .l1,
.statement .l2 { color: var(--chalk); }
/* Narrow phones: the signed phrase keeps together on its own line(s). */
@media (max-width: 480px) {
  .statement .l1,
  .statement .l2 { display: block; }
}

.soon {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(14px, 0.8rem + 0.2vw, 16px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.soon span { margin-right: -0.16em; }
.soon::before,
.soon::after {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding-top: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--hair);
  font-size: clamp(13px, 0.7rem + 0.25vw, 15px);
  line-height: 1.4;
  color: var(--ink-soft);
}

/* Short landscape phones: mark on the left, words on the right. */
@media (orientation: landscape) and (max-height: 540px) and (max-width: 940px) {
  .stage {
    grid-template-columns: auto minmax(0, 32rem);
    justify-content: center;
    justify-items: start;
    align-items: center;
    text-align: left;
    column-gap: clamp(24px, 5vw, 56px);
    row-gap: 14px;
    padding-block: max(20px, env(safe-area-inset-top, 0px)) 20px;
  }
  .hero-mark { grid-row: 1 / span 2; align-self: center; width: clamp(96px, 34vh, 200px); }
  .statement { align-self: end; max-width: none; font-size: clamp(1.125rem, 0.75rem + 1.6vw, 1.75rem); }
  .soon { align-self: start; }
  .soon::after { display: none; }
}

/* The 404 page: the same world, the still mark, one line and a way home. */
.lost .hero-mark { width: clamp(96px, min(30vw, 22vh), 200px); }
.lost h1 {
  max-width: min(18em, 100%);
  font-size: clamp(1.5rem, 1rem + 1.6vw + 0.4vh, 3rem);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.home {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--chalk);
  color: var(--world);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
}
.home:hover { background: var(--ink-soft); }
.home:focus-visible {
  outline: 2px solid var(--chalk);
  outline-offset: 4px;
}
@media (orientation: landscape) and (max-height: 540px) and (max-width: 940px) {
  .lost .hero-mark { grid-row: 1 / span 2; width: clamp(80px, 30vh, 160px); }
  .lost h1 { align-self: end; max-width: none; font-size: clamp(1.25rem, 0.8rem + 1.6vw, 2rem); }
  .home { align-self: start; }
}

/* Mark motion, from the logo page: the base state is the finished logo; .play runs the sequence once (2.5 s). */
.df-anim .ring { opacity: 0; }
.df-anim .ring-spin { transform-box: view-box; transform-origin: 35.5px 64px; }
.df-anim .ring-mask,
.df-anim .hook-mask { stroke-dasharray: 100 100; stroke-dashoffset: 0; }
.df-anim .stem { opacity: 0; }
.df-anim .bar { transform-box: fill-box; transform-origin: 0 50%; }
.df-anim .press { transform-box: view-box; transform-origin: 50px 89px; }
.play .hero-mark .ring { animation: dfRing var(--dur) linear var(--delay) both; }
.play .hero-mark .ring-spin { animation: dfSpin var(--dur) linear var(--delay) both; }
.play .hero-mark .ring-mask { animation: dfRingDraw var(--dur) linear var(--delay) both; }
.play .hero-mark .stem { animation: dfStem var(--dur) linear var(--delay) both; }
.play .hero-mark .lower { animation: dfLower var(--dur) linear var(--delay) both; }
.play .hero-mark .press { animation: dfPress var(--dur) linear var(--delay) both; }
.play .hero-mark .hook-mask { animation: dfHook var(--dur) linear var(--delay) both; }
.play .hero-mark .bar { animation: dfBar var(--dur) linear var(--delay) both; }
.play .statement .l2 { animation: dfSigned var(--dur) linear var(--delay) both; }
@keyframes dfRing { 0% { opacity: 0 } 4% { opacity: 1 } 51.9% { opacity: 1 } 52%, 100% { opacity: 0 } }
@keyframes dfSpin { 0% { transform: rotate(-420deg) scale(.82); animation-timing-function: cubic-bezier(.25, .5, .3, 1) } 40%, 100% { transform: rotate(0deg) scale(1) } }
@keyframes dfRingDraw { 0% { stroke-dashoffset: 94; animation-timing-function: cubic-bezier(.42, .08, .36, 1) } 38%, 100% { stroke-dashoffset: 0 } }
@keyframes dfStem { 0%, 36% { opacity: 0; transform: translateY(-38px); animation-timing-function: cubic-bezier(.6, 0, .9, .45) } 40% { opacity: 1 } 52% { opacity: 1; transform: translateY(0) } 52.1%, 100% { opacity: 0; transform: translateY(0) } }
@keyframes dfLower { 0%, 51.9% { opacity: 0 } 52%, 100% { opacity: 1 } }
@keyframes dfPress { 0%, 52% { transform: scale(1); animation-timing-function: cubic-bezier(.3, 0, .5, 1) } 55% { transform: scale(.972); animation-timing-function: cubic-bezier(.3, 0, .3, 1) } 62%, 100% { transform: scale(1) } }
@keyframes dfHook { 0%, 54% { stroke-dashoffset: 100; animation-timing-function: cubic-bezier(.45, 0, .3, 1) } 74%, 100% { stroke-dashoffset: 0 } }
@keyframes dfBar { 0%, 74% { transform: scaleX(0); animation-timing-function: cubic-bezier(.2, .7, .2, 1) } 90%, 100% { transform: scaleX(1) } }
@keyframes dfSigned { 0%, 84% { color: var(--signing) } 92%, 100% { color: var(--chalk) } }

@media (prefers-reduced-motion: reduce) {
  .play .hero-mark *,
  .play .statement .l2 { animation: none !important; }
  #field { display: none; }
}
