/* Public homepage (public/index.html only). Shared page rules live in styles.css and shell.css. */
.home {
  background: var(--page-backdrop);
}
.home .sq-public-header {
  padding-block: .65rem;
  border-bottom-color: var(--page-frame);
}
.home h1, .home h2, .home h3 {
  font-family: var(--page-heading);
  font-weight: 700;
  letter-spacing: 0;
}
.home .section {
  padding-block: 1.6rem 2rem;
}

/* Section titles with gold rules either side, as in the mock. */
.flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin: 0 0 1.25rem;
  color: var(--page-parchment);
  font-size: clamp(1.25rem, 2.2vw, 1.9rem);
  text-align: center;
  text-wrap: balance;
}
.flourish::before, .flourish::after {
  content: '';
  flex: 0 1 9rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--page-gold));
}
.flourish::after {
  background: linear-gradient(270deg, transparent, var(--page-gold));
}

/* Buttons: .primary-action and .secondary-action come from styles.css. */
.home .icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

/* Hero banner */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(300px, 22vw, 360px);
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--page-frame);
  overflow: hidden;
}
.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 42%;
  z-index: -2;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #0d0a0bf2 0%, #0d0a0bcc 28%, #0d0a0b33 50%, transparent 62%);
}
.hero-content > * {
  max-width: 34rem;
}
.hero h1 {
  margin: 0 0 .6rem;
  color: var(--page-parchment);
  font-size: clamp(2.1rem, 3.3vw, 3rem);
  line-height: 1.12;
  text-shadow: 0 2px 10px #000c;
}
.hero-intro {
  color: #f3ece0;
  font-size: 1.1rem;
  line-height: 1.5;
  text-shadow: 0 1px 6px #000;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem 1.2rem;
  margin-top: 1.4rem;
}
.hero-facts {
  margin-top: 1rem;
  color: var(--page-gold);
  font: 700 1.05rem/1.4 var(--page-heading);
  text-shadow: 0 1px 6px #000;
}
.access-note {
  margin-top: .3rem;
  color: #d8cfc4;
  font-size: .8rem;
  text-shadow: 0 1px 4px #000;
}

