/*
 * velent.app in Horizon, the app's look: its colour follows the sun
 * (dawn, day, night, set on <html data-phase> from the visitor's clock),
 * Bricolage Grotesque for display and Instrument Sans for text. Every
 * value is lifted from lib/v3/theme/v3_horizon_tokens.dart.
 */

:root,
[data-phase="day"] {
  --sky: #dcebef;
  --sky-title: #0f2a33;
  --sky-ink: #4e6870;
  --glass: rgba(255, 255, 255, 0.6);
  --ground: #fafcfc;
  --ink: #12262b;
  --meta: #5c7076;
  --divider: #e6eef0;
  --check-border: #c3d3d7;
  --accent: #1c7482;
  --accent-text: #176572;
  --on-accent: #ffffff;
  --accent-soft: #e0f0f1;
  --surface: #eaf2f4;
  --surface-border: #e1ecee;
  --outline: #cfdde0;
  --card: #ffffff;
  --shadow: rgba(15, 42, 51, 0.12);
  --hill-near: #4a8683;
  color-scheme: light;
}

[data-phase="dawn"] {
  --sky: #f9e0cc;
  --sky-title: #3a1f2e;
  --sky-ink: #6e4a55;
  --glass: rgba(255, 255, 255, 0.55);
  --ground: #fffbf8;
  --ink: #2b1b26;
  --meta: #7a6670;
  --divider: #f2e7e2;
  --check-border: #d9c7c1;
  --accent: #c24a2b;
  --accent-text: #b2482a;
  --on-accent: #ffffff;
  --accent-soft: #fbe9e1;
  --surface: #fbefe8;
  --surface-border: #f1e3dc;
  --outline: #d8cfcb;
  --card: #ffffff;
  --shadow: rgba(110, 50, 60, 0.14);
  --hill-near: #8e4f6e;
  color-scheme: light;
}

[data-phase="night"] {
  --sky: #1e1c40;
  --sky-title: #f0eeff;
  --sky-ink: #b4b0d8;
  --glass: rgba(255, 255, 255, 0.1);
  --ground: #131228;
  --ink: #eceafb;
  --meta: #a29fc4;
  --divider: #22203f;
  --check-border: #4a4776;
  --accent: #b3a5ff;
  --accent-text: #c4b9ff;
  --on-accent: #17152e;
  --accent-soft: #2a2654;
  --surface: #1c1a36;
  --surface-border: #2a2850;
  --outline: #3d3b67;
  --card: #1c1a36;
  --shadow: rgba(0, 0, 0, 0.4);
  --hill-near: #1a183c;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Instrument Sans", -apple-system, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.9s ease, color 0.9s ease;
}

img,
svg,
canvas {
  display: block;
}

a {
  color: var(--accent-text);
  text-underline-offset: 0.18em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4.5vw, 44px);
}

/* ── Type ─────────────────────────────────────────────────────────────── */

.display,
h1,
h2,
h3 {
  font-family: "Bricolage Grotesque", "Instrument Sans", -apple-system,
    sans-serif;
  font-optical-sizing: auto;
  margin: 0;
  color: inherit;
}

h1 {
  font-size: clamp(2.6rem, 1.35rem + 5.2vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 700;
  font-variation-settings: "wdth" 92;
}

h2 {
  font-size: clamp(2rem, 1.2rem + 3.1vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 700;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 650;
}

p {
  margin: 0;
}

.lede {
  font-size: clamp(1.1rem, 1rem + 0.45vw, 1.3rem);
  line-height: 1.55;
  max-width: 38ch;
}

.quiet {
  color: var(--meta);
}

/* ── Buttons ──────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: 600 1.02rem/1 "Instrument Sans", sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, background-color 0.3s ease,
    border-color 0.3s ease, color 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.97);
}

.btn-fill {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-line {
  background: transparent;
  color: var(--ink);
  border-color: var(--outline);
}

.btn-glass {
  background: var(--glass);
  color: var(--sky-title);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn svg {
  width: 19px;
  height: 19px;
  flex: none;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ── Header ───────────────────────────────────────────────────────────── */

.top {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  padding-top: max(14px, env(safe-area-inset-top));
}

.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--sky-title);
  text-decoration: none;
  font: 700 1.3rem/1 "Bricolage Grotesque", sans-serif;
  letter-spacing: -0.02em;
}

