/* Noxe home. Tokens are taken from the forest: blossom, lantern gold, dusk blue, night green. */
@font-face {
  font-family: "Brygada 1918";
  src: url("../fonts/brygada-1918-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-next-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #fbf4f3;        /* blossom paper */
  --paper-deep: #f4e6e6;   /* a petal shade darker, for the directory */
  --ink: #1b2a33;          /* dusk-blue ink */
  --ink-soft: #46535c;
  --rose: #9c3556;         /* deep blossom, for buttons (white text 7:1) */
  --rose-hover: #84294a;
  --on-rose: #ffffff;
  --blossom: #f2c7d1;
  --lantern: #c98a1e;      /* lantern gold, for focus and small marks */
  --dusk: #34476a;
  --rule: rgba(27, 42, 51, 0.16);
  --shot-shadow: 0 14px 30px -18px rgba(27, 42, 51, 0.55);
  --serif: "Brygada 1918", "Iowan Old Style", Georgia, serif;
  --sans: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, sans-serif;
  --wrap: 1180px;
  --gutter: 20px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1f1c;        /* forest at night */
    --paper-deep: #132823;
    --ink: #f5ece9;
    --ink-soft: #c3cbc6;
    --rose: #f2b6c5;         /* blossom under lanterns (dark text 10:1) */
    --rose-hover: #f7cbd6;
    --on-rose: #2a1119;
    --blossom: #6e3b4a;
    --lantern: #f0c46c;
    --dusk: #9fb3d6;
    --rule: rgba(245, 236, 233, 0.16);
    --shot-shadow: 0 16px 34px -18px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--lantern); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.vh {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -80px; z-index: 10;
  background: var(--paper); color: var(--ink); padding: 12px 16px; border-radius: 12px;
  font-weight: 700;
}
.skip:focus { top: 12px; }

/* Buttons: rounded rectangles, never capsules */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 12px 26px;
  border-radius: 13px;
  background: var(--rose); color: var(--on-rose);
  font-family: var(--sans); font-weight: 700; font-size: 1.0625rem;
  text-decoration: none;
  transition: background-color 160ms ease;
}
.btn:hover { background: var(--rose-hover); }

