/* Royal Impact: shared palette, type rhythm and page-specific layouts. */
:root {
  --navy: #0C1429;
  --navy-2: #121E36;
  --navy-3: #1B2B49;
  --text: #F7F3EA;
  --muted: #AAB6CF;
  --gold: #E3B871;
  --glass: rgba(255, 255, 255, 0.035);
  --glass-b: rgba(195, 210, 237, 0.18);
  --r-s: 6px;
  --r-m: 10px;
  --r-l: 14px;
  --r-xl: 20px;
}

html {
  scroll-padding-top: 94px;
  scrollbar-gutter: stable both-edges;
}

.container {
  width: 100%;
  max-width: 1320px;
  box-sizing: border-box;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 56px);
}

.sp {
  padding-block: clamp(52px, 7vw, 104px);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.btn-g,
.btn-o,
.btn-wa,
.btn-dl {
  min-height: 44px;
  border-radius: var(--r-s);
  font-family: var(--body);
  font-weight: 600;
  justify-content: center;
}

.btn-o {
  border-color: var(--glass-b);
}

.btn-g:hover,
.btn-dl:hover {
  box-shadow: none;
  transform: none;
}

#hero {
  min-height: auto;
  padding-block: clamp(112px, 13vw, 156px) clamp(46px, 6vw, 88px);
  background: var(--navy);
  border-bottom: 1px solid var(--glass-b);
}

#pre,
#stars,
.hero-bg,
.hero-glow,
.hero-card,
.scroll-cue {
  display: none;
}

.hero-badge,
.tag {
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  color: var(--gold);
  letter-spacing: 0.025em;
  text-transform: none;
}

.hero-badge {
  margin-bottom: 16px;
}

.hero-badge::before {
  content: none;
}

.hero-h1 {
  margin-bottom: 20px;
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero-h1 .hi,
.sec-title .gold {
  color: inherit;
  text-shadow: none;
}

.hero-sub {
  max-width: 56ch;
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.7;
}

.hero-center .hero-sub,
.library-page .hero-sub {
  margin-inline: auto;
}

.sec-title {
  line-height: 1.12;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero-frame,
.hero-frame img {
  border-radius: var(--r-m);
}

.hero-frame::before,
.hero-frame::after {
  content: none;
}

.hero-frame img {
  height: auto;
}

.home-page #hero .hero-inner {
  gap: clamp(24px, 5vw, 72px);
}

.home-page #hero .hero-h1 {
  font-size: clamp(36px, 5.1vw, 68px);
}

.home-page .hero-welcome {
  display: block;
  margin-bottom: 10px;
  font-family: var(--body);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.home-page .hero-h1 .hi {
  display: block;
  max-width: min-content;
}

.home-page .hero-vis {
  opacity: 1;
  transform: none;
  min-width: 0;
  padding: 0 0 10px 10px;
  border-left: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}

.home-page #stats {
  border-block: 1px solid var(--glass-b);
}

.home-page .stat + .stat::before {
  background: var(--glass-b);
}

.projects-head,
.gal-head {
  text-align: left;
  margin-bottom: clamp(24px, 4vw, 46px);
}

.projects-head .sec-sub {
  margin-inline: 0;
}

.proj-card,
.proj-card.hl,
.pay-card {
  background: var(--navy-2);
  padding: clamp(22px, 3vw, 38px);
  border-color: var(--glass-b);
}

.proj-card.hl {
  border-top: 2px solid var(--gold);
}

.proj-card p,
.test-card p {
  font-size: 16px;
}

.proj-card::before,
.book-card::before {
  content: none;
}

.proj-card:hover,
.pay-card:hover,
.test-card:hover,
.book-card:hover {
  transform: none;
  box-shadow: none;
}

.test-card {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--glass-b);
  border-radius: 0;
  padding: 22px 0 0;
}

.activity-img img {
  height: auto;
}

.pay-num {
  font-family: var(--body);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.library-page .books-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2.2vw, 28px);
}

.library-page .book-card:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  align-items: stretch;
  background: var(--navy);
}

.library-page .book-card:first-child .book-cover {
  display: grid;
  place-items: center;
  padding: clamp(24px, 4vw, 56px);
  aspect-ratio: auto;
}

.library-page .book-card:first-child .book-cover img {
  width: min(100%, 260px);
  height: auto;
  object-fit: contain;
  transform: none;
}

.library-page .book-card:first-child .book-body {
  justify-content: center;
  padding: clamp(24px, 5vw, 68px);
}

.library-page .book-card:first-child h3 {
  font-size: clamp(24px, 3.5vw, 43px);
  max-width: 24ch;
}

.library-page .book-card:first-child p {
  flex: none;
  max-width: 50ch;
  font-size: 16px;
}

.book-ribbon {
  top: 12px;
  right: 12px;
  border-radius: var(--r-s);
  text-transform: none;
  letter-spacing: normal;
  padding: 5px 10px;
}

.book-ribbon::after {
  content: none;
}

.library-page .book-card:not(:first-child) .book-cover {
  aspect-ratio: auto;
  background: transparent;
}

.library-page .book-soon {
  position: static;
  flex-direction: row;
  justify-content: flex-start;
  padding: 14px 24px 0;
  background: transparent;
}

.library-page .book-soon i {
  font-size: 16px;
  color: var(--gold);
}

.library-page .book-soon span {
  text-transform: none;
  letter-spacing: normal;
}

.library-page .book-card:not(:first-child) .book-body {
  padding-top: 12px;
}

@media (min-width: 901px) {
  .home-page #hero .hero-inner {
    grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
  }
}

@media (min-width: 769px) {
  .home-page .proj-card.hl {
    grid-row: span 2;
  }
}

@media (max-width: 640px) {
  .library-page .books-grid,
  .library-page .book-card:first-child {
    grid-template-columns: minmax(0, 1fr);
  }

  .library-page .book-card:first-child .book-cover img {
    max-width: 180px;
  }

  .home-page .hero-vis {
    padding: 0 0 6px 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
  }
}

.zone-directory-link {
  margin-top: 1rem;
}

footer a.footer-admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  min-height: 30px;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--glass-b);
  border-radius: var(--r-s);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
}

footer a.footer-admin-link:hover,
footer a.footer-admin-link:focus-visible {
  color: var(--gold);
  border-color: var(--gold);
}
