/* Ferret's landing page. Sable, cream and amber from branding/, a 4-pt
   spacing grid, concentric radii (inner = outer - padding). */

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/nunito-latin.woff2") format("woff2");
}

:root {
  --sable: #2b2320;
  --cream: #f5ebdc;
  --amber: #e39a33;

  --bg: #fbf7f1;
  --band: #f5ebdc;
  --surface: #fffdf9;
  --fill: rgb(43 35 32 / 0.06);
  --fill-strong: rgb(43 35 32 / 0.1);
  --ink: #2b2320;
  --ink-2: #5e524c;
  --link: #9c560f;
  --on-amber: #2b2320;
  --shadow: 0 1px 2px rgb(43 35 32 / 0.06), 0 12px 32px -8px rgb(43 35 32 / 0.18);
  --shadow-big: 0 2px 4px rgb(43 35 32 / 0.06), 0 32px 64px -16px rgb(43 35 32 / 0.28);
  --glow: rgb(227 154 51 / 0.22);

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s8: 32px;
  --s10: 40px;
  --s12: 48px;
  --s16: 64px;
  --s24: 96px;

  --r-card: 28px;
  --r-pill: 999px;
  --r-window: 12px;
  --r-popover: 16px;
  --r-bezel: 44px;
  --bezel: 8px;

  --wrap: 1120px;
  --gutter: var(--s4);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1715;
    --band: #241d1a;
    --surface: #2b2320;
    --fill: rgb(245 235 220 / 0.08);
    --fill-strong: rgb(245 235 220 / 0.14);
    --ink: #f5ebdc;
    --ink-2: #c9bbaa;
    --link: #f0ae52;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px -8px rgb(0 0 0 / 0.5);
    --shadow-big: 0 2px 4px rgb(0 0 0 / 0.3), 0 32px 64px -16px rgb(0 0 0 / 0.6);
    --glow: rgb(227 154 51 / 0.14);
  }
}

@media (min-width: 640px) {
  :root {
    --gutter: var(--s6);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito", ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img,
picture {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: var(--link);
  text-underline-offset: 3px;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--fill);
}

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 8px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--s4);
  top: -100px;
  z-index: 10;
  padding: var(--s2) var(--s4);
  border-radius: var(--r-pill);
  background: var(--amber);
  color: var(--on-amber);
  font-weight: 700;
}

.skip:focus {
  top: var(--s3);
}

.marker {
  margin-right: 0.4em;
  font-style: normal;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.narrow {
  max-width: 760px;
}

/* Continuous corners where the browser can draw them. */
@supports (corner-shape: squircle) {
  .card,
  .button,
  .badges li,
  .platform,
  .extra,
  .facts li,
  .faq-item,
  .shot img,
  .shot-phone {
    corner-shape: squircle;
  }

  :root {
    --r-card: 40px;
    --r-window: 20px;
    --r-popover: 24px;
    --r-bezel: 64px;
  }
}

/* Nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--s4);
  max-width: var(--wrap);
  height: 60px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  margin-right: auto;
  color: var(--ink);
  font-weight: 800;
  font-size: 19px;
  text-decoration: none;
}

.nav-brand img {
  width: 28px;
  height: 28px;
}

.nav-links {
  display: flex;
  gap: var(--s1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: var(--s2) var(--s3);
  border-radius: var(--r-pill);
  color: var(--ink-2);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}

.nav-links a:hover {
  background: var(--fill);
  color: var(--ink);
}

.nav-anchor {
  display: none;
}

@media (min-width: 760px) {
  .nav-anchor {
    display: block;
  }
}

/* Buttons */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: var(--s3) var(--s6);
  border-radius: var(--r-pill);
  background: var(--fill);
  color: var(--ink);
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.button:hover {
  background: var(--fill-strong);
}

.button.primary {
  background: var(--amber);
  color: var(--on-amber);
}

.button.primary:hover {
  background: #eba94c;
}

.button:active {
  transform: scale(0.98);
}

.more {
  display: inline-block;
  font-weight: 800;
  text-decoration: none;
}

.more:hover {
  text-decoration: underline;
}

/* Hero */

.hero {
  position: relative;
  padding-top: var(--s12);
  text-align: center;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -60px 0 auto;
  z-index: -1;
  height: 720px;
  background: radial-gradient(60% 55% at 50% 30%, var(--glow), transparent 70%);
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s5);
}

