/* =========================================================================
   Arbutus — an independent studio on the Pacific coast of Canada
   Coastal-forest aesthetic: arbutus bark, evergreen, sea fog.
   ========================================================================= */

/* ---- Reset --------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

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

:root { color-scheme: light dark; }

/* ---- Theme tokens -------------------------------------------------------- */
:root,
[data-theme="light"] {
  --bg:        #FAFAFA;   /* paper white                  */
  --bg-2:      #F0F0F1;   /* recessed grey                */
  --surface:   #FFFFFF;   /* raised card                  */
  --surface-2: #FFFFFFcc;
  --ink:       #0B0C0E;   /* near-black ink               */
  --ink-soft:  #34373B;
  --muted:     #6E7379;   /* grey                         */
  --faint:     #9AA0A5;
  --line:      #0B0C0E16;
  --line-soft: #0B0C0E0c;

  --bark:      #0B0C0E;   /* high-contrast foreground     */
  --bark-deep: #000000;
  --ember:     #6E7379;
  --moss:      #34373B;
  --sage:      #8A8F94;
  --gold:      #6E7379;

  --on-accent: #FAFAFA;

  --shadow-sm: 0 1px 2px #0B0C0E0f, 0 1px 4px #0B0C0E0a;
  --shadow-md: 0 8px 24px -10px #0B0C0E26, 0 2px 8px #0B0C0E10;
  --shadow-lg: 0 30px 60px -28px #0B0C0E33, 0 12px 28px -18px #0B0C0E26;

  --grain-opacity: 0.018;
  --mesh-opacity: 0.8;
}

[data-theme="dark"] {
  --bg:        #0A0B0D;   /* near-black                   */
  --bg-2:      #0E1013;
  --surface:   #16181B;
  --surface-2: #1c1f22cc;
  --ink:       #F4F5F6;   /* near-white                   */
  --ink-soft:  #C9CDD1;
  --muted:     #888D93;   /* grey                         */
  --faint:     #585D63;
  --line:      #F4F5F61a;
  --line-soft: #F4F5F60e;

  --bark:      #FFFFFF;   /* high-contrast foreground     */
  --bark-deep: #E4E6E8;
  --ember:     #B7BCC0;
  --moss:      #E2E5E8;
  --sage:      #888D93;
  --gold:      #9AA0A5;

  --on-accent: #0A0B0D;

  --shadow-sm: 0 1px 2px #00000050, 0 2px 10px #00000038;
  --shadow-md: 0 8px 26px -10px #00000070, 0 2px 10px #00000048;
  --shadow-lg: 0 34px 70px -30px #000000b0, 0 14px 30px -18px #00000088;

  --grain-opacity: 0.07;
  --mesh-opacity: 1;
}

/* ---- Base ---------------------------------------------------------------- */
body {
  font-family: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  letter-spacing: -0.005em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .5s ease, color .5s ease;
}

/* Atmospheric layers ------------------------------------------------------- */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}
/* a precise monochrome spotlight that drifts on its own — calm, ambient */
.mesh {
  position: absolute;
  inset: 0;
  opacity: var(--mesh-opacity);
  background:
    radial-gradient(46% 38% at 50% 26%, color-mix(in oklab, var(--ink) 10%, transparent), transparent 72%),
    radial-gradient(70% 50% at 50% -8%, color-mix(in oklab, var(--ink) 7%, transparent), transparent 70%);
  animation: glide 26s ease-in-out infinite;
}
@keyframes glide {
  0%   { transform: translate3d(-2.5%, -1%, 0) scale(1);    opacity: calc(var(--mesh-opacity) * 0.72); }
  50%  { transform: translate3d(2.5%, 1.4%, 0) scale(1.06); opacity: var(--mesh-opacity); }
  100% { transform: translate3d(-2.5%, -1%, 0) scale(1);    opacity: calc(var(--mesh-opacity) * 0.72); }
}
/* an elegant, very slow light sweep across the page */
.mesh::after {
  content: "";
  position: absolute;
  inset: -25% -45%;
  background: linear-gradient(100deg, transparent 40%, color-mix(in oklab, var(--ink) 5%, transparent) 50%, transparent 60%);
  animation: sweep 19s ease-in-out infinite;
}
@keyframes sweep {
  0%   { transform: translateX(-18%); }
  50%  { transform: translateX(18%); }
  100% { transform: translateX(-18%); }
}
/* WebGL atmosphere: float-computed gradient field, dithered to 8-bit (no banding) */
.atmos-gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.atmosphere.gl-active .mesh,
.atmosphere.gl-active .orbs { display: none; }

