/* =========================================
   GLOBAL RESET
========================================= */

:root {
  --war-red: #ff0000;
  --war-red-dark: #b30000;
  --war-black: #000000;
  --war-dark: #121212;
  --war-grey: #dddddd;
  --war-white: #ffffff;
}

*,
*::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;
  font-family: Arial, Helvetica, sans-serif;
  background-color: var(--war-white);
}

img,
video,
iframe {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  max-width: 100%;
  font: inherit;
}

/* Prevent long content from widening the page */
p,
h1,
h2,
h3,
a,
label {
  overflow-wrap: anywhere;
  word-break: normal;
}

/* =========================================
   HERO / COVER SECTION
========================================= */

.cover-section {
  position: relative;
  width: 100%;
  height: min(100vh, 900px);
  min-height: 500px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #000;
}

/* This is the key overflow fix */
.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 SECTION
========================================= */

.home-section {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: calc(100vh - 120px);
  margin: 0;
  padding: 60px 20px;
  text-align: center;
  color: var(--war-white);
  background: linear-gradient(135deg, #000000, #1e1e1e);
}

.content-container {
  width: min(800px, 100%);
  min-width: 0;
  margin: 0 auto;
  padding: clamp(20px, 5vw, 40px);
  overflow: hidden;
  background-color: var(--war-dark);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.home-section h1 {
  margin: 0 0 24px;
  color: #d11010;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.15;
  text-decoration: underline var(--war-white);
  text-underline-offset: 8px;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000;
}

.title1 {
  color: var(--war-white);
}

.home-section p {
  max-width: 720px;
  margin: 0 auto 30px;
  color: var(--war-grey);
  font-size: clamp(1rem, 3.5vw, 1.4rem);
  line-height: 1.7;
}

.slogan {
  display: inline-block;
  margin-top: 0;
  color: var(--war-red);
  font-size: clamp(1.3rem, 5vw, 1.7rem);
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.6);
}

.red {
  color: red;
}

/* =========================================
   BOOK / POSTER VIDEO
========================================= */

.book-thumbnail {
  width: 100%;
  margin: 24px auto;
}

.book-thumbnail video,
.book-thumbnail img {
  width: min(100%, 420px);
  height: auto;
  max-height: 600px;
  margin: 0 auto;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.book-thumbnail video:hover,
.book-thumbnail img:hover {
  transform: scale(1.025);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.8);
}

/* =========================================
   CTA BUTTON
========================================= */

.cta-button {
  display: inline-block;
  margin-top: 8px;
  padding: 14px 30px;
  color: var(--war-white);
  background-color: var(--war-red);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 0.3s ease,
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}

.cta-button:hover {
  background-color: #d32f2f;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
}

.cta-button:focus-visible {
  outline: 3px solid #fff;
  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-color: var(--war-red);
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: normal;
  transition: background-color 0.3s ease;
}

#connectWalletButton:hover,
#disconnectWalletButton:hover,
#donateButton:hover {
  background-color: var(--war-red-dark);
}

/* =========================================
   FOOTER
========================================= */

.footer {
  width: 100%;
  margin: 0;
  padding: 40px 20px 24px;
  overflow: hidden;
  color: var(--war-white);
  background-color: var(--war-red);
  border-top: 2px solid crimson;
}

.footer-container {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 30px;
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 0;
}

.footer-left,
.footer .sib-form {
  flex: 1 1 0;
  width: 100%;
  min-width: 0;
  max-width: 500px;
  margin: 0;
}

.footer-left {
  padding: 24px;
  color: var(--war-white);
  background-color: #222;
  border-radius: 10px;
}

.footer-left h3 {
  margin: 0 0 14px;
  padding-bottom: 8px;
  color: #ff1919;
  border-bottom: 2px solid #ff1919;
  font-size: 1.6rem;
}

.footer-left p {
  margin: 8px 0;
  color: var(--war-white);
  font-size: 1.05rem;
  line-height: 1.6;
}

