/* Fastling website. Colours, type and shapes follow design/tokens.md. */

@font-face {
  font-family: 'Fredoka';
  font-weight: 600;
  font-display: swap;
  src: url('fonts/fredoka-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-weight: 400;
  font-display: swap;
  src: url('fonts/nunito-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-weight: 700;
  font-display: swap;
  src: url('fonts/nunito-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-weight: 800;
  font-display: swap;
  src: url('fonts/nunito-800.woff2') format('woff2');
}

:root {
  --background: #f4f5fb;
  --surface: #ffffff;
  --text: #1e2135;
  --text-muted: #5e6278;
  --text-subtle: #4c5068;
  --border: #e6e7f0;
  --primary: #5b4bd6;
  --primary-text: #4a3bc4;
  --primary-soft: #ece9ff;
  --hero: #5b4bd6;
  --hero-deep: #4a3bc4;
  --hero-text: #ffffff;
  --hero-muted: #e4e0ff;
  --pill: rgba(255, 255, 255, 0.12);
  --water-soft: #ddeeff;
  --water-text: #1f6fbf;
  --coffee: #f3e6dc;
  --tea: #e3f3e1;
  --salts: #fff1cc;
  --meal: #ffe3dd;
  --success: #2f7a3a;
  --shadow: 0 1px 2px rgba(30, 33, 53, 0.06);
  --radius-card: 22px;
  --radius-panel: 28px;
  --gutter: 20px;
  --max: 1080px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #14152a;
    --surface: #1f2139;
    --text: #f2f3fa;
    --text-muted: #a9adc6;
    --text-subtle: #c3c6da;
    --border: #33375a;
    --primary: #7b6cf0;
    --primary-text: #b4aaff;
    --primary-soft: #2e2a5c;
    --hero: #2e2a5c;
    --hero-deep: #1f1c45;
    --hero-muted: #d4cfff;
    --water-soft: #1d3350;
    --water-text: #8cc6ff;
    --coffee: #3a2e27;
    --tea: #23382a;
    --salts: #3d3520;
    --meal: #40292a;
    --success: #6cc27a;
  }
}

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family:
    'Nunito',
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-family: 'Fredoka', 'Nunito', system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.25rem, 7vw, 3.5rem);
}

h2 {
  font-size: clamp(1.75rem, 5vw, 2.4rem);
}

h3 {
  font-size: 1.3rem;
}

p {
  margin: 0 0 1em;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

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

img,
svg {
  max-width: 100%;
}

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

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--gutter);
  top: 12px;
  z-index: 10;
  background: var(--surface);
  padding: 10px 16px;
  border-radius: 12px;
}

/* Header */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 64px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  color: var(--text);
  text-decoration: none;
  font-family: 'Fredoka', 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 1.5rem;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--text-subtle);
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  background: var(--primary-soft);
  color: var(--primary-text);
}

/* Hero */

.hero {
  background: linear-gradient(160deg, var(--hero) 0%, var(--hero-deep) 100%);
  color: var(--hero-text);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  gap: 32px;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 64px;
}

@media (min-width: 860px) {
  .hero .wrap {
    grid-template-columns: 1.1fr 1fr;
    padding-top: 80px;
    padding-bottom: 88px;
  }
}

.hero p.lead {
  color: var(--hero-muted);
  font-size: 1.2rem;
  max-width: 34em;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0 0 28px;
  list-style: none;
}

.pills li {
  background: var(--pill);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 800;
  font-size: 0.95rem;
}

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

.store {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 56px;
  min-width: 190px;
  padding: 8px 20px;
  border-radius: 16px;
  background: #ffffff;
  color: #1e2135;
  text-decoration: none;
  line-height: 1.2;
}

.store small {
  font-size: 0.8rem;
  font-weight: 700;
  color: #5e6278;
}

.store strong {
  font-family: 'Fredoka', 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
}

.store.soon {
  background: transparent;
  color: var(--hero-text);
  border: 2px solid rgba(255, 255, 255, 0.45);
}

.store.soon small {
  color: var(--hero-muted);
}

.hero-art {
  justify-self: center;
  width: min(100%, 460px);
}

/* Buddy motion: a gentle bob and a blink, stopped under reduce motion. */

.bob {
  animation: bob 3.6s ease-in-out infinite;
  transform-box: fill-box;
}

.bob.late {
  animation-delay: -1.2s;
}

.bob.later {
  animation-delay: -2.4s;
}

