/*
 * Evenroo public site: shared tokens, fonts, header, footer, buttons and stamps. OWNER: the lead.
 * World: the app's Ink stamp look (PRODUCT.md Brand Commitments). Colours mirror the app's
 * theme tokens (white surfaces, Evenroo green #1d5240, emerald for money owed to you, burnt orange
 * for money you owe, stamp red for PAID). Figtree for text, Schibsted Grotesk for amounts and
 * headings, Big Shoulders Display for stamp letters only. Self-hosted, no third-party requests.
 * Used by every page; reading pages add /site/pages.css, the landing adds /welcome/landing.css.
 */

@font-face {
  font-family: 'Figtree';
  src: url('/site/fonts/figtree-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
  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;
}
@font-face {
  font-family: 'Figtree';
  src: url('/site/fonts/figtree-latin-ext.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('/site/fonts/schibsted-latin.woff2') format('woff2');
  font-weight: 400 900;
  font-display: swap;
  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;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('/site/fonts/schibsted-latin-ext.woff2') format('woff2');
  font-weight: 400 900;
  font-display: swap;
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Big Shoulders Display';
  src: url('/site/fonts/bigshoulders-latin.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
  unicode-range: U+0000-00FF;
}

:root {
  color-scheme: light dark;
  --font-ui: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-num: 'Schibsted Grotesk', var(--font-ui);
  --font-stamp: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --font-code: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, monospace;

  --canvas: #f3f4f3;
  --surface: #ffffff;
  --surface-2: #f5f6f5;
  --border: #e3e6e4;
  --border-strong: #c9cecb;
  --text: #161a18;
  --text-2: #5b625e;
  --brand: #1d5240;
  --brand-hover: #174535;
  --on-brand: #ffffff;
  --brand-soft: #e6f0eb;
  --brand-text: #1d5240;
  --pos: #0e7a4a;
  --neg: #a8440a;
  --stamp: #c8322a;
  --focus: #1d5240;
  --selection: #cfe5d9;
  --shadow-2: 0 10px 30px rgba(16, 24, 20, 0.14), 0 1px 3px rgba(16, 24, 20, 0.08);
  --shadow-phone: 0 40px 80px -30px rgba(16, 40, 30, 0.35), 0 8px 20px -8px rgba(16, 24, 20, 0.18);
  --shadow-fab: 0 6px 18px rgba(16, 40, 30, 0.28);
  --shadow-band: 0 30px 60px -30px rgba(0, 0, 0, 0.5);
  --bezel: #16181b;
  --m0: #1d5240;
  --m1: #27457a;
  --m2: #9a2f2a;
  --m3: #6b4a1c;
  --m4: #6a3f8f;
  --stamp-filter: url(#ink);

  /* The agent band: Evenroo green owns a whole region in both themes. */
  --band: #1d5240;
  --band-2: #174535;
  --on-band: #ffffff;
  --on-band-2: #cfe3d8;
  --band-line: rgba(255, 255, 255, 0.16);

  /* Type ramp: the app's (DESIGN.md "Type ramp") plus the site's display steps (DESIGN.md "Public site").
     Every font-size on the site is one of these, or a fluid token that runs between two of them. */
  --t-2xs: 0.75rem; /* 12 */
  --t-xs: 0.8125rem; /* 13 */
  --t-sm: 0.9375rem; /* 15 */
  --t-md: 1rem; /* 16 */
  --t-ml: 1.125rem; /* 18 */
  --t-lg: 1.25rem; /* 20 */
  --t-xl: 1.5rem; /* 24, site */
  --t-title: 1.75rem; /* 28 */
  --t-2xl: 2.5rem; /* 40 */
  --t-3xl: 3rem; /* 48, site */
  --t-4xl: 3.5rem; /* 56, site */
  --t-5xl: 4.25rem; /* 68, site */
  --t-lead: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  --t-h4: clamp(1.5rem, 1.25rem + 1vw, 2.5rem);
  --t-h3: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  --t-h2: clamp(2.5rem, 1.9rem + 2vw, 3.5rem);
  --t-display: clamp(2.5rem, 1.5rem + 3.6vw, 4.25rem);
  /* Radii: the app's (6, 10, 16, pill) plus two site-only steps for stages and device frames. */
  --r-1: 6px;
  --r-2: 10px;
  --r-3: 16px;
  --r-4: 24px;
  --r-device: 44px;
  --r-full: 999px;
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;
  --gutter: clamp(16px, 4.4vw, 64px);
  --max: 1440px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --canvas: #0b0e0d;
    --surface: #141817;
    --surface-2: #1c211f;
    --border: #2a302d;
    --border-strong: #3d4541;
    --text: #eef2ef;
    --text-2: #a5aea9;
    --brand: #2a7454;
    --brand-hover: #318262;
    --on-brand: #ffffff;
    --brand-soft: #18302a;
    --brand-text: #74cba3;
    --pos: #4cc38a;
    --neg: #f2945a;
    --stamp: #ff6b5e;
    --focus: #74cba3;
    --selection: #24493b;
    --shadow-2: 0 12px 32px rgba(0, 0, 0, 0.5);
    --shadow-phone: 0 40px 80px -30px rgba(0, 0, 0, 0.8);
    --shadow-fab: 0 6px 18px rgba(0, 0, 0, 0.55);
    --bezel: #2b302e;
    --m0: #7fd0aa;
    --m1: #9bb8ef;
    --m2: #f39a8e;
    --m3: #dcb27a;
    --m4: #c8a6ec;
    --stamp-filter: url(#ink-dark);
    --band: #10241c;
    --band-2: #0c1c16;
    --on-band: #eef2ef;
    --on-band-2: #b5cbbf;
    --band-line: rgba(255, 255, 255, 0.12);
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --canvas: #0b0e0d;
  --surface: #141817;
  --surface-2: #1c211f;
  --border: #2a302d;
  --border-strong: #3d4541;
  --text: #eef2ef;
  --text-2: #a5aea9;
  --brand: #2a7454;
  --brand-hover: #318262;
  --on-brand: #ffffff;
  --brand-soft: #18302a;
  --brand-text: #74cba3;
  --pos: #4cc38a;
  --neg: #f2945a;
  --stamp: #ff6b5e;
  --focus: #74cba3;
  --selection: #24493b;
  --shadow-2: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-phone: 0 40px 80px -30px rgba(0, 0, 0, 0.8);
  --shadow-fab: 0 6px 18px rgba(0, 0, 0, 0.55);
  --bezel: #2b302e;
  --m0: #7fd0aa;
  --m1: #9bb8ef;
  --m2: #f39a8e;
  --m3: #dcb27a;
  --m4: #c8a6ec;
  --stamp-filter: url(#ink-dark);
  --band: #10241c;
  --band-2: #0c1c16;
  --on-band: #eef2ef;
  --on-band-2: #b5cbbf;
  --band-line: rgba(255, 255, 255, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 88px;
}
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font: 400 var(--t-md)/1.55 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure,
pre {
  margin: 0;
}
ul,
ol {
  padding: 0;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: var(--brand-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover {
  text-decoration-thickness: 2px;
}
::selection {
  background: var(--selection);
  color: var(--text);
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--r-1);
}
code,
pre,
kbd {
  font-family: var(--font-code);
  font-size: 0.9em;
}
.num {
  font-family: var(--font-num);
  font-variant-numeric: lining-nums;
  letter-spacing: -0.01em;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.ink-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
html {
  scrollbar-color: var(--border-strong) transparent;
}

.skip {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 100;
  background: var(--brand);
  color: var(--on-brand);
  padding: 10px 16px;
  border-radius: var(--r-full);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus {
  top: var(--s-3);
}

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: var(--r-full);
  background: var(--brand);
  color: var(--on-brand);
  font: 700 var(--t-md)/1 var(--font-ui);
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 160ms var(--ease-out),
    transform 160ms var(--ease-out);
}
.btn:hover {
  background: var(--brand-hover);
}
.btn:active {
  transform: translateY(1px);
}
.btn--sm {
  min-height: 40px;
  padding: 0 18px;
  font-size: var(--t-sm);
  font-weight: 600;
}
.btn--lg {
  min-height: 56px;
  padding: 0 30px;
  font-size: var(--t-ml);
}
.btn--ghost {
  background: transparent;
  color: var(--brand-text);
  box-shadow: inset 0 0 0 1.5px var(--border-strong);
}
.btn--ghost:hover {
  background: var(--brand-soft);
}
.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

/* ---- Stamps (the signature) ---------------------------------------------- */
/* Member initial: a small, slightly rotated ink stamp in the member's own ink. */
.st {
  --s: 32px;
  --r: -4deg;
  --c: var(--m0);
  width: var(--s);
  height: var(--s);
  display: inline-grid;
  place-items: center;
  flex: none;
  color: var(--c);
  border: 1.8px solid var(--c);
  border-radius: var(--r-1);
  font: 800 calc(var(--s) * 0.6)/1 var(--font-stamp);
  transform: rotate(var(--r));
  filter: var(--stamp-filter);
}
/* Word stamp: PAID, QUITS. Double border like a rubber stamp. */
.stamp {
  --c: var(--stamp);
  --r: -8deg;
  display: inline-block;
  color: var(--c);
  font: 800 var(--t-xl)/1 var(--font-stamp);
  letter-spacing: 0.08em;
  border: 3px solid var(--c);
  border-radius: var(--r-1);
  padding: 6px 12px 5px;
  transform: rotate(var(--r));
  filter: var(--stamp-filter);
  box-shadow:
    inset 0 0 0 2px var(--surface),
    inset 0 0 0 3.5px var(--c);
  white-space: nowrap;
}
.stamp--green {
  --c: var(--brand-text);
}

/* ---- Header -------------------------------------------------------------- */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
}
.top__in {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  gap: var(--s-5);
}
.wm {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font: 700 var(--t-xl)/1 var(--font-num);
  letter-spacing: -0.02em;
  padding: 6px 0;
}
.wm:hover {
  text-decoration: none;
}
/* The app's mark (public/icons/icon.svg, src/client/ui/Wordmark.tsx): a green rounded square
   holding two halves of a coin. Drawn inline so it follows the theme's brand green. */
.wm__mark {
  width: 32px;
  height: 32px;
  flex: none;
}
.top__nav {
  margin-left: auto;
}
.top__nav ul {
  list-style: none;
  display: flex;
  gap: clamp(16px, 2.4vw, 34px);
  align-items: center;
}
.top__nav a {
  color: var(--text-2);
  text-decoration: none;
  font: 500 var(--t-sm)/1 var(--font-ui);
  padding: 12px 0;
  display: inline-block;
}
.top__nav a:hover,
.top__nav a[aria-current='page'] {
  color: var(--text);
}
.top__nav a[aria-current='page'] {
  text-decoration: underline;
  text-decoration-color: var(--brand-text);
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}
.top__short {
  display: none;
}
@media (max-width: 860px) {
  .top__wide {
    display: none;
  }
  .top__in {
    gap: var(--s-4);
  }
}
@media (max-width: 420px) {
  .top__long {
    display: none;
  }
  .top__short {
    display: inline;
  }
  .top__in {
    gap: 12px;
    padding-block: 10px;
  }
  .wm {
    font-size: var(--t-lg);
    gap: 8px;
  }
  .wm__mark {
    width: 28px;
    height: 28px;
  }
  .top__nav a {
    font-size: var(--t-sm);
  }
  .top__cta {
    padding: 0 14px;
  }
}

/* ---- Footer -------------------------------------------------------------- */
.foot {
  background: var(--canvas);
  border-top: 1px solid var(--border);
  color: var(--text-2);
}
.foot__in {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--s-8) var(--gutter) var(--s-6);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr);
  gap: var(--s-7) var(--s-6);
}
.foot__brand p {
  margin-top: var(--s-3);
  max-width: 34ch;
  font-size: var(--t-sm);
}
.wm--foot {
  font-size: var(--t-lg);
}
.foot__cols {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr));
  gap: var(--s-5);
}
.foot__h {
  font: 600 var(--t-sm)/1.3 var(--font-ui);
  color: var(--text);
  margin-bottom: var(--s-3);
}
.foot__cols ul {
  list-style: none;
  display: grid;
  gap: 2px;
}
.foot__cols a {
  color: var(--text-2);
  text-decoration: none;
  font-size: var(--t-sm);
  display: inline-block;
  padding: 6px 0;
}
.foot__cols a:hover {
  color: var(--text);
  text-decoration: underline;
}
.foot__fine {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border);
  padding-top: var(--s-5);
  font-size: var(--t-xs);
}
@media (max-width: 760px) {
  .foot__in {
    grid-template-columns: 1fr;
    gap: var(--s-6);
    padding-top: var(--s-7);
  }
  .foot__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Directory badges (Startup Fame asks for one on the homepage for its free listing). */
.foot__badges {
  grid-column: 1 / -1;
  margin: 0;
}
.foot__badges img {
  height: 28px;
  width: auto;
  display: block;
}