/* fine film grain */
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="dark"] .grain { mix-blend-mode: screen; }

/* drifting colored orbs */
.orbs { position: absolute; inset: 0; overflow: hidden; }
.orb {
  position: absolute;
  width: 52vmax;
  height: 52vmax;
  border-radius: 50%;
  filter: blur(190px) saturate(1.05);
  opacity: .3;
  mix-blend-mode: screen;
  will-change: transform;
}
[data-theme="light"] .orb { mix-blend-mode: multiply; opacity: .18; filter: blur(200px) saturate(1); }
.orb--1 { background: radial-gradient(circle at 50% 50%, #FF5FA2, transparent 64%); top: -16%; left: -12%; animation: orb1 84s ease-in-out infinite; }
.orb--2 { background: radial-gradient(circle at 50% 50%, #22D3EE, transparent 64%); top: 26%;  left: 56%;  animation: orb2 98s ease-in-out infinite; }
.orb--3 { background: radial-gradient(circle at 50% 50%, #FFB86C, transparent 64%); top: 50%;  left: 0%;   animation: orb3 90s ease-in-out infinite; }
.orb--4 { background: radial-gradient(circle at 50% 50%, #6366F1, transparent 64%); top: -10%; left: 50%;  animation: orb4 108s ease-in-out infinite; }
.orb--5 { background: radial-gradient(circle at 50% 50%, #C44DFF, transparent 64%); top: 56%;  left: 64%;  animation: orb5 76s ease-in-out infinite; }
@keyframes orb1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(11vw, 9vh) scale(1.07); } }
@keyframes orb2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-12vw, 7vh) scale(1.05); } }
@keyframes orb3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(12vw, -9vh) scale(1.06); } }
@keyframes orb4 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-10vw, 11vh) scale(1.04); } }
@keyframes orb5 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-11vw, -8vh) scale(1.07); } }

@media (prefers-reduced-motion: reduce) {
  .mesh,
  .mesh::after,
  .accent,
  .badge .live::after,
  .orb,
  .btn--ai,
  .btn--ai::before { animation: none !important; }
  * { scroll-behavior: auto !important; }
}

/* ---- Typography ---------------------------------------------------------- */
h1, h2, h3, .display {
  font-family: "Schibsted Grotesk", "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 720;
  line-height: 1.0;
  letter-spacing: -0.035em;
  color: var(--ink);
}
.accent {
  /* dark: dim base + bright sweep; light variant overridden below */
  background-image: linear-gradient(100deg,
    color-mix(in oklab, var(--ink) 80%, var(--muted)) 0%,
    color-mix(in oklab, var(--ink) 80%, var(--muted)) 40%,
    var(--ink) 50%,
    color-mix(in oklab, var(--ink) 80%, var(--muted)) 60%,
    color-mix(in oklab, var(--ink) 80%, var(--muted)) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: sheen 7s linear infinite;
}
[data-theme="light"] .accent {
  background-image: linear-gradient(100deg,
    var(--ink) 0%, var(--ink) 40%,
    color-mix(in oklab, var(--ink) 48%, var(--muted)) 50%,
    var(--ink) 60%, var(--ink) 100%);
}
@keyframes sheen {
  0%   { background-position: 135% 0; }
  100% { background-position: -35% 0; }
}

a { color: inherit; text-decoration: none; }

.eyebrow {
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--bark);
  display: inline-flex;
  align-items: center;
  gap: .6em;
}
.eyebrow::before {
  content: "";
  width: 1.6em; height: 1px;
  background: currentColor;
  opacity: .65;
}