/* Framed panels shared by the gallery, cards, news and FAQ. */
.carousel, .realm-card, .realm-overview, .latest-panel, .faq-columns details {
  border: 1px solid var(--page-frame);
  border-radius: 6px;
  background: linear-gradient(180deg, #1c1516, #120e0f);
  box-shadow: inset 0 0 0 1px #00000099, 0 8px 22px #0007;
}

/* What can you do: gallery beside the cards */
.discover-section {
  scroll-margin-top: 1rem;
}
.realm-overview {
  margin-bottom: 1.5rem;
  padding: clamp(.9rem, 2vw, 1.4rem);
  text-align: center;
}
.realm-overview h3 {
  margin: 0 0 .9rem;
  color: var(--page-parchment);
  font-size: 1.1rem;
}
.realm-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.realm-counts li {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: .65rem .35rem;
  background: #0d0a0b66;
  border: 1px solid #c9a46347;
  border-radius: 4px;
  font-size: .875rem;
  line-height: 1.3;
}
.realm-counts strong {
  color: var(--page-parchment);
  font: 700 clamp(1.25rem, 2.55vw, 1.9rem)/1.2 var(--page-heading);
}
.realm-overview p {
  margin: .9rem 0 0;
  font-size: .925rem;
  text-wrap: pretty;
}
.realm-overview p strong {
  color: var(--page-parchment);
}
.discover-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.carousel {
  padding: .6rem;
}
.gallery-stage {
  position: relative;
}
.gallery-slides {
  display: grid;
  gap: 1rem;
}
.gallery-slide > a {
  position: relative;
  display: block;
  border: 1px solid #5d4628;
  border-radius: 4px;
  overflow: hidden;
  background: #09090b;
}
.gallery-slide img {
  aspect-ratio: 8 / 5;
  object-fit: cover;
}
.gallery-slide figcaption {
  display: grid;
  gap: .25rem;
  padding: .75rem .35rem .2rem;
  color: #d9d0c5;
  font-size: .9rem;
}
.gallery-slide figcaption strong {
  color: var(--page-parchment);
  font: 700 1rem/1.35 var(--page-heading);
}
.image-label {
  position: absolute;
  top: .5rem;
  right: .5rem;
  padding: .2rem .6rem;
  border: 1px solid #5d4628;
  border-radius: 3px;
  background: #0d0a0bd9;
  color: var(--page-parchment);
  font: 700 .8rem/1.4 var(--page-heading);
}
.carousel[data-enhanced] .gallery-slides {
  touch-action: pan-y pinch-zoom;
}
.carousel[data-enhanced] .gallery-slide {
  animation: reveal-scene .18s ease-out;
}
.carousel-controls button {
  position: absolute;
  top: 0;
  margin-top: calc(31.25% - 22px);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #d8ad62;
  border-radius: 50%;
  background: #0d0a0bd9;
  color: var(--page-parchment);
  font-size: 1.6rem;
  line-height: 1;
}
.carousel-previous {
  left: .45rem;
}
.carousel-next {
  right: .45rem;
}
.carousel-controls button:hover {
  background: #45201c;
}
.carousel-topics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .4rem;
  margin-top: .7rem;
}
.carousel-topics button {
  min-height: 44px;
  padding: .3rem .2rem;
  border: 1px solid var(--page-frame);
  border-radius: 4px;
  background: #0d0a0b;
  color: var(--page-parchment);
  font: 700 .85rem/1.2 system-ui, sans-serif;
}
.carousel-topics button:hover, .carousel-topics button[aria-pressed="true"] {
  background: #45201c;
  border-color: #e3b866;
}
.carousel-topics button[aria-pressed="true"] {
  box-shadow: inset 0 -2px #e3b866;
}
.realm-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.realm-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}
.realm-card img {
  aspect-ratio: 3 / 1;
  object-fit: cover;
  border-bottom: 1px solid #5d4628;
}
.realm-card > div {
  padding: .65rem .8rem;
}
.realm-card h3 {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin: 0 0 .3rem;
  color: var(--page-parchment);
  font-size: 1rem;
  line-height: 1.25;
}
.realm-card h3 .icon {
  color: #e2b45c;
}
.realm-card p {
  color: #d9d0c5;
  font-size: .82rem;
  line-height: 1.45;
}
/* Latest from the Realm: the red band with two ribboned panels */
.latest-section {
  border-block: 1px solid var(--page-frame);
  background:
    radial-gradient(ellipse 70% 120% at 50% 50%, #5a161699, transparent 75%),
    linear-gradient(180deg, #2a0f10, #1a0b0c);
}
.latest-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.latest-panel {
  position: relative;
  display: grid;
  grid-template-columns: 42% 1fr;
  align-items: center;
  gap: 1.1rem;
  padding: 1.6rem 1.1rem 1rem;
}
.latest-changes {
  grid-template-columns: 1fr 34%;
}
.ribbon {
  position: absolute;
  top: -.85rem;
  left: 1rem;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .2rem 1.4rem .2rem .7rem;
  border: 1px solid #d8ad62;
  background: var(--page-red);
  clip-path: polygon(0 0, 100% 0, calc(100% - .7rem) 50%, 100% 100%, 0 100%);
  color: #fff3df;
  font: 700 .8rem/1.6 var(--page-heading);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.latest-art {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid #5d4628;
  border-radius: 4px;
}
.latest-date {
  color: #d9d0c5;
  font-size: .75rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.latest-panel h3 {
  margin: .2rem 0 .4rem;
  color: #fff3df;
  font-size: 1.25rem;
}
.latest-copy > p:not(.latest-date) {
  color: #e2d9cd;
  font-size: .88rem;
  line-height: 1.5;
}
.latest-highlights {
  margin: .2rem 0 0;
  padding: 0;
  list-style: none;
  color: #e2d9cd;
  font-size: .88rem;
}
.latest-highlights li {
  position: relative;
  padding-left: 1.2rem;
}
.latest-highlights li::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: #e2b45c;
  font-size: .7rem;
  line-height: 2;
}
.latest-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  min-height: 44px;
  color: #f0c77c;
  font: 700 .95rem/1.3 var(--page-heading);
}

/* FAQ: three columns of framed rows */
.faq-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .6rem 1.25rem;
  align-items: start;
}
.faq-column {
  display: grid;
  gap: .6rem;
}
.faq-columns details {
  overflow: hidden;
}
.faq-columns summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .55rem 2.4rem .55rem 2.1rem;
  color: #f1e6d3;
  font-size: .93rem;
  cursor: pointer;
  list-style: none;
}
.faq-columns summary::-webkit-details-marker {
  display: none;
}
.faq-columns summary::before {
  content: '›';
  position: absolute;
  left: .85rem;
  color: #e2b45c;
  font-size: 1.3rem;
  line-height: 1;
}
.faq-columns summary::after {
  content: '';
  position: absolute;
  right: 1rem;
  top: calc(50% - .35rem);
  width: .45rem;
  height: .45rem;
  border: solid #e2b45c;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.faq-columns details[open] summary {
  background: var(--page-red);
  color: #fff3df;
}
.faq-columns details[open] summary::before {
  content: '◇';
  font-size: .9rem;
}
.faq-columns details[open] summary::after {
  top: calc(50% - .1rem);
  transform: rotate(-135deg);
}
.faq-columns details p {
  padding: .7rem 1rem .9rem 2.1rem;
  color: #ddd4c8;
  font-size: .88rem;
  line-height: 1.55;
}

