/* Friemind website — shared styles
   Built on top of the design system (colors_and_type.css).
   Imports Nunito + Caveat (handwritten accents, used sparingly). */

@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&family=Caveat:wght@500;600;700&display=swap");

/* ---------- Tokens (mirror design-system, restated locally) ---------- */
:root {
  --fm-surface: #FAF9F5;
  --fm-surface-2: #F0EEE6;
  --fm-surface-3: #E8E6DC;
  --fm-card: #FFFFFF;
  --fm-text: #1F1E1D;
  --fm-text-2: #65635E;
  --fm-text-3: #8E8B83;
  --fm-text-muted: #B8B5AC;
  --fm-stroke: #E0DDD2;
  --fm-stroke-2: #ECE9E0;
  --fm-accent: #CC785C;
  --fm-accent-dark: #A85B41;

  --postit-cream: #FFEFCC;
  --postit-rose:  #FFD6D6;
  --postit-sky:   #E0F4FF;
  --postit-mint:  #E8F5E9;
  --postit-lilac: #F3E5F5;

  --shadow-postit: 0 6px 14px rgba(0,0,0,0.13);
  --shadow-postit-lg: 0 12px 28px rgba(0,0,0,0.18);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.04), 0 12px 32px rgba(0,0,0,0.06);
  --shadow-phone: 0 30px 80px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.1);

  --sans: "Nunito", system-ui, -apple-system, sans-serif;
  --hand: "Caveat", "Marker Felt", cursive;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--fm-text);
  background: var(--fm-surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 17px;
  line-height: 1.55;
  /* subtle paper texture */
  background-image: radial-gradient(circle at 1px 1px, rgba(0,0,0,0.025) 1px, transparent 0);
  background-size: 14px 14px;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }

/* ---------- Layout helpers ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .wrap { padding: 0 20px; } }

/* ---------- Nav ---------- */
.fm-nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  background: rgba(250, 249, 245, 0.78);
  border-bottom: 1px solid var(--fm-stroke-2);
}
.fm-nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.fm-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 22px; letter-spacing: -0.4px;
}
.fm-logo__dots { display: flex; gap: 3px; }
.fm-logo__dots span {
  width: 12px; height: 12px; border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.fm-logo__dots span:nth-child(1) { background: var(--postit-cream); transform: rotate(-8deg); }
.fm-logo__dots span:nth-child(2) { background: var(--postit-rose);  transform: rotate(4deg); }
.fm-logo__dots span:nth-child(3) { background: var(--postit-sky);   transform: rotate(-3deg); }

.fm-nav__links { display: flex; gap: 28px; align-items: center; white-space: nowrap; }
.fm-nav__links a {
  font-size: 14px; font-weight: 600; color: var(--fm-text-2);
  transition: color .15s;
}
.fm-nav__links a:hover { color: var(--fm-text); }
.fm-nav__cta,
.fm-nav__links a.fm-nav__cta {
  background: var(--fm-text); color: #fff;
  padding: 10px 18px; border-radius: 16px;
  font-weight: 700; font-size: 14px;
  transition: transform .15s;
}
.fm-nav__cta:hover,
.fm-nav__links a.fm-nav__cta:hover { transform: translateY(-1px); color: #fff; }

@media (max-width: 720px) {
  .fm-nav__links a:not(.fm-nav__cta) { display: none; }
}

/* ---------- Buttons ---------- */
.fm-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px; border-radius: 18px;
  font-weight: 700; font-size: 15px;
  border: none; transition: transform .15s, background .15s;
}
.fm-btn--primary { background: var(--fm-accent); color: #FAF9F5; }
.fm-btn--primary:hover { background: var(--fm-accent-dark); transform: translateY(-1px); }
.fm-btn--dark { background: var(--fm-text); color: #FAF9F5; }
.fm-btn--dark:hover { transform: translateY(-1px); }
.fm-btn--secondary {
  background: transparent; color: var(--fm-text);
  border: 1.5px solid var(--fm-stroke); font-weight: 600;
}
.fm-btn--secondary:hover { background: var(--fm-surface-2); }

/* ---------- Store badges ---------- */
.store-badges { display: flex; gap: 12px; flex-wrap: wrap; }
.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--fm-text); color: #FAF9F5;
  padding: 12px 22px; border-radius: 14px;
  transition: transform .15s;
}
.store-badge:hover { transform: translateY(-2px); }
.store-badge__sub { font-size: 11px; opacity: .8; line-height: 1; }
.store-badge__main { font-size: 18px; font-weight: 700; line-height: 1.1; margin-top: 2px; }

/* ---------- Sections ---------- */
.fm-section { padding: 96px 0; position: relative; }
.fm-section--alt { background: var(--fm-surface-2); }

.fm-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 1.2px;
  color: var(--fm-text-3); text-transform: uppercase;
}
.fm-h1 {
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 800; line-height: 0.98; letter-spacing: -2px;
  text-wrap: balance;
}
.fm-h2 {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800; line-height: 1.05; letter-spacing: -1px;
  text-wrap: balance;
}
.fm-h3 {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 700; line-height: 1.2; letter-spacing: -0.4px;
}
.fm-lede {
  font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5;
  color: var(--fm-text-2); text-wrap: pretty; max-width: 540px;
}
.fm-aside {
  font-size: 15px; color: var(--fm-text-2); line-height: 1.6;
}