.footer-left a {
  color: var(--war-white);
  text-decoration: none;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.footer-left a:hover {
  color: #ff1919;
  text-decoration: underline;
}

/* =========================================
   NEWSLETTER
========================================= */

/*
  More specific selector protects the layout from
  the external sibforms stylesheet.
*/
.footer .sib-form {
  padding: 28px;
  text-align: center;
  color: #222;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.newsletter-logo {
  width: 100px;
  height: auto;
  margin: 0 auto 15px;
}

.newsletter-title {
  margin: 0 0 6px;
  color: #ff1919;
  font-size: 24px;
  font-weight: 700;
}

.newsletter-subtitle {
  margin: 0 0 18px;
  color: #333;
  font-size: 14px;
  line-height: 1.5;
}

#sib-form {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

#sib-form > label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  line-height: 1.4;
}

.footer .sib-form input[type="email"] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 10px 0 0;
  padding: 12px;
  color: #111;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.sib-form-block__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  margin-top: 14px;
  padding: 11px 22px;
  color: var(--war-white);
  background-color: #ff1919;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 700;
}

.sib-form-block__button:hover {
  background-color: var(--war-red-dark);
}

/* =========================================
   CHECKBOX
========================================= */

.checkbox-container {
  display: flex;
  align-items: flex-start;
  width: 100%;
  margin-top: 14px;
  text-align: left;
}

.checkbox-container input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 10px 0 0;
}

.checkbox-label {
  flex: 1;
  min-width: 0;
  color: #333;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* =========================================
   FOOTER MAP
========================================= */

.footer-bottom {
  width: min(1200px, 100%);
  margin: 30px auto 0;
  padding-top: 0;
  text-align: center;
}

.map-container {
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
}

.map-container iframe {
  display: block;
  width: 100%;
  height: 250px;
  border: 0;
  border-radius: 10px;
}

.footer-bottom p {
  margin: 20px 0 0;
  color: var(--war-white);
  font-size: 1rem;
}

/* =========================================
   MODAL
========================================= */

.modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  padding: 20px;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: rgba(0, 0, 0, 0.65);
}

.modal-content {
  width: min(500px, 100%);
  margin: 5vh auto;
  padding: 24px;
  color: #111;
  background-color: #fff;
  border: 1px solid #888;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
}

.close-button {
  float: right;
  color: #777;
  cursor: pointer;
  font-size: 28px;
  font-weight: 700;
}

.close-button:hover,
.close-button:focus {
  color: #000;
  text-decoration: none;
}

.modal-content label {
  display: block;
  margin: 12px 0 6px;
  font-weight: 700;
}

.modal-content input,
.modal-content textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 15px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.modal-content textarea {
  resize: vertical;
}

.modal-content button {
  padding: 10px 20px;
  color: white;
  background-color: var(--war-red);
  border: 0;
  border-radius: 5px;
  cursor: pointer;
}

.modal-content button:hover {
  background-color: #d32f2f;
}

/* =========================================
   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;
  }

  .footer-container {
    flex-direction: column;
    align-items: center;
  }

  .footer-left,
  .footer .sib-form {
    max-width: 650px;
  }
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {
  .cover-section {
    height: 65vh;
    min-height: 400px;
  }

  .cover-video {
    object-position: center;
  }

  .home-section {
    min-height: auto;
    padding: 40px 14px;
  }

  .content-container {
    padding: 24px 16px;
    border-radius: 10px;
  }

  .home-section h1 {
    margin-bottom: 20px;
    text-underline-offset: 5px;
  }

  .home-section p {
    margin-bottom: 24px;
    line-height: 1.6;
  }

  .book-thumbnail video,
  .book-thumbnail img {
    width: min(100%, 330px);
  }

  .cta-button {
    width: min(100%, 260px);
    padding: 13px 20px;
  }

  .footer {
    padding: 30px 14px 20px;
  }

  .footer-container {
    gap: 20px;
  }

  .footer-left,
  .footer .sib-form {
    width: 100%;
    padding: 20px 16px;
  }

  .map-container iframe {
    height: 220px;
  }

  .modal {
    padding: 12px;
  }

  .modal-content {
    margin: 3vh auto;
    padding: 20px 16px;
  }
}

/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 480px) {
  .cover-section {
    height: 58vh;
    min-height: 360px;
  }

  .home-section {
    padding-inline: 10px;
  }

  .content-container {
    padding-inline: 14px;
  }

  .footer {
    padding-inline: 10px;
  }

  .footer-left,
  .footer .sib-form {
    padding-inline: 14px;
  }

  .newsletter-title {
    font-size: 21px;
  }

  .checkbox-label {
    font-size: 0.82rem;
  }
}

/* =========================================
   REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}