@font-face {
  font-family: "Norwester";
  src: url("./fonts/norwester.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --red: #ff1616;
  --red-deep: #7a0000;
  --white: #ffffff;
  --black: #000000;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #000;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--white);
  background:
    radial-gradient(ellipse at 12% 24%, rgba(255, 0, 0, 0.1), transparent 26rem),
    radial-gradient(ellipse at 88% 82%, rgba(255, 0, 0, 0.08), transparent 30rem),
    #000;
  font-family: "Norwester", Impact, "Arial Narrow", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
}

body::before {
  background-image:
    radial-gradient(circle, rgba(255, 20, 20, 0.88) 0 1px, transparent 1.45px),
    radial-gradient(circle, rgba(255, 255, 255, 0.28) 0 1px, transparent 1.25px),
    radial-gradient(ellipse at 12% 35%, rgba(255, 0, 0, 0.17), transparent 20rem),
    radial-gradient(ellipse at 55% 58%, rgba(255, 0, 0, 0.13), transparent 24rem);
  background-position: 0 0, 70px 40px, 8% 40%, 54% 60%;
  background-size: 150px 150px, 230px 230px, 100% 100%, 100% 100%;
  opacity: 0.22;
  animation: pixel-cloud 42s ease-in-out infinite alternate;
}

body::after {
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.032) 0 1px, transparent 1px 6px);
  opacity: 0.18;
  animation: scan-drift 20s linear infinite;
}

@keyframes pixel-cloud {
  0% {
    background-position: 0 0, 70px 40px, -18% 28%, 38% 64%;
    transform: translate3d(-1rem, 0, 0);
  }

  50% {
    background-position: 90px 180px, -80px 180px, 44% 46%, 78% 44%;
    transform: translate3d(1.25rem, -0.75rem, 0);
  }

  100% {
    background-position: 180px 320px, -180px 300px, 112% 60%, 24% 72%;
    transform: translate3d(0.5rem, 1rem, 0);
  }
}

@keyframes scan-drift {
  from { background-position: 0 0; }
  to { background-position: 0 42px; }
}

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

a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 4px;
}

.page {
  position: relative;
  z-index: 1;
  width: min(100%, 1180px);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(14px, 3vw, 34px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 56px;
  font-size: clamp(18px, 2.6vw, 30px);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: clamp(12px, 3vw, 42px);
}

.brand-small {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(34px, 5vw, 58px);
  text-shadow: 2px 0 var(--red), -2px 0 var(--red), 0 2px var(--red), 0 -2px var(--red);
}

.brand-mark {
  display: none;
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(255, 0, 0, 0.72));
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 320px);
  align-items: center;
  gap: clamp(22px, 5vw, 68px);
  padding: clamp(34px, 7vw, 88px) 0 clamp(22px, 4vw, 44px);
}

.home .hero {
  min-height: 0;
  padding: clamp(44px, 5vw, 76px) 0 14px;
}

.home.page {
  width: min(100%, 1480px);
  padding-inline: clamp(24px, 4vw, 76px);
}

.wordmark {
  margin: 0;
  font-size: clamp(66px, 13vw, 170px);
  line-height: 0.86;
  color: #fff;
  text-shadow:
    6px 0 #b91616,
    -6px 0 #b91616,
    0 6px #b91616,
    0 -6px #b91616,
    0 0 30px rgba(255, 0, 0, 0.45);
}

.library .wordmark {
  font-size: clamp(64px, 12vw, 150px);
}

.faith .wordmark {
  font-size: clamp(46px, 8.8vw, 116px);
}

.tagline {
  margin: 18px 0 0;
  max-width: 900px;
  font-size: clamp(22px, 4vw, 52px);
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(255, 0, 0, 0.55);
  animation: slogan-flicker 6.5s steps(1, end) infinite;
}