/* Hero: the forest, full bleed. Light is the golden day, dark is the groves from above. */
.hero {
  --hero-scrim: 44, 27, 21;          /* warm dark, like bark at evening */
  position: relative;
  min-height: 92svh;
  display: grid;
  grid-template-rows: auto 1fr;
  color: #fff;
  isolation: isolate;
  overflow: clip;                    /* the media layer runs past the right edge on wide screens */
  background: rgb(var(--hero-scrim));
}
@media (prefers-color-scheme: dark) {
  .hero { --hero-scrim: 8, 20, 22; }
}
.hero-media, .hero-scrim { position: absolute; inset: 0; z-index: -1; }
.hero-still, .hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 30%;
}
.hero-video { opacity: 0; transition: opacity 900ms ease; }
.hero-video.is-playing { opacity: 1; }
.hero-scrim {
  background:
    linear-gradient(to bottom, rgba(var(--hero-scrim), 0.45) 0, rgba(var(--hero-scrim), 0) 110px),
    linear-gradient(to top, rgba(var(--hero-scrim), 0.92) 0, rgba(var(--hero-scrim), 0.84) 38%, rgba(var(--hero-scrim), 0.35) 60%, rgba(var(--hero-scrim), 0) 76%);
}
@media (prefers-reduced-motion: no-preference) {
  .hero-still { animation: drift 48s ease-in-out infinite alternate; transform-origin: 60% 40%; }
  .hero.is-paused .hero-still { animation-play-state: paused; }
}
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.1) translate(-1.5%, -1%); } }
.hero-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: max(18px, env(safe-area-inset-top));
}
.wordmark {
  font-family: var(--serif); font-weight: 700; font-size: 1.75rem; letter-spacing: -0.01em;
  text-decoration: none; color: #fff;
  padding: 4px 0;
}
.motion-toggle {
  min-height: 44px; padding: 8px 14px;
  border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(var(--hero-scrim), 0.55); color: #fff;
  font: 600 0.9375rem/1.2 var(--sans);
  cursor: pointer;
}
.motion-toggle:hover { background: rgba(var(--hero-scrim), 0.8); }
.hero-copy {
  align-self: end;
  padding-bottom: max(44px, calc(env(safe-area-inset-bottom) + 32px));
}
.hero h1 {
  font-size: clamp(2.6rem, 9.4vw, 5.4rem);
  line-height: 1.02;
  max-width: 13ch;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 24px rgba(var(--hero-scrim), 0.55);
}
.hero-lede {
  margin-top: 18px;
  max-width: 34rem;
  font-size: clamp(1.125rem, 2.6vw, 1.3125rem);
  line-height: 1.55;
  color: #f4ebe8;
}
.btn-hero { margin-top: 28px; background: #f2b6c5; color: #2a1119; }
.btn-hero:hover { background: #f7cbd6; }

/* The one orchestrated moment: hero words settle in on load */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero-lede, .btn-hero { animation: settle 900ms cubic-bezier(.2, .7, .2, 1) both; }
  .hero-lede { animation-delay: 140ms; }
  .btn-hero { animation-delay: 260ms; }
}
@keyframes settle { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Story */
.story {
  display: grid; gap: 36px;
  padding-top: clamp(64px, 10vw, 128px);
  padding-bottom: clamp(64px, 9vw, 112px);
}
.story h2 { font-size: clamp(1.9rem, 4.6vw, 3rem); max-width: 22ch; }
.story-text p { margin-top: 20px; max-width: 36rem; font-size: 1.1875rem; line-height: 1.7; color: var(--ink-soft); }
.story-text p:first-of-type { margin-top: 26px; }
.story-figure { margin: 0; }
.story-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px; }
.story-figure figcaption { margin-top: 12px; font-size: 0.9375rem; color: var(--ink-soft); }

/* Directory */
.directory { background: var(--paper-deep); padding-block: clamp(64px, 9vw, 112px); }
.directory h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.section-lede { margin-top: 14px; max-width: 36rem; color: var(--ink-soft); font-size: 1.1875rem; }

.companion {
  margin-top: 44px;
  display: grid; gap: 0;
  background: #142231; color: #fff;
  border-radius: 24px; overflow: hidden;
}
.companion-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 70%; }
.companion-text { padding: 26px 22px 28px; }
.companion h3 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.companion .app-what { color: #f1e7e4; font-size: 1.1875rem; margin-top: 10px; }
.companion .app-who { color: #cfd7dd; }
.companion .btn { background: #f2b6c5; color: #2a1119; }
.companion .btn:hover { background: #f7cbd6; }

.group { margin-top: clamp(56px, 7vw, 88px); }
.group-title { font-size: clamp(1.75rem, 3vw, 1.875rem); padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.app-list { list-style: none; margin: 0; padding: 0; }
.app {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 18px;
  padding-block: 26px;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.app-shot {
  width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; object-position: top;
  border-radius: 14px;
  border: 1px solid var(--rule);
  box-shadow: var(--shot-shadow);
  background: #fff;
}
.app-name { font-size: 1.4375rem; line-height: 1.2; }
.app-what { margin-top: 8px; }
.app-who { margin-top: 8px; font-size: 1rem; color: var(--ink-soft); font-style: normal; }
.app .btn, .companion .btn { margin-top: 16px; min-width: 120px; }

/* Panorama: the forest at dusk, cropped to the trees */
.panorama img { width: 100%; aspect-ratio: 3 / 1; object-fit: cover; object-position: 50% 92%; }

/* Private by design */
.private { padding-top: clamp(64px, 9vw, 112px); padding-bottom: clamp(64px, 9vw, 104px); }
.private h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.promises { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 0; }
.promises li { padding-block: 22px; border-top: 1px solid var(--rule); }
.promises li:last-child { border-bottom: 1px solid var(--rule); }
.promises h3 { font-size: 1.75rem; }
.promises p { margin-top: 6px; color: var(--ink-soft); max-width: 30rem; }
.private-note { margin-top: 26px; max-width: 36rem; color: var(--ink-soft); font-size: 1rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); background: #0f1f1c; color: #e9e1de; padding-block: 48px max(48px, env(safe-area-inset-bottom)); }
.footer-inner { display: grid; gap: 12px; }
.footer-mark { font-family: var(--serif); font-weight: 700; font-size: 1.75rem; color: #fff; }
.site-footer a { color: #fff; }
.help { font-size: 1.1875rem; }

/* Privacy page */
.page-head { background: #142231; color: #fff; }
.page-head .hero-top { padding-bottom: 18px; }
.prose { padding-block: clamp(48px, 8vw, 96px); max-width: 44rem; }
.prose h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); }
.prose h2 { font-size: 1.5rem; margin-top: 40px; }
.prose p, .prose ul { margin-top: 14px; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 6px; }
.prose .back { display: inline-block; margin-top: 40px; }

/* Wider screens */
@media (min-width: 720px) {
  :root { --gutter: 40px; }
  .app { grid-template-columns: 150px 1fr; gap: 26px; }
  .promises { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .promises li, .promises li:last-child { border-bottom: 0; }
  .footer-inner { grid-template-columns: auto 1fr; column-gap: 48px; align-items: baseline; }
  .footer-mark { grid-row: span 3; }
}
@media (min-width: 960px) {
  /* Noxe's tree sits to the right of the headline; the image fades in from the text side */
  .hero-media {
    left: 12%; right: -12%;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 20%);
    mask-image: linear-gradient(to right, transparent 0, #000 20%);
  }
  .hero-still, .hero-video { object-position: 50% 45%; }
  .hero-copy { align-self: center; padding-bottom: 48px; }
  .hero-lede { max-width: 29rem; }
  .hero h1 { font-size: clamp(3.4rem, 5.2vw, 4.75rem); }
  .hero-scrim {
    background:
      linear-gradient(to bottom, rgba(var(--hero-scrim), 0.35) 0, rgba(var(--hero-scrim), 0) 110px),
      linear-gradient(to right, rgba(var(--hero-scrim), 0.8) 0, rgba(var(--hero-scrim), 0.66) 34%, rgba(var(--hero-scrim), 0.6) 47%, rgba(var(--hero-scrim), 0.2) 61%, rgba(var(--hero-scrim), 0) 71%);
  }
  .story { grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: center; }
  .companion { grid-template-columns: 1.25fr 1fr; align-items: center; }
  .companion-img { height: 100%; aspect-ratio: auto; min-height: 340px; }
  .companion-text { padding: 40px 44px; }
  .group { display: grid; grid-template-columns: 260px 1fr; gap: 48px; align-items: start; }
  .group-title { position: sticky; top: 24px; border-bottom: 0; padding-top: 26px; }
  .app-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; border-top: 1px solid var(--rule); }
  .app { grid-template-columns: 132px 1fr; }
  .panorama img { aspect-ratio: 4 / 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-video { display: none; }
  * { transition: none !important; animation: none !important; }
}
