/* Isle of Human — site styles. Matches the app: cream paper, ink strokes, torch orange. */

:root {
  --paper: #F6EEDB;
  --ink: #1C1917;
  --torch: #FA9438;
  --ember: #D9452E;
  --leaf: #4D9E66;
  --tide: #339EB8;
  --night-a: #0E1A1F;
  --night-b: #1C1917;
  --wood: #6B4A2B;
  --panel: rgba(255, 255, 255, 0.55);
  --stroke: 2px solid var(--ink);
  --r: 16px;
  --r-sm: 14px;
  --shadow: 4px 4px 0 var(--ink);
  --head: "Luckiest Guy", Impact, "Arial Black", sans-serif;
  --body: "Patrick Hand", "Segoe Print", "Comic Sans MS", cursive, sans-serif;
  --max: 1040px;
  --gutter: 16px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.25rem;
  line-height: 1.4;
  overflow-x: clip;
}

h1, h2, h3 {
  font-family: var(--head);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin: 0;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

img, svg { max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--tide);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--ink);
  border: var(--stroke);
  border-radius: var(--r-sm);
  font-family: var(--head);
  text-transform: uppercase;
  text-decoration: none;
}
.skip:focus { top: 16px; }

/* Layout */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px var(--gutter);
}
.section > h2 {
  font-size: clamp(2.1rem, 8vw, 3.2rem);
  margin-bottom: 0.6em;
  text-decoration: underline;
  text-decoration-color: var(--torch);
  text-decoration-thickness: 6px;
  text-underline-offset: 6px;
}
.lead { font-size: 1.35rem; max-width: 40ch; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 50px;
  padding: 0.5em 1.2em;
  border: var(--stroke);
  border-radius: var(--r-sm);
  background: var(--torch);
  color: var(--ink);
  font-family: var(--head);
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn-tide { background: var(--tide); }
.btn-leaf { background: var(--leaf); }
.btn-paper { background: var(--paper); }
.btn svg { width: 1.2em; height: 1.2em; flex: none; }
.btn.is-placeholder { cursor: help; }

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(180deg, var(--night-a) 0%, var(--night-b) 100%);
  color: var(--paper);
  text-align: center;
  padding: clamp(64px, 14vw, 120px) var(--gutter) 0;
}
.hero canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero-inner { max-width: 720px; margin: 0 auto; }
.hero h1 {
  font-size: clamp(3.4rem, 15vw, 7rem);
  text-wrap: balance;
  color: var(--torch);
  text-shadow: 4px 4px 0 var(--ember), 0 0 28px rgba(250, 148, 56, 0.45);
}
.tagline {
  font-family: var(--head);
  text-transform: uppercase;
  font-size: clamp(1.15rem, 4.8vw, 1.7rem);
  letter-spacing: 0.03em;
  margin: 0.6em 0 0.8em;
}
.hero .lead { margin: 0 auto 1.6em; max-width: 36ch; }
.hero .btn { box-shadow: 4px 4px 0 var(--paper); }
.hero .btn:hover { box-shadow: 6px 6px 0 var(--paper); }
.hero .btn:active { box-shadow: 2px 2px 0 var(--paper); }
.hero :focus-visible { outline-color: var(--paper); }
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 18px;
}
.actions .btn { flex: 1 1 220px; max-width: 320px; }

