/* ══════════════════════════════════════════════════════
   THE ARCHIVE — 2000s OLD WEB STYLE
   Edges • Tiled BG • Blinking • Raw
   ══════════════════════════════════════════════════════ */

@font-face {
  font-family: "JMH Typewriter";
  src: url("../fonts/jmh-typewriter.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Angels";
  src: url("../fonts/angels.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0a0f;
  --panel: #111118;
  --border: #333340;
  --text: #b0b8c4;
  --bright: #e0e6f0;
  --cyan: #5ac8e8;
  --gold: #d4af37;
  --red: #e8563a;
  --muted: #666680;
  --link: #7ec8e3;
  --link-hover: #ffffff;
  --font-body: "JMH Typewriter", "Courier New", Courier, monospace;
  --font-display: "JMH Typewriter", "Georgia", "Times New Roman", serif;
  --font-thin: "Angels", "Helvetica Neue", Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  font-size: 14px;
}

/* Tiled background — replace bg-tile.png with your own */
body.tiled {
  background-image: url("../images/bg-tile.png");
  background-repeat: repeat;
  background-size: 200px;
}

::selection {
  background: var(--cyan);
  color: var(--bg);
}

a {
  color: var(--link);
  text-decoration: underline;
}
a:hover {
  color: var(--link-hover);
}

/* ── BLINKING TEXT ───────────────────────────────── */
.blink {
  animation: blink-anim 1s step-end infinite;
}

@keyframes blink-anim {
  50% {
    opacity: 0;
  }
}

/* ── VISITOR COUNTER ─────────────────────────────── */
.visitor-counter {
  position: fixed;
  bottom: 10px;
  right: 10px;
  z-index: 50;
  font-family: var(--font-body);
  font-size: 11px;
  color: #00ff41;
  background: #000;
  border: 1px solid #00ff4166;
  padding: 4px 8px;
}

@media (min-width: 640px) {
  .visitor-counter {
    bottom: 15px;
    right: 15px;
    font-size: 12px;
    padding: 5px 10px;
  }
}

/* ── STAR HEADER ─────────────────────────────────── */
.star-header {
  width: 100%;
  height: 32px;
  background-image: url("../images/stars.gif");
  background-repeat: repeat-x;
  background-size: auto 32px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ── HEADER TAGLINE ──────────────────────────────── */
.header-tagline {
  text-align: center;
  padding: 10px 1rem;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

/* ── UNDER CONSTRUCTION ──────────────────────────── */
.under-construction {
  text-align: center;
  padding: 6px;
  font-size: 11px;
  color: var(--red);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ── LANDING PAGE ────────────────────────────────── */
.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 1rem;
}

/* Cymatic circle */
.cymatic-center {
  position: relative;
  z-index: 5;
  cursor: pointer;
  transition: opacity 0.4s ease;
  margin: 0.3rem 0;
}

.cymatic-center img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  display: block;
}

@media (min-width: 640px) {
  .cymatic-center img {
    width: 120px;
    height: 120px;
  }
}

.cymatic-center:hover {
  filter: brightness(1.15);
}

/* Frequency buttons — curved arc */
.freq-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 240px;
  margin: 0.5rem auto 0;
  position: relative;
  z-index: 5;
}

.freq-btn {
  font-family: var(--font-body);
  font-size: 9px;
  padding: 2px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

/* Curved arc — edges dip down */
.freq-btn:nth-child(1),
.freq-btn:nth-child(9) {
  margin-top: 16px;
}
.freq-btn:nth-child(2),
.freq-btn:nth-child(8) {
  margin-top: 8px;
}
.freq-btn:nth-child(3),
.freq-btn:nth-child(7) {
  margin-top: 3px;
}
.freq-btn:nth-child(4),
.freq-btn:nth-child(6) {
  margin-top: 0;
}
.freq-btn:nth-child(5) {
  margin-top: 0;
}

.freq-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.freq-btn.active {
  border-color: var(--cyan);
  color: var(--cyan);
  background: #5ac8e811;
}

/* Music note link */
.music-note {
  position: relative;
  z-index: 5;
  margin-top: 0.4rem;
  text-align: center;
}

.music-note a {
  font-size: 1rem;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s;
}

.music-note a:hover {
  color: var(--cyan);
}

.music-note .note-label {
  display: block;
  font-size: 8px;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 0;
}

/* ── CONSTELLATION NAV ───────────────────────────── */
.constellation {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.constellation a {
  position: absolute;
  pointer-events: all;
  text-decoration: none;
  text-align: center;
  transition: transform 0.3s ease;
}

.constellation a:hover {
  transform: scale(1.08);
}

.constellation a img {
  display: block;
  width: 90px;
  height: 90px;
  object-fit: contain;
  margin: 0 auto;
  filter: brightness(0.85);
  transition: filter 0.3s;
}

@media (min-width: 640px) {
  .constellation a img {
    width: 120px;
    height: 120px;
  }
}

.constellation a:hover img {
  filter: brightness(1.1);
}

.constellation .nav-label {
  font-family: var(--font-thin);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 4px;
  transition: color 0.3s;
}

.constellation a:hover .nav-label {
  color: var(--bright);
}

/* Mobile: stack constellation into a list */
@media (max-width: 639px) {
  .constellation {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 1rem 0;
    pointer-events: all;
  }

  .constellation a {
    position: relative;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
  }

  .constellation a img {
    width: 70px;
    height: 70px;
  }
}

/* ── CONTENT PAGES ───────────────────────────────── */
.page-wrap {
  min-height: 100vh;
  padding: 1rem;
  position: relative;
  z-index: 1;
}

@media (min-width: 640px) {
  .page-wrap {
    padding: 2rem;
  }
}

.page-header {
  text-align: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .page-header {
    padding: 2rem 0;
    margin-bottom: 2rem;
  }
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--bright);
  letter-spacing: 0.08em;
}

@media (min-width: 640px) {
  .page-header h1 {
    font-size: 2rem;
  }
}

.page-header .back {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
}

.page-header .back:hover {
  color: var(--cyan);
}

.content {
  max-width: 800px;
  margin: 0 auto;
}

/* ── CHAPEL PAGE ─────────────────────────────────── */
.chapel-bg {
  background-image: url("../images/chapel/stained-glass.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.chapel-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  background: #0a0a0fcc;
  z-index: 0;
}

.statue-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 1rem 0;
  position: relative;
  z-index: 1;
  -webkit-overflow-scrolling: touch;
}

.statue-row img {
  height: 150px;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
  filter: brightness(0.9);
  border: 1px solid var(--border);
}

@media (min-width: 640px) {
  .statue-row {
    gap: 12px;
    padding: 1.5rem 0;
  }
  .statue-row img {
    height: 220px;
  }
}

/* Scroll shape */
.scroll {
  background: #1a1510;
  border: 1px solid #3a2f20;
  padding: 1.5rem;
  margin: 1rem 0;
  position: relative;
  z-index: 1;
  box-shadow: inset 0 0 30px #0a0805;
}

@media (min-width: 640px) {
  .scroll {
    padding: 2rem;
    margin: 1.5rem 0;
  }
}

.scroll::before,
.scroll::after {
  content: "";
  display: block;
  height: 8px;
  background: linear-gradient(to right, #2a1f10, #3a2f20, #2a1f10);
  border-radius: 4px;
  margin: -1.5rem -1.5rem 1rem;
}

@media (min-width: 640px) {
  .scroll::before,
  .scroll::after {
    margin: -2rem -2rem 1.5rem;
  }
}

.scroll::after {
  margin: 1rem -1.5rem -1.5rem;
}

@media (min-width: 640px) {
  .scroll::after {
    margin: 1.5rem -2rem -2rem;
  }
}

.scroll ul {
  list-style: none;
}

.scroll li {
  padding: 0.4rem 0;
  border-bottom: 1px dashed #3a2f2055;
  font-size: 13px;
}

.scroll li:last-child {
  border-bottom: none;
}

.scroll li::before {
  content: "> ";
  color: var(--gold);
}

/* ── LIBRARY PAGE ────────────────────────────────── */
.library-section {
  margin-bottom: 2rem;
}

.library-section h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--bright);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
  margin-bottom: 0.8rem;
}

.library-section ul {
  list-style: none;
}

.library-section li {
  padding: 0.3rem 0;
  font-size: 13px;
}

.library-section li::before {
  content: "\2022 ";
  color: var(--muted);
}

/* ── MUSEUM PAGE ─────────────────────────────────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media (min-width: 480px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}

@media (min-width: 640px) {
  .gallery {
    gap: 12px;
  }
}

.gallery-item {
  border: 1px solid var(--border);
  background: var(--panel);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: border-color 0.2s;
}

.gallery-item:hover {
  border-color: var(--cyan);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  filter: saturate(0.8);
  transition: filter 0.3s;
}

.gallery-item:hover img {
  filter: saturate(1);
}

.gallery-item .cap {
  padding: 6px 8px;
  font-size: 11px;
  color: var(--muted);
}

/* ── BLOG PAGE ───────────────────────────────────── */
.blog-paper {
  background-image: url("../images/blog-paper.png");
  background-size: cover;
  background-attachment: fixed;
}

.blog-paper .content {
  background: #f2e9d8ee;
  padding: 1.5rem;
  border: 1px solid #c4b89a;
}

@media (min-width: 640px) {
  .blog-paper .content {
    padding: 2rem;
  }
}

.blog-paper .content * {
  color: #3e2b1f;
}

.blog-paper .content a {
  color: #6b3a2a;
}

.blog-post {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px dashed #c4b89a;
}

.blog-post:last-child {
  border-bottom: none;
}

.blog-date {
  font-size: 11px;
  color: #8a7a6a;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
}

.blog-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.blog-body {
  font-size: 13px;
  line-height: 1.7;
}

/* ── CYMATICS PAGE ───────────────────────────────── */
.cymatics-entry {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.cymatics-entry:last-child {
  border-bottom: none;
}

.cymatics-entry img {
  width: 100%;
  max-width: 500px;
  border: 1px solid var(--border);
  margin-bottom: 0.8rem;
  display: block;
}

.cymatics-entry h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--bright);
  margin-bottom: 0.4rem;
}

.cymatics-entry p {
  font-size: 13px;
  line-height: 1.7;
  max-width: 600px;
}

/* ── FOOTER ──────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

/* ── GUESTBOOK / WEBRING ─────────────────────────── */
.sidebar-box {
  border: 1px solid var(--border);
  padding: 8px;
  margin: 1rem 0;
  font-size: 12px;
}

.sidebar-box h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.sidebar-box ul {
  list-style: none;
}
.sidebar-box li {
  padding: 2px 0;
}