@keyframes slogan-flicker {
  0%, 100% {
    opacity: 1;
    text-shadow: 0 0 16px rgba(255, 0, 0, 0.55), 0 0 1px #fff;
  }

  7% {
    opacity: 0.88;
    text-shadow: 0 0 8px rgba(255, 0, 0, 0.38);
  }

  8%, 12%, 57%, 61% { opacity: 1; }

  58% {
    opacity: 0.72;
    transform: translateX(1px);
  }

  59% {
    opacity: 1;
    transform: translateX(0);
  }

  91% { opacity: 0.82; }
  92% { opacity: 1; }
}

.arabic,
.intro {
  margin: 10px 0 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(18px, 2.6vw, 30px);
  line-height: 1.08;
  text-transform: uppercase;
  text-shadow: 0 0 14px rgba(255, 0, 0, 0.45);
}

.seal {
  width: min(100%, 300px);
  margin: 0 auto;
  filter: drop-shadow(0 0 24px rgba(255, 0, 0, 0.7));
  animation: float-seal 7s ease-in-out infinite;
}

@keyframes float-seal {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.cards,
.library-grid,
.faith-grid {
  display: grid;
  gap: clamp(10px, 1.8vw, 22px);
}

.cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  margin-top: 0;
}

.library-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: 1fr;
}

.faith-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 900px;
  margin: 0 auto;
}

.card,
.library-card,
.faith-card {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 0, 0, 0.38), transparent 46%),
    linear-gradient(180deg, rgba(75, 0, 0, 0.72), rgba(0, 0, 0, 0.9));
  box-shadow:
    0 0 18px rgba(255, 255, 255, 0.72),
    0 0 34px rgba(255, 0, 0, 0.74),
    inset 0 0 30px rgba(255, 0, 0, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.card {
  display: flex;
  min-height: 150px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: clamp(12px, 1.8vw, 18px);
  text-align: center;
}

.faith-card {
  min-height: 210px;
  padding: clamp(18px, 2.6vw, 28px);
}

.library-card {
  display: flex;
  min-height: 132px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: clamp(12px, 1.8vw, 18px);
  grid-column: span 2;
  text-align: center;
}

.card:hover,
.library-card:hover,
.faith-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 0 22px rgba(255, 255, 255, 0.9),
    0 0 48px rgba(255, 0, 0, 0.95),
    inset 0 0 34px rgba(255, 0, 0, 0.36);
}

.card h2,
.library-card h2,
.faith-card h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 0.95;
  text-transform: uppercase;
}

.library-card h2 {
  margin-bottom: 6px;
  font-size: clamp(30px, 3vw, 42px);
}

.library .library-card p {
  font-family: "Norwester", Impact, "Arial Narrow", sans-serif;
  font-size: clamp(16px, 1.55vw, 20px);
  line-height: 1.12;
  text-transform: uppercase;
}

.card p,
.library-card p,
.faith-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(14px, 1.45vw, 18px);
  line-height: 1.35;
}

.home .card p {
  font-family: "Norwester", Impact, "Arial Narrow", sans-serif;
  font-size: clamp(16px, 1.35vw, 20px);
  line-height: 1.12;
  text-transform: uppercase;
}

.home .card h2 {
  margin-bottom: 6px;
  font-size: clamp(28px, 2.8vw, 40px);
}

.submission {
  max-width: 900px;
  margin: clamp(24px, 5vw, 52px) auto 0;
  padding: clamp(18px, 3vw, 30px);
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
  box-shadow: 0 0 26px rgba(255, 0, 0, 0.72);
  text-align: center;
}

.submission p {
  margin: 0 0 14px;
  font-size: clamp(20px, 3vw, 34px);
  line-height: 1.05;
  text-transform: uppercase;
}

.submission a {
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(15px, 2vw, 20px);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3vw, 38px);
  margin: clamp(34px, 7vw, 78px) auto 0;
  text-align: center;
}

.strip img {
  width: clamp(42px, 7vw, 86px);
  filter: drop-shadow(0 0 18px rgba(255, 0, 0, 0.78));
}