/* ---- Layout -------------------------------------------------------------- */
.wrap { width: min(1180px, 100% - 2.6rem); margin-inline: auto; }
.wrap--narrow { width: min(760px, 100% - 2.6rem); margin-inline: auto; }
section { position: relative; }

/* ---- Navigation ---------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(1.4);
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .4s ease, background-color .4s ease;
}
.nav.is-stuck { border-bottom-color: var(--line); }
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.05rem;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 600; }
.brand__mark { width: 30px; height: 30px; color: var(--bark); flex: none; }
.brand__name {
  font-family: "Schibsted Grotesk", sans-serif;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -.03em;
}
.brand__name b { font-weight: 700; }

.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.1rem); }
.nav__link {
  font-size: .92rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  transition: color .25s ease;
}
.nav__link::after {
  content: "";
  position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 1.5px;
  background: var(--bark);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__links .nav__link.is-hideable { display: none; }
@media (min-width: 720px) { .nav__links .nav__link.is-hideable { display: inline; } }

/* prominent, elegant contact pill in the menu bar */
.nav__link--cta {
  padding: .5em 1.05em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in oklab, var(--surface) 55%, transparent);
  backdrop-filter: blur(10px);
  color: var(--ink);
  transition: border-color .25s ease, background-color .25s ease, transform .25s cubic-bezier(.2,.8,.2,1);
}
.nav__link--cta::after { display: none; }
.nav__link--cta:hover { border-color: var(--ink); background: var(--surface); transform: translateY(-1px); }

/* Theme toggle */
.toggle {
  --size: 38px;
  width: var(--size); height: var(--size);
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease, border-color .3s ease;
  box-shadow: var(--shadow-sm);
}
.toggle:hover { transform: rotate(-18deg) scale(1.06); border-color: var(--bark); }
.toggle svg { width: 18px; height: 18px; transition: opacity .3s ease, transform .4s ease; }
.toggle .icon-sun { display: none; }
[data-theme="dark"] .toggle .icon-sun { display: block; }
[data-theme="dark"] .toggle .icon-moon { display: none; }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  padding: .82em 1.45em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease, background-color .3s ease, color .3s ease, border-color .3s ease;
  white-space: nowrap;
}
.btn--primary {
  background: var(--bark);
  color: var(--on-accent);
  box-shadow: 0 8px 22px -10px color-mix(in oklab, var(--bark) 70%, transparent);
}
.btn--primary:hover { background: var(--bark-deep); transform: translateY(-2px); box-shadow: 0 14px 30px -12px color-mix(in oklab, var(--bark) 80%, transparent); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--bark); color: var(--bark); transform: translateY(-2px); }
.btn__arrow { transition: transform .3s ease; }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* Apple-Intelligence-style molten gradient button */
.btn--ai {
  position: relative;
  isolation: isolate;
  color: #fff;
  border: none;
  background-image: linear-gradient(110deg, #FF5FA2, #C44DFF, #6366F1, #22D3EE, #FFB86C, #FF5FA2);
  background-size: 280% 280%;
  animation: ai-flow 40s ease-in-out infinite;
  box-shadow: 0 8px 26px -8px rgba(150, 80, 255, .5);
  text-shadow: 0 1px 6px rgba(0, 0, 0, .18);
}
/* matching molten glow behind the button */
.btn--ai::before {
  content: "";
  position: absolute;
  inset: -3px;
  z-index: -1;
  border-radius: inherit;
  background-image: linear-gradient(110deg, #FF5FA2, #C44DFF, #6366F1, #22D3EE, #FFB86C, #FF5FA2);
  background-size: 280% 280%;
  filter: blur(15px);
  opacity: .6;
  animation: ai-flow 40s ease-in-out infinite;
}
.btn--ai:hover { transform: translateY(-2px); filter: brightness(1.06) saturate(1.08); }
.btn--ai:hover::before { opacity: .85; }
@keyframes ai-flow {
  0%   { background-position: 0% 50%; }
  25%  { background-position: 55% 100%; }
  50%  { background-position: 100% 50%; }
  75%  { background-position: 45% 0%; }
  100% { background-position: 0% 50%; }
}

/* ---- Hero ---------------------------------------------------------------- */
.hero { padding-block: clamp(3.5rem, 9vw, 7.5rem) clamp(3rem, 7vw, 5.5rem); }
.hero__inner { max-width: 22ch; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .01em;
  padding: .5em 1em;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface) 55%, transparent);
  backdrop-filter: blur(10px);
  color: var(--ink-soft);
  letter-spacing: .005em;
}
.badge .leaf-chip {
  width: 1.25em; height: 1.25em;
  display: grid; place-items: center;
  color: var(--bark);
}
.hero h1 {
  font-size: clamp(2.9rem, 1.6rem + 6vw, 6.6rem);
  margin-block: 1.1rem .2rem;
  max-width: none;
}
.hero h1 em { color: var(--bark); }
.hero__lede {
  font-size: clamp(1.08rem, 1rem + .5vw, 1.4rem);
  color: var(--muted);
  max-width: 46ch;
  margin-top: 1.4rem;
  line-height: 1.5;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2.3rem; }
