/* ── 1. TOKENS ── */

:root {
  /* ── Palette ── */
  --bg:       #030a12;
  --surface:  #071525;
  --surface2: #0a1e35;
  --border:   rgba(144, 224, 239, 0.08);
  --text:     #e8f4f8;
  --muted:    #6a8a9a;
  --accent:   #4ecdc4;
  --accent2:  #90e0ef;
  --tag-bg:   rgba(78, 205, 196, 0.1);

  /* ── Typography Scale ── */
  --font-hero:          clamp(1.75rem, 3vw, 2.75rem);
  --font-section-title: clamp(1.8rem, 3.5vw, 2.75rem);
  --font-body:          1.0625rem;
  --font-small:         0.875rem;
  --font-label:         0.75rem;

  /* ── Spacing Scale ── */
  --space-xs:     8px;
  --space-sm:     16px;
  --space-md:     24px;
  --space-lg:     48px;
  --space-xl:     100px;
  --radius-card:  16px;
  --radius-btn:   8px;
  --radius-tag:   100px;

  /* ── Transitions ── */
  --transition-fast: 0.2s ease;
  --transition-slow: 0.4s ease;

  color-scheme: dark;
}

/* ── 2. RESET ── */

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

/* Ensure [hidden] always wins over display values set in component CSS */
[hidden] { display: none !important; }

/* ── 3. GLOBAL ── */

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  /* Layer 3: depth CSS custom properties drive ambient hue shift */
  --depth-hue:   195;
  --depth-light: 12%;
  --caustic-opacity: 0.14;
  transition: background 0.4s ease;
}

/* ── SKIP NAV ── */

.skip-nav {
  position: absolute;
  top: -100%;
  left: 24px;
  z-index: 999;
  background: var(--accent);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: 0 0 8px 8px;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-nav:focus {
  top: 0;
}

/* ── FOCUS RING ── */

:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 3px;
  border-radius: 3px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* ── 4. HOME ── */

/* ── NAV ── */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px max(48px, env(safe-area-inset-right)) 20px max(48px, env(safe-area-inset-left));
  background: rgba(12, 12, 14, 0.85);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nav-logo-name {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.nav-logo-name span {
  color: var(--accent);
}

.nav-logo-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.nav-logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

/* ── NAV HAMBURGER ── */

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  flex-shrink: 0;
}

.nav-burger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

nav.nav-is-open .nav-burger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

nav.nav-is-open .nav-burger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

nav.nav-is-open .nav-burger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── NAV DRAWER ── */

.nav-drawer {
  display: none;
  position: fixed;
  top: 65px;
  left: 0;
  right: 0;
  z-index: 99;
  background: rgba(12, 12, 14, 0.97);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transform: translateY(-105%);
  transition: transform 0.3s ease;
}

nav.nav-is-open + .nav-drawer {
  transform: translateY(0);
}

.nav-drawer-links {
  list-style: none;
  padding: 12px 0 20px;
  margin: 0;
}

.nav-drawer-links li a {
  display: flex;
  align-items: center;
  padding: 0 24px;
  min-height: 52px;
  font-size: 1rem;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.nav-drawer-links li a:hover,
.nav-drawer-links li a:active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-drawer-links .nav-cta {
  margin: 8px 24px 0;
  border-radius: 6px;
  justify-content: center;
  min-height: 48px;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: var(--font-small);
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: color var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  background: var(--accent);
  color: #030a12 !important;
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 500 !important;
  transition: opacity var(--transition-fast) !important;
}

.nav-cta:hover {
  opacity: 0.85;
  color: #030a12 !important;
}

/* ── CAUSTICS CANVAS (Layer 2) ── */

#caustics {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: var(--caustic-opacity, 0.14);
  mix-blend-mode: screen;
  filter: blur(8px);
}

/* ── HERO ── */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 48px 80px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(144, 224, 239, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(144, 224, 239, 0.02) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 40%, transparent 100%);
}

.hero-glow {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(78, 205, 196, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 64px;
  width: 100%;
}

.hero-content {
  position: relative;
  flex: 1;
  min-width: 0;
}

.hero-logo-card {
  flex-shrink: 0;
  width: clamp(260px, 26vw, 360px);
  padding: 40px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeUp 0.85s 0.4s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.hero-logo-card img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--tag-bg);
  border: 1px solid rgba(78, 205, 196, 0.2);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--radius-tag);
  margin-bottom: 32px;
  animation: fadeUp 0.6s ease both;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

@keyframes bioPulse {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 4px currentColor); }
  50%       { opacity: 0.65; filter: drop-shadow(0 0 10px currentColor); }
}

