
:root {
  --war-red: #e50914;
  --war-red-light: #ff2833;
  --war-red-dark: #920008;
  --war-black: #030303;
  --war-dark: #090909;
  --war-panel: #111111;
  --war-panel-light: #181818;
  --war-white: #ffffff;
  --war-grey: #c4c4c4;
  --war-muted: #818181;
  --war-border: rgba(255, 255, 255, 0.1);
  --content-width: 1200px;
  --focus-ring: #ffffff;
}

/* =========================================
   RESET / BASE
========================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  color: var(--war-white);
  background: var(--war-black);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  display: block;
  width: 100%;
}

img,
video,
iframe {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  max-width: 100%;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

p,
h1,
h2,
h3,
a,
label {
  overflow-wrap: anywhere;
}

[hidden] {
  display: none !important;
}

/* =========================================
   HERO / COVER VIDEO
========================================= */

.cover-section {
  position: relative;
  width: 100%;
  height: min(100vh, 900px);
  min-height: 500px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  background: #000;
}

.cover-section::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.04) 0%,
    rgba(0, 0, 0, 0.12) 55%,
    rgba(0, 0, 0, 0.68) 100%
  );
}

.cover-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

.cover-overlay {
  position: relative;
  z-index: 2;
  width: min(700px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px;
  text-align: center;
}

.cover-overlay h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 6vw, 3rem);
}

/* =========================================
   HOME INTRODUCTION
========================================= */

.home-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: calc(100vh - 90px);
  margin: 0;
  padding: clamp(60px, 8vw, 110px) 20px;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(229, 9, 20, 0.16), transparent 34rem),
    linear-gradient(135deg, #030303, #121212 58%, #080808);
}

.home-section::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, #000, transparent 92%);
}

.content-container {
  position: relative;
  z-index: 1;
  width: min(820px, 100%);
  min-width: 0;
  margin: 0 auto;
  padding: clamp(26px, 5vw, 52px);
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 45%),
    rgba(12, 12, 12, 0.94);
  border: 1px solid var(--war-border);
  border-radius: 16px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.5),
    0 0 50px rgba(229, 9, 20, 0.08);
  backdrop-filter: blur(12px);
}

.home-section h1 {
  margin: 0 0 26px;
  color: var(--war-red-light);
  font-size: clamp(2.25rem, 7vw, 4.2rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-decoration: none;
  text-transform: uppercase;
  text-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
}

.title1 {
  color: var(--war-white);
  font-size: 0.68em;
  letter-spacing: 0.02em;
}

.home-section p {
  max-width: 700px;
  margin: 0 auto 28px;
  color: var(--war-grey);
  font-size: clamp(1rem, 2.3vw, 1.25rem);
  line-height: 1.75;
}

.slogan {
  display: inline-block;
  margin: 0;
  color: var(--war-red-light);
  font-size: clamp(1.35rem, 4.5vw, 1.85rem);
  font-weight: 900;
  line-height: 1.3;
  text-shadow: 0 6px 22px rgba(229, 9, 20, 0.22);
}

.red {
  color: var(--war-red-light);
}

.black {
  color: #000;
}

/* =========================================
   POSTER VIDEO / IMAGE
========================================= */

.book-thumbnail {
  width: 100%;
  margin: 34px auto;
}

.book-thumbnail video,
.book-thumbnail img {
  width: min(100%, 430px);
  height: auto;
  max-height: 640px;
  margin: 0 auto;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  box-shadow:
    0 22px 55px rgba(0, 0, 0, 0.65),
    0 0 30px rgba(229, 9, 20, 0.1);
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.book-thumbnail video:hover,
.book-thumbnail img:hover {
  border-color: rgba(229, 9, 20, 0.5);
  transform: translateY(-5px) scale(1.015);
  box-shadow:
    0 28px 65px rgba(0, 0, 0, 0.75),
    0 0 40px rgba(229, 9, 20, 0.15);
}

/* =========================================
   CTA BUTTON
========================================= */

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  min-height: 52px;
  margin-top: 4px;
  padding: 14px 30px;
  color: var(--war-white);
  background: var(--war-red);
  border: 1px solid var(--war-red);
  border-radius: 7px;
  box-shadow: 0 14px 35px rgba(229, 9, 20, 0.27);
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    transform 0.25s ease,
    background-color 0.25s ease,
    box-shadow 0.25s ease;
}

.cta-button:hover {
  background: var(--war-red-light);
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(229, 9, 20, 0.4);
}

.cta-button:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 4px;
}

/* =========================================
   WALLET BUTTONS
========================================= */

.wallet-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

#connectWalletButton,
#disconnectWalletButton,
#donateButton {
  max-width: 100%;
  margin: 0;
  padding: 10px 14px;
  color: var(--war-white);
  background: var(--war-red);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
  white-space: normal;
  transition:
    background-color 0.25s ease,
    transform 0.25s ease;
}

#connectWalletButton:hover,
#disconnectWalletButton:hover,
#donateButton:hover {
  background: var(--war-red-dark);
  transform: translateY(-1px);
}

