/* --- Fonts --- */
@font-face {
  font-family: 'Ringbearer';
  src: url('RingbearerCE.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* --- Design tokens --- */
:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --text: #b8b8b8;
  --muted: #808080;
  --accent: #8a8a8a;

  --maxw: 72rem;
  --pad-x: clamp(1rem, 4vw, 2rem);
  --radius: 0;

  --fs-1: clamp(2rem, 4vw + 1rem, 3rem);
  --fs-2: clamp(1.25rem, 1.5vw + 0.75rem, 1.75rem);
  --fs-3: clamp(1rem, 0.5vw + 0.9rem, 1.125rem);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8f8f8;
    --surface: #ffffff;
    --text: #2a2a2a;
    --muted: #666666;
  }
}

/* --- Base reset --- */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, "Helvetica Neue", Arial;
  background: #000;
  color: var(--text);
  line-height: 1.6;
  padding-top: 60px; /* Account for fixed nav */
  position: relative;
  z-index: 2;
}

a { 
  color: var(--accent); 
  text-decoration: none; 
  transition: opacity 0.2s ease, color 0.2s ease, text-shadow 0.2s ease;
}
a:hover, 
a:focus,
a:active { 
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
  opacity: 1;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  left: var(--pad-x);
  top: 1rem;
  padding: 0.5rem 0.75rem;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  color: var(--text);
  border-radius: 0.5rem;
  outline: 2px solid var(--accent);
}

/* Layout */
.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 0;
  position: relative;
  z-index: 2;
  padding-block: clamp(1.25rem, 2.5vw, 2rem);
}

.stack > * + * { margin-top: 0.75rem; }

/* Cohesive text that preserves line breaks */
.cohesive-text {
  white-space: pre-line;
  line-height: 1.6;
  margin: 0;
  text-align: center;
}

/* Hero banner */
.hero {
  position: relative;
  width: 100%;
  max-width: 1200px;
  z-index: 2;
  margin: 0 auto;
  aspect-ratio: 820 / 312;
  background: center / cover no-repeat var(--surface);
  background-image: url("assets/banner.png");
  border-bottom: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.35), rgba(0,0,0,.15), rgba(0,0,0,.45));
}
.hero-inner {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 2rem;
}
h1 {
  margin: 0 0 0.25rem 0;
  font-size: clamp(2rem, 4vw + 1rem, 3rem);
  font-family: 'Ringbearer', serif;
  font-weight: normal;
  text-align: center;
}

h2 {
  font-family: 'Ringbearer', serif;
}

h3 {
  font-family: 'Ringbearer', serif;
  font-weight: normal;
  padding-top: 0.5rem;
}

.hero h1 {
  margin: 0 0 0.25rem 0;
  font-size: clamp(2rem, 4vw + 1rem, 3rem);
  text-align: center;
}
.tagline {
  margin: 0;
  font-size: var(--fs-3);
  color: var(--muted);
}

/* Tile menu */
.tile-menu {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
  width: 100%;
}
.tile {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  border: none;
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: left;
  color: inherit;
  opacity: 0.8;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.tile-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

.tile.expanded .tile-content {
  max-height: none;
  opacity: 1;
}

.tile.expanded {
  opacity: 1;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.2) !important;
}

.tile.expanded:hover,
.tile.expanded:focus {
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.2) !important;
}

/* Content sections within tiles */
.content-section {
  margin-bottom: 1.5rem;
}

.content-section:last-child {
  margin-bottom: 0;
}

.content-section h4 {
  margin: 1rem 0 0.75rem 0;
  font-size: var(--fs-3);
  color: var(--text);
  font-weight: bold;
  border-top: 1px solid color-mix(in srgb, var(--text) 20%, transparent);
  padding-top: 0.75rem;
}

.content-section:first-child h4 {
  margin-top: 0.5rem;
}

.content-section p {
  margin: 0 0 0.5rem 0;
  line-height: 1.5;
}