.brand svg {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.sign-in {
  color: var(--sky-title);
  font-weight: 600;
  text-decoration: none;
}

.sign-in:hover {
  text-decoration: underline;
}

.top .btn {
  min-height: 44px;
  padding: 0 18px;
  font-size: 0.95rem;
}

/* ── The sky over the page ────────────────────────────────────────────── */

.hero {
  position: relative;
  isolation: isolate;
  background: var(--sky);
  color: var(--sky-title);
  transition: background-color 0.9s ease, color 0.9s ease;
}

.valley {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero-sky {
  min-height: clamp(560px, 78vh, 860px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: clamp(104px, 15vh, 160px);
  padding-bottom: clamp(150px, 26vh, 260px);
}

.hello {
  font: 600 1.05rem/1.3 "Instrument Sans", sans-serif;
  color: var(--sky-ink);
  margin-bottom: 14px;
}

.hero h1 {
  max-width: 11.5ch;
  color: var(--sky-title);
}

.hero .lede {
  margin-top: 22px;
  color: var(--sky-ink);
}

.hero .stores {
  margin-top: 30px;
}

.hero .free {
  margin-top: 14px;
  font-size: 0.95rem;
  color: var(--sky-ink);
}

/* The sky's own control: see the valley at another hour. */
.phases {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.phases button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--sky-title);
  font: 600 0.88rem/1 "Instrument Sans", sans-serif;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.phases button svg {
  width: 16px;
  height: 16px;
}

.phases button[aria-pressed="true"] {
  background: var(--sky-title);
  color: var(--sky);
}

/* In the words' flow on every screen: over the hills it would hide the
   flowers it is there to show. */
.phase-dock {
  margin-top: 22px;
}

/* ── Try it: the morning on the ground, under the hills ─────────────────── */

.try {
  position: relative;
  padding: 26px 0 72px;
}

.try-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

.routine-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.routine-head h2 {
  font-size: clamp(1.9rem, 1.5rem + 1.4vw, 2.5rem);
}

.routine-head .quiet {
  margin-top: 4px;
}

.count {
  font: 700 1.05rem/1 "Bricolage Grotesque", sans-serif;
  color: var(--ink);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.row {
  border-bottom: 1px solid var(--divider);
}

.row button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 74px;
  padding: 12px 2px;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.check {
  position: relative;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--check-border);
  transition: background-color 0.22s ease, border-color 0.22s ease,
    transform 0.18s ease;
}

.check svg {
  position: absolute;
  inset: 5px;
  width: 16px;
  height: 16px;
  color: var(--on-accent);
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  transition: stroke-dashoffset 0.32s ease 0.05s;
}

.row button:active .check {
  transform: scale(0.9);
}

.row.done .check {
  background: var(--accent);
  border-color: var(--accent);
}

.row.done .check svg {
  stroke-dashoffset: 0;
}

.row .title {
  display: block;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.3;
}

.row .sub {
  display: block;
  color: var(--meta);
  font-size: 0.97rem;
}

.row.done .title {
  color: var(--meta);
  text-decoration: line-through;
  text-decoration-color: var(--check-border);
}

.try-note {
  color: var(--meta);
  font-size: 0.97rem;
}

.cleared {
  display: none;
  padding: 22px 0 6px;
}

.cleared p:first-child {
  font: 700 clamp(1.5rem, 1.2rem + 1.2vw, 2rem) / 1.15 "Bricolage Grotesque",
    sans-serif;
  letter-spacing: -0.02em;
}

.try.all-done .cleared {
  display: block;
}

.seed {
  position: fixed;
  left: 0;
  top: 0;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 40;
}

/* ── Sections on the ground ───────────────────────────────────────────── */

.band {
  padding: clamp(64px, 11vw, 132px) 0;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.split .copy p:not(.quiet) {
  max-width: 44ch;
}

.copy h2 {
  max-width: 14ch;
}

.copy h2 + p {
  margin-top: 20px;
}

.copy p + p {
  margin-top: 14px;
}

/* The day as Your day draws it: a ribbon of its skies. */
.ribbon {
  position: relative;
  height: 112px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(
    90deg,
    #f9e0cc 0%,
    #f9e0cc var(--morning-end, 14%),
    #dcebef var(--morning-end, 14%),
    #dcebef var(--noon-until, 50%),
    #f3e7c9 var(--golden-at, 72%),
    #e9a88e var(--night-start, 88%),
    #1e1c40 var(--night-start, 88%),
    #1e1c40 100%
  );
}

.ribbon .hills {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: 46%;
}

.ribbon .now {
  position: absolute;
  top: 10px;
  bottom: 10px;
  width: 2px;
  margin-left: -1px;
  border-radius: 2px;
  background: #12262b;
}

.ribbon .now span {
  position: absolute;
  top: -2px;
  left: 8px;
  white-space: nowrap;
  font: 600 0.82rem/1 "Instrument Sans", sans-serif;
  color: #12262b;
}

.ribbon .now.on-night {
  background: #f0eeff;
}

.ribbon .now.on-night span {
  color: #f0eeff;
}

.windows {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.windows li {
  padding-top: 12px;
  border-top: 2px solid var(--divider);
}

.windows strong {
  display: block;
  font: 650 1.05rem/1.2 "Bricolage Grotesque", sans-serif;
}

.windows span {
  color: var(--meta);
  font-size: 0.93rem;
}

/* Kinder by design: a list, each with the app's own glyph. */
.kind {
  list-style: none;
  margin: clamp(30px, 5vw, 56px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 34px 56px;
}

.kind li {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 16px;
}

.glyph {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.glyph svg {
  width: 23px;
  height: 23px;
}

.kind p {
  margin-top: 6px;
  color: var(--meta);
  max-width: 42ch;
}

/* Vela, as her chat draws her. */
.chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(18px, 3vw, 28px);
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
}

.msg {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: 20px;
  line-height: 1.45;
}

.msg.me {
  align-self: flex-end;
  background: var(--accent);
  color: var(--on-accent);
  border-bottom-right-radius: 6px;
}

.msg.vela {
  align-self: flex-start;
  background: var(--card);
  border-bottom-left-radius: 6px;
}

.who {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
  font-weight: 650;
}

.sail {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.sail svg {
  width: 20px;
  height: 20px;
}

.receipt {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--outline);
  color: var(--meta);
  font-size: 0.92rem;
}

.receipt svg {
  width: 16px;
  height: 16px;
  color: var(--accent-text);
}

/* Two skies, one corner: the invite page's grammar. */
.pair {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #1e1c40;
  aspect-ratio: 16 / 10;
}

.pair svg {
  width: 100%;
  height: 100%;
}

/* App lock, as Home says it. */
.notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--meta);
}

.notice svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--accent-text);
}

.notice strong {
  color: var(--ink);
  font-weight: 600;
}

.lock-stack {
  display: grid;
  gap: 12px;
}

.platform {
  font-size: 0.95rem;
  color: var(--meta);
}

/* Pro: plain lines, no grid of cards. */
.pro {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  columns: 1;
}

.pro li {
  break-inside: avoid;
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
}

.pro strong {
  font-weight: 650;
}

.pro span {
  color: var(--meta);
}

/* ── Night: the close and the footer ──────────────────────────────────── */

.close {
  position: relative;
  isolation: isolate;
  background: var(--sky);
  color: var(--sky-title);
  text-align: center;
}

.close .valley {
  z-index: -1;
}

.close .wrap {
  min-height: clamp(480px, 64vh, 680px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: clamp(72px, 12vh, 120px);
  padding-bottom: clamp(160px, 24vh, 240px);
}

.close h2 {
  max-width: 15ch;
  color: var(--sky-title);
}

.close p {
  margin-top: 16px;
  color: var(--sky-ink);
}

.close .stores {
  justify-content: center;
  margin-top: 28px;
}

footer {
  background: var(--ground);
  color: var(--meta);
  font-size: 0.95rem;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 28px;
  padding-top: 30px;
  padding-bottom: max(30px, env(safe-area-inset-bottom));
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

footer a {
  color: var(--ink);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

.forge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--meta);
}

.forge img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

/* ── Documents (privacy, terms, contact) ──────────────────────────────── */

.doc-sky {
  position: relative;
  isolation: isolate;
  background: var(--sky);
  color: var(--sky-title);
}

.doc-sky .wrap {
  padding-top: clamp(104px, 14vh, 140px);
  padding-bottom: clamp(96px, 14vh, 130px);
}

.doc-sky h1 {
  font-size: clamp(2.4rem, 1.6rem + 3.4vw, 4rem);
  max-width: 16ch;
}

.doc-sky p {
  margin-top: 12px;
  color: var(--sky-ink);
}

/* Lined up with the title above it; lines kept to a reading length. */
.doc {
  padding-top: clamp(36px, 6vw, 64px);
  padding-bottom: clamp(56px, 8vw, 96px);
}

.doc > * {
  max-width: 720px;
}

.doc h2 {
  font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.9rem);
  margin-top: 2.2em;
  margin-bottom: 0.5em;
}

.doc h3 {
  margin-top: 1.6em;
  margin-bottom: 0.4em;
}

.doc p,
.doc li {
  color: var(--ink);
}

.doc p + p {
  margin-top: 0.9em;
}

.doc ul {
  padding-left: 1.2em;
}

.doc li + li {
  margin-top: 0.4em;
}

.doc .quiet {
  color: var(--meta);
}

/* The header band's hills, in the hour's colours. */
:root,
[data-phase="day"] {
  --hill-0: #c3dddc;
  --hill-1: #9cc6c1;
  --hill-2: #6fa7a2;
}

[data-phase="dawn"] {
  --hill-0: #efb79b;
  --hill-1: #de8e7c;
  --hill-2: #b9687a;
}

[data-phase="night"] {
  --hill-0: #34306a;
  --hill-1: #2a2759;
  --hill-2: #221f4b;
}

.doc-hills {
  position: absolute;
  inset: auto 0 -1px 0;
  width: 100%;
  height: clamp(40px, 7vw, 76px);
}

.doc-hills .h0 {
  fill: var(--hill-0);
}

.doc-hills .h1 {
  fill: var(--hill-1);
}

.doc-hills .h2 {
  fill: var(--ground);
}

.doc .addresses {
  list-style: none;
  margin: 0 0 1em;
  padding: 0;
  max-width: 900px;
}

.addresses li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--divider);
}

.addresses span {
  color: var(--meta);
}

.addresses a {
  font-weight: 600;
}

@media (min-width: 760px) {
  .addresses li {
    grid-template-columns: 200px minmax(0, 1fr) auto;
    align-items: baseline;
  }
}

/* ── Wider screens ────────────────────────────────────────────────────── */

@media (min-width: 760px) {
  .kind {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pro {
    columns: 2;
    column-gap: 48px;
  }
}

@media (min-width: 960px) {
  .split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  }

  .split.flip .copy {
    order: 2;
  }

  .try-grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 4fr);
    gap: 64px;
    align-items: start;
  }

  .try-aside {
    padding-top: 10px;
  }
}

@media (min-width: 561px) and (max-width: 959px) {
  .hero-sky {
    padding-bottom: 380px;
  }
}

@media (max-width: 560px) {
  .top .sign-in {
    display: none;
  }

  .hero-sky {
    padding-bottom: 300px;
  }

  .phases button {
    padding: 0 11px;
  }

  .windows {
    grid-template-columns: minmax(0, 1fr);
  }

  .stores .btn {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
