/* ============================================================
   Rot Together — marketing site
   Brand tokens mirror app/lib/shared/theme.dart
   ============================================================ */

@font-face {
  font-family: "Sauce TM";
  src: url("/assets/Sauce-TM-Regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}

:root {
  /* Palette */
  --vivid-purple: #7510b8;     /* canvas */
  --deep-violet: #4a0080;      /* cards / surfaces */
  --midnight-violet: #320060;  /* inputs (most recessed) */
  --electric-violet: #a020f0;  /* buttons / chrome */
  --toxic-green: #39ff14;      /* primary accent */
  --slime: #aaff00;            /* secondary accent */
  --hot-magenta: #ff1f8f;      /* spice / error */
  --ghost-white: #ede0ff;      /* primary text */
  --pale-lavender: #c8aeff;    /* muted text */
  --murky-violet: #7b3fbf;     /* outlines */

  --radius-card: 16px;
  --radius-btn: 14px;
  --maxw: 1080px;
  --shadow-glow: 0 0 24px rgba(57, 255, 20, 0.35);
}

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

html {
  scroll-behavior: smooth;
  /* Branded canvas so navigation never flashes white before body paints */
  background-color: #5a0c96;
}

body {
  min-height: 100vh;
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  color: var(--ghost-white);
  background-color: var(--vivid-purple);
  background-image:
    radial-gradient(1200px 600px at 50% -10%, rgba(160, 32, 240, 0.55), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(57, 255, 20, 0.08), transparent 55%),
    linear-gradient(180deg, #7510b8 0%, #5a0c96 45%, #320060 100%);
  background-attachment: fixed;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Subtle decay grain overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Pinned vignette for grime */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  box-shadow: inset 0 0 160px rgba(20, 0, 40, 0.7);
}

::selection {
  background-color: var(--toxic-green);
  color: #0a0014;
}

a {
  color: var(--toxic-green);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

/* --- Headings --- */
h1,
h2,
h3 {
  font-family: "Rubik", system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ghost-white);
}

/* --- Layout --- */
.container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.eyebrow {
  font-family: "Rubik", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--toxic-green);
}

/* --- Top nav --- */
.site-nav {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}
.site-nav .btn {
  flex-shrink: 0;
}
.site-nav .brand:hover {
  text-decoration: none;
}

/* --- Hero --- */
.hero {
  text-align: center;
  padding: 2.5rem 0 4rem;
}
.hero-logo {
  width: clamp(150px, 32vw, 240px);
  height: auto;
  filter: drop-shadow(0 0 26px rgba(57, 255, 20, 0.45));
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}
.wordmark {
  font-family: "Sauce TM", "Rubik", sans-serif;
  font-weight: 400;
  font-size: clamp(3rem, 11vw, 6rem);
  line-height: 1;
  margin: 1.5rem 0 0.5rem;
  color: var(--ghost-white);
  text-shadow:
    0 0 18px rgba(160, 32, 240, 0.8),
    0 0 40px rgba(160, 32, 240, 0.45);
}
.tagline {
  font-family: "Rubik", sans-serif;
  font-weight: 600;
  font-size: clamp(1.1rem, 3.5vw, 1.6rem);
  color: var(--slime);
  max-width: 22ch;
  margin: 0.25rem auto 1rem;
}
.hero-intro {
  color: var(--pale-lavender);
  font-size: 1.1rem;
  max-width: 52ch;
  margin: 0 auto 2rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: "Rubik", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.9rem 1.6rem;
  border-radius: var(--radius-btn);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.btn-primary {
  background-color: var(--toxic-green);
  color: #08120a;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: 0 0 32px rgba(57, 255, 20, 0.6);
}
.btn-ghost {
  background-color: transparent;
  color: var(--ghost-white);
  border-color: var(--ghost-white);
}
.btn-ghost:hover {
  background-color: rgba(237, 224, 255, 0.1);
  text-decoration: none;
}

/* --- Store badges (coming soon) --- */
.store-badges {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.store-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--murky-violet);
  background-color: rgba(50, 0, 96, 0.6);
  color: var(--ghost-white);
  cursor: default;
  position: relative;
  opacity: 0.85;
}
.store-badge svg {
  width: 26px;
  height: 26px;
  fill: var(--ghost-white);
  flex-shrink: 0;
}
.store-badge .store-label {
  text-align: left;
  line-height: 1.15;
}
.store-badge .store-label small {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--toxic-green);
}
.store-badge .store-label strong {
  font-family: "Rubik", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
}
.store-badge .badge-soon {
  position: absolute;
  top: -9px;
  right: -9px;
  font-family: "Rubik", sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #08120a;
  background: var(--slime);
  padding: 2px 7px;
  border-radius: 999px;
  transform: rotate(6deg);
}

/* --- Section scaffolding --- */
.section {
  padding: 3.5rem 0;
}
.section-head {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto 2.5rem;
}
.section-head h2 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin: 0.5rem 0;
}
.section-head p {
  color: var(--pale-lavender);
}

