/* ── Fonts ── */
@font-face {
  font-family: 'DM Serif Display';
  src: url('../fonts/DMSerifDisplay-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/DMSans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/DMSans-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ── Variables ── */
:root {
  --bg:           #0d0f14;
  --surface:      #161a24;
  --button-idle:  #2a3550;
  --button-hover: #3d5080;
  --button-pulse: #5b7ec7;
  --text-primary: #e8ecf4;
  --text-muted:   #7a8299;
  --accent:       #7eb8f7;
  --danger:       #e07070;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: 'DM Sans', system-ui, sans-serif;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

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

a:hover {
  text-decoration: underline;
}

/* ── Header ── */
.header {
  padding: 1.5rem 2rem 0;
}

.logo {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.5rem;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ── Main ── */
.main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.button-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
  max-width: 480px;
  width: 100%;
}

/* ── Exhale Button ── */
.button-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 240px;
  height: 240px;
}

.exhale-btn {
  position: relative;
  z-index: 1;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 2px solid rgba(91, 126, 199, 0.25);
  background: var(--button-idle);
  color: var(--text-primary);
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  line-height: 1.35;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  animation: breathe 4s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: manipulation;
}

.exhale-btn:hover {
  background: var(--button-hover);
  border-color: rgba(91, 126, 199, 0.5);
}

.exhale-btn.active {
  background: var(--button-pulse);
  border-color: rgba(91, 126, 199, 0.7);
  animation: breathe-active 4s ease-in-out infinite;
}

.btn-label {
  display: block;
}

/* ── Animations ── */
@keyframes breathe {
  0%, 100% { transform: scale(1.0); }
  50%       { transform: scale(1.04); }
}

@keyframes breathe-active {
  0%, 100% {
    transform: scale(1.0);
    box-shadow: 0 0 30px rgba(91, 126, 199, 0.2);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 0 55px rgba(91, 126, 199, 0.4);
  }
}

/* ── Ripple ── */
.ripple-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
  border-radius: 50%;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--button-pulse);
  opacity: 0;
  animation: ripple-expand 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes ripple-expand {
  0%   { opacity: 0.7; transform: scale(0.5); }
  100% { opacity: 0;   transform: scale(1.9); }
}

/* ── Supporting text ── */
.btn-sublabel {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.session-info {
  font-size: 0.85rem;
  color: var(--accent);
  min-height: 1.25em;
}

.live-counter {
  font-size: 1rem;
  color: var(--text-muted);
}

#hourly-count {
  color: var(--text-primary);
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.5rem;
}

.map-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.map-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.crisis-notice {
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 300px;
  line-height: 1.5;
}

/* ── Map ── */
.map-section {
  width: 100%;
  background: var(--surface);
}

.map-container {
  width: 100%;
  height: 50vh;
  min-height: 300px;
  background: var(--surface);
}

/* ── Footer ── */
.footer {
  padding: 1.5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: center;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-nav span {
  color: var(--text-muted);
}

.footer-privacy {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Page layouts (privacy / terms) ── */
.page-content {
  flex: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.page-content h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.page-content .last-updated {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.page-content h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.2rem;
  margin: 2rem 0 0.75rem;
  color: var(--text-primary);
}

.page-content p,
.page-content li {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.page-content ul {
  padding-left: 1.5rem;
  margin-top: 0.5rem;
}

.page-content li {
  margin-bottom: 0.35rem;
}

.page-content a {
  color: var(--accent);
}

.crisis-box {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
}

.crisis-box p {
  margin-bottom: 0.25rem;
}

/* ── Mobile ── */
@media (max-width: 600px) {
  .button-wrapper {
    width: 200px;
    height: 200px;
  }

  .exhale-btn {
    width: 160px;
    height: 160px;
    font-size: 0.9rem;
  }

  .header {
    padding: 1rem 1.25rem 0;
  }

  .main {
    padding: 1.5rem 1.25rem;
  }

  .page-content {
    padding: 2rem 1.25rem;
  }

  .page-content h1 {
    font-size: 1.6rem;
  }
}