.hero-logo {
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 12px 20px rgb(43 35 32 / 0.25));
}

.eyebrow {
  color: var(--ink-2);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.hero h1 {
  max-width: 14ch;
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.lead {
  max-width: 34em;
  color: var(--ink-2);
  font-size: clamp(18px, 2.4vw, 21px);
}

.acronym {
  color: var(--ink-2);
  font-size: 14px;
  letter-spacing: 0.04em;
}

.hero .actions {
  justify-content: center;
  margin-top: var(--s2);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.badges li {
  padding: var(--s1) var(--s3);
  border-radius: var(--r-pill);
  background: var(--fill);
  color: var(--ink-2);
  font-weight: 700;
  font-size: 14px;
}

.badges .marker {
  margin-right: 0.3em;
}

.hero-shot {
  margin-top: var(--s12);
  margin-bottom: var(--s16);
}

/* App renders */

.shot img {
  width: 100%;
  background: var(--surface);
  box-shadow: var(--shadow-big);
}

.shot-window img {
  border-radius: var(--r-window);
}

.shot-popover img {
  border-radius: var(--r-popover);
}

.shot-phone {
  padding: var(--bezel);
  border-radius: var(--r-bezel);
  background: #16110f;
  box-shadow: var(--shadow-big);
}

.shot-phone img {
  border-radius: calc(var(--r-bezel) - var(--bezel));
  box-shadow: none;
}

.shot-hero {
  max-width: 1000px;
  margin-inline: auto;
}

/* Bands and section heads */

.band {
  background: var(--band);
}

section {
  padding-block: var(--s16);
}

.hero {
  padding-bottom: 0;
}

@media (min-width: 860px) {
  section {
    padding-block: var(--s24);
  }
}

h2 {
  font-size: clamp(30px, 4.6vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  max-width: 40em;
  margin-bottom: var(--s12);
}

.section-head p,
.split-text > p {
  color: var(--ink-2);
  font-size: 19px;
}

.section-foot {
  margin-top: var(--s10);
  color: var(--ink-2);
}

/* Together */

.split {
  display: grid;
  gap: var(--s12);
  align-items: center;
}

.split-text {
  display: flex;
  flex-direction: column;
  gap: var(--s5);
}

.split-shot .shot {
  max-width: 340px;
  margin-inline: auto;
}

@media (min-width: 860px) {
  .split {
    grid-template-columns: 1.2fr 1fr;
    gap: var(--s16);
  }
}

.steps {
  display: grid;
  gap: var(--s3);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: flex;
  align-items: baseline;
  gap: var(--s3);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--r-pill);
  background: var(--amber);
  color: var(--on-amber);
  font-weight: 800;
  font-size: 15px;
  transform: translateY(-1px);
}

/* Features */

.feature {
  display: grid;
  gap: var(--s8);
  align-items: center;
  padding-block: var(--s12);
}

.section-head + .feature {
  padding-top: 0;
}

.feature + .feature {
  border-top: 1px solid var(--fill);
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  max-width: 34em;
}

.feature h3 {
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 800;
}

.feature-lead {
  font-size: 19px;
}

.points {
  display: grid;
  gap: var(--s2);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
}

.points li {
  position: relative;
  padding-left: var(--s6);
}

.points li::before {
  content: "";
  position: absolute;
  left: var(--s1);
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--amber);
}

.feature-tall .shot {
  max-width: 320px;
  margin-inline: auto;
}

.feature-tall .shot-phone {
  max-width: 280px;
}

@media (min-width: 860px) {
  .feature {
    grid-template-columns: 1fr 1fr;
    gap: var(--s16);
  }

  .feature-wide {
    grid-template-columns: 2fr 3fr;
  }

  .feature:nth-of-type(even) .feature-text {
    order: 2;
  }

  .feature-tall .shot {
    max-width: 360px;
  }
}

.extras {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s4);
  margin: var(--s12) 0 0;
  padding: 0;
  list-style: none;
}

.extra,
.facts li,
.platform,
.card {
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.extra {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s6);
}

.extra h3 {
  font-size: 19px;
  font-weight: 800;
}

.extra p {
  flex: 1;
  color: var(--ink-2);
  font-size: 16px;
}

/* Privacy */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts li {
  padding: var(--s6);
  color: var(--ink-2);
}

.facts strong {
  color: var(--ink);
}

/* Download */

.platforms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--s4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.platforms li {
  display: flex;
}

.platform {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  width: 100%;
  padding: var(--s6);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.platform:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-big);
}

