/* Gabs UGC landing page. Colours come only from specs/brand.md (BabyG panel_core.py THEMES). */

/* Light = "Pink" scheme */
:root {
  --bg: #fde7f1;
  --card: #fff6fa;
  --text: #3a2a33;
  --muted: #8a6878;
  --line: #f2bfd6;
  --accent: #e0559a;
  --purple: #9b3fa0;
  --grey: #8a7a82;

  /* Text-safe tints: plain accent (3.0:1) and muted (4.1:1) fail on the light bg,
     so text uses them mixed with the text colour (5.1:1 and 5.0:1). */
  --accent-text: color-mix(in srgb, var(--accent) 60%, var(--text));
  --muted-text: color-mix(in srgb, var(--muted) 80%, var(--text));
  /* Text on an accent fill: black when the accent's luminance is above 0.179 (panel_core text_on). */
  --on-accent: #000;

  --radius: 22px;
  --gutter: 16px;
  --font: "Fredoka", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  color-scheme: light dark;
}

/* Dark = "Pink night" scheme: every colour already passes 4.5:1 here, so no mixes are needed */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1418;
    --card: #2a1d24;
    --text: #f7e6ef;
    --muted: #c09aae;
    --line: #4a3240;
    --accent: #ff7eb6;
    --purple: #d39af0;
    --grey: #9a8a92;

    --accent-text: var(--accent);
    --muted-text: var(--muted);
    --on-accent: #000;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    radial-gradient(40rem 28rem at 12% -8%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(36rem 26rem at 95% 12%, color-mix(in srgb, var(--purple) 12%, transparent), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0;
  font-weight: 600;
}

p {
  margin: 0;
}

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

:focus-visible {
  outline: 3px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Header ---------- */

.site-header {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  border-radius: 999px;
}

.brand img {
  width: 40px;
  height: 40px;
}

.wordmark {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.wordmark-gabs {
  color: var(--accent-text);
}

.wordmark-ugc {
  color: var(--muted-text);
}

/* ---------- Hero ---------- */

main {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.5rem 0 3.5rem;
}

.hero-logo {
  width: clamp(220px, 70vw, 300px);
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 14px 24px color-mix(in srgb, var(--accent) 22%, transparent));
}

@media (prefers-reduced-motion: no-preference) {
  .hero-logo {
    animation: float 6s ease-in-out infinite;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.pill {
  display: inline-block;
  padding: 0.3rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2rem, 6.5vw, 3.4rem);
  max-width: 16ch;
  margin-bottom: 1rem;
}

.lead {
  max-width: 36rem;
  font-size: clamp(1.05rem, 2.6vw, 1.2rem);
  color: var(--muted-text);
}

/* ---------- Features ---------- */

.features {
  padding-bottom: 3rem;
}

.features h2 {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 1.5rem;
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 600px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem 1.35rem;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 8%, transparent);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.75rem;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 14%, var(--card));
  font-size: 1.4rem;
  line-height: 1;
}

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

.card p {
  color: var(--muted-text);
  font-size: 1rem;
  line-height: 1.5;
}

/* ---------- Closing line ---------- */

.closing {
  text-align: center;
  padding: 0.5rem 0 3.5rem;
}

.closing p {
  font-size: clamp(1.15rem, 3vw, 1.4rem);
  font-weight: 500;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.25rem var(--gutter) 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.5rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted-text);
}

/* ---------- 404 ---------- */

.notfound {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
  padding: 2rem var(--gutter) 4rem; /* keep main's side gutter */
}

.notfound img {
  width: clamp(160px, 50vw, 220px);
}

.notfound h1 {
  font-size: clamp(1.8rem, 6vw, 2.6rem);
}

.notfound p {
  color: var(--muted-text);
}

.button {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: color-mix(in srgb, var(--accent) 88%, var(--text));
}