.hero__meta {
  margin-top: 3.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.4rem, 4vw, 3.2rem);
  align-items: baseline;
}
.stat { display: flex; flex-direction: column; gap: .15rem; }
.stat__num {
  font-family: "Schibsted Grotesk", sans-serif;
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.3rem);
  font-weight: 720;
  letter-spacing: -.03em;
  color: var(--ink);
  line-height: 1;
}
.stat__label { font-size: .82rem; color: var(--faint); letter-spacing: .02em; }

/* ---- Section heading ----------------------------------------------------- */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section__head { max-width: 60ch; margin-bottom: clamp(2.2rem, 5vw, 3.4rem); }
.section__head h2 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.5rem);
  margin-top: .8rem;
}
.section__head p { color: var(--muted); font-size: 1.08rem; margin-top: 1rem; max-width: 52ch; }

/* ---- Manifesto / ethos --------------------------------------------------- */
.ethos {
  border-block: 1px solid var(--line);
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.ethos__lead {
  font-family: "Schibsted Grotesk", sans-serif;
  font-weight: 600;
  font-size: clamp(1.5rem, 1.1rem + 1.9vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -.03em;
  max-width: 22ch;
}
.ethos__lead .mk { color: var(--bark); }
.ethos__grid {
  margin-top: clamp(2.4rem, 5vw, 3.6rem);
  display: grid;
  gap: clamp(1.4rem, 3vw, 2.4rem);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.ethos__item { display: flex; flex-direction: column; gap: .55rem; }
.ethos__item .ic { width: 26px; height: 26px; color: var(--bark); }
.ethos__item h3 { font-size: 1.18rem; font-weight: 700; }
.ethos__item p { color: var(--muted); font-size: .96rem; }

/* ---- Apps ---------------------------------------------------------------- */
.apps__grid {
  display: grid;
  gap: clamp(1.1rem, 2.4vw, 1.6rem);
  grid-template-columns: repeat(12, 1fr);
}
.app {
  position: relative;
  grid-column: span 12;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.6rem, 2.8vw, 2.3rem);
  border-radius: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  isolation: isolate;
  transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s ease, border-color .4s ease;
}
@media (min-width: 680px) { .app { grid-column: span 6; } }
.app::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(120% 120% at 100% 0%, color-mix(in oklab, var(--app-accent, var(--bark)) 16%, transparent), transparent 60%);
  transition: opacity .45s ease;
}
.app:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: color-mix(in oklab, var(--app-accent, var(--bark)) 40%, var(--line)); }
.app:hover::before { opacity: 1; }
.app__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.app__icon {
  width: 54px; height: 54px;
  border-radius: 15px;
  display: grid; place-items: center;
  color: var(--on-accent);
  background: linear-gradient(150deg, color-mix(in oklab, var(--app-accent, var(--bark)) 88%, white 4%), color-mix(in oklab, var(--app-accent, var(--bark)) 100%, black 14%));
  box-shadow: inset 0 1px 0 #ffffff40, 0 8px 18px -10px color-mix(in oklab, var(--app-accent, var(--bark)) 70%, transparent);
  flex: none;
}
.app__icon svg { width: 28px; height: 28px; }
.pill {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .4em .8em;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: color-mix(in oklab, var(--bg) 60%, transparent);
  display: inline-flex; align-items: center; gap: .5em;
  white-space: nowrap;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--app-accent, var(--bark)); box-shadow: 0 0 0 0 color-mix(in oklab, var(--app-accent, var(--bark)) 60%, transparent); animation: pulse 2.6s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--app-accent, var(--bark)) 55%, transparent); }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.app h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.95rem); font-weight: 700; }