.faq-more {
  margin-top: 1.1rem;
}

/* Closing banner */
.final-invitation {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: clamp(220px, 17vw, 300px);
  padding: 2rem 1rem;
  border-top: 1px solid var(--page-frame);
  overflow: hidden;
  text-align: center;
}
.final-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 66%;
  z-index: -2;
}
.final-invitation::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 45% 70% at 50% 50%, #0d0a0b99, transparent 75%);
}
.final-invitation h2 {
  margin: 0 0 1rem;
  color: #fff3df;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  text-shadow: 0 2px 12px #000;
}
.optional-interest {
  margin-top: .75rem;
  font-size: .85rem;
}
.optional-interest a {
  color: #fff3df;
  text-shadow: 0 1px 6px #000;
}

@keyframes reveal-scene {
  from { opacity: .6; }
  to { opacity: 1; }
}
@media (max-width: 1100px) {
  .latest-panels {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 960px) {
  .discover-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 860px) {
  .faq-columns {
    grid-template-columns: 1fr;
  }
  .faq-column {
    display: contents;
  }
}
@media (max-width: 760px) {
  .realm-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero {
    align-items: flex-start;
    min-height: 0;
    padding-block: 1.5rem 1.75rem;
  }
  .hero-art {
    object-position: 18% center;
  }
  .hero::before {
    background: linear-gradient(90deg, #0d0a0be0 0%, #0d0a0b99 45%, #0d0a0b1a 80%);
  }
  .hero-content > * {
    max-width: 22rem;
  }
  .hero-intro {
    font-size: 1rem;
  }
  .home .primary-action, .secondary-action {
    min-height: 48px;
    padding: .55rem 1.1rem;
    font-size: 1.05rem;
  }
  .hero-facts {
    font-size: .9rem;
  }
  .home .section {
    padding-block: 1.75rem 2rem;
  }
  .flourish {
    gap: .75rem;
  }
  .flourish::before, .flourish::after {
    flex-basis: 1.5rem;
  }
  .latest-panel, .latest-changes {
    grid-template-columns: 40% 1fr;
    gap: .8rem;
    padding: 1.5rem .8rem .8rem;
  }
  .latest-changes .latest-art {
    grid-row: 1;
    grid-column: 1;
  }
  .latest-panel h3 {
    font-size: 1.05rem;
  }
  .latest-copy > p:not(.latest-date), .latest-highlights {
    font-size: .82rem;
  }
  .image-viewer {
    padding: .75rem;
  }
}
@media (max-width: 480px) {
  .realm-cards {
    grid-template-columns: 1fr;
  }
  .realm-card {
    grid-template-columns: 35% 1fr;
    grid-template-rows: none;
    align-items: center;
  }
  .realm-card img {
    aspect-ratio: auto;
    height: 100%;
    border-right: 1px solid #5d4628;
    border-bottom: 0;
  }
}
@media (max-width: 420px) {
  .hero h1 {
    font-size: 1.85rem;
  }
  .hero-actions {
    flex-wrap: nowrap;
    gap: .6rem;
  }
  .home .hero-actions > a {
    min-height: 44px;
    padding: .45rem .8rem;
    font-size: .95rem;
    white-space: nowrap;
  }
  .realm-card h3 {
    font-size: .92rem;
  }
  .realm-card p {
    font-size: .78rem;
  }
}
@media (max-width: 359px) {
  .hero-actions {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  .carousel[data-enhanced] .gallery-slide {
    animation: none;
  }
}
