/* The Flatten Earth Society — a parody site
   Serious fonts, silly ideas. */

:root {
  --ink: #1c1712;
  --paper: #f4efe4;
  --paper-alt: #efe7d3;
  --accent: #b5532e;      /* pancake / terracotta */
  --accent-dark: #8a3a1e;
  --gold: #c79a3a;
  --line: rgba(28, 23, 18, 0.14);
  --shadow: 0 10px 30px rgba(28, 23, 18, 0.12);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--serif);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(1080px, 92vw); margin-inline: auto; }

a { color: var(--accent-dark); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 239, 228, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
}
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); }
.brand-mark { font-size: 1.8rem; line-height: 1; }
.brand-text strong { display: block; font-family: var(--sans); font-size: 0.85rem; letter-spacing: 0.14em; }
.brand-text small { color: var(--accent-dark); font-size: 0.72rem; letter-spacing: 0.05em; }

.site-nav { display: flex; align-items: center; gap: 1.4rem; font-family: var(--sans); }
.site-nav a { text-decoration: none; font-size: 0.9rem; letter-spacing: 0.02em; color: var(--ink); }
.site-nav a:hover { color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.82rem; }

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(199, 154, 58, 0.18), transparent 60%),
    radial-gradient(900px 600px at 0% 20%, rgba(181, 83, 46, 0.10), transparent 55%);
  padding: 4.5rem 0 4rem;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center; }
.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  color: var(--accent-dark);
  margin: 0 0 0.8rem;
  font-weight: 700;
}
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 0.98; margin: 0; letter-spacing: -0.01em; }
.hero h2 { font-size: clamp(1.4rem, 3.5vw, 2.2rem); font-weight: 400; color: var(--accent); margin: 0.4rem 0 1.2rem; font-style: italic; }
.lede { font-size: 1.15rem; max-width: 34ch; }
.lede .flattening { color: var(--accent); font-weight: 700; font-style: normal; letter-spacing: 0.02em; }
.hero-cta { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.6rem; }
.hero-note { font-family: var(--sans); font-size: 0.78rem; color: rgba(28,23,18,0.6); margin-top: 1.2rem; }