.app h3 .app__cat { display: block; font-family: "Hanken Grotesk", sans-serif; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--app-accent, var(--bark)); margin-bottom: .5rem; }
.app__desc { color: var(--muted); font-size: 1rem; max-width: 42ch; }
.app__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; padding-top: .4rem; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  font-size: .78rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: .38em .8em .38em .65em;
  border-radius: 9px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
}
.tag svg { width: 14px; height: 14px; color: var(--app-accent, var(--bark)); flex: none; }

/* Editorial index number on each app */
.app__num {
  font-family: "Schibsted Grotesk", sans-serif;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--app-accent, var(--bark));
  font-variant-numeric: tabular-nums;
}
.app__cat-row { display: flex; align-items: center; gap: .7rem; margin-bottom: .55rem; }
.app__cat-row .app__cat { margin: 0 !important; }
.app__cat-row::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Ghost gets a featured wide treatment */
.app--feature { grid-column: span 12; }
@media (min-width: 680px) { .app--feature { grid-column: span 12; } }
.app--feature .app__inner {
  display: grid;
  gap: clamp(1.4rem, 3vw, 2.6rem);
  align-items: center;
}
@media (min-width: 860px) {
  .app--feature .app__inner { grid-template-columns: 1.05fr .95fr; }
}
.app--feature h3 { font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.6rem); }
.app--feature .app__desc { font-size: 1.06rem; max-width: 46ch; }

/* Ghost visual — drifting input "signals" feeding a page */
.ghost-viz {
  position: relative;
  min-height: 230px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--bg) 50%, transparent), transparent),
    var(--bg-2);
  overflow: hidden;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: .5rem;
}
.ghost-viz__signals { position: absolute; inset: 0; }
.signal {
  position: absolute;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  padding: .35em .7em;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: .4em;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  animation: float-signal 7s ease-in-out infinite;
}
.signal .sdot { width: 6px; height: 6px; border-radius: 50%; background: var(--bark); }
.signal:nth-child(1) { top: 12%; left: 6%;  animation-delay: 0s; }
.signal:nth-child(2) { top: 24%; right: 8%; animation-delay: -1.4s; }
.signal:nth-child(3) { top: 46%; left: 12%; animation-delay: -2.8s; }
.signal:nth-child(4) { top: 40%; right: 14%; animation-delay: -4.2s; }
.signal:nth-child(5) { top: 64%; left: 30%; animation-delay: -5.6s; }
@keyframes float-signal {
  0%, 100% { transform: translateY(0); opacity: .9; }
  50% { transform: translateY(-7px); opacity: 1; }
}
.ghost-viz__page {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .9rem 1rem;
  box-shadow: var(--shadow-md);
}
.ghost-viz__page .gline { height: 7px; border-radius: 4px; background: var(--line); margin-block: .42rem; }
.ghost-viz__page .gline.w1 { width: 84%; background: color-mix(in oklab, var(--bark) 38%, var(--line)); }
.ghost-viz__page .gline.w2 { width: 96%; }
.ghost-viz__page .gline.w3 { width: 70%; }
.ghost-viz__page .gdate { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--bark); margin-bottom: .5rem; }

