/* ============================================================
   Freckle — freckle-app.com
   Shared stylesheet · Design Guide v1 · May 2026
   ============================================================ */

/* ---- Google Fonts ----------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---- Tokens ----------------------------------------------- */
:root {
  /* Surfaces */
  --bone:   #FAF6F1;
  --paper:  #FFFFFF;
  --stone:  #F0EBE3;
  --shell:  #E8E2D8;

  /* Ink */
  --ink:      #1F1B17;
  --graphite: #5C544C;
  --slate:    #8B847C;
  --mist:     #B8B0A6;

  /* Brand */
  --clay:       #B5623F;
  --clay-deep:  #8E4727;
  --clay-light: #E8C9B5;
  --clay-tint:  #F5E5D8;

  /* Functional */
  --sage:        #7E8E6E;
  --sage-light:  #DBE0D0;
  --amber:       #C8893A;
  --amber-light: #F2DFB8;
  --rust:        #A04A2D;
  --rust-light:  #ECCFC0;

  /* Lines */
  --hairline: #E8E2D8;
  --border:   #D6CFC2;

  /* Type */
  --serif: 'Fraunces', Georgia, serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:  'JetBrains Mono', 'SF Mono', Consolas, monospace;

  /* Layout */
  --max-w: 1040px;
  --gutter: 32px;
}

/* ---- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--bone);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
}

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

a {
  color: var(--clay);
  text-decoration: none;
}

/* ---- Typography ------------------------------------------- */
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144;
  color: var(--ink);
}

.h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 80;
  color: var(--ink);
}

.h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(20px, 2.5vw, 26px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 36;
  color: var(--ink);
}

.lead {
  font-family: var(--sans);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.6;
  color: var(--graphite);
  font-weight: 400;
}

.micro {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate);
  font-weight: 500;
}

/* ---- Layout ----------------------------------------------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---- Navigation ------------------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 241, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variation-settings: "opsz" 36;
  border: none;
}

.nav-logo-mark {
  width: 24px;
  height: 24px;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--graphite);
  border: none;
  transition: color 150ms;
}

.nav-links a:hover { color: var(--clay); }
.nav-links a.btn-primary { color: white; }
.nav-links a.btn-primary:hover { color: white; }

/* ---- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  padding: 11px 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 150ms, border-color 150ms, color 150ms;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--clay);
  color: white;
  border-color: var(--clay);
}
.btn-primary:hover { background: var(--clay-deep); border-color: var(--clay-deep); }

.btn-secondary {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--stone); }

.btn-lg {
  font-size: 16px;
  padding: 14px 28px;
  border-radius: 10px;
}

/* ---- Tags ------------------------------------------------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--sans);
}
.tag-stable  { background: var(--sage-light);  color: #4F5C3F; }
.tag-watch   { background: var(--amber-light); color: #6E4A0F; }
.tag-neutral { background: var(--stone);       color: var(--graphite); }

/* ---- Site footer ------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 40px 0;
  margin-top: 96px;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-logo {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variation-settings: "opsz" 36;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 13px;
  color: var(--graphite);
  border: none;
  transition: color 150ms;
}
.footer-links a:hover { color: var(--clay); }

.footer-copy {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--slate);
  letter-spacing: 0.04em;
}

/* ---- Legal page prose ------------------------------------- */
.prose-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 72px var(--gutter) 120px;
}

.prose-page .page-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 12px;
}

.prose-page h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 80;
  color: var(--ink);
  margin-bottom: 8px;
}

.prose-page .prose-updated {
  font-size: 13px;
  color: var(--slate);
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--hairline);
}

.prose-page h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 36;
  color: var(--ink);
  margin-top: 40px;
  margin-bottom: 12px;
}

.prose-page h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 36;
  color: var(--ink);
  margin-top: 28px;
  margin-bottom: 10px;
}

.prose-page p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--graphite);
  margin-bottom: 16px;
}

.prose-page ul {
  margin: 0 0 16px 0;
  padding-left: 20px;
  list-style: none;
}

.prose-page ul li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--graphite);
  padding: 3px 0;
  padding-left: 16px;
  position: relative;
}

.prose-page ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--mist);
  font-size: 13px;
}

.prose-page a {
  color: var(--clay);
  border-bottom: 1px solid var(--clay-light);
}

.prose-page .prose-contact {
  margin-top: 48px;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 12px;
}

.prose-page .prose-contact p {
  margin-bottom: 0;
}

/* ---- Responsive ------------------------------------------- */
@media (max-width: 768px) {
  :root { --gutter: 20px; }

  .nav-links { gap: 18px; }

  .site-footer .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .prose-page {
    padding-top: 48px;
    padding-bottom: 80px;
  }
}

@media (max-width: 480px) {
  .nav-links a { font-size: 13px; }
  .footer-links { flex-direction: column; gap: 12px; }
}