/* ---------- the planet animation ---------- */
.hero-visual { display: flex; justify-content: center; align-items: center; padding: 1rem; }
.planet {
  position: relative;
  width: 240px; height: 240px;
  display: grid; place-items: center;
}
.planet-squish {
  width: 200px; height: 200px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #f6d98a 0 12%, transparent 13%),
    radial-gradient(circle at 68% 55%, #7bb27a 0 16%, transparent 17%),
    radial-gradient(circle at 45% 72%, #5f9e8f 0 12%, transparent 13%),
    linear-gradient(140deg, #6aa9d6 0%, #3f7bb0 55%, #2d5a8a 100%);
  box-shadow: inset -24px -28px 40px rgba(0,0,0,0.28), inset 18px 18px 34px rgba(255,255,255,0.15), var(--shadow);
  position: relative;
  animation: squish 6s ease-in-out infinite;
  transform-origin: center bottom;
}
@keyframes squish {
  0%, 100% { transform: scaleY(1) scaleX(1); }
  45% { transform: scaleY(0.16) scaleX(1.08); border-radius: 50%; }
  55% { transform: scaleY(1.05) scaleX(0.97); }
}
.continent { position: absolute; border-radius: 50%; }
.c1 { width: 46px; height: 30px; top: 40px; left: 34px; background: #6fae6e; }
.c2 { width: 60px; height: 40px; top: 96px; left: 110px; background: #5f9e8f; }
.c3 { width: 34px; height: 22px; top: 150px; left: 40px; background: #7bb27a; }
.c4 { width: 26px; height: 26px; top: 24px; left: 130px; background: #8fc07f; }

.press { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 170px; display: flex; justify-content: center; animation: pressdown 6s ease-in-out infinite; }
@keyframes pressdown {
  0%, 40% { transform: translate(-50%, 0); }
  50%, 60% { transform: translate(-50%, 64px); }
  100% { transform: translate(-50%, 0); }
}
.press-plate {
  width: 160px; height: 26px; border-radius: 8px;
  background: linear-gradient(180deg, #d9c07f, #a87f34);
  border: 1px solid #7c5a1f;
  box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}
.planet-label {
  position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.2em;
  color: var(--accent-dark); text-transform: uppercase;
}

/* ---------- social proof ---------- */
.proof { border-block: 1px solid var(--line); background: var(--paper-alt); }
.proof-inner { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; gap: 1rem; padding: 1.6rem 0; }
.proof-inner strong { display: block; font-size: 1.6rem; color: var(--accent); }
.proof-inner small { font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.04em; color: rgba(28,23,18,0.7); }

/* ---------- sections ---------- */
.section { padding: 4rem 0; }
.section-alt { background: var(--paper-alt); }
.section-title { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 0.3rem; letter-spacing: -0.01em; }
.section-sub { margin-top: 0; color: rgba(28,23,18,0.65); font-style: italic; }

/* ---------- manifesto ---------- */
.manifesto-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; margin-top: 2rem; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow);
}
.card h4 { margin: 0 0 0.5rem; font-family: var(--sans); font-size: 1.05rem; color: var(--accent-dark); }
.card p { margin: 0; font-size: 0.98rem; }

/* ---------- get to work ---------- */
.chores {
  list-style: none;
  counter-reset: chore;
  padding: 0;
  margin: 2rem 0 0;
  max-width: 720px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.chores li {
  position: relative;
  padding: 1rem 1rem 1rem 3.2rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.02rem;
}
.chores li:last-child { border-bottom: none; }
.chores li::before {
  counter-increment: chore;
  content: counter(chore);
  position: absolute; left: 1rem; top: 1rem;
  width: 1.6rem; height: 1.6rem;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* ---------- science ---------- */
.science { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; margin-top: 2rem; align-items: start; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.steps li { position: relative; padding: 1rem 0 1rem 3.4rem; border-bottom: 1px dashed var(--line); }
.steps li:first-child { border-top: 1px dashed var(--line); }
.step-num {
  position: absolute; left: 0; top: 1rem;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; font-family: var(--sans); font-weight: 700;
}
.steps p { margin: 0; }
.disclaimer {
  background: var(--paper);
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow);
  font-size: 0.95rem;
}

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin-top: 2rem; }
.faq details { border-bottom: 1px solid var(--line); padding: 0.2rem 0; }
.faq summary {
  cursor: pointer; font-size: 1.15rem; font-weight: 600;
  padding: 1rem 0.3rem; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 0 0 1rem; color: rgba(28,23,18,0.85); }

/* ---------- join ---------- */
.join-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.perks { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.perks li { padding: 0.4rem 0; font-size: 0.98rem; }
.join-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.8rem;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 1rem;
}
.join-form label { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.95rem; font-weight: 600; }
.join-form input {
  font-family: var(--sans); font-size: 0.95rem;
  padding: 0.65rem 0.8rem; border: 1px solid var(--line); border-radius: 8px;
  background: #fffdf8; color: var(--ink);
}
.join-form input:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.level-select { font-size: 0.9rem; }
.level-select strong { display: block; margin-bottom: 0.5rem; }
.radio-group { display: flex; flex-direction: column; gap: 0.35rem; }
.radio { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; }
.btn[type=submit] { width: 100%; }
.form-success { background: rgba(111,178,122,0.15); border-radius: 8px; padding: 0.8rem; font-weight: 600; text-align: center; }
.form-tiny { font-size: 0.72rem; color: rgba(28,23,18,0.55); margin: 0; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0; }
.footer-inner { display: flex; flex-direction: column; gap: 0.3rem; }
.site-footer p { margin: 0; font-size: 0.9rem; }
.footer-fineprint { font-size: 0.78rem; color: rgba(28,23,18,0.55); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero-grid, .join-wrap, .science { grid-template-columns: 1fr; }
  .manifesto-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .site-nav { gap: 0.9rem; }
  .proof-inner { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .site-nav a:not(.btn) { display: none; }
}

/* ---------- membership certificate ---------- */
.cert {
  margin-top: 2.4rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.cert-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 0.6rem 1.2rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.cert-head h4 { margin: 0; font-family: var(--sans); font-size: 1rem; letter-spacing: 0.02em; }
.cert-lead { margin: 0; font-size: 0.92rem; color: rgba(28, 23, 18, 0.75); }
.cert-lead strong { font-family: var(--sans); color: var(--accent-dark); letter-spacing: 0.02em; }
.cert canvas {
  display: block; width: 100%; height: auto;
  border-radius: 10px; border: 1px solid var(--line); background: var(--paper-alt);
}
.cert-actions { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.1rem; }
.cert-status { font-family: var(--sans); font-size: 0.78rem; color: var(--accent-dark); }
@media (max-width: 520px) { .cert { padding: 0.9rem; } }
