/* Giglow brand — aligned with lib/src/app/giglow_theme.dart */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  color-scheme: dark;
  --bg-primary: #09090b;
  --bg-secondary: #111116;
  --bg-glow: #1a1b25;
  --surface: #141417;
  --surface-raised: #1b1c21;
  --border: #2a2b34;
  --text-primary: #f4efe9;
  --text-secondary: #e4ddd5;
  --text-muted: #a6a2af;
  --indigo: #8e83ff;
  --mint: #6fe1b7;
  --danger: #ff7c8f;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Lora', Georgia, serif;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-glow: 0 0 80px rgba(142, 131, 255, 0.12);
  --max-width: 44rem;
  --max-width-wide: 56rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text-secondary);
  background: var(--bg-primary);
}

/* Ambient background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(142, 131, 255, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(111, 225, 183, 0.06), transparent 50%),
    linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  pointer-events: none;
}

a {
  color: var(--indigo);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--mint);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(9, 9, 11, 0.82);
  border-bottom: 1px solid rgba(42, 43, 52, 0.8);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-decoration: none;
}

.brand:hover {
  color: var(--text-primary);
}

.brand__mark {
  width: 2.75rem;
  height: 2.75rem;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.25rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.site-nav a:not(.btn) {
  color: var(--text-muted);
}

.site-nav a:not(.btn):hover,
.site-nav a:not(.btn)[aria-current='page'] {
  color: var(--text-primary);
}

.site-nav .btn--primary {
  color: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn--primary {
  background: var(--indigo);
  color: #fff;
  box-shadow: 0 4px 20px rgba(142, 131, 255, 0.35);
}

.btn--primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(142, 131, 255, 0.45);
}

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  color: var(--text-primary);
  border-color: var(--indigo);
  background: rgba(142, 131, 255, 0.08);
}

main {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* —— Home —— */
.hero {
  max-width: var(--max-width);
  padding: 3.5rem 0 2.5rem;
}

.hero__eyebrow {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mint);
  margin: 0 0 1rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  margin: 0 0 1rem;
}

.hero__lead {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin: 0 0 0.5rem;
  max-width: 36ch;
}

.hero__publisher {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.features {
  display: grid;
  gap: 1rem;
  max-width: var(--max-width-wide);
  margin: 2rem 0 3rem;
}

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

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow-glow);
}

.feature-card h2 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--indigo);
  margin: 0 0 0.5rem;
}

.feature-card p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--text-secondary);
}

.section-block {
  max-width: var(--max-width);
  margin-bottom: 2.5rem;
}

.section-block h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
}

.section-block p {
  margin: 0 0 1rem;
}

.section-block ul {
  margin: 0;
  padding-left: 1.25rem;
}

.section-block li {
  margin-bottom: 0.5rem;
}

/* —— Legal pages —— */
.legal {
  max-width: var(--max-width);
  padding: 2.5rem 0 2rem;
}

.legal h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.legal .meta {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.legal h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  margin: 2rem 0 0.65rem;
}

.legal p {
  margin: 0 0 1rem;
}

.legal ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.legal li {
  margin-bottom: 0.4rem;
}

.legal .meta a {
  color: var(--mint);
}

/* —— Footer —— */
.site-footer {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 2rem 1.5rem 2.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.site-footer a {
  color: var(--text-secondary);
}

.site-footer a:hover {
  color: var(--text-primary);
}

.site-footer a[href^='mailto:'] {
  color: var(--mint);
  font-weight: 600;
}

.site-footer a[href^='mailto:']:hover {
  color: #9ef0d0;
}

/* —— Mobile —— */
@media (max-width: 720px) {
  .site-header__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
  }

  .brand {
    font-size: 1.125rem;
  }

  .site-nav {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    row-gap: 0.5rem;
  }

  .site-nav .btn--primary {
    margin-left: auto;
    padding: 0.55rem 1rem;
    font-size: 0.8125rem;
    white-space: nowrap;
  }

  main {
    padding: 0 1rem 3rem;
  }

  .hero {
    padding: 2rem 0 1.5rem;
  }

  .hero__lead {
    font-size: 1.0625rem;
    max-width: none;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    width: 100%;
    text-align: center;
  }

  .feature-card {
    padding: 1.15rem 1.2rem;
  }

  .legal {
    padding: 1.5rem 0 1.5rem;
  }

  .legal .meta {
    font-size: 0.875rem;
    line-height: 1.5;
    word-break: break-word;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 1rem 2rem;
    gap: 1.25rem;
  }

  .site-footer__links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    width: 100%;
  }

  .site-footer a[href^='mailto:'] {
    word-break: break-all;
    max-width: 100%;
  }
}

@media (max-width: 380px) {
  .site-nav {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
  }

  .site-nav a:not(.btn) {
    text-align: center;
    padding: 0.35rem 0;
  }

  .site-nav .btn--primary {
    grid-column: 1 / -1;
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
}
