/* Friendli public site — landing + legal pages.
 *
 * COLOUR DISCIPLINE — the point of this file.
 *
 * The brand is a violet-to-pink gradient. Used as a surface treatment it turns
 * a company site into a toy: gradient headline, gradient slab behind the hero,
 * gradient chips with nothing in them. So the rule here is that the gradient
 * belongs to the LOGO, and to exactly one deliberate panel colour — nowhere
 * else. Everything that used to be gradient is now either flat ink, the single
 * accent, or a real illustration.
 *
 * That leaves the page carried by neutrals, which are biased a few degrees
 * toward violet rather than being pure grey, so they read as chosen and as
 * part of the same family as the mark.
 *
 * The illustrations are white line art (shipped with the app's onboarding), so
 * they need a dark ground in BOTH themes. --panel is that ground, and it is
 * also the page's one saturated moment.
 *
 * Type: Figtree for display — geometric and rounded, which is what the mark
 * is — and Inter for body, the face the app itself bundles, so site and
 * product read as one thing.
 */

:root {
  /* Brand — the mark's own colours. Only the logo and --panel use these. */
  --violet: #4C07FF;
  --pink: #FF00A0;

  --ground: #FFFFFF;
  --surface: #F8F7FB;
  --ink: #14121C;
  --ink-2: #4A4657;
  --muted: #7C7789;
  --line: #E7E5EC;
  --accent: #4A19E6;
  --accent-soft: #F1EDFF;

  /* The one saturated surface. Constant across themes — it is the ground the
   * white line-art illustrations are drawn for. */
  --panel: #1A1338;
  --panel-2: #2A1B5C;
  --on-panel: #EFECFA;
  --on-panel-dim: #A9A1CE;

  --display: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 1080px;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0C0A14;
    --surface: #141221;
    --ink: #F3F2F7;
    --ink-2: #C3BFD0;
    --muted: #8D889C;
    --line: #262331;
    --accent: #A48DFF;
    --accent-soft: #1C1733;
  }
}

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3 { font-family: var(--display); text-wrap: balance; }

/* ---------- shared chrome ---------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 22px 24px;
}
.brand { display: block; flex: none; }
/* Two files rather than a CSS filter — the lockup's wordmark is solid black in
 * one and solid white in the other, and no filter gets from one to the other
 * while leaving the gradient mark untouched. */
.brand img { height: 30px; width: auto; }
.brand .on-light { display: block; }
.brand .on-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .brand .on-light { display: none; }
  .brand .on-dark { display: block; }
}

.nav-links { display: flex; gap: 22px; font-size: 14.5px; flex-wrap: wrap; }
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a:hover { color: var(--ink); }

footer {
  border-top: 1px solid var(--line);
  margin-top: 88px;
  padding: 40px 24px 60px;
}
.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: start;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14.5px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.footer-legal { font-size: 13.5px; color: var(--muted); max-width: 46ch; }
.footer-legal p { margin: 0 0 6px; }
.footer-legal strong { color: var(--ink-2); }

/* ---------- landing: hero ---------- */

.hero {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 56px 24px 80px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(38px, 5.4vw, 58px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.033em;
  margin: 0 0 18px;
}
.hero p { font-size: 18.5px; color: var(--ink-2); margin: 0 0 30px; max-width: 44ch; }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: 15.5px;
  padding: 12px 24px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary { background: var(--ink); color: var(--ground); }
.btn-secondary { border-color: var(--line); color: var(--ink); background: var(--ground); }
.btn-secondary:hover { border-color: var(--muted); }
.note { font-size: 13.5px; color: var(--muted); margin: 16px 0 0; }

/* The page's one saturated surface, and the ground the white line art needs. */
.panel {
  background: linear-gradient(150deg, var(--panel), var(--panel-2));
  border-radius: 24px;
  padding: 40px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
/* A single soft violet bloom, not a second gradient competing with the first. */
.panel::before {
  content: "";
  position: absolute;
  width: 340px; height: 340px;
  top: -130px; right: -110px;
  background: radial-gradient(circle, rgba(124, 58, 237, .5), transparent 68%);
}
.panel img { position: relative; width: 100%; max-width: 330px; }

/* ---------- landing: how it works ---------- */

.strip { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 68px 24px; }
.section { max-width: var(--wrap); margin: 0 auto; padding: 76px 24px; }
.strip .section { padding: 0; }

.eyebrow {
  font-family: var(--display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}
.section h2 { font-size: clamp(26px, 3.4vw, 33px); font-weight: 700; letter-spacing: -.025em; margin: 0 0 10px; }
.section .sub { color: var(--ink-2); margin: 0 0 40px; max-width: 58ch; font-size: 17px; }

.cards { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card {
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
/* The illustration tile. Replaces the empty gradient chips that used to sit
 * here — a coloured square with nothing in it reads as a failed image load. */
.card-art {
  background: linear-gradient(150deg, var(--panel), var(--panel-2));
  padding: 26px;
  display: grid;
  place-items: center;
}
.card-art img { width: 100%; max-width: 150px; }
.card-body { padding: 22px 24px 26px; }
.card h3 { font-size: 17.5px; font-weight: 700; margin: 0 0 8px; letter-spacing: -.012em; }
.card p { margin: 0; font-size: 15px; color: var(--ink-2); }

/* ---------- landing: safety ---------- */

.split { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.safety-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.safety-list li { display: grid; grid-template-columns: auto 1fr; gap: 14px; font-size: 15.5px; color: var(--ink-2); }
.safety-list strong { color: var(--ink); font-weight: 600; }
/* A drawn check, not a filled dot — the dot read as a bullet with a colour
 * problem rather than as an affirmation. */
.tick {
  width: 22px; height: 22px;
  flex: none;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
  margin-top: 3px;
}
.tick svg { width: 12px; height: 12px; }

/* ---------- legal pages ---------- */

.doc { max-width: 720px; margin: 0 auto; padding: 32px 24px 0; }
.doc-head { border-bottom: 1px solid var(--line); padding-bottom: 26px; margin-bottom: 34px; }
.doc h1 { font-size: clamp(30px, 4.4vw, 40px); font-weight: 800; letter-spacing: -.03em; margin: 0 0 10px; }
.doc .updated { font-size: 14px; color: var(--muted); margin: 0; }
.doc h2 { font-size: 21px; font-weight: 700; letter-spacing: -.015em; margin: 42px 0 12px; }
.doc h3 { font-size: 16.5px; font-weight: 600; margin: 26px 0 8px; }
.doc p, .doc li { color: var(--ink-2); }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 14px; padding-left: 22px; display: grid; gap: 8px; }
.doc strong { color: var(--ink); }

.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 36px;
}
.toc p {
  font-family: var(--display);
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 10px;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .11em;
}
.toc ol { margin: 0; padding-left: 20px; gap: 6px; font-size: 15px; }

.callout {
  border-left: 2px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 0 0 30px;
}
.callout p { margin: 0; font-size: 15px; }

.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 20px 0;
  background: var(--surface);
}
.contact-card p { margin: 0 0 4px; font-size: 15px; }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: 32px 24px 56px; gap: 40px; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .section { padding: 56px 24px; }
  .strip { padding: 56px 24px; }
  .panel { padding: 32px; }
  .nav { flex-direction: column; align-items: flex-start; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