.content-section p:last-child {
  margin-bottom: 0;
}
.tile:hover,
.tile:focus {
  transform: translateY(-4px);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
  text-decoration: none;
  opacity: 1;
}

.tile:hover h3::after,
.tile:focus h3::after {
  background-image: url("assets/lily_pointer.png");
}
.tile h3 {
  margin: 0 0 0.5rem 0;
  font-size: var(--fs-2);
  border-top: 1px solid color-mix(in srgb, var(--text) 20%, transparent);
  padding: 0.75rem 0 0.25rem 0;
  text-align: center;
  position: relative;
}

/* Pointer for expandable tiles only (not link tiles) */
.tile:not(a) h3::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background-image: url("assets/lily_pointer.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.2s ease;
}

.tile.expanded h3::after {
  transform: translateY(-50%) rotate(180deg);
}

/* Link tiles (index page) - centered text, no pointer */
a.tile {
  text-align: center;
  justify-content: center;
}

a.tile h3 {
  text-align: center;
}
.tile p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Intro Layout */
.intro-layout {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  position: relative;
  z-index: 2;
}

.intro-navigation {
  flex: 0 0 calc(25% - 0.75rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.intro-navigation .tile {
  height: auto;
}

.intro-text {
  flex: 0 0 calc(50% - 0.75rem);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
}

.intro-text h3 {
  font-size: var(--fs-2);
  margin: -0.25rem 0 0.25rem 0;
  padding: 0;
  text-align: center;
  font-family: 'Ringbearer', serif;
  font-weight: normal;
  border-top: none;
  color: var(--text);
}

.intro-text p {
  margin: 0 0 0.5rem 0;
  color: var(--muted);
}

.intro-text p:last-child {
  margin-bottom: 0;
}

.intro-news {
  flex: 0 0 calc(25% - 0.75rem);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  padding: 1.5rem;
}

.intro-news h3 {
  font-size: var(--fs-2);
  margin: 0 0 1rem 0;
  border-top: 1px solid color-mix(in srgb, var(--text) 20%, transparent);
  padding: 0.75rem 0 0.25rem 0;
  text-align: center;
  font-family: 'Ringbearer', serif;
  font-weight: normal;
  color: var(--text);
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.news-item {
  display: flex;
  flex-direction: column;
}

.news-item h4 {
  margin: 0 0 0.5rem 0;
  font-size: clamp(1.125rem, 0.6vw + 1.05rem, 1.25rem);
  font-weight: normal;
  text-align: left;
  font-family: 'Ringbearer', serif;
  color: var(--text);
  border-top: 1px solid color-mix(in srgb, var(--text) 20%, transparent);
  padding-top: 0.75rem;
}

.news-date {
  margin-bottom: 0.5rem !important;
  font-size: 0.9rem;
  color: var(--muted);
}

.news-item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: left;
}

/* Footer */
.site-footer {
  margin-top: 2rem;
  border-top: none;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  position: relative;
  z-index: 2;
}
.site-footer .footer-inner {
  max-width: 1200px;
  margin-inline: auto;
  padding: 1.25rem var(--pad-x);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
}
.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: bold;
  transition: opacity 0.2s ease, text-shadow 0.2s ease;
}

.footer-links a:hover,
.footer-links a:focus {
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
  opacity: 1;
}
.small {
  font-size: 0.875rem;
  color: var(--muted);
}

/* Illustration section */
.illustration-section {
  position: relative;
  width: 100%;
  max-width: 1200px;
  z-index: 2;
  margin: 0 auto;
  aspect-ratio: 820 / 312;
  background: transparent;
  padding: 0;
  border-bottom: none;
}

.illustration-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
}

.illustration-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* Eyes Effect */
#eyes-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.eye {
  position: absolute;
  width: 300px;
  height: 300px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  transition: none;
}

@keyframes eyeAppear {
  0%, 100% {
    opacity: 1;
  }
}