/* ---------- Post-it ---------- */
.postit {
  position: relative; padding: 18px 20px;
  border-radius: 6px; box-shadow: var(--shadow-postit);
  font-size: 15px; line-height: 1.5;
  user-select: none;
}
.postit::before {
  content: ""; position: absolute; top: -8px; left: 50%;
  transform: translateX(-50%);
  width: 50px; height: 14px; background: rgba(0,0,0,0.08);
  border-radius: 2px;
}
.postit__author { font-weight: 700; font-size: 13px; }
.postit__time { font-size: 12px; color: var(--fm-text-2); }
.postit__head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 6px;
}
.postit--draggable { cursor: grab; }
.postit--draggable:active { cursor: grabbing; }
.postit--draggable.dragging { box-shadow: var(--shadow-postit-lg); z-index: 100; }

/* ---------- Phone frame ---------- */
.phone {
  width: 360px; height: 780px; border-radius: 48px;
  background: var(--fm-surface); position: relative; overflow: hidden;
  box-shadow: var(--shadow-phone);
  font-family: var(--sans);
}
.phone__island {
  position: absolute; top: 11px; left: 50%; transform: translateX(-50%);
  width: 116px; height: 34px; border-radius: 20px; background: #000; z-index: 50;
}
.phone__indicator {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  width: 130px; height: 5px; border-radius: 100px;
  background: rgba(0,0,0,0.25); z-index: 60;
}
.phone__statusbar {
  height: 47px; padding: 14px 26px 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 16px; font-weight: 600; color: var(--fm-text);
}

/* ---------- Footer ---------- */
.fm-footer {
  background: var(--fm-text); color: #FAF9F5; padding: 72px 0 48px;
}
.fm-footer a { color: rgba(250,249,245,0.7); }
.fm-footer a:hover { color: #FAF9F5; }
.fm-footer__grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 56px;
}
@media (max-width: 720px) { .fm-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
.fm-footer h4 {
  font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  margin-bottom: 18px; color: rgba(250,249,245,0.55);
}
.fm-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.fm-footer__bottom {
  margin-top: 64px; padding-top: 24px;
  border-top: 1px solid rgba(250,249,245,0.1);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: rgba(250,249,245,0.5);
}
@media (max-width: 720px) { .fm-footer__bottom { flex-direction: column; gap: 12px; align-items: flex-start; } }

/* ---------- Misc decorative ---------- */
.tape {
  position: absolute; width: 64px; height: 18px;
  background: rgba(0,0,0,0.07); border-radius: 2px;
  transform: rotate(-4deg);
}
.handnote {
  font-family: var(--hand); font-weight: 600;
  color: var(--fm-text-2); font-size: 22px;
  transform: rotate(-2deg);
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s, transform .8s; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
