/* Familjen Grotesk (OFL, see fonts/OFL.txt). One variable file covers the 600 and 700 weights. */
@font-face {
  font-family: "Familjen Grotesk";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("/fonts/familjen-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Metric-matched stand-in while the web font loads: Arial Bold scaled to the
   width of "Scent of a…" at weight 700, with Familjen Grotesk's ascent and descent
   (1230 / 270 of 1200 units), so the headline doesn't move when the font swaps. */
@font-face {
  font-family: "Familjen Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Arimo Bold");
  font-weight: 600 700;
  size-adjust: 86.23%;
  ascent-override: 118.87%;
  descent-override: 26.09%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light dark;

  --bg-light: #FFFFFF;
  --ink-light: #15171A;
  --sec-light: #50565E;
  --line-light: #E3E6EA;
  --surf-light: #F4F5F7;
  --bg-dark: #101113;
  --ink-dark: #F2F3F5;
  --sec-dark: #A9AFB8;
  --line-dark: #2A2D31;
  --surf-dark: #1A1C1F;

  --bg: var(--bg-light);
  --ink: var(--ink-light);
  --sec: var(--sec-light);
  --line: var(--line-light);
  --surf: var(--surf-light);

  --display: "Familjen Grotesk", "Familjen Fallback", system-ui, sans-serif;
  --gutter: 24px;
  --pad-l: max(var(--gutter), env(safe-area-inset-left));
  --pad-r: max(var(--gutter), env(safe-area-inset-right));
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--bg-dark);
    --ink: var(--ink-dark);
    --sec: var(--sec-dark);
    --line: var(--line-dark);
    --surf: var(--surf-dark);
  }
}

@media (prefers-reduced-motion: no-preference) {
  :root { scroll-behavior: smooth; }
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.num { font-variant-numeric: tabular-nums; }

a { color: inherit; }
a:hover { color: var(--sec); }

:where(a, button):focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}
:where(footer)[tabindex="-1"]:focus { outline: none; }

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}
.skip-link:focus-visible {
  position: fixed;
  top: max(8px, env(safe-area-inset-top));
  left: max(8px, env(safe-area-inset-left));
  z-index: 10;
  padding: 12px 18px;
  border-radius: 26px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}

.wrap {
  max-width: 1248px; /* 1200px of content plus the 24px gutters, as in the mock-up */
  margin-inline: auto;
  padding-left: var(--pad-l);
  padding-right: var(--pad-r);
}

/* ---- header ---- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
}
.brand svg { flex: none; }
.brand-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
}
.nav-list li { display: flex; }
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
  border-radius: 26px;
  corner-shape: squircle;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}
.pill:hover { color: var(--bg); opacity: 0.86; }
.pill-lg { padding: 14px 26px; font-size: 16px; }

/* on phones the hero's own "Get the app" sits just below, so the header keeps only the two section links */
@media (max-width: 480px) {
  .site-header { row-gap: 0; }
  .nav-list { gap: 0 24px; }
  .nav-list .nav-get { display: none; }
}

/* ---- hero ---- */
.hero {
  position: relative;
  min-height: 720px;
  display: flex;
  align-items: center;
}
.scene {
  position: absolute;
  inset: 0;
}
.scene canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.copy {
  position: relative;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.copy h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(44px, 6.4vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
/* zero-size marker at the end of the headline: main.js reads its box to line the sprayed words up with the text */
.mark {
  display: inline-block;
  width: 0;
  height: 0;
}
.lede {
  margin: 0;
  max-width: 460px;
  font-size: 19px;
  line-height: 1.5;
  color: var(--sec);
}
.actions,
.hero-ctl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 18px;
  border-radius: 26px;
  corner-shape: squircle;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}
.ghost:hover { border-color: var(--sec); }
/* the scene controls only do something once the script has run; hide them (keeping their space) until then */
:root:not(.js) .hero-ctl { visibility: hidden; }

@media (max-width: 820px) {
  .hero {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
  }
  .scene {
    position: relative;
    inset: auto;
    height: 480px;
    order: 2;
  }
  .copy {
    max-width: none;
    padding-top: 40px;
  }
  .copy h1 { white-space: normal; }
}

/* ---- feature and community rows ---- */
.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  padding-top: 56px;
  padding-bottom: 56px;
  border-top: 1px solid var(--line);
}
.item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.item h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.item p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--sec);
}

/* subtle reveal as each item scrolls in; decorative, so browsers without
   scroll-driven animations (or with reduced motion) simply show the items */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes rise {
      from { opacity: 0; translate: 0 16px; }
    }
    .row .item {
      animation: rise linear backwards;
      animation-timeline: view();
      animation-range: entry 0% entry 90%;
    }
  }
}

/* ---- footer ---- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  padding-top: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  font-size: 14px;
  color: var(--sec);
  border-top: 1px solid var(--line);
}
.get-line { margin: 0; color: var(--ink); font-size: 15px; }
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.foot-links li { display: flex; }
.foot-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