.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: var(--font-hero);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  animation: fadeUp 0.85s 0.1s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.hero-title .accent { color: var(--accent); }
.hero-title .dim    { color: var(--muted); }

.hero-sub {
  font-size: 1.125rem;
  font-weight: 300;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 48px;
  animation: fadeUp 0.85s 0.2s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeUp 0.85s 0.3s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── SURFACE ANIMATION (Layer 5) ── */

.surface-anim {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.85s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.85s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.surface-anim.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger siblings sequentially */
.surface-anim:nth-child(2) { transition-delay: 0.08s; }
.surface-anim:nth-child(3) { transition-delay: 0.16s; }
.surface-anim:nth-child(4) { transition-delay: 0.24s; }
.surface-anim:nth-child(5) { transition-delay: 0.32s; }

/* ── BUTTONS ── */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #030a12;
  padding: 14px 28px;
  border-radius: var(--radius-btn);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  padding: 14px 28px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  text-decoration: none;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-primary:active,
.btn-secondary:active {
  transform: scale(0.97) !important;
}

.game-link:active {
  transform: scale(0.97);
}

/* ── SECTION SHARED ── */

section {
  padding: 100px 48px;
}

.section-label {
  font-size: var(--font-label);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
  animation: bioPulse 3s infinite ease-in-out;
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: var(--font-section-title);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.section-desc {
  color: var(--muted);
  font-weight: 300;
  font-size: var(--font-body);
  max-width: 560px;
  line-height: 1.75;
}

/* ── GAMES ── */

#games {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.games-header {
  margin-bottom: 64px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.game-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: transform var(--transition-slow), border-color var(--transition-slow), box-shadow var(--transition-slow);
  cursor: pointer;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(78, 205, 196, 0.3);
  box-shadow: 0 0 28px rgba(78, 205, 196, 0.12);
}

.game-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
  overflow: hidden;
}

.game-card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(12, 12, 14, 0.6));
}

/* Portrait thumbnail override — used for UNCHI (748×896 art) and 3-5-10 */
.game-card-thumb--portrait {
  aspect-ratio: 748 / 896;
}

/* Full-bleed image inside a game card thumbnail */
.game-card-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

/* Contained image with padding — used for app icons on a dark background */
.game-card-thumb-img--padded {
  object-fit: contain;
  inset: 40px;
  width: calc(100% - 80px);
  height: calc(100% - 80px);
}

.game-card-body {
  padding: 24px;
}

.game-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tag {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-tag);
  background: var(--tag-bg);
  color: var(--accent);
  border: 1px solid rgba(78, 205, 196, 0.15);
  animation: bioPulse 3s infinite ease-in-out;
}

.tag.blue {
  background: rgba(144, 224, 239, 0.1);
  color: var(--accent2);
  border-color: rgba(144, 224, 239, 0.15);
  animation: none;
}

.tag.in-dev {
  background: rgba(201, 168, 76, 0.15);
  color: #c9a84c;
  border-color: rgba(201, 168, 76, 0.45);
  animation: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.game-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.game-desc {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.65;
  margin-bottom: 24px;
}

.game-links {
  display: flex;
  gap: 12px;
}

/* Stacked layout: store row on top, privacy full-width below */
.game-links--stacked {
  flex-direction: column;
  gap: 10px;
}

.game-links-row {
  display: flex;
  gap: 10px;
}

/* Makes a link stretch to fill available row width */
.game-link--grow {
  flex: 1;
  justify-content: center;
}

.game-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color var(--transition-slow), color var(--transition-slow), box-shadow var(--transition-slow);
}

.game-link:hover,
.game-link:focus-within {
  border-color: rgba(78, 205, 196, 0.4);
  color: var(--accent);
  box-shadow: 0 0 12px rgba(78, 205, 196, 0.1);
}

.game-link svg {
  flex-shrink: 0;
}

/* ── COMING SOON / DISABLED GAME LINK ── */

.game-link--disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
  user-select: none;
}

.game-link-soon {
  font-size: 0.7em;
  opacity: 0.75;
}

.game-link--privacy {
  border-color: rgba(78, 205, 196, 0.25);
  color: var(--accent);
}

.game-link--privacy:hover {
  border-color: rgba(78, 205, 196, 0.6);
  color: var(--accent);
  box-shadow: 0 0 12px rgba(78, 205, 196, 0.15);
}

/* ── WAITLIST BUTTON ── */

.game-link--waitlist {
  background: rgba(78, 205, 196, 0.08);
  border-color: rgba(78, 205, 196, 0.4);
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
}

