/* Flag of Earth — modern responsive stylesheet
   Palette drawn from the flag itself: the blue Earth, the yellow Sun,
   the white Moon, all set against the black of space. */

:root {
  --color-space: #05070f;
  --color-space-2: #0c1122;
  --color-panel: #ffffff;
  --color-panel-alt: #f4f6fb;
  --color-earth: #2258c6;
  --color-earth-dark: #163c86;
  --color-sun: #f5c518;
  --color-sun-dark: #c99a05;
  --color-moon: #f3f4f7;
  --color-text: #1b1e28;
  --color-text-muted: #545a6b;
  --color-text-invert: #f4f6fb;
  --color-border: #e1e4ec;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(10, 14, 30, 0.08);
  --shadow-md: 0 8px 24px rgba(10, 14, 30, 0.12);
  --content-width: 920px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  font-size: 17px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-panel-alt);
  color: var(--color-text);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-earth);
  text-decoration: underline;
  text-decoration-color: rgba(34, 88, 198, 0.35);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--color-earth-dark);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-sun);
  color: #1b1e28;
  padding: 0.75em 1.25em;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--color-text);
}

h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: clamp(1.15rem, 2.4vw, 1.4rem); }

p { margin: 0 0 1em; }

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-4) 0;
}

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

.site-header {
  background: radial-gradient(circle at 20% 20%, rgba(34, 88, 198, 0.35), transparent 55%),
    radial-gradient(circle at 80% 0%, rgba(245, 197, 24, 0.25), transparent 45%),
    linear-gradient(180deg, var(--color-space-2), #131a30 100%);
  color: var(--color-text-invert);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-2) var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65em;
  text-decoration: none;
  color: var(--color-text-invert);
}

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

.brand img {
  width: 42px;
  height: auto;
  flex-shrink: 0;
}

.brand-name {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  color: var(--color-text-invert);
  width: 44px;
  height: 40px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25em 1.4em;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--color-text-invert);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.35em 0.1em;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--color-sun);
  color: var(--color-sun);
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
    order: 3;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: var(--space-2);
    padding-top: var(--space-1);
  }

  .site-nav li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .site-nav a {
    display: block;
    padding: 0.85em 0.2em;
  }

  .header-inner {
    flex-wrap: wrap;
  }
}

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

.hero {
  background: radial-gradient(circle at 20% 20%, rgba(34, 88, 198, 0.35), transparent 55%),
    radial-gradient(circle at 80% 0%, rgba(245, 197, 24, 0.25), transparent 45%),
    linear-gradient(180deg, var(--color-space-2), #131a30 100%);
  color: var(--color-text-invert);
  text-align: center;
  padding: var(--space-5) var(--space-3) var(--space-4);
}

.hero img {
  margin: 0 auto var(--space-3);
  width: min(320px, 70vw);
}

.hero h1 {
  color: var(--color-text-invert);
  margin: 0 0 var(--space-2);
}

.hero .tagline {
  font-style: italic;
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: #cfd6ea;
  max-width: 40em;
  margin: 0 auto var(--space-3);
}

.hero-actions {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Layout ---------- */

main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-4) var(--space-3) var(--space-5);
}

main > h2:first-child,
.page-title {
  margin-top: 0;
}

.lede {
  font-size: 1.1rem;
  color: var(--color-text-muted);
}

.welcome-line {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text);
  margin: var(--space-4) 0;
}

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

.btn {
  display: inline-block;
  padding: 0.75em 1.5em;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 0.98rem;
}

.btn-primary {
  background: var(--color-sun);
  color: #1b1e28;
}

.btn-primary:hover {
  background: var(--color-sun-dark);
  color: #1b1e28;
}

.btn-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--color-text-invert);
}

.btn-secondary:hover {
  border-color: var(--color-sun);
  color: var(--color-sun);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-earth);
  color: var(--color-earth);
}

.btn-outline:hover {
  background: var(--color-earth);
  color: #fff;
}

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

.grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  margin: var(--space-3) 0;
  padding: 0;
  list-style: none;
}

.card {
  background: var(--color-panel);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--color-border);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  color: inherit;
}

.card-media {
  aspect-ratio: 4 / 3;
  background: #0c1122;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-body {
  padding: var(--space-2);
}

.card-body h3 {
  margin: 0 0 0.3em;
  font-size: 1.05rem;
}

.card-body p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

/* ---------- Detail pages (flown locations etc.) ---------- */

.detail-header {
  margin-bottom: var(--space-3);
}

.photo-gallery {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  margin: var(--space-3) 0;
  padding: 0;
  list-style: none;
}

.photo-gallery img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.figure-single {
  text-align: center;
  margin: var(--space-3) 0;
}

.figure-single img {
  margin: 0 auto var(--space-1);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  max-height: 480px;
  width: auto;
}

.source-link {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ---------- Order / product tables ---------- */

.product-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  margin: var(--space-3) 0;
}

.product-card {
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.6em;
}

.product-card img {
  width: 100%;
  border-radius: var(--radius-sm);
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #0c1122;
}

.make-grid .product-card img {
  width: 25%;
  margin: 0 auto;
}

.product-card h3 {
  margin: 0;
}

.product-price {
  font-weight: 700;
  color: var(--color-earth-dark);
  font-size: 1.05rem;
}

.product-card form {
  margin-top: auto;
}

.product-card .paypal-btn {
  width: 100%;
  text-align: center;
}

.donation-note {
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-sun);
  border-radius: var(--radius-sm);
  padding: var(--space-2);
  margin: var(--space-3) 0;
}

/* ---------- Order form (mail-in / printable) ---------- */

.order-form-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-3) 0;
  font-size: 0.95rem;
}

.order-form-table th,
.order-form-table td {
  border: 1px solid var(--color-border);
  padding: 0.6em 0.75em;
  text-align: left;
}

.order-form-table th {
  background: var(--color-panel-alt);
}

.form-field {
  margin-bottom: var(--space-2);
}

.form-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3em;
}

.form-field input {
  width: 100%;
  max-width: 420px;
  padding: 0.5em 0.7em;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
}

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

.contact-panel {
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.contact-panel img {
  margin: var(--space-2) auto;
}

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

.site-footer {
  background: var(--color-space);
  color: #aab1c5;
  text-align: center;
  padding: var(--space-1) var(--space-3);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
}

.site-footer p {
  margin: 0;
}

/* ---------- Print ---------- */

@media print {
  .site-header,
  .site-footer,
  .no-print {
    display: none !important;
  }

  main {
    max-width: none;
    padding: 0;
    font-size: 0.8rem;
  }

  body {
    background: #fff;
  }

  .order-form-table {
    font-size: 0.8em;
  }

  .order-form-table th,
  .order-form-table td {
    padding: 0.35em 0.5em;
  }

  h1.page-title {
    font-size: 1.4rem;
    margin-bottom: 0.5em;
  }

  h2 {
    font-size: 1.1rem;
    margin: 0.75em 0 0.4em;
  }

  p {
    margin: 0 0 0.5em;
  }
}

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

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.muted { color: var(--color-text-muted); }