.eye {
  animation: blink 4.6s infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes blink {
  0%,
  92%,
  100% {
    transform: scaleY(1);
  }
  95% {
    transform: scaleY(0.1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bob,
  .eye {
    animation: none;
  }
}

/* Sections */

section {
  padding: 64px 0;
}

.section-intro {
  max-width: 40em;
  margin-bottom: 32px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.eyebrow {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-text);
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 640px) {
  .grid.two,
  .grid.three {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .grid.three {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 24px;
}

.card > h2:first-child,
.card > h3:first-child {
  margin-top: 0;
}

.card p:last-child {
  margin-bottom: 0;
}

.card p {
  color: var(--text-subtle);
}

.icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  margin-bottom: 14px;
  color: var(--primary-text);
  background: var(--primary-soft);
}

.icon svg {
  width: 24px;
  height: 24px;
}

.icon.water {
  background: var(--water-soft);
  color: var(--water-text);
}

.icon.coffee {
  background: var(--coffee);
}

.icon.tea {
  background: var(--tea);
}

.icon.salts {
  background: var(--salts);
}

.icon.meal {
  background: var(--meal);
}

/* Buddies */

.buddy-card {
  text-align: center;
}

.buddy-card svg {
  width: 140px;
  height: 130px;
  display: block;
  margin: 0 auto 8px;
}

.buddy-card .tagline {
  color: var(--primary-text);
  font-weight: 800;
  margin-bottom: 6px;
}

.buddy-bun {
  background: #fff1ea;
}

.buddy-pip {
  background: #eaf5ff;
}

.buddy-miso {
  background: #fff6e6;
}

.buddy-card.buddy-bun,
.buddy-card.buddy-pip,
.buddy-card.buddy-miso {
  border-color: transparent;
}

.buddy-card.buddy-bun h3,
.buddy-card.buddy-pip h3,
.buddy-card.buddy-miso h3,
.buddy-card.buddy-bun p,
.buddy-card.buddy-pip p,
.buddy-card.buddy-miso p {
  color: #1e2135;
}

.buddy-card.buddy-bun .tagline,
.buddy-card.buddy-pip .tagline,
.buddy-card.buddy-miso .tagline {
  color: #4a3bc4;
}

.note {
  margin-top: 20px;
  color: var(--text-muted);
}

/* Screenshots */

.shots-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.shots {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px var(--gutter) 20px;
  margin: 0;
  list-style: none;
  max-width: var(--max);
  margin: 0 auto;
}

.shots li {
  flex: 0 0 auto;
  scroll-snap-align: center;
}

.shots img {
  display: block;
  width: 240px;
  height: auto;
  aspect-ratio: 9 / 16;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--primary-soft);
}

.scroll-hint {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Privacy promise */

.promise {
  background: var(--primary-soft);
  border-radius: var(--radius-panel);
  padding: 32px 24px;
}

@media (min-width: 640px) {
  .promise {
    padding: 48px;
  }
}

.checks {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  gap: 12px;
}

@media (min-width: 640px) {
  .checks {
    grid-template-columns: repeat(2, 1fr);
  }
}

.checks li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-weight: 700;
}

.checks svg {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  color: var(--success);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 16px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

@media (prefers-color-scheme: dark) {
  .button {
    background: #6c5ce7;
  }
}

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

/* Text pages: privacy and support */

.page {
  padding: 48px 0 72px;
}

.page .wrap {
  max-width: 760px;
}

.prose h2 {
  font-size: 1.6rem;
  margin-top: 1.6em;
}

.prose h3 {
  margin-top: 1.4em;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
  margin: 0 0 1em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose .updated {
  color: var(--text-muted);
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  margin-bottom: 12px;
}

.faq summary {
  cursor: pointer;
  display: flex;
  gap: 12px;
  align-items: baseline;
  min-height: 48px;
  padding: 14px 20px;
  font-weight: 800;
  list-style: none;
}

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

.faq summary::before {
  content: '+';
  flex: 0 0 1ch;
  color: var(--primary-text);
  font-weight: 800;
}

.faq details[open] summary::before {
  content: '\2212';
}

.faq details > div {
  padding: 0 20px 6px 44px;
  color: var(--text-subtle);
}

.contact-card {
  margin-bottom: 32px;
}

.contact-card .email {
  font-family: 'Fredoka', 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 1.4rem;
  word-break: break-word;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  padding: 40px 0 48px;
  font-size: 0.95rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-bottom: 16px;
}

.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-weight: 700;
}

.site-footer p {
  max-width: 46em;
}

.not-found {
  text-align: center;
  padding: 72px 0 96px;
}

.not-found svg {
  width: 160px;
  height: 150px;
}