/* --- Feature cards --- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.feature-card {
  background-color: rgba(74, 0, 128, 0.55);
  border: 1px solid var(--murky-violet);
  border-radius: var(--radius-card);
  padding: 1.75rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(3px);
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--toxic-green);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.feature-icon {
  font-size: 1.8rem;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(57, 255, 20, 0.12);
  border: 1px solid rgba(57, 255, 20, 0.35);
  margin-bottom: 1rem;
}
.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.feature-card p {
  color: var(--pale-lavender);
  font-size: 0.98rem;
}

/* --- Newsletter / beta signup --- */
.beta {
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
  background: rgba(50, 0, 96, 0.5);
  border: 1px solid var(--murky-violet);
  border-radius: 20px;
  padding: 2.25rem 2rem;
}
.beta h2 {
  font-size: clamp(1.6rem, 4.5vw, 2.2rem);
}
.beta p {
  color: var(--pale-lavender);
  margin: 0.75rem auto 1.5rem;
  max-width: 46ch;
}
.beta-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.field-row {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  max-width: 460px;
}
.email-input {
  flex: 1;
  min-width: 0;
  background-color: var(--midnight-violet);
  border: 1px solid var(--murky-violet);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  color: var(--ghost-white);
  font-family: "Nunito", sans-serif;
  font-size: 1rem;
}
.email-input::placeholder {
  color: rgba(200, 174, 255, 0.6);
}
.email-input:focus {
  outline: none;
  border-color: var(--ghost-white);
  box-shadow: 0 0 0 2px rgba(237, 224, 255, 0.25);
}
.cf-turnstile {
  min-height: 65px;
  margin-top: 1rem;
}
.form-note {
  font-size: 0.8rem;
  color: rgba(200, 174, 255, 0.7);
}
.form-success {
  font-family: "Rubik", sans-serif;
  font-weight: 700;
  color: var(--toxic-green);
  padding: 1rem;
  font-size: 1.1rem;
}
.form-error {
  color: var(--hot-magenta);
  font-size: 0.9rem;
}
.form-error:empty {
  display: none;
}

/* --- Footer --- */
.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--murky-violet);
  margin-top: 2rem;
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--pale-lavender);
  font-size: 0.9rem;
}
.footer-links {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}
.footer-links a {
  color: var(--ghost-white);
}
.footer-meta {
  font-size: 0.82rem;
  opacity: 0.8;
}

/* --- Contact form --- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.75rem;
}
.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.contact-field label {
  font-family: "Rubik", sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ghost-white);
}
.contact-input {
  background-color: var(--midnight-violet);
  border: 1px solid var(--murky-violet);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  color: var(--ghost-white);
  font-family: "Nunito", sans-serif;
  font-size: 1rem;
  width: 100%;
  resize: vertical;
}
.contact-input::placeholder {
  color: rgba(200, 174, 255, 0.6);
}
.contact-input:focus {
  outline: none;
  border-color: var(--ghost-white);
  box-shadow: 0 0 0 2px rgba(237, 224, 255, 0.2);
}
select.contact-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c8aeff' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
select.contact-input option {
  background-color: var(--deep-violet);
}
.contact-submit {
  align-self: flex-start;
}

/* --- Legal / prose pages --- */
.prose {
  max-width: 760px;
  margin: 0 auto;
  background: rgba(50, 0, 96, 0.4);
  border: 1px solid var(--murky-violet);
  border-radius: 16px;
  padding: clamp(1.5rem, 5vw, 3rem);
}
.prose h1 {
  font-size: clamp(2rem, 6vw, 2.8rem);
  margin-bottom: 0.25rem;
}
.prose .updated {
  color: var(--pale-lavender);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}
.prose h2 {
  font-size: 1.4rem;
  color: var(--toxic-green);
  margin: 2rem 0 0.75rem;
}
.prose p,
.prose li {
  color: var(--ghost-white);
  margin-bottom: 0.85rem;
}
.prose ul {
  padding-left: 1.25rem;
}
.prose a {
  color: var(--slime);
}
.prose .disclaimer {
  margin-top: 2.5rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--hot-magenta);
  background: rgba(255, 31, 143, 0.08);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--pale-lavender);
}
.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-family: "Rubik", sans-serif;
  font-weight: 600;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .site-nav {
    padding: 1rem 1.25rem;
  }
  .site-nav .btn {
    padding: 0.55rem 0.85rem;
    font-size: 0.82rem;
  }
  /* Stack store badges so they never overflow narrow screens */
  .store-badge {
    flex: 1 1 100%;
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .field-row {
    flex-direction: column;
  }
  .field-row .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}