.strip p {
  margin: 0;
  font-size: clamp(30px, 7vw, 78px);
  line-height: 0.9;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(255, 0, 0, 0.75);
}

.strip.single {
  flex-direction: column;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(14px, 3vw, 42px);
  margin-top: clamp(28px, 6vw, 64px);
  padding-bottom: 20px;
  font-size: clamp(18px, 2.4vw, 30px);
}

/* Libr8 News */
.news-body {
  background: #000;
}

.news-body::before {
  background-image: none;
  opacity: 0;
  animation: none;
}

.news-body::after {
  background: none;
  opacity: 0;
  animation: none;
}

.news-page {
  width: min(100%, 1080px);
}

.news-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: clamp(10px, 1.5vw, 18px);
}

.news-nav-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(255, 0, 0, 0.78));
  animation: float-seal 7s ease-in-out infinite;
}

.news-hero {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 10px 0 12px;
  text-align: center;
}

.news-kicker {
  margin: 0 0 12px;
  color: #ff4b4b;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(12px, 1.5vw, 16px);
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.news-title {
  margin: 0;
  font-size: clamp(64px, 13vw, 144px);
  line-height: 0.82;
  text-transform: uppercase;
  text-shadow:
    5px 0 #a80000,
    -5px 0 #a80000,
    0 5px #a80000,
    0 -5px #a80000,
    0 0 32px rgba(255, 0, 0, 0.55);
}

.news-deck {
  max-width: 660px;
  margin: 22px auto 0;
  color: rgba(255, 255, 255, 0.72);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(12px, 1.5vw, 15px);
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.news-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 0;
}

.news-button,
.load-more {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 2px solid #fff;
  border-radius: 5px;
  color: #fff;
  background: rgba(0, 0, 0, 0.78);
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.52);
  font: inherit;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.news-button.primary,
.load-more {
  border-color: #ff3131;
  background: linear-gradient(180deg, #d61515, #800000);
}

.news-button:hover,
.load-more:hover {
  transform: translateY(-2px);
  background-color: rgba(128, 0, 0, 0.9);
  box-shadow: 0 0 26px rgba(255, 0, 0, 0.82);
}

.news-button {
  min-height: 42px;
  padding: 9px 15px;
  font-size: clamp(16px, 1.8vw, 20px);
}

.news-archive {
  padding-top: clamp(4px, 1vw, 12px);
}

.news-search {
  width: min(100%, 760px);
  margin: 0 auto 12px;
  padding: clamp(12px, 1.6vw, 16px);
  border: 2px solid #ff2727;
  border-radius: 10px;
  background: #000;
  box-shadow:
    0 0 12px rgba(255, 25, 25, 0.72),
    0 0 28px rgba(255, 0, 0, 0.38),
    inset 0 0 18px rgba(255, 0, 0, 0.12);
}

.news-search label {
  display: block;
  margin-bottom: 9px;
  color: #fff;
  font-size: clamp(18px, 2.4vw, 25px);
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(255, 0, 0, 0.78);
}

.news-search-row {
  display: flex;
  gap: 10px;
}

.news-search input {
  min-width: 0;
  min-height: 48px;
  flex: 1 1 auto;
  padding: 11px 14px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 5px;
  outline: none;
  color: #fff;
  background: #090909;
  box-shadow: inset 0 0 15px rgba(255, 0, 0, 0.18);
  font: inherit;
  font-size: clamp(16px, 2vw, 21px);
}

.news-search input::placeholder {
  color: rgba(255, 255, 255, 0.48);
}

.news-search input:focus {
  border-color: #ff3131;
  box-shadow:
    0 0 16px rgba(255, 0, 0, 0.68),
    inset 0 0 15px rgba(255, 0, 0, 0.18);
}

.news-search button {
  min-height: 48px;
  padding: 10px 16px;
  border: 2px solid #ff3131;
  border-radius: 5px;
  color: #fff;
  background: linear-gradient(180deg, #d61515, #800000);
  font: inherit;
  font-size: clamp(16px, 2vw, 20px);
  text-transform: uppercase;
  cursor: pointer;
}

.news-search button[hidden] {
  display: none;
}

.news-search-status,
.news-search-empty {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(14px, 1.8vw, 18px);
  line-height: 1.2;
  text-transform: uppercase;
}

.news-search-status:empty {
  display: none;
}

.news-search-empty {
  padding: 38px 18px;
  border: 2px solid #ff2727;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.42);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  clip-path: inset(50%) !important;
}

.news-feed {
  display: grid;
  gap: 24px;
  width: min(100%, 760px);
  margin: 0 auto;
}

.news-post-shell {
  position: relative;
  min-height: 140px;
  overflow: hidden;
  padding: clamp(8px, 1.5vw, 13px);
  border: 2px solid #ff2727;
  border-radius: 10px;
  background: #000;
  box-shadow:
    0 0 12px rgba(255, 25, 25, 0.86),
    0 0 30px rgba(255, 0, 0, 0.52),
    inset 0 0 22px rgba(255, 0, 0, 0.16);
}

.news-post-shell iframe {
  display: block;
  max-width: 100% !important;
  margin: 0 auto !important;
}

.news-post-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
  max-width: 640px;
  margin: 8px auto 0;
  padding: 10px 4px 2px;
  border-top: 1px solid rgba(255, 39, 39, 0.5);
}

.news-post-links a {
  color: #ff5b5b;
  font-size: clamp(14px, 1.8vw, 18px);
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255, 0, 0, 0.65);
}

.news-post-links a:hover {
  color: #fff;
}

.news-feed-note {
  width: min(100%, 760px);
  margin: 24px auto 0;
  color: rgba(255, 255, 255, 0.62);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.load-more[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .home .hero {
    min-height: 0;
  }

  .seal {
    width: min(64vw, 260px);
  }

  .home .brand-mark {
    display: block;
  }

  .home .hero .seal {
    display: none;
  }

  .cards,
  .faith-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-card {
    grid-column: span 1;
  }

}

@media (max-width: 620px) {
  .page {
    padding: 18px;
  }

  .nav-links {
    gap: 12px 18px;
    font-size: 18px;
  }

  .wordmark {
    font-size: clamp(54px, 18vw, 92px);
  }

  .cards,
  .library-grid,
  .faith-grid {
    grid-template-columns: 1fr;
  }

  .cards {
    margin-top: 0;
  }

  .faith-card {
    min-height: 170px;
  }

  .home .card {
    min-height: 128px;
    padding: 10px;
  }

  .home .card h2 {
    font-size: clamp(28px, 8vw, 32px);
  }

  .home .card p {
    font-size: clamp(17px, 4.8vw, 20px);
  }

  .library .library-card {
    min-height: 132px;
    padding: 10px;
  }

  .library .library-card h2 {
    font-size: clamp(28px, 8vw, 32px);
  }

  .library .library-card p {
    font-family: "Norwester", Impact, "Arial Narrow", sans-serif;
    font-size: clamp(18px, 5vw, 20px);
    line-height: 1.12;
    text-transform: uppercase;
  }

  .library .brand-mark {
    display: block;
  }

  .library .hero .seal {
    display: none;
  }

  .library .strip {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 12px;
  }

  .library .strip img {
    width: clamp(34px, 12vw, 48px);
  }

  .library .strip p {
    font-size: clamp(30px, 10vw, 48px);
    white-space: nowrap;
  }

  .news-actions {
    width: min(100%, 360px);
    flex-wrap: nowrap;
    gap: 8px;
  }

  .news-hero {
    padding: 4px 0 10px;
  }

  .news-button {
    min-width: 0;
    min-height: 40px;
    flex: 1 1 0;
    padding: 8px 9px;
    font-size: clamp(14px, 4.4vw, 17px);
    white-space: nowrap;
  }

  .news-search {
    margin-bottom: 10px;
    padding: 12px;
  }

  .news-search-row {
    flex-direction: column;
  }

  .news-search button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
