/* The Gratitude Collective — pre-launch page (static version).
   Brand tokens per BRAND-SPECIFICATIONS.md §2A (SpeedXMedia identity). */

:root {
  --cream: #f7f5f0;
  --royal: #3a5898;
  --royal-deep: #2e4778;
  --ink: #14161c;
  --navy: #0f1b33;
  --periwinkle: #a9b6d6;
  --gold: #b89659;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--royal); color: var(--cream); }

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

/* Mark instances (<use href="#tgc-mark">) tint via currentColor */
.pinwheel { fill: currentColor; }

.container { max-width: 72rem; margin-inline: auto; padding-inline: 1.5rem; }
.section { padding-block: 6rem; }
@media (min-width: 768px) { .section { padding-block: 8rem; } }
.narrow { max-width: 44rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Type ---- */
.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.eyebrow.accent { color: var(--royal); }
.eyebrow.gold { color: var(--gold); }
.eyebrow.muted { color: rgb(20 22 28 / 0.6); }
.normalcase { text-transform: none; letter-spacing: normal; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; }

h1 {
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h2 { font-size: clamp(2.25rem, 4vw, 3rem); line-height: 1.15; }

.prose { max-width: 48rem; margin-inline: auto; display: flex; flex-direction: column; gap: 2rem; }
.prose p { font-size: 1.125rem; color: rgb(20 22 28 / 0.8); }
.prose .muted, .muted { color: rgb(20 22 28 / 0.7); }
.center { text-align: center; margin-top: 5rem; }
.center-text { text-align: center; }
.fineprint { font-size: 0.875rem; color: rgb(20 22 28 / 0.6); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding-inline: 1.5rem;
  border: none; border-radius: 0.125rem; cursor: pointer;
  font-family: var(--font-body); font-size: 0.875rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
  white-space: nowrap; transition: background-color 0.2s, color 0.2s;
}
.btn:focus-visible { outline: 2px solid var(--royal); outline-offset: 2px; }
.btn-solid { background: var(--royal); color: var(--cream); }
.btn-solid:hover { background: var(--royal-deep); }
.btn-solid:disabled { opacity: 0.6; cursor: default; }
.btn-ghost { background: transparent; border: 1px solid var(--royal); color: var(--royal); white-space: normal; text-align: center; }
.btn-ghost:hover { background: var(--royal); color: var(--cream); }
.btn-gold { background: transparent; border: 1px solid var(--gold); color: var(--gold); }
.btn-gold:hover { background: var(--gold); color: var(--navy); }
.btn-gold:focus-visible { outline-color: var(--gold); }
.btn-wide { width: 100%; min-height: 3.25rem; }

/* ---- Hero ---- */
/* Photo background (hero_image.jpg — compressed copy of hero_image.png) under a
   cream scrim so the ink text keeps AA contrast. */
.hero {
  display: flex; flex-direction: column; min-height: 100svh;
  background-image:
    linear-gradient(rgb(247 245 240 / 0.92), rgb(247 245 240 / 0.92)),
    url("hero_image.jpg");
  background-size: cover;
  background-position: center;
}
@media (min-width: 768px) {
  /* Heavier scrim over the copy column, photo showing through on the right */
  .hero {
    background-image:
      linear-gradient(90deg,
        rgb(247 245 240 / 0.97) 0%,
        rgb(247 245 240 / 0.90) 45%,
        rgb(247 245 240 / 0.30) 100%),
      url("hero_image.jpg");
  }
}
.hero-brand { display: flex; align-items: center; padding-top: 2rem; width: 100%; }
.logo-lockup { height: 3rem; width: auto; color: var(--ink); }
.hero-main {
  flex: 1; width: 100%;
  display: grid; align-items: center; gap: 3rem;
  padding-block: 4rem;
}
@media (min-width: 768px) { .hero-main { grid-template-columns: 3fr 2fr; gap: 2rem; } }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 2rem; max-width: 42rem; }
.lede { font-size: 1.125rem; color: rgb(20 22 28 / 0.7); max-width: 36rem; }
.hero-form { display: flex; flex-direction: column; gap: 0.75rem; width: 100%; max-width: 28rem; }
@media (min-width: 640px) { .hero-form { flex-direction: row; } }
.hero-form input {
  flex: 1; min-height: 3rem; padding-inline: 1rem;
  border: 1px solid rgb(20 22 28 / 0.2); border-radius: 0.125rem;
  background: rgb(255 255 255 / 0.7); font: inherit; font-size: 1rem; color: var(--ink);
}
.hero-form input::placeholder { color: rgb(20 22 28 / 0.4); }
.hero-form input:focus { border-color: var(--royal); outline: 2px solid var(--royal); }
.hero-symbol { width: 100%; max-width: 17.5rem; margin-inline: auto; color: var(--royal); }
@media (min-width: 768px) { .hero-symbol { max-width: none; } }

/* ---- Gratitude symbol animation ---- */
@keyframes spiral-draw { to { stroke-dashoffset: 0; } }
@keyframes dot-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.spiral-path {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: spiral-draw 1.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}
.spiral-dot { opacity: 0; animation: dot-in 0.7s ease-out forwards; }
.spiral-dot:nth-of-type(1) { animation-delay: 1.9s; }
.spiral-dot:nth-of-type(2) { animation-delay: 2.1s; }
.spiral-dot:nth-of-type(3) { animation-delay: 2.3s; }

/* ---- Marquee ---- */
.marquee { overflow: hidden; border-block: 1px solid rgb(20 22 28 / 0.1); padding-block: 1rem; user-select: none; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee-track { display: flex; width: max-content; animation: marquee 36s linear infinite; }
.marquee-group { display: flex; flex-shrink: 0; }
.marquee .eyebrow { display: flex; align-items: center; white-space: nowrap; color: rgb(20 22 28 / 0.6); }
.marquee i { font-style: normal; color: var(--royal); margin-inline: 2rem; }

/* ---- Scroll reveal (hidden state only applies once JS stamps reveal-ready) ---- */
.reveal-ready .reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.reveal-ready .reveal.revealed { opacity: 1; transform: none; }

/* ---- Bands & rules ---- */
.band-royal { background: var(--royal); padding-block: 5rem; text-align: center; }
@media (min-width: 768px) { .band-royal { padding-block: 6rem; } }
.pull-quote { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.875rem, 4vw, 3rem); color: var(--cream); }
.quote-royal { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 3vw, 1.875rem); line-height: 1.35; color: var(--royal); }
.ruled { border-top: 1px solid rgb(20 22 28 / 0.1); }
.band-navy { background: var(--navy); }
.band-navy h2.on-dark { color: var(--cream); }
.band-navy .on-dark-muted { color: rgb(247 245 240 / 0.8); }
.anchor-hook { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.35; color: var(--gold); }
.anchor-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin-top: 0.5rem; }
.platforms { font-size: 0.875rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgb(247 245 240 / 0.6); }

