/* ==========================================================================
   MoonAlly — shared stylesheet
   ========================================================================== */

:root {
  --navy: #273143;
  --sage: #708e92;
  --gold: #c9a96e;
  --bg: #f7f5f2;
  --white: #ffffff;
  --text-muted: #5a6472;
  --shadow: 0 4px 20px rgba(39, 49, 67, 0.08);
  --radius-card: 12px;
  --radius-btn: 8px;
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--navy);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Playfair Display", Georgia, serif;
  color: var(--navy);
  margin: 0 0 0.5em;
  line-height: 1.2;
}

p {
  margin: 0 0 1em;
  color: var(--text-muted);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Logo ---------- */

.logo {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  display: inline-flex;
}

.logo .logo-moon {
  color: var(--navy);
}

.logo .logo-ally {
  color: var(--sage);
}

.logo img {
  height: 40px;
  width: auto;
}

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

.site-header {
  background: var(--white);
  padding: 24px 0;
  border-bottom: 1px solid rgba(39, 49, 67, 0.08);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-wrap: wrap;
  gap: 16px;
}

.site-header .header-nav {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 28px;
  font-size: 0.95rem;
  font-weight: 500;
}

.site-header .header-nav a {
  color: var(--navy);
  transition: color 0.2s ease;
}

.site-header .header-nav a:hover {
  color: var(--sage);
}

@media (max-width: 640px) {
  .site-header .header-nav {
    position: static;
    transform: none;
    justify-content: center;
    width: 100%;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 6px 18px rgba(201, 169, 110, 0.35);
}

.btn-primary:hover {
  background: #d6b784;
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-navy {
  background: var(--navy);
  color: var(--white);
}

.btn-navy:hover {
  background: #333f56;
}

.cta-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 36px;
}

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

.hero {
  padding: 110px 0;
  text-align: center;
}

.hero-navy {
  background: var(--navy);
  color: var(--white);
}

.hero-navy h1 {
  color: var(--white);
}

.hero-navy p {
  color: rgba(255, 255, 255, 0.75);
}

.hero-sage {
  background: var(--sage);
  color: var(--white);
}

.hero-sage h1 {
  color: var(--white);
}

.hero-sage p {
  color: rgba(255, 255, 255, 0.9);
}

.hero h1 {
  font-size: 2.75rem;
  margin-bottom: 0.4em;
}

.hero .subline {
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- Sections ---------- */

section {
  padding: 80px 0;
}

.section-heading {
  text-align: center;
  margin-bottom: 56px;
}

.section-heading h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.section-heading p {
  max-width: 600px;
  margin: 0 auto;
}

.section-dark {
  background: var(--navy);
  color: var(--white);
}

.section-dark .section-heading h2,
.section-dark .section-heading p {
  color: var(--white);
}

.section-dark .section-heading p {
  color: rgba(255, 255, 255, 0.7);
}

.section-sage {
  background: var(--sage);
  color: var(--white);
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 800px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 32px 28px;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.card p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* icon card icons */

.icon-svg {
  display: block;
  margin: 0 auto 18px;
}

.icon-card {
  text-align: center;
}

/* stat cards (research section) */

.stat-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-card);
  padding: 36px 24px;
  text-align: center;
}

.stat-card .stat-number {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2.75rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.stat-card .stat-label {
  font-weight: 600;
  color: var(--white);
  margin-bottom: 6px;
}

.stat-card .stat-source {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0;
}

/* step cards (getting started) */

.step-card .step-label {
  display: inline-block;
  background: var(--bg);
  color: var(--sage);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

/* image placeholders */

.image-placeholder {
  background: linear-gradient(135deg, var(--sage) 0%, var(--navy) 100%);
  border-radius: var(--radius-card);
  min-height: 220px;
}

/* ---------- Links section (homepage) ---------- */

.link-panel {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.link-panel a {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 24px 32px;
  font-weight: 600;
  color: var(--navy);
  flex: 1 1 320px;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.link-panel a:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 26px rgba(39, 49, 67, 0.14);
}

.link-panel a span {
  color: var(--gold);
}

/* ---------- Specs grid ---------- */

.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(39, 49, 67, 0.1);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow);
}

@media (max-width: 700px) {
  .specs-grid {
    grid-template-columns: 1fr;
  }
}

.spec-item {
  background: var(--white);
  padding: 22px 28px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.spec-item .spec-label {
  font-weight: 600;
  color: var(--navy);
}

.spec-item .spec-value {
  color: var(--text-muted);
  text-align: right;
}

/* ---------- FAQ accordion ---------- */

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 22px 28px;
  font-family: "Inter", sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-question .faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--sage);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.faq-item.active .faq-question .faq-icon {
  transform: rotate(45deg);
  background: var(--gold);
  color: var(--navy);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 28px;
}

.faq-item.active .faq-answer {
  padding: 0 28px 24px;
}

.faq-answer p {
  margin: 0;
  font-size: 0.96rem;
}

/* ---------- Contact section ---------- */

.contact-section {
  text-align: center;
}

.contact-section h2 {
  color: var(--white);
}

.contact-section .contact-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

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

.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: 40px 0;
  font-size: 0.9rem;
}

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

.site-footer p {
  color: rgba(255, 255, 255, 0.7);
  margin: 4px 0;
}

/* ---------- Utility ---------- */

.text-center {
  text-align: center;
}

@media (max-width: 640px) {
  .hero {
    padding: 72px 0;
  }
  .hero h1 {
    font-size: 2.1rem;
  }
  section {
    padding: 56px 0;
  }
}