.game-link--waitlist:hover,
.game-link--waitlist:focus-visible {
  background: rgba(78, 205, 196, 0.15);
  border-color: rgba(78, 205, 196, 0.65);
  color: var(--accent);
  box-shadow: 0 0 16px rgba(78, 205, 196, 0.2);
}

/* ── WAITLIST MODAL ── */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(3, 10, 18, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 40px 36px 36px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(78, 205, 196, 0.06);
  transform: translateY(12px);
  transition: transform 0.25s ease;
}

.modal-overlay.is-open .modal {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px;
  line-height: 0;
  border-radius: 4px;
  transition: color var(--transition-fast);
}

.modal-close:hover,
.modal-close:focus-visible {
  color: var(--text);
  outline: 2px solid var(--accent2);
  outline-offset: 2px;
}

.modal-label {
  font-size: var(--font-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.modal-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.modal-desc {
  font-size: var(--font-small);
  color: var(--muted);
  margin-bottom: 24px;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.modal-field-label {
  font-size: var(--font-small);
  font-weight: 500;
  color: var(--text);
}

.modal-input {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  color: var(--text);
  font-family: inherit;
  font-size: var(--font-small);
  padding: 10px 14px;
  width: 100%;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.modal-input::placeholder {
  color: var(--muted);
}

.modal-input:focus {
  outline: none;
  border-color: rgba(78, 205, 196, 0.5);
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

.modal-error {
  font-size: var(--font-small);
  color: #ff6b6b;
  min-height: 1.2em;
  margin-bottom: 12px;
}

.modal-submit {
  width: 100%;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-btn);
  font-family: inherit;
  font-size: var(--font-small);
  font-weight: 600;
  padding: 12px;
  cursor: pointer;
  transition: opacity var(--transition-fast), box-shadow var(--transition-fast);
}

.modal-submit:hover {
  opacity: 0.9;
  box-shadow: 0 0 20px rgba(78, 205, 196, 0.3);
}

.modal-submit:disabled {
  opacity: 0.55;
  cursor: default;
}

.modal-submit:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 3px;
}

.modal-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  padding: 16px 0 8px;
  color: var(--accent);
}

.modal-success p {
  color: var(--text);
  font-size: var(--font-small);
}

@media (max-width: 480px) {
  .modal {
    padding: 32px 24px 28px;
  }
}

/* ── COMING SOON CARD ── */

.game-card.coming-soon {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.1);
  background: transparent;
}

.game-card.coming-soon .game-card-thumb {
  background: var(--surface2);
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.15);
}

.coming-soon-label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 300;
  font-style: italic;
  margin-top: 4px;
}

/* ── MISSION ── */

#mission {
  max-width: 720px;
  position: relative;
  overflow: hidden;
}

.mission-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mission-bullets li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  color: var(--muted);
  font-weight: 300;
  font-size: var(--font-body);
  line-height: 1.75;
}

.mission-bullets li::before {
  content: '';
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 10px;
  animation: bioPulse 3s infinite ease-in-out;
}

/* ── MILESTONES ── */

#milestones {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.milestones-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 48px;
}

.milestone-col {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px;
}

.milestone-col-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.milestone-col-title.achieved { color: var(--accent); }
.milestone-col-title.upcoming { color: var(--accent2); }

.milestone-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.milestone-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.6;
}

.milestone-list li .bullet-icon {
  flex-shrink: 0;
  margin-top: 5px;
}

.milestone-list.achieved li .bullet-icon { color: var(--accent); }
.milestone-list.upcoming li .bullet-icon { color: var(--accent2); }

/* ── CONTACT ── */

#contact {
  background: var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
}

#contact .section-title {
  margin: 0 auto 20px;
}

#contact .section-desc {
  margin: 0 auto 48px;
  text-align: center;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── FOOTER ── */

footer {
  padding: 40px 48px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--muted);
  text-decoration: none;
}

.footer-logo span {
  color: var(--accent);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-privacy {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-privacy:hover {
  color: var(--text);
}

/* ── PRIVACY PAGE ── */

.privacy-page {
  max-width: 760px;
  padding-top: 140px;
}

.privacy-updated {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 8px;
}

.privacy-body {
  margin-top: 32px;
}

.privacy-body h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 40px;
  margin-bottom: 10px;
}

.privacy-body h3 {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 24px;
  margin-bottom: 8px;
}

.privacy-body p {
  color: var(--muted);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 12px;
}

.privacy-body a {
  color: var(--accent2);
  text-underline-offset: 3px;
}

.privacy-body strong {
  color: var(--text);
  font-weight: 500;
}

.privacy-body ul,
.privacy-body ol {
  color: var(--muted);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.75;
  margin: 0 0 1rem 1.5rem;
}

.privacy-body li {
  margin-bottom: 0.4rem;
}

.privacy-body code {
  background: var(--surface2);
  color: var(--accent2);
  font-size: 0.875em;
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
}

/* Privacy highlight callout box */
.privacy-highlight {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.2rem;
  margin: 1rem 0 1.5rem;
}

.privacy-highlight p { margin-bottom: 0; }

/* Privacy data tables */
.privacy-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0 1.5rem;
  font-size: 0.9rem;
}

