@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English:ital@0;1&family=Courier+Prime:ital,wght@0,400;0,700;1,400&display=swap');

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

:root {
  --ink: #1a1208;
  --cream: #f5f0e4;
  --cream-dark: #ede8d8;
  --mid: #8a8070;
  --border-w: 1.5px;
  --sidebar-w: 46px;
  --topbar-h: 40px;
  --bottombar-h: 38px;
  --font-display: 'IM Fell English', serif;
  --font-mono: 'Courier Prime', monospace;
}

html, body {
  height: 100%;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-mono);
  overflow: hidden;
}

/* ─── OUTER PAGE SHELL ─── */
.page {
  width: 100vw;
  height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ─── SVG FRAME OVERLAY ─── */
/* The SVG sits absolutely, pointer-events none, drawing the frame on top */
.frame-svg {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 100;
}

/* ─── GRID LAYOUT ─── */
.layout {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: var(--topbar-h) 1fr var(--bottombar-h);
  grid-template-columns: var(--sidebar-w) 1fr var(--sidebar-w);
}

/* ─── TOP BAR ─── */
.bar-top {
  grid-column: 1 / 4;
  grid-row: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* ─── BOTTOM BAR ─── */
.bar-bottom {
  grid-column: 1 / 4;
  grid-row: 3;
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* ─── SIDEBARS ─── */
.sidebar {
  grid-row: 2;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-left  { grid-column: 1; }
.sidebar-right { grid-column: 3; }

.sidebar-text {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  white-space: nowrap;
  animation: scrollDown 20s linear infinite;
  color: var(--ink);
  opacity: 0.65;
  text-transform: uppercase;
}
.sidebar-right .sidebar-text { animation: scrollUp 24s linear infinite; }

@keyframes scrollDown {
  from { transform: translateY(-40%) rotate(180deg); }
  to   { transform: translateY(40%) rotate(180deg); }
}
@keyframes scrollUp {
  from { transform: translateY(40%); }
  to   { transform: translateY(-40%); }
}

/* ─── MAIN CONTENT ─── */
.main {
  grid-column: 2;
  grid-row: 2;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2.8rem 3.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--ink) var(--cream);
}

/* ─── MARQUEE ─── */
.marquee-track {
  display: flex;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0 0.8rem;
}
.marquee-track span { display: inline-block; }
.marquee-rtl span { animation: marqueeRTL 32s linear infinite; }
.marquee-ltr span { animation: marqueeLTR 32s linear infinite; }

@keyframes marqueeRTL {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes marqueeLTR {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

/* ─── NAV (homepage) ─── */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 1.4rem;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.nav-bar a {
  color: var(--ink);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.nav-bar a:hover { opacity: 1; }
.nav-eye { font-size: 17px; cursor: default; opacity: 0.75; }

/* ─── HEADINGS ─── */
h1.page-title {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 1.8vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  padding-bottom: 0.5rem;
}

/* ─── BODY TEXT ─── */
.body-text {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.4vw, 1.12rem);
  line-height: 1.9;
  max-width: 58ch;
}
.body-text p + p { margin-top: 1.5em; }

/* ─── MYSTERY NUMBER ─── */
.mystery-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink);
  opacity: 0.38;
  letter-spacing: 0.1em;
  cursor: default;
  user-select: none;
  padding: 0 0.9rem;
  flex-shrink: 0;
}

/* ─── HOMEPAGE HERO ─── */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  gap: 1.6rem;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: normal;
  font-style: italic;
  line-height: 1.08;
}
.hero-presents {
  font-family: var(--font-mono);
  font-size: clamp(0.65rem, 1.1vw, 0.82rem);
  letter-spacing: 0.38em;
  text-transform: uppercase;
  opacity: 0.55;
}
.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3.2vw, 2.6rem);
  font-weight: normal;
  line-height: 1.2;
}

/* ─── RIGHT SIDEBAR STATIC (homepage) ─── */
.sidebar-right-static {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink);
  opacity: 0.7;
  line-height: 1.7;
  animation: none;
}

/* ─── WHAT PAGE LINKS ─── */
.discipline-list { list-style: none; margin-top: 1.8rem; }
.discipline-list li { border-top: 1px solid rgba(26,18,8,0.18); }
.discipline-list li:last-child { border-bottom: 1px solid rgba(26,18,8,0.18); }
.discipline-list a {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.8vw, 2.2rem);
  font-style: italic;
  color: var(--ink);
  text-decoration: none;
  padding: 0.65em 0.2em;
  position: relative;
  transition: padding-left 0.22s ease;
}
.discipline-list a::after {
  content: '→';
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.65em;
  position: absolute;
  right: 0.5em;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.2s;
}
.discipline-list a:hover { padding-left: 1em; }
.discipline-list a:hover::after { opacity: 1; }

/* ─── WHY PAGE SUBSCRIBE ─── */
.subscribe-section { margin-top: 3rem; padding-top: 1.8rem; border-top: 1px solid rgba(26,18,8,0.18); }
.subscribe-section h2 {
  font-family: var(--font-display);
  font-weight: normal;
  font-style: italic;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  margin-bottom: 0.5rem;
}
.subscribe-section p {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  opacity: 0.55;
  margin-bottom: 1.1rem;
}
.subscribe-form {
  display: flex;
  max-width: 400px;
  border: 1.5px solid var(--ink);
  background: var(--cream);
}
.subscribe-form input[type="email"] {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 0.55em 0.75em;
  outline: none;
  color: var(--ink);
  letter-spacing: 0.05em;
}
.subscribe-form input::placeholder { opacity: 0.3; font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase; }
.subscribe-form button {
  background: var(--ink);
  color: var(--cream);
  border: none;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.55em 0.9em;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.subscribe-form button:hover { background: var(--cream); color: var(--ink); }

/* ─── PLACEHOLDER PAGE ─── */
.placeholder-msg {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  opacity: 0.3;
  margin-top: 2rem;
}
.back-link {
  display: inline-block;
  margin-top: 2.8rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  opacity: 0.7;
  transition: opacity 0.18s;
}
.back-link:hover { opacity: 1; }

/* ─── BOTTOM BAR INNER (homepage) ─── */
.bar-bottom-inner {
  display: flex;
  width: 100%;
  align-items: center;
  overflow: hidden;
}
