/* ========================================
   Root Variables
   ======================================== */

:root {
  --color-bg: #F0F0F0;
  --color-content: #FFFFFF;
  --color-text: #2D2D2D;
  --color-heading: #000000;
  --color-link: #5E90E3;
  --color-link-hover: #3A6BCF;
  --color-btn: #4A90D9;
  --color-btn-hover: #3A7BC8;
  --color-btn-text: #FFFFFF;
  --color-border: #DCDCDC;
  --color-muted: #666666;
  --color-success: #2E7D32;
  --color-error: #C62828;

  --font-display: 'Wix Madefor Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-body: 'Wix Madefor Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-code: 'Courier New', Courier, monospace;

  --max-width: 860px;
  --page-padding: 48px;
  --section-gap: 48px;
  --radius: 6px;
  --transition: 0.3s ease;
}

/* ========================================
   Reset and Base
   ======================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-link);
  text-decoration: underline;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-link-hover);
}

ul, ol {
  padding-left: 1.5em;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--color-heading);
  line-height: 1.2;
}

/* ========================================
   Layout
   ======================================== */

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  background-color: var(--color-content);
  padding: 0 var(--page-padding);
}

/* ========================================
   Navigation
   ======================================== */

.nav {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 0;
  position: relative;
}

.nav__links {
  display: flex;
  gap: 32px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.nav__link {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text);
  text-decoration: none;
  padding: 4px 0;
  transition: color var(--transition);
}

.nav__link:hover {
  color: var(--color-link);
}

.nav__link--active {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-heading);
  border-radius: 2px;
  transition: var(--transition);
}

.nav__hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   Site Header
   ======================================== */

.site-header {
  padding: 24px 0 16px;
}