@keyframes eyeBlink {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* Navigation Flash Effect */
:root {
  --fx-x: 50vw;
  --fx-y: 50vh;
}

#nav-fx {
  position: fixed;
  width: 1500px;
  height: 1500px;
  pointer-events: none;
  z-index: 9999;
  background: radial-gradient(
    circle at center,
    rgba(0, 255, 126, 0.15) 0%,
    rgba(0, 255, 126, 0.1) 8%,
    rgba(0, 255, 126, 0.08) 15%,
    rgba(0, 255, 126, 0.05) 25%,
    rgba(0, 255, 126, 0.03) 35%,
    rgba(0, 255, 126, 0.01) 45%,
    transparent 55%
  );
  opacity: 0;
  transform: scale(0.8);
  top: 0;
  left: 0;
}

#nav-fx.play-flash {
  animation: nav-flash 0.4s ease-out forwards;
}

#nav-fx.fade-mode {
  background: rgba(0, 0, 0, 1);
  transform: none;
  border-radius: 0;
  width: 200vw;
  height: 200vh;
  top: -50%;
  left: -50%;
  opacity: 0;
}

#nav-fx.play-fade {
  animation: fade-effect 0.2s ease forwards;
}

@keyframes nav-flash {
  0% {
    opacity: 1;
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes fade-effect {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  #nav-fx.play-flash, #nav-fx.play-fade {
    animation: none !important;
  }
}

/* Navigation */
.nav {
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  padding: 0;
  max-width: 1200px;
  margin: 0 auto;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  width: 100%;
  border: none;
  box-shadow: none;
}

.nav-inner {
  max-width: 1200px;
  margin-inline: auto;
  padding: 0.5rem var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-size: var(--fs-2);
  font-family: 'Ringbearer', serif;
  color: var(--text);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--muted);
  font-family: 'Ringbearer', serif;
  font-size: var(--fs-2);
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.2s ease;
}

.nav-toggle:hover,
.nav-toggle:focus {
  color: var(--text);
  text-decoration: underline;
}

.links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.links a {
  color: var(--muted);
  text-decoration: none;
  font-family: 'Ringbearer', serif;
  font-size: var(--fs-2);
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.links a:hover,
.links a:focus {
  color: var(--text);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.links a.active {
  color: var(--accent);
}

/* Mobile navigation */
@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }
  
  .links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
    flex-direction: column;
    padding: 1rem var(--pad-x);
    gap: 1rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
  }
  
  .links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
}

/* Tabbed Content */
.tabs-container {
  background: transparent;
  margin-top: 2rem;
  width: 100%;
}

.tabs-header {
  display: flex;
  gap: 0;
  margin-bottom: 0;
  background: transparent;
}

.tab-button {
  flex: 1;
  padding: 1rem 1.5rem;
  background: color-mix(in srgb, var(--surface) 30%, transparent);
  border: none;
  color: var(--muted);
  font-family: 'Ringbearer', serif;
  font-size: var(--fs-2);
  cursor: pointer;
  transition: color 0.2s ease, opacity 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  border-radius: 0;
  box-shadow: none;
}

.tab-button::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%) rotate(180deg);
  width: 24px;
  height: 24px;
  background-image: url("assets/lily_pointer.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.tab-button:hover,
.tab-button:focus {
  color: var(--text);
}

.tab-button.active {
  color: var(--text);
  opacity: 1;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.tab-button.active::after {
  transform: translateY(-50%) rotate(0deg);
  opacity: 1;
}

.tabs-content {
  position: relative;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  padding: 1.5rem;
  min-height: 200px;
  transition: background 0.2s ease;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive tweak */
@media (max-width: 640px) {
  .hero-inner { padding: 1.25rem; }
  
  .tile-menu {
    grid-template-columns: 1fr;
  }
  
  .tab-button {
    font-size: var(--fs-3);
    padding: 0.75rem 1rem;
  }
  
  .intro-layout {
    flex-direction: column;
  }
  
  .intro-navigation,
  .intro-text,
  .intro-news {
    flex: 1 1 100%;
  }
}
/* CSS Document */