/* Fable the Cat ($FABL) — terracotta / cream flat aesthetic */

:root {
  --terracotta: #c65a2e;
  --terracotta-deep: #a84a24;
  --terracotta-dark: #7d3418;
  --cream: #f7e8c9;
  --cream-bright: #fdf3dc;
  --ink: #3a2417;
  --ink-soft: #6b4a35;
  --paper: #f3e2bf;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: "Fraunces", Georgia, serif; }

/* subtle paper grain */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

.section-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Hero ===== */
.hero {
  background: var(--cream);
  padding: 72px 0 0;
}

.hero-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px 64px;
  display: grid;
  grid-template-columns: minmax(280px, 460px) 1fr;
  gap: 56px;
  align-items: center;
}

.hero-art { position: relative; }

.cat-frame {
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 24px 60px -20px rgba(125, 52, 24, 0.45);
  transform: rotate(-2deg);
  transition: transform 0.4s ease;
}
.cat-frame:hover { transform: rotate(0deg) scale(1.02); }
.cat-frame img { display: block; width: 100%; height: auto; }

.asterisk-float {
  position: absolute;
  font-family: "Fraunces", serif;
  font-weight: 900;
  color: var(--terracotta);
  opacity: 0.7;
  animation: bob 4s ease-in-out infinite;
  user-select: none;
}
.a1 { font-size: 2.6rem; top: -28px; right: 6%; animation-delay: 0s; }
.a2 { font-size: 1.7rem; bottom: -8px; left: -18px; animation-delay: 1.3s; }
.a3 { font-size: 2rem; top: 38%; right: -26px; animation-delay: 2.4s; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(12deg); }
}

.ticker-pill {
  display: inline-block;
  background: var(--terracotta);
  color: var(--cream-bright);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero-copy h1 {
  font-size: clamp(3.2rem, 8vw, 5.4rem);
  font-weight: 900;
  line-height: 0.95;
  color: var(--terracotta-dark);
  letter-spacing: -0.02em;
}

.tagline {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--terracotta);
  margin: 18px 0 14px;
  font-weight: 700;
}

.sub {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 46ch;
}

.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: 14px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--terracotta);
  color: var(--cream-bright);
  box-shadow: 0 6px 0 var(--terracotta-dark);
}
.btn-primary:hover { background: var(--terracotta-deep); transform: translateY(-2px); box-shadow: 0 8px 0 var(--terracotta-dark); }

.btn-ghost {
  background: transparent;
  color: var(--terracotta-dark);
  border: 2px solid var(--terracotta);
}
.btn-ghost:hover { background: rgba(198, 90, 46, 0.1); }

.btn-big { font-size: 1.15rem; padding: 18px 34px; }

/* marquee */
.marquee {
  background: var(--terracotta-dark);
  color: var(--cream);
  overflow: hidden;
  padding: 12px 0;
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: scroll 40s linear infinite;
  white-space: nowrap;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== Sections ===== */
section { padding: 88px 0; }

h2 {
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 900;
  color: var(--terracotta-dark);
  margin-bottom: 16px;
}
h2 .asterisk { color: var(--terracotta); margin-right: 4px; }

/* story */
.story { background: var(--cream-bright); }

.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 36px;
}

.story-card {
  background: var(--cream);
  border: 2px solid rgba(198, 90, 46, 0.25);
  border-radius: 20px;
  padding: 28px 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.story-card:hover { transform: translateY(-4px); border-color: var(--terracotta); }

.step {
  font-family: "Fraunces", serif;
  font-weight: 900;
  font-size: 0.9rem;
  color: var(--terracotta);
  letter-spacing: 0.1em;
}
.story-card h3 { font-size: 1.4rem; margin: 8px 0 10px; color: var(--terracotta-dark); }
.story-card p { color: var(--ink-soft); font-size: 0.95rem; }

.story-note {
  margin-top: 32px;
  font-style: italic;
  color: var(--ink-soft);
  text-align: center;
}

/* rules */
.rules { background: var(--terracotta); color: var(--cream-bright); }
.rules h2 { color: var(--cream-bright); }
.rules h2 .asterisk { color: var(--cream); }
.rules-intro { max-width: 60ch; opacity: 0.92; }

.rules-list { list-style: none; margin-top: 36px; display: grid; gap: 16px; }
.rules-list li {
  background: rgba(253, 243, 220, 0.1);
  border: 1.5px solid rgba(253, 243, 220, 0.35);
  border-radius: 16px;
  padding: 22px 26px;
  display: flex;
  gap: 22px;
  align-items: baseline;
  flex-wrap: wrap;
}
.rule-badge {
  font-family: "Fraunces", serif;
  font-weight: 700;
  background: var(--cream);
  color: var(--terracotta-dark);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  white-space: nowrap;
}
.rules-list p { flex: 1; min-width: 240px; font-size: 1rem; }
.rules-list strong { color: var(--cream); }
.rule-link { color: var(--cream-bright); font-weight: 700; text-decoration-color: var(--cream); text-underline-offset: 3px; }
.rule-link:hover { color: #fff; }

/* CA */
.ca-section { background: var(--cream-bright); text-align: center; }
.ca-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: 24px;
}

.ca-box {
  display: flex;
  align-items: stretch;
  max-width: 720px;
  margin: 12px auto 0;
  border: 2px solid var(--terracotta);
  border-radius: 16px;
  overflow: hidden;
  background: var(--cream);
}
.ca-box code {
  flex: 1;
  padding: 18px 20px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: clamp(0.72rem, 1.9vw, 1rem);
  color: var(--terracotta-dark);
  word-break: break-all;
  text-align: left;
  align-self: center;
}
.ca-box button {
  background: var(--terracotta);
  color: var(--cream-bright);
  border: none;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 0 28px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.ca-box button:hover { background: var(--terracotta-deep); }
.ca-box button.copied { background: #4a7a4e; }

.ca-hint { margin-top: 14px; color: var(--ink-soft); font-size: 0.9rem; }
.ca-section .btn-big { margin-top: 34px; }

/* footer */
footer {
  background: var(--terracotta-dark);
  color: var(--cream);
  padding: 56px 0;
  text-align: center;
}
.footer-cat {
  font-family: "Fraunces", serif;
  font-size: 3rem;
  font-weight: 900;
  color: var(--terracotta);
  line-height: 1;
  margin-bottom: 18px;
}
.disclaimer {
  max-width: 68ch;
  margin: 0 auto;
  font-size: 0.85rem;
  opacity: 0.8;
}
.colophon {
  margin-top: 22px;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 0.95rem;
  opacity: 0.65;
}
.footer-link {
  color: var(--cream-bright);
  font-weight: 700;
  text-decoration-color: var(--terracotta);
  text-underline-offset: 3px;
}
.footer-link:hover { color: #fff; }

/* responsive */
@media (max-width: 760px) {
  .hero { padding-top: 44px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-art { max-width: 340px; margin: 0 auto; }
  .hero-actions { justify-content: center; }
  .sub { margin: 0 auto; }
  section { padding: 64px 0; }
  .rules-list li { flex-direction: column; gap: 10px; }
}