/* ---- Pillars ---- */
.pillars { display: grid; gap: 1.5rem; max-width: 56rem; margin: 4rem auto 0; }
@media (min-width: 768px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar { border-top: 2px solid var(--royal); padding-top: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.pillar h3 { font-size: 1.5rem; }
.pillar p { color: rgb(20 22 28 / 0.7); }

/* ---- Apparel showcase (full-bleed photo grid, copy overlaid) ----
   The four lifestyle photos ARE the section: edge-to-edge, no gutters.
   A dark scrim under the overlay keeps the white copy at AA contrast. */
.showcase { position: relative; }
.showcase-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .showcase-grid { grid-template-columns: repeat(4, 1fr); } }
.showcase-grid img {
  width: 100%; height: 100%; min-height: 24rem; object-fit: cover;
}
@media (min-width: 768px) { .showcase-grid img { min-height: min(48rem, 92svh); } }
.showcase-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 3rem 1.5rem 4rem;
  background: linear-gradient(rgb(15 27 51 / 0) 40%, rgb(15 27 51 / 0.72) 85%);
}
.showcase-overlay h2 { color: #fff; text-shadow: 0 1px 12px rgb(15 27 51 / 0.5); }
.showcase-overlay .prose { gap: 1.25rem; }
.showcase-overlay .prose p { color: rgb(255 255 255 / 0.88); text-shadow: 0 1px 8px rgb(15 27 51 / 0.5); }
.btn-light { background: transparent; border: 1px solid #fff; color: #fff; white-space: normal; text-align: center; }
.btn-light:hover { background: #fff; color: var(--navy); }
.btn-light:focus-visible { outline-color: #fff; }

/* ---- The Code ---- */
.code-list { max-width: 48rem; margin: 3rem auto 0; border-block: 1px solid rgb(20 22 28 / 0.1); }
.code-list details { padding-block: 1.25rem; }
.code-list details + details { border-top: 1px solid rgb(20 22 28 / 0.1); }
.code-list summary {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 500; font-size: 1.25rem;
}
.code-list summary::-webkit-details-marker { display: none; }
.code-list summary:focus-visible { outline: 2px solid var(--royal); outline-offset: 4px; }
.code-list summary span { color: var(--royal); transition: transform 0.2s; }
.code-list details[open] summary span { transform: rotate(45deg); }
.code-list details p { margin-top: 0.75rem; max-width: 42rem; color: rgb(20 22 28 / 0.7); }
.code-close { display: flex; flex-direction: column; gap: 0.75rem; align-items: center; margin-top: 4rem; }
.code-final { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.875rem, 3.5vw, 2.25rem); }

/* ---- Signup ---- */
.join { background: rgb(255 255 255 / 0.4); }
#join { scroll-margin-top: 2rem; }
.join .section { display: flex; flex-direction: column; gap: 2rem; }
.signup { display: flex; flex-direction: column; gap: 1rem; }
.field-row { display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 640px) { .field-row { flex-direction: row; } .field { flex: 1; } }
.field label, fieldset legend { display: block; margin-bottom: 0.375rem; font-size: 0.875rem; font-weight: 500; color: rgb(20 22 28 / 0.7); }
.optional { color: rgb(20 22 28 / 0.4); }
.field input {
  min-height: 3rem; width: 100%; padding-inline: 1rem;
  border: 1px solid rgb(20 22 28 / 0.2); border-radius: 0.125rem;
  background: #fff; font: inherit; font-size: 1rem; color: var(--ink);
}
.field input::placeholder { color: rgb(20 22 28 / 0.4); }
.field input:focus { border-color: var(--royal); outline: 2px solid var(--royal); }
fieldset { border: none; display: flex; flex-direction: column; gap: 0.625rem; }
.check { display: flex; align-items: flex-start; gap: 0.75rem; color: rgb(20 22 28 / 0.8); cursor: pointer; }
.check input { width: 1.25rem; height: 1.25rem; margin-top: 0.2rem; flex-shrink: 0; accent-color: var(--royal); }
.check.consent { font-size: 0.875rem; color: rgb(20 22 28 / 0.7); }
.hp { position: absolute; left: -2500px; width: 1px; height: 1px; overflow: hidden; }
.form-error { font-size: 0.875rem; font-weight: 500; color: #a33b2e; }
.success {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  border: 1px solid rgb(58 88 152 / 0.3); border-radius: 0.125rem;
  background: #fff; padding: 2.5rem 1.5rem; text-align: center;
}
.success-title { font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; }
.success-body { color: rgb(20 22 28 / 0.6); }

/* ---- Footer ---- */
.footer-inner {
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
  padding-block: 3.5rem; text-align: center;
}
.footer-mark { width: 2.25rem; height: 2.25rem; color: var(--royal); }
.socials { color: rgb(20 22 28 / 0.6); }
.privacy { max-width: 36rem; font-size: 0.75rem; color: rgb(20 22 28 / 0.65); }
.copyright { font-size: 0.875rem; color: rgb(20 22 28 / 0.6); }

/* ---- Calm for everyone ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spiral-path { animation: none; stroke-dasharray: none; stroke-dashoffset: 0; }
  .spiral-dot { animation: none; opacity: 1; transform: none; }
  .reveal-ready .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; }
}