/* ---- Privacy strip ------------------------------------------------------- */
.privacy-strip {
  border-radius: 28px;
  background: var(--moss);
  color: #F2EFE4;
  padding: clamp(2.2rem, 5vw, 3.6rem);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
[data-theme="dark"] .privacy-strip { background: #13241B; border: 1px solid var(--line); }
.privacy-strip::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(60% 120% at 90% 10%, color-mix(in oklab, var(--ember) 28%, transparent), transparent 60%);
  pointer-events: none;
}
.privacy-strip .eyebrow { color: var(--ember); }
.privacy-strip h2 { color: #F6F2E8; font-size: clamp(1.8rem, 1.3rem + 2vw, 3rem); margin-top: .8rem; max-width: 18ch; }
.privacy-strip p { color: #DfE5D8; max-width: 50ch; margin-top: 1rem; }
.privacy-strip .pledges { display: grid; gap: 1rem 2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 2rem; }
.pledge { display: flex; gap: .7rem; align-items: flex-start; }
.pledge .pic { width: 22px; height: 22px; color: var(--ember); flex: none; margin-top: 2px; }
.pledge b { display: block; color: #F6F2E8; font-weight: 600; }
.pledge span { color: #C9D2C1; font-size: .92rem; }
.privacy-strip .btn--primary { margin-top: 2rem; background: var(--ember); color: #1C2A20; }
.privacy-strip .btn--primary:hover { background: #F2A974; }

/* ---- Roots / Canada ------------------------------------------------------ */
.roots__inner { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 820px) { .roots__inner { grid-template-columns: 1fr 1fr; } }
.roots__art {
  position: relative;
  aspect-ratio: 5 / 4;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, color-mix(in oklab, var(--moss) 22%, var(--surface)), var(--surface));
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
}
.roots__art svg { width: 78%; height: 78%; }
.roots h2 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3.2rem); }
.roots p { color: var(--muted); margin-top: 1.1rem; max-width: 46ch; }
.roots p + p { margin-top: .9rem; }

/* ---- Notify / footer CTA ------------------------------------------------- */
.notify { text-align: center; padding-block: clamp(3.5rem, 8vw, 6rem); }
.notify h2 { font-size: clamp(2rem, 1.4rem + 3vw, 4rem); max-width: 16ch; margin-inline: auto; }
.notify p { color: var(--muted); margin-top: 1.1rem; max-width: 44ch; margin-inline: auto; }
.notify__form {
  margin: 2rem auto 0;
  display: flex;
  gap: .6rem;
  max-width: 460px;
  flex-wrap: wrap;
  justify-content: center;
}
.notify__form input {
  flex: 1 1 220px;
  font: inherit;
  padding: .85em 1.2em;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.notify__form input:focus { outline: none; border-color: var(--bark); box-shadow: 0 0 0 4px color-mix(in oklab, var(--bark) 16%, transparent); }
.notify__note { font-size: .82rem; color: var(--faint); margin-top: 1rem; }
.notify__msg { font-size: .92rem; color: var(--moss); margin-top: 1rem; min-height: 1.2em; font-weight: 600; }
[data-theme="dark"] .notify__msg { color: var(--sage); }

/* ---- Footer -------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(2.6rem, 5vw, 4rem) 2rem;
  margin-top: clamp(2rem, 5vw, 4rem);
}
.footer__top {
  display: grid;
  gap: 2.2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .footer__top { grid-template-columns: 1.6fr 1fr 1fr; } }
.footer__brand p { color: var(--muted); max-width: 34ch; margin-top: 1rem; font-size: .95rem; }
.footer__col h4 { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); font-weight: 600; font-family: "Hanken Grotesk", sans-serif; margin-bottom: 1rem; }
.footer__col a { display: block; color: var(--ink-soft); padding-block: .35rem; font-size: .96rem; transition: color .2s ease, transform .2s ease; }
.footer__col a:hover { color: var(--bark); transform: translateX(3px); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(2.4rem, 5vw, 3.5rem);
  padding-top: 1.6rem;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-size: .85rem;
}
.footer__made { display: inline-flex; align-items: center; gap: .5em; }
.footer__made svg { width: 18px; height: 13px; }

/* ---- Reveal animation ---------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- Legal / document pages ---------------------------------------------- */
.doc { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5rem); }
.doc__head { max-width: 70ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.doc__head .eyebrow { margin-bottom: 1rem; }
.doc__head h1 { font-size: clamp(2.2rem, 1.6rem + 3vw, 4rem); }
.doc__head p.lede { color: var(--muted); font-size: 1.12rem; margin-top: 1.1rem; max-width: 56ch; }
.doc__meta { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin-top: 1.5rem; font-size: .86rem; color: var(--faint); }
.doc__meta b { color: var(--ink-soft); font-weight: 600; }

.doc__layout { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (min-width: 900px) { .doc__layout { grid-template-columns: 230px 1fr; } }
.toc {
  position: sticky;
  top: 90px;
  font-size: .9rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.3rem 1.4rem;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.toc h4 { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-bottom: .9rem; font-family: "Hanken Grotesk", sans-serif; font-weight: 600; }
.toc a { display: block; color: var(--muted); padding-block: .42rem; line-height: 1.3; transition: color .2s ease, padding .2s ease; border-left: 2px solid transparent; padding-left: .7rem; margin-left: -.7rem; }
.toc a:hover, .toc a.is-active { color: var(--bark); border-left-color: var(--bark); }
@media (max-width: 899px) { .toc { display: none; } }

.prose h2 {
  font-size: clamp(1.45rem, 1.1rem + 1.2vw, 2rem);
  margin-top: 2.8rem;
  padding-top: 2.4rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: 90px;
}
.prose h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.prose h3 { font-size: 1.2rem; font-weight: 650; margin-top: 1.8rem; }
.prose p, .prose li { color: var(--ink-soft); margin-top: 1rem; max-width: 70ch; }
.prose ul, .prose ol { margin-top: .6rem; padding-left: 1.3rem; }
.prose li { margin-top: .5rem; }
.prose li::marker { color: var(--bark); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a:not(.btn) { color: var(--bark); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in oklab, var(--bark) 40%, transparent); }
.prose a:not(.btn):hover { text-decoration-color: var(--bark); }
.callout {
  margin-top: 1.6rem;
  padding: 1.1rem 1.3rem;
  border-radius: 14px;
  background: color-mix(in oklab, var(--moss) 10%, var(--surface));
  border: 1px solid var(--line);
  border-left: 3px solid var(--bark);
}
.callout p { margin-top: 0; color: var(--ink-soft); }
.callout p + p { margin-top: .7rem; }

.backlink { display: inline-flex; align-items: center; gap: .45em; color: var(--muted); font-size: .92rem; font-weight: 500; margin-bottom: 1.5rem; transition: color .2s ease, gap .2s ease; }
.backlink:hover { color: var(--bark); gap: .7em; }

/* ---- Coming-soon (simple) layout ----------------------------------------- */
.cs {
  min-height: calc(100vh - 76px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-block: clamp(1.5rem, 4vw, 2.5rem);
}
.cs__inner {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.1rem, 2.4vw, 1.6rem);
  max-width: 800px;
  padding-block: clamp(1.5rem, 4vw, 3rem);
}
.cs__art {
  width: clamp(160px, 30vw, 230px);
  margin-bottom: .4rem;
  filter: drop-shadow(0 18px 30px color-mix(in oklab, var(--ember) 22%, transparent));
  animation: rise 1s cubic-bezier(.2,.8,.2,1) both;
}
.cs__art svg { width: 100%; height: auto; display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }

.cs h1 {
  font-size: clamp(2.6rem, 1.5rem + 4.4vw, 4.9rem);
  font-weight: 680;
  line-height: .98;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.cs__lede {
  color: var(--muted);
  font-size: clamp(1.05rem, 1rem + .4vw, 1.28rem);
  max-width: 42ch;
  line-height: 1.5;
}

.cs__apps { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: .3rem; }
.cs__app {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .5em .95em;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface) 55%, transparent);
  backdrop-filter: blur(10px);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: -.01em;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), border-color .25s ease, background-color .25s ease;
}
.cs__app:hover { transform: translateY(-2px); border-color: color-mix(in oklab, var(--ink) 32%, var(--line)); background: var(--surface); }
.cs__app svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.cs__app:hover svg { color: var(--ink); }
.cs__app small { color: var(--faint); font-weight: 500; }

/* live status dot in the badge */
.badge .live { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); position: relative; flex: none; }
.badge .live::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--ink);
  animation: ping 2.4s cubic-bezier(0,0,.2,1) infinite;
}
@keyframes ping { 0% { transform: scale(1); opacity: .55; } 70%,100% { transform: scale(2.6); opacity: 0; } }

.cs .notify__form { margin-top: .6rem; }
.cs .footer-mini {
  flex: none;
  width: 100%;
  margin-top: 1rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.4rem;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  font-size: .85rem;
}
.cs .footer-mini a { color: var(--ink-soft); font-weight: 500; transition: color .2s ease; }
.cs .footer-mini a:hover { color: var(--bark); }
.cs .footer-mini .made { display: inline-flex; align-items: center; gap: .45em; }
.cs .footer-mini .made svg { width: 17px; height: 13px; }

/* ---- Editorial icon grid ------------------------------------------------- */
.iconrow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.iconrow__cell {
  background: var(--surface);
  padding: clamp(1.2rem, 2.2vw, 1.7rem);
  display: flex;
  flex-direction: column;
  gap: .7rem;
  transition: background-color .3s ease;
}
.iconrow__cell:hover { background: var(--bg-2); }
.iconrow__cell .ic {
  width: 26px; height: 26px;
  color: var(--bark);
}
.iconrow__cell b { font-size: 1rem; font-weight: 600; letter-spacing: -.01em; }
.iconrow__cell span { font-size: .86rem; color: var(--muted); line-height: 1.4; }

/* stat icon chips in the hero */
.stat__icon {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid; place-items: center;
  color: var(--bark);
  background: color-mix(in oklab, var(--bark) 12%, transparent);
  margin-bottom: .55rem;
}
.stat__icon svg { width: 17px; height: 17px; }

/* ---- Contact page -------------------------------------------------------- */
.contact__grid {
  display: grid;
  gap: clamp(1.6rem, 4vw, 2.4rem);
  align-items: start;
  max-width: 560px;
}

.method {
  display: flex;
  gap: 1rem;
  padding: 1.05rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in oklab, var(--surface) 60%, transparent);
  backdrop-filter: blur(8px);
  transition: border-color .25s ease, transform .25s cubic-bezier(.2,.8,.2,1), background-color .25s ease;
}
.method + .method { margin-top: .85rem; }
.method:hover {
  border-color: color-mix(in oklab, var(--ink) 28%, var(--line));
  transform: translateY(-2px);
  background: var(--surface);
}
.method__ic {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--bg-2);
  color: var(--ink);
  flex: none;
}
.method__ic svg { width: 20px; height: 20px; }
.method h3 { font-size: 1rem; font-weight: 650; letter-spacing: -.01em; }
.method__body p { color: var(--muted); font-size: .9rem; margin-top: .15rem; }
.method__body a { color: var(--ink-soft); border-bottom: 1px solid var(--line); transition: color .2s ease, border-color .2s ease; }
.method__body a:hover { color: var(--ink); border-color: var(--ink); }

.contact__form {
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: .42rem;
  letter-spacing: .01em;
}
.field__opt { color: var(--faint); font-weight: 500; }
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .82em 1em;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--faint); }
.field textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--ink) 10%, transparent);
}
.contact__row { display: grid; gap: 1rem; }
@media (min-width: 520px) { .contact__row { grid-template-columns: 1fr 1fr; } }
.contact__form .btn { width: 100%; justify-content: center; margin-top: .4rem; }
.form-msg { font-size: .9rem; font-weight: 600; color: var(--ink); margin-top: .9rem; min-height: 1.2em; }
.contact__note { color: var(--faint); font-size: .82rem; margin-top: .9rem; }

/* ---- Focus visibility ---------------------------------------------------- */
:focus-visible { outline: 2px solid var(--bark); outline-offset: 3px; border-radius: 4px; }

::selection { background: color-mix(in oklab, var(--bark) 28%, transparent); color: var(--ink); }