/* =========================================
   LEGACY FOOTER WRAPPER
   Supports the original Home.html wrapper while
   allowing the minimal WAR footer to match the
   WorldActionRivalry page.
========================================= */

.footer {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: var(--war-white);
  background: var(--war-black);
  border: 0;
}

/* Hide the old contact/newsletter block when it is still present. */
.footer > .footer-container {
  display: none;
}

/* =========================================
   WAR FOOTER + WORLD MAP
========================================= */

.war-footer {
  width: 100%;
  margin: 0;
  padding: 0 0 30px;
  overflow: hidden;
  color: var(--war-white);
  background:
    radial-gradient(circle at 50% 100%, rgba(229, 9, 20, 0.08), transparent 28rem),
    #050505;
  border-top: 3px solid var(--war-red);
  text-align: center;
}

.map-container {
  position: relative;
  width: 100%;
  height: clamp(220px, 30vw, 330px);
  margin: 0;
  overflow: hidden;
  background: #111;
  border-radius: 0;
}

.map-container::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  box-shadow: inset 0 -35px 45px rgba(0, 0, 0, 0.42);
}

.map-container iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  filter: grayscale(0.9) contrast(1.08) brightness(0.78);
}

.footer-brand {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: 46px 20px 8px;
}

.footer-war {
  display: block;
  color: var(--war-red-light);
  font-size: clamp(3rem, 8vw, 4.8rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.08em;
  text-shadow: 0 10px 28px rgba(229, 9, 20, 0.24);
}

.footer-brand p {
  margin: 10px 0 0;
  color: var(--war-grey);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  line-height: 1.4;
  text-transform: uppercase;
}

.footer-line {
  width: min(540px, calc(100% - 40px));
  height: 1px;
  margin: 26px auto 20px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.24),
    transparent
  );
}

.war-footer > p {
  margin: 0;
  padding: 0 20px;
  color: var(--war-muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

/* =========================================
   DONATION MODAL
========================================= */

.modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  padding: 20px;
  overflow-y: auto;
  overflow-x: hidden;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(7px);
}

.modal-content {
  position: relative;
  width: min(520px, 100%);
  margin: 5vh auto;
  padding: 30px;
  color: #111;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.modal-content h2 {
  margin: 0 45px 22px 0;
  color: #111;
  font-size: 1.75rem;
}

.close-button {
  position: absolute;
  top: 14px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: #666;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

.close-button:hover,
.close-button:focus {
  color: #000;
  background: #f1f1f1;
}

.modal-content label {
  display: block;
  margin: 14px 0 7px;
  color: #222;
  font-weight: 700;
}

.modal-content input,
.modal-content textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 12px;
  color: #111;
  background: #fff;
  border: 1px solid #c9c9c9;
  border-radius: 6px;
}

.modal-content input:focus,
.modal-content textarea:focus {
  border-color: var(--war-red);
}

.modal-content textarea {
  min-height: 110px;
  resize: vertical;
}

.modal-content form > button {
  width: 100%;
  margin-top: 20px;
  padding: 13px 20px;
  color: var(--war-white);
  background: var(--war-red);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
  transition:
    background-color 0.25s ease,
    transform 0.25s ease;
}

.modal-content form > button:hover {
  background: var(--war-red-dark);
  transform: translateY(-1px);
}

/* =========================================
   OPTIONAL REVEAL ANIMATION
========================================= */

.section {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 900px) {
  .cover-section {
    height: 75vh;
    min-height: 460px;
  }

  .home-section {
    min-height: auto;
  }
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {
  .cover-section {
    height: 65vh;
    min-height: 400px;
  }

  .cover-video {
    object-position: center;
  }

  .home-section {
    padding: 48px 14px;
  }

  .content-container {
    padding: 28px 18px;
    border-radius: 12px;
  }

  .home-section h1 {
    margin-bottom: 22px;
  }

  .home-section p {
    margin-bottom: 24px;
    line-height: 1.65;
  }

  .book-thumbnail {
    margin: 28px auto;
  }

  .book-thumbnail video,
  .book-thumbnail img {
    width: min(100%, 340px);
  }

  .cta-button {
    width: min(100%, 270px);
    padding: 13px 20px;
  }

  .map-container {
    height: 230px;
  }

  .footer-brand {
    padding-top: 38px;
  }

  .modal {
    padding: 12px;
  }

  .modal-content {
    margin: 3vh auto;
    padding: 24px 18px;
  }
}

/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 480px) {
  .cover-section {
    height: 58vh;
    min-height: 350px;
  }

  .home-section {
    padding-inline: 10px;
  }

  .content-container {
    padding: 24px 14px;
  }

  .home-section h1 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .map-container {
    height: 210px;
  }

  .footer-brand p {
    letter-spacing: 0.14em;
  }

  .war-footer > p {
    font-size: 0.78rem;
  }
}

/* =========================================
   REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .book-thumbnail video:hover,
  .book-thumbnail img:hover,
  .cta-button:hover,
  #connectWalletButton:hover,
  #disconnectWalletButton:hover,
  #donateButton:hover {
    transform: none;
  }
}