/* Torches on the beach */
.torches {
  display: block;
  width: min(100%, 600px);
  height: auto;
  margin: 36px auto -3px;
}
.sand {
  display: block;
  width: 100%;
  height: 30px;
  margin-top: -1px;
}
.flame {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: flicker 1.1s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
.glow {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: glow 1.1s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
.torch:nth-child(even) .flame, .torch:nth-child(even) .glow { animation-duration: 1.35s; }
@keyframes flicker {
  0%, 100% { transform: scale(1, 1) rotate(0deg); }
  25% { transform: scale(0.93, 1.07) rotate(-2.5deg); }
  50% { transform: scale(1.05, 0.95) rotate(1.5deg); }
  75% { transform: scale(0.97, 1.04) rotate(2.5deg); }
}
@keyframes glow {
  0%, 100% { opacity: 0.16; transform: scale(1); }
  50% { opacity: 0.26; transform: scale(1.12); }
}

/* Cards and panels */
.card {
  background: var(--panel);
  border: var(--stroke);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card h3 {
  font-size: 1.45rem;
  margin-bottom: 0.4em;
  text-decoration: underline;
  text-decoration-color: var(--accent, var(--torch));
  text-decoration-thickness: 4px;
  text-underline-offset: 5px;
}
.cards {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  border: var(--stroke);
  border-radius: 50%;
  background: var(--accent, var(--torch));
  color: var(--ink);
}
.icon svg { width: 26px; height: 26px; }
.icon-night { color: var(--paper); }

.then {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.then li {
  position: relative;
  padding-left: 30px;
}
.then li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 16px;
  height: 16px;
  border: var(--stroke);
  border-radius: 50%;
  background: var(--accent, var(--torch));
}
.then strong { font-family: var(--head); font-weight: 400; text-transform: uppercase; letter-spacing: 0.02em; }

/* Why it feels alive */
.alive {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}
.alive .card { padding: 18px 20px; }
.alive .card h3 { font-size: 1.3rem; }

/* Screenshots strip */
.strip-wrap { padding-bottom: 32px; }
.strip {
  display: flex;
  gap: 18px;
  list-style: none;
  margin: 0 calc(-1 * var(--gutter));
  padding: 8px var(--gutter) 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--ink) transparent;
}
.strip:focus-visible { outline-offset: -3px; }
.phone {
  flex: 0 0 auto;
  width: min(70vw, 270px);
  aspect-ratio: 9 / 19.5;
  padding: 6px;
  border: var(--stroke);
  border-radius: 34px;
  background: var(--ink);
  box-shadow: var(--shadow);
  scroll-snap-align: center;
  overflow: hidden;
}
.phone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 28px;
  background: var(--night-a);
}
.hint { font-size: 1.05rem; opacity: 0.75; margin-top: -6px; }

/* Dark band (the pitch) */
.band {
  background: linear-gradient(180deg, var(--night-b) 0%, var(--night-a) 100%);
  color: var(--paper);
}
.band .section > h2 { text-decoration-color: var(--ember); }
.band :focus-visible { outline-color: var(--paper); }
.band a { color: var(--torch); }
.pitch { max-width: 62ch; }
.stats {
  list-style: none;
  margin: 28px 0;
  padding: 0;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}
.stat {
  background: var(--paper);
  color: var(--ink);
  border: var(--stroke);
  border-radius: var(--r);
  padding: 18px 20px;
  box-shadow: 4px 4px 0 var(--torch);
}
.stat strong {
  display: block;
  font-family: var(--head);
  font-weight: 400;
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 6px;
  color: var(--ember);
}
.stat span { display: block; font-size: 1.1rem; }
.disclaimer {
  border-left: 6px solid var(--torch);
  padding: 6px 0 6px 16px;
  margin-top: 28px;
  max-width: 62ch;
}

/* "If you really want to get in my head": a paper panel that opens */
.headspace {
  max-width: 62ch;
  margin: 28px 0 0;
  background: var(--paper);
  color: var(--ink);
  border: var(--stroke);
  border-radius: var(--r);
  box-shadow: 4px 4px 0 var(--torch);
}
.headspace summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  font-family: var(--head);
  font-size: 1.35rem;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: var(--r);
}
.headspace summary::-webkit-details-marker { display: none; }
.headspace summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: var(--stroke);
  border-radius: 50%;
  background: var(--torch);
  font-size: 1.5rem;
  line-height: 1;
}
.headspace[open] summary { border-bottom: var(--stroke); border-radius: var(--r) var(--r) 0 0; }
.headspace[open] summary::after { content: "\2212"; }
.headspace summary:hover::after { background: var(--ember); }
.band .headspace summary:focus-visible { outline-color: var(--tide); }
.headspace .inner { padding: 18px 20px 20px; }
.headspace .inner p { max-width: 58ch; }

/* Contact */
.contact-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  align-items: start;
}
.field { display: grid; gap: 4px; margin-bottom: 14px; }
.field label { font-family: var(--head); text-transform: uppercase; font-size: 1rem; letter-spacing: 0.03em; }
input, textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: var(--stroke);
  border-radius: var(--r-sm);
  padding: 0.55em 0.8em;
}
textarea { min-height: 120px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-links { display: grid; gap: 14px; justify-items: start; }
.contact-links .btn { width: 100%; max-width: 320px; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  z-index: 20;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--paper);
  border-radius: var(--r-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Footer */
.footer {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  padding: 44px var(--gutter) 40px;
}
.footer p { max-width: 62ch; margin: 0 auto 1em; }
.footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-bottom: 1em; }
.footer a { color: var(--torch); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.footer :focus-visible { outline-color: var(--paper); }
.footer small { display: block; font-size: 1rem; opacity: 0.85; }

/* Privacy page */
.page .hero { padding-top: clamp(48px, 10vw, 88px); }
.page .hero h1 { font-size: clamp(3rem, 14vw, 6rem); }
.privacy-list { padding-left: 0; list-style: none; display: grid; gap: 16px; margin: 0 0 28px; }
.privacy-list li { padding-left: 26px; position: relative; }
.privacy-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4em;
  width: 14px;
  height: 14px;
  border: var(--stroke);
  border-radius: 50%;
  background: var(--leaf);
}
.privacy-list strong { font-family: var(--head); font-weight: 400; text-transform: uppercase; letter-spacing: 0.02em; }

@media (min-width: 720px) {
  .section { padding: 72px var(--gutter); }
  body { font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flame, .glow, .btn, .toast { animation: none !important; transition: none !important; }
  .glow { opacity: 0.2; }
}

/* The campfire button in the hero */
.fire-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  margin-top: 26px;
  padding: 0.5em 1.2em 0.5em 1em;
  border: 2px solid var(--paper);
  border-radius: 999px;
  background: transparent;
  color: var(--paper);
  font-family: var(--head);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.3s ease;
}
.fire-btn:hover { background: rgba(246, 238, 219, 0.12); }
.fire-icon { width: 1.3em; height: 1.3em; flex: none; transform-box: fill-box; transform-origin: 50% 100%; }
.fire-btn.is-on {
  background: var(--torch);
  color: var(--ink);
  border-color: var(--torch);
  box-shadow: 0 0 0 4px rgba(250, 148, 56, 0.25), 0 0 32px rgba(250, 148, 56, 0.55);
}
.fire-btn.is-on .fire-icon { animation: flicker 0.9s ease-in-out infinite; }
.fire-note { margin: 10px auto 0; max-width: 36ch; font-size: 1.05rem; opacity: 0.75; }

/* Cast page */
.crumb { margin: 0 0 14px; font-size: 1.1rem; }
.crumb a { color: var(--paper); text-decoration-color: var(--torch); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.cast {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 22px 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
}
.member { text-align: center; }
.member h3 { font-size: 1.25rem; margin: 10px 0 2px; }
.portrait {
  display: block;
  width: 100%;
  max-width: 180px;
  height: auto;
  margin: 0 auto;
  aspect-ratio: 1;
  padding: 8px;
  border: var(--stroke);
  border-radius: 50%;
  background: var(--panel);
  box-shadow: var(--shadow);
  object-fit: contain;
}
.member .role { font-size: 1.05rem; opacity: 0.8; margin: 0; }
.member .kind {
  display: inline-block;
  margin: 6px 0 4px;
  padding: 0.1em 0.7em;
  border: var(--stroke);
  border-radius: 999px;
  background: var(--accent, var(--torch));
  color: var(--paper);
  font-family: var(--head);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.member .kind[style*="#FA9438"], .member .kind[style*="#F6EEDB"] { color: var(--ink); }
.member .tag { font-size: 1.05rem; line-height: 1.3; margin: 2px 0 0; }
.kinds .card { color: var(--ink); }
.band .kinds .card h3 { text-decoration-color: var(--accent, var(--torch)); }
.host-card { display: grid; grid-template-columns: minmax(120px, 180px) 1fr; gap: 20px; align-items: center; max-width: 640px; }
.host-card h3 { font-size: 1.6rem; margin-bottom: 2px; }
.host-card .role { opacity: 0.8; margin-bottom: 0.6em; }
@media (max-width: 480px) { .host-card { grid-template-columns: 1fr; text-align: center; } }

@media (prefers-reduced-motion: reduce) {
  .fire-btn.is-on .fire-icon { animation: none !important; }
}

/* Sign-up form */
.kit-form .btn { width: 100%; max-width: 320px; }
.form-note { margin: 10px 0 0; font-size: 1rem; opacity: 0.7; }