.privacy-body th {
  background: var(--surface2);
  color: var(--text);
  text-align: left;
  padding: 0.6rem 0.8rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.privacy-body td {
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-weight: 300;
  vertical-align: top;
}

.privacy-body tr:last-child td { border-bottom: none; }

/* ── RESPONSIVE ── */

@media (max-width: 900px) {
  .hero-inner {
    flex-direction: column;
    gap: 40px;
  }

  .hero-logo-card {
    width: 100%;
    max-width: 300px;
    padding: 28px 24px;
  }
}

@media (max-width: 768px) {
  nav {
    padding: 16px max(24px, env(safe-area-inset-right)) 16px max(24px, env(safe-area-inset-left));
  }

  .nav-links {
    display: none;
  }

  .nav-logo-img {
    height: 28px;
  }

  .nav-burger {
    display: flex;
  }

  .nav-drawer {
    display: block;
  }

  .hero,
  section {
    padding: 80px 24px;
  }

  .hero {
    padding-top: 100px;
  }

  footer {
    padding: 32px 24px;
  }

  .milestones-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ── CREATURES (Layer 4) ── */

/* Shared creature rules */
.creature-whale,
.creature-jellyfish,
.creature-ray {
  position: absolute;
  pointer-events: none;
  fill: #90e0ef;
  opacity: 0.35;
  overflow: visible;
}

/* ── WHALE — hero section ── */
.creature-whale {
  display: none;
  width: 280px;
  bottom: 8%;
  right: -20px;
  opacity: 0.35;
  will-change: transform;
  animation: whaleDrift 45s linear infinite;
}

@keyframes whaleDrift {
  0%   { transform: translateX(0)    translateY(0);    }
  25%  { transform: translateX(-60px) translateY(-12px); }
  50%  { transform: translateX(-120px) translateY(0);  }
  75%  { transform: translateX(-60px) translateY(12px); }
  100% { transform: translateX(0)    translateY(0);    }
}

/* ── JELLYFISH — coming-soon card ── */
.jellyfish-wrap {
  display: none;
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 90px;
  pointer-events: none;
  overflow: visible;
}

.creature-jellyfish {
  width: 90px;
  opacity: 0.6;
  will-change: transform;
  animation: jellyBob 9s ease-in-out infinite;
}

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

.jelly-tendril {
  fill: none;
  stroke: #90e0ef;
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0.5;
}

.jelly-tendril:nth-child(1) { animation: tendrilWave 7s  ease-in-out infinite; }
.jelly-tendril:nth-child(2) { animation: tendrilWave 9s  ease-in-out infinite 0.6s; }
.jelly-tendril:nth-child(3) { animation: tendrilWave 11s ease-in-out infinite 1.2s; }
.jelly-tendril:nth-child(4) { animation: tendrilWave 8s  ease-in-out infinite 0.3s; }

@keyframes tendrilWave {
  0%, 100% { transform: skewX(0deg); }
  33%      { transform: skewX(5deg); }
  66%      { transform: skewX(-4deg); }
}

/* ── MANTA RAY — mission section ── */
.creature-ray {
  width: 320px;
  bottom: 0;
  right: -40px;
  opacity: 0.055;
  animation: rayBank 60s ease-in-out infinite;
}

@keyframes rayBank {
  0%, 100% { transform: translateX(0)     rotateZ(0deg);    }
  30%      { transform: translateX(-80px)  rotateZ(2deg);   }
  60%      { transform: translateX(-150px) rotateZ(-1.5deg); }
  80%      { transform: translateX(-60px)  rotateZ(1deg);   }
}

/* Responsive creature sizes */
@media (max-width: 768px) {
  .creature-whale    { width: 140px; }
  .creature-ray      { width: 160px; }
  .creature-jellyfish,
  .jellyfish-wrap    { width: 60px; }

  /* Remove blur filter on mobile Safari to prevent scroll jank */
  .jelly-tendril     { filter: none; }
}

/* ── MOTION SAFETY ── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  /* Hero entrance animations: render at final state immediately */
  .hero-title,
  .hero-sub,
  .hero-actions,
  .hero-logo-card,
  .hero-badge {
    animation: none;
    opacity: 1;
    transform: none;
  }

  /* Section labels and tags: pause bioluminescent pulse */
  .section-label,
  .tag,
  .mission-bullets li::before,
  .hero-badge::before {
    animation: none;
    opacity: 1;
  }

  /* Surface animations: skip to final state */
  .surface-anim {
    opacity: 1;
    transform: none;
    transition: none;
  }

  /* Nav drawer + hamburger: skip slide/rotate animations */
  .nav-drawer {
    transition: none;
  }

  .nav-burger-bar {
    transition: none;
  }

  /* Creatures: pause float/drift animations */
  .creature-whale,
  .creature-jellyfish,
  .creature-ray,
  .creature-jellyfish .jelly-tendril {
    animation: none !important;
  }
}

/*
── LAYER 12: SELF-HOSTED FONTS ────────────────────────────────
 Steps to activate:
   1. Go to https://gwfh.mranftl.com/ and download:
      - Syne  (weights 400, 600, 700, 800)  → WOFF2
      - DM Sans (weights 300, 400, 500; italic 300) → WOFF2
   2. Place all .woff2 files in assets/fonts/
   3. Uncomment the @font-face block below
   4. Remove the two Google Fonts <link> tags from index.html and privacy.html
   5. Tighten CSP in _headers:
      style-src 'self'  (remove https://fonts.googleapis.com)
      font-src  'self'  (remove https://fonts.gstatic.com)
───────────────────────────────────────────────────────────────

@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/syne-v22-latin-800.woff2') format('woff2');
}
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/syne-v22-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/syne-v22-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/syne-v22-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/dm-sans-v15-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/dm-sans-v15-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/dm-sans-v15-latin-300.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/dm-sans-v15-latin-300italic.woff2') format('woff2');
}
*/

/* ── 7. DELETE ACCOUNT ── */

/* Step wrappers — sign-in step and confirm-deletion step */
.delete-step-heading {
  font-size: var(--font-lg);
  font-weight: 600;
  color: var(--text);
  margin-top: var(--space-md);
  margin-bottom: var(--space-sm);
}

.delete-signin-step,
.delete-confirm-step {
  max-width: 480px;
}

.delete-form {
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 480px;
}

.delete-form-label {
  display: block;
  font-size: var(--font-small);
  font-weight: 500;
  color: var(--text);
}

.delete-form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  font-family: 'DM Sans', sans-serif;
  font-size: var(--font-body);
  transition: border-color var(--transition-fast);
}