.site-header__title {
  font-size: 3.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.site-header__page-title {
  font-size: 2.25rem;
  font-weight: 800;
  margin-top: 8px;
}

/* ========================================
   Content Sections
   ======================================== */

.content {
  padding-bottom: var(--section-gap);
}

.content section,
.content .step {
  margin-top: var(--section-gap);
}

.content section:first-child {
  margin-top: 0;
}

.content p {
  margin-top: 1em;
}

.content p:first-child {
  margin-top: 0;
}

/* ========================================
   Hero Image
   ======================================== */

.hero {
  padding: 16px 0;
}

.hero__image {
  width: 100%;
  border: 1px solid #E5E5E5;
}

/* ========================================
   Intro Section
   ======================================== */

.intro strong {
  font-weight: 700;
}

/* ========================================
   Benefits List
   ======================================== */

.benefits__title {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 12px;
}

.benefits__list {
  list-style: disc;
  padding-left: 1.5em;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.benefits__list li {
  line-height: 1.6;
}

/* ========================================
   Section Headings
   ======================================== */

.section-heading {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.section-subheading {
  font-size: 1.375rem;
  font-weight: 800;
  margin-top: 32px;
  margin-bottom: 12px;
}

/* ========================================
   Steps
   ======================================== */

.step__heading {
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.step__image {
  margin: 24px auto;
  max-width: 480px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.step__note {
  font-size: 0.9375rem;
  color: var(--color-muted);
  font-style: italic;
  margin-top: 16px;
}

/* ========================================
   Copy Block (link and alt text)
   ======================================== */

.copy-block {
  margin: 20px 0;
}

.copy-block__label {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
}

.copy-block__content {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.copy-block__text {
  flex: 1;
  padding: 12px 16px;
  font-family: var(--font-code);
  font-size: 0.875rem;
  line-height: 1.5;
  background-color: #F8F8F8;
  word-break: break-all;
  white-space: pre-wrap;
}

.copy-block__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  background-color: var(--color-btn);
  color: var(--color-btn-text);
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color var(--transition);
}

.copy-block__btn:hover {
  background-color: var(--color-btn-hover);
}

.copy-block__btn--copied {
  background-color: var(--color-success);
}

/* ========================================
   Forms
   ======================================== */

.form {
  margin-top: 24px;
}

.form__row {
  display: flex;
  gap: 16px;
}

.form__group--half {
  flex: 1;
}

.form__group {
  margin-bottom: 20px;
}

.form__label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.form__label--required::after {
  content: " *";
  color: var(--color-error);
}

.required-asterisk {
  color: var(--color-error);
}

.form__input,
.form__textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background-color: var(--color-content);
  color: var(--color-text);
  transition: border-color var(--transition);
}

.form__input:focus,
.form__textarea:focus {
  outline: none;
  border-color: var(--color-btn);
  box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

.form__textarea {
  min-height: 120px;
  resize: vertical;
}

.form__checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.form__checkbox-group input[type="checkbox"] {
  margin-top: 4px;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--color-btn);
}

.form__checkbox-group label {
  font-size: 0.9375rem;
  line-height: 1.5;
  cursor: pointer;
}

.form__submit {
  display: block;
  width: 100%;
  padding: 14px 24px;
  background-color: var(--color-btn);
  color: var(--color-btn-text);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background-color var(--transition);
  margin-top: 8px;
}

.form__submit:hover {
  background-color: var(--color-btn-hover);
}

.form__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form__disclaimer {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-top: 16px;
  line-height: 1.6;
}

.form__message {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  margin-top: 16px;
  display: none;
}

.form__message--success {
  display: block;
  background-color: #E8F5E9;
  color: var(--color-success);
  border: 1px solid #C8E6C9;
}

.form__message--error {
  display: block;
  background-color: #FFEBEE;
  color: var(--color-error);
  border: 1px solid #FFCDD2;
}

/* ========================================
   Done / Thank You Section
   ======================================== */

.done {
  text-align: center;
  padding: 32px 0;
}

.done__heading {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.done__emoji {
  font-size: 2rem;
  margin-top: 16px;
}

/* ========================================
   Pre-footer
   ======================================== */

.pre-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--section-gap) var(--page-padding);
}

.pre-footer__ctas {
  margin-bottom: var(--section-gap);
}

.pre-footer__ctas p {
  margin-bottom: 8px;
  font-size: 1rem;
}

/* ========================================
   Newsletter
   ======================================== */

.newsletter {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}

.newsletter__title {
  font-size: 1.375rem;
  font-weight: 800;
  margin-bottom: 24px;
}

.newsletter .form__input {
  text-align: left;
}

.newsletter .form__checkbox-group {
  justify-content: flex-start;
  text-align: left;
}

.newsletter .form__submit {
  max-width: 500px;
}

/* ========================================
   Footer
   ======================================== */

.footer {
  text-align: center;
  padding: 48px var(--page-padding) 32px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer__title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.footer__image {
  max-width: 320px;
  margin: 0 auto 24px;
}

.footer__tagline {
  font-size: 0.9375rem;
  color: var(--color-text);
  margin-bottom: 16px;
}

.footer__copyright {
  font-size: 0.875rem;
  color: var(--color-muted);
}

.footer__copyright a {
  color: var(--color-text);
}

.footer__copyright a:hover {
  color: var(--color-link);
}

/* ========================================
   Audio Player
   ======================================== */

.audio-player {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background-color: #F8F8F8;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin: 24px 0;
}

.audio-player__play {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  flex-shrink: 0;
}

.audio-player__current,
.audio-player__duration {
  font-family: var(--font-code);
  font-size: 0.8125rem;
  color: var(--color-muted);
  flex-shrink: 0;
  min-width: 40px;
}

.audio-player__timeline {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, var(--color-btn) 0%, #ddd 0%);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.audio-player__timeline::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-btn);
  cursor: pointer;
}

.audio-player__timeline::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-btn);
  border: none;
  cursor: pointer;
}

.audio-player__volume {
  background: none;
  border: none;
  font-size: 1.125rem;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

/* ========================================
   Story Images
   ======================================== */

.story-image {
  margin: 24px 0;
  max-width: 100%;
}

.story-image--small {
  max-width: 280px;
}

.story-image--medium {
  max-width: 400px;
}

.story-image--center {
  margin-left: auto;
  margin-right: auto;
}

.story-image__caption {
  font-size: 0.8125rem;
  color: var(--color-muted);
  font-style: italic;
  margin-top: 8px;
  line-height: 1.4;
}

.story-images-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 24px 0;
}

.story-images-row img {
  flex: 1;
  min-width: 120px;
  max-width: 200px;
  object-fit: contain;
}

/* ========================================
   Donate Widget
   ======================================== */

.donate-widget {
  display: flex;
  justify-content: center;
  margin: var(--section-gap) 0;
}

/* ========================================
   Legal Content
   ======================================== */

.legal h1 {
  font-size: 2.25rem;
  margin-bottom: 8px;
}

.legal h2 {
  font-size: 1.5rem;
  margin-top: 40px;
  margin-bottom: 12px;
}

.legal h3 {
  font-size: 1.25rem;
  margin-top: 28px;
  margin-bottom: 8px;
}

.legal p {
  margin-top: 1em;
}

.legal ul {
  margin-top: 1em;
  padding-left: 1.5em;
}

.legal li {
  margin-bottom: 8px;
}

/* ========================================
   Utility
   ======================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center {
  text-align: center;
}

/* Page Transitions */

body {
  opacity: 1;
  transition: opacity 0.4s ease;
}

body.page-fade-out {
  opacity: 0;
}

body.page-fade-in {
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ========================================
   Media Queries — 768px (tablet/mobile)
   ======================================== */

@media (max-width: 768px) {
  :root {
    --page-padding: 24px;
    --section-gap: 36px;
  }

  .nav {
    justify-content: flex-end;
  }

  .nav__hamburger {
    display: flex;
  }

  .nav__links {
    display: none;
    position: fixed;
    inset: 0;
    background-color: var(--color-content);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    z-index: 100;
  }

  .nav__links.open {
    display: flex;
  }

  .nav__link {
    font-size: 1.25rem;
  }

  .site-header__title {
    font-size: 2.5rem;
  }

  .site-header__page-title {
    font-size: 1.75rem;
  }

  .section-heading {
    font-size: 1.375rem;
  }

  .hero__image {
    max-width: 100%;
  }

  .copy-block__content {
    flex-direction: column;
  }

  .copy-block__btn {
    padding: 10px 16px;
  }
}

/* ========================================
   Media Queries — 480px (small mobile)
   ======================================== */

@media (max-width: 480px) {
  :root {
    --page-padding: 16px;
    --section-gap: 28px;
  }

  body {
    font-size: 1rem;
  }

  .site-header__title {
    font-size: 2rem;
  }

  .step__heading {
    font-size: 1.125rem;
  }
}