.platform-name {
  font-weight: 800;
  font-size: 20px;
}

.platform-how {
  flex: 1;
  color: var(--ink-2);
  font-size: 15px;
}

.platform-go {
  color: var(--link);
  font-weight: 800;
  font-size: 15px;
}

/* Open source */

.open-source {
  padding-top: 0;
}

.oss-card {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  padding: var(--s8) var(--s6);
  background: var(--sable);
  color: var(--cream);
}

.oss-card p {
  max-width: 40em;
  color: #d9ccbb;
  font-size: 18px;
}

.oss-card strong {
  color: var(--cream);
}

.oss-card .button {
  background: rgb(245 235 220 / 0.12);
  color: var(--cream);
}

.oss-card .button:hover {
  background: rgb(245 235 220 / 0.2);
}

.oss-card .button.primary {
  background: var(--amber);
  color: var(--on-amber);
}

.oss-card .actions {
  margin-top: var(--s2);
}

@media (min-width: 860px) {
  .oss-card {
    padding: var(--s16);
  }
}

@media (prefers-color-scheme: dark) {
  .oss-card {
    background: #322925;
  }
}

/* FAQ */

.faq {
  padding-top: 0;
}

.faq-list {
  display: grid;
  gap: var(--s2);
  max-width: 760px;
}

.faq-item {
  border-radius: var(--r-popover);
  background: var(--fill);
}

.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s4);
  min-height: 56px;
  padding: var(--s4) var(--s5);
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--r-pill);
  background: var(--fill);
  font-weight: 700;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 var(--s5) var(--s5);
  color: var(--ink-2);
}

/* Footer */

.footer {
  padding-block: var(--s12) var(--s8);
  background: var(--band);
  font-size: 15px;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--s8);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  color: var(--ink-2);
}

.footer-brand strong {
  color: var(--ink);
  font-size: 17px;
}

.footer-column h2 {
  margin-bottom: var(--s3);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.footer-column ul {
  display: grid;
  gap: var(--s2);
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s3);
  margin-top: var(--s10);
  color: var(--ink-2);
}

.footer-bottom a {
  color: var(--ink-2);
}

/* 404 */

.not-found .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s5);
  padding-block: var(--s16);
  text-align: center;
}

.not-found h1 {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 800;
}

.not-found p {
  color: var(--ink-2);
}

/* Motion: things rise in as they scroll into view. Only when the browser
   ties animations to scrolling, and never when the reader asked for less
   motion. */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
  }

  .hero-text > * {
    animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .hero-text > :nth-child(2) { animation-delay: 0.05s; }
  .hero-text > :nth-child(3) { animation-delay: 0.1s; }
  .hero-text > :nth-child(4) { animation-delay: 0.15s; }
  .hero-text > :nth-child(5) { animation-delay: 0.2s; }
  .hero-text > :nth-child(6) { animation-delay: 0.25s; }

  .hero-shot {
    animation: rise 0.8s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}