.delete-form-input:focus {
  border-color: var(--accent2);
  outline: none;
}

.delete-form-error {
  font-size: var(--font-small);
  color: #e05c5c;
  min-height: 1.2em;
  margin-top: calc(var(--space-xs) * -0.5);
}

.delete-form-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  font-size: var(--font-small);
  font-weight: 300;
  color: var(--muted);
  cursor: pointer;
  line-height: 1.6;
  margin-top: var(--space-sm);
}

.delete-form-checkbox {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Sign-in submit button — teal (primary action) */
.delete-form-submit {
  width: 100%;
  padding: 14px 20px;
  background: var(--accent);
  color: #030a12;
  border: none;
  border-radius: var(--radius-btn);
  font-family: 'DM Sans', sans-serif;
  font-size: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  transition: opacity var(--transition-fast);
  margin-top: var(--space-sm);
}

.delete-form-submit:hover:not(:disabled) {
  opacity: 0.88;
}

.delete-form-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Danger variant — used for the final delete confirmation button */
.delete-form-submit--danger {
  background: #e05c5c;
  color: #fff;
}

.delete-confirm-message {
  margin-top: var(--space-md);
  max-width: 480px;
}

.delete-form-footer-note {
  margin-top: var(--space-lg);
  max-width: 480px;
  font-size: var(--font-small);
  color: var(--muted);
}

/* OAuth sign-in buttons (Google / Apple) */
.delete-oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-top: var(--space-md);
  max-width: 480px;
}

.delete-oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius-btn);
  font-family: 'DM Sans', sans-serif;
  font-size: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.delete-oauth-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.delete-oauth-btn--google {
  background: #fff;
  color: #3c4043;
}

.delete-oauth-btn--google:hover:not(:disabled) {
  opacity: 0.9;
}

.delete-oauth-btn--apple {
  background: #000;
  color: #fff;
}

.delete-oauth-btn--apple:hover:not(:disabled) {
  opacity: 0.85;
}

/* "or sign in with email" divider */
.delete-oauth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  max-width: 480px;
  color: var(--muted);
  font-size: var(--font-small);
}

.delete-oauth-divider::before,
.delete-oauth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
