:root {
  --ink: #20231f;
  --moss: #465447;
  --moss-deep: #25362d;
  --paper: #eee9dc;
  --paper-light: #f7f3e9;
  --rust: #a65337;
  --gold: #c39550;
  --line: rgba(37, 54, 45, 0.22);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.7;
}

a { color: inherit; }

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 32px;
  padding: 28px clamp(24px, 6vw, 92px);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 243, 233, 0.76);
}

.wordmark {
  color: var(--moss-deep);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}

nav { display: flex; flex-wrap: wrap; gap: 24px; }
nav a, .text-link, .tree-link, .door-links a {
  text-decoration: none;
  color: var(--moss-deep);
}

nav a { font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; }
nav a:hover, nav a.active { color: var(--rust); }

.hero {
  position: relative;
  overflow: hidden;
  min-height: min(720px, 82vh);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 90px clamp(24px, 12vw, 190px) 110px;
  background: radial-gradient(circle at 78% 24%, rgba(195, 149, 80, 0.28), transparent 26%), linear-gradient(138deg, #f7f3e9 0%, #e9e2d2 58%, #d8d2c0 100%);
}

.eyebrow, .overline, .section-marker {
  margin: 0 0 18px;
  color: var(--rust);
  font-family: "Trebuchet MS", sans-serif;
  font-size: 0.72rem;
  font-weight: bold;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1, h2, p { max-width: 760px; }
h1 { margin: 0; color: var(--moss-deep); font-size: clamp(3.7rem, 9vw, 8.5rem); font-weight: normal; line-height: 0.96; letter-spacing: -0.03em; }
h1 em { color: var(--rust); font-size: 0.82em; }

.lead { margin: 44px 0 30px; max-width: 510px; color: #4e574e; font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.55; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  margin-top: 12px;
}
.access-message {
  max-width: 560px;
  margin: 6px 0 10px;
  padding: 12px 16px;
  border-left: 3px solid var(--gold);
  color: var(--moss-deep);
  background: rgba(255,255,255,0.38);
  font-family: "Trebuchet MS", sans-serif;
  font-size: 0.86rem;
}
.primary-cta, .secondary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-family: "Trebuchet MS", sans-serif;
  font-size: 0.76rem;
  font-weight: bold;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.primary-cta {
  background: var(--moss-deep);
  color: var(--paper-light);
  box-shadow: 0 14px 28px rgba(37, 54, 45, 0.18);
}
.primary-cta span { margin-left: 8px; color: var(--gold); }
.secondary-cta {
  border: 1px solid var(--moss-deep);
  color: var(--moss-deep);
  background: rgba(255,255,255,0.24);
}
.primary-cta:hover, .primary-cta:focus-visible, .secondary-cta:hover, .secondary-cta:focus-visible {
  transform: translateY(-1px);
  outline: none;
}
.scroll-cue { color: var(--rust); text-decoration: none; font-size: 1.2rem; }
.scroll-cue span { margin-left: 10px; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; }

.live-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 32px clamp(24px, 12vw, 190px);
  color: var(--paper-light);
  background: var(--moss-deep);
}
.live-banner .eyebrow { margin-bottom: 8px; color: var(--gold); }
.live-banner h2 { margin: 0 0 8px; color: var(--paper-light); font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: normal; line-height: 1; }
.live-banner p:not(.eyebrow) { margin: 0; color: #d5dbd0; }
.live-banner-link { flex: 0 0 auto; padding: 12px 16px; border: 1px solid var(--gold); color: var(--paper-light); font-family: "Trebuchet MS", sans-serif; font-size: 0.76rem; letter-spacing: 0.08em; text-decoration: none; text-transform: uppercase; }
.live-banner-link span { margin-left: 8px; color: var(--gold); }
.live-banner-link:hover, .live-banner-link:focus-visible { color: var(--gold); outline: none; }

.section { display: grid; grid-template-columns: minmax(120px, 0.4fr) minmax(0, 1fr); gap: clamp(30px, 9vw, 150px); padding: clamp(80px, 12vw, 170px) clamp(24px, 12vw, 190px); }
.section-marker { padding-top: 9px; color: var(--moss); }
.section-copy h2, .tree-copy h2, .closing h2 { margin: 0 0 30px; color: var(--moss-deep); font-size: clamp(2.1rem, 4vw, 4.3rem); font-weight: normal; line-height: 1.05; }
.section-copy p, .tree-copy p { margin: 0 0 25px; font-size: clamp(1.08rem, 1.5vw, 1.3rem); }
.roots-section { background: var(--paper-light); }
.split-section { border-top: 1px solid var(--line); }

.text-link, .tree-link { display: inline-block; margin-top: 18px; padding-bottom: 5px; border-bottom: 1px solid currentColor; font-family: "Trebuchet MS", sans-serif; font-size: 0.8rem; font-weight: bold; letter-spacing: 0.1em; text-transform: uppercase; }
.text-link span, .tree-link span { margin-left: 8px; color: var(--rust); }

.season-band { padding: 74px clamp(24px, 12vw, 190px); color: var(--paper-light); background: var(--moss-deep); }
.season-band .eyebrow { color: var(--gold); }
.seasons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 900px; margin: 30px 0; }
.seasons div { padding: 18px 14px; border-top: 1px solid rgba(238, 233, 220, 0.35); opacity: 0.55; }
.seasons .current { border-color: var(--gold); opacity: 1; }
.seasons span, .seasons small { display: block; }
.seasons span { font-size: 1.35rem; }
.seasons small { margin-top: 4px; color: var(--gold); font-family: "Trebuchet MS", sans-serif; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; }
.season-note { max-width: 470px; color: #cbd1c5; font-style: italic; }

.portus-section { background: #d8d2c0; }
.tree-section { position: relative; overflow: hidden; background: var(--paper-light); }
.tree-copy { grid-column: 2; }
.tree-diagram { position: absolute; right: 8%; top: 18%; width: 180px; color: var(--moss); text-align: center; font-style: italic; line-height: 1.35; opacity: 0.72; }
.canopy { display: block; padding: 24px 14px; border: 1px solid var(--moss); border-radius: 50%; }
.trunk-line { display: block; width: 1px; height: 80px; margin: auto; background: var(--moss); }
.roots { display: block; font-size: 0.95rem; }

.closing { padding: 130px 24px; color: var(--paper-light); text-align: center; background: linear-gradient(135deg, var(--rust), #753d2f); }
.closing .eyebrow { color: #f0ce8d; }
.closing h2 { max-width: 700px; margin: 0 auto 44px; color: var(--paper-light); }
.door-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px 34px; }
.door-links a { color: var(--paper-light); font-family: "Trebuchet MS", sans-serif; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; }
.door-links a:hover { color: #f0ce8d; }
.home-hero { min-height: min(650px, 76vh); }
.home-hero > :not(.home-hero-mark) { position: relative; z-index: 1; }
.home-hero-mark {
  position: absolute;
  right: clamp(24px, 10vw, 150px);
  bottom: clamp(34px, 8vw, 110px);
  width: clamp(190px, 26vw, 360px);
  aspect-ratio: 1;
  margin: 0;
  border: 1px solid rgba(70, 84, 71, 0.28);
  border-radius: 50%;
  opacity: 0.9;
}
.home-hero-mark span { position: absolute; display: block; }
.mark-moon { top: 15%; left: 58%; width: 23%; aspect-ratio: 1; border: 1px solid var(--gold); border-radius: 50%; background: rgba(195, 149, 80, 0.18); }
.mark-trunk { left: 49%; top: 24%; width: 2px; height: 45%; background: var(--moss); }
.mark-harbour { left: 26%; bottom: 26%; width: 48%; height: 22%; border: 1px solid var(--rust); border-top: 0; border-radius: 0 0 120px 120px; }
.mark-root { left: 50%; bottom: 30%; width: 36%; height: 1px; background: var(--moss); transform-origin: left center; }
.root-one { transform: rotate(24deg); }
.root-two { transform: rotate(0deg); }
.root-three { transform: rotate(-24deg); }
.home-doors { justify-content: flex-start; gap: 18px 30px; }
.home-doors a { color: var(--moss-deep); border-bottom: 1px solid var(--rust); padding-bottom: 8px; }
.home-doors a span { margin-left: 8px; color: var(--rust); }
.home-doors a:hover { color: var(--rust); }

.portus-landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: clamp(36px, 7vw, 110px);
}
.hero-copy { position: relative; z-index: 1; }
.portus-map {
  position: relative;
  width: min(100%, 430px);
  aspect-ratio: 1;
  margin: 0;
  border: 1px solid rgba(37, 54, 45, 0.24);
  border-radius: 50%;
  background: linear-gradient(145deg, #d9d4c0, #f7f3e9);
  box-shadow: 0 24px 60px rgba(37, 54, 45, 0.16);
}
.map-sea, .map-coast { position: absolute; inset: 0; border-radius: 50%; }
.map-sea { background: radial-gradient(circle at 70% 70%, rgba(56, 85, 107, 0.28), transparent 28%); }
.map-coast { clip-path: polygon(0 48%, 42% 30%, 78% 44%, 100% 36%, 100% 100%, 0 100%); background: rgba(166, 83, 55, 0.16); }
.map-node {
  position: absolute;
  min-width: 84px;
  padding: 7px 10px;
  border: 1px solid rgba(37, 54, 45, 0.25);
  border-radius: 999px;
  color: var(--moss-deep);
  background: rgba(247, 243, 233, 0.82);
  font-family: "Trebuchet MS", sans-serif;
  font-size: 0.66rem;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}
.harbour { left: 42%; bottom: 23%; }
.settlement { left: 43%; top: 42%; }
.forest { left: 16%; top: 36%; }
.mountain { right: 13%; top: 23%; }
.ruins { left: 28%; bottom: 39%; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 34px;
}
.feature-card {
  min-height: 150px;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(247, 243, 233, 0.7);
}
.feature-card strong, .feature-card small { display: block; }
.feature-card strong { color: var(--moss-deep); font-size: 1.15rem; font-weight: normal; }
.feature-card small { margin-top: 10px; color: var(--moss); line-height: 1.45; }
.content-index-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 32px; }
.index-list { padding: 22px 20px; border: 1px solid var(--line); border-radius: 4px; background: rgba(247, 243, 233, 0.72); }
.index-list h3 { margin: 0 0 14px; color: var(--moss-deep); font-size: 1.2rem; font-weight: normal; }
.index-list a { display: block; padding: 8px 0; border-top: 1px solid rgba(37, 54, 45, 0.12); color: var(--moss-deep); text-decoration: none; }
.index-list a:hover { color: var(--rust); }
.newsletter-section { background: #e4dfce; }
.newsletter-form { max-width: 620px; margin-top: 26px; }
.newsletter-form label { display: block; margin-bottom: 8px; color: var(--moss-deep); font-family: "Trebuchet MS", sans-serif; font-size: 0.72rem; font-weight: bold; letter-spacing: 0.12em; text-transform: uppercase; }
.newsletter-form div { display: flex; gap: 10px; }
.newsletter-form input, .newsletter-form button { min-height: 48px; border: 1px solid var(--moss-deep); font: inherit; }
.newsletter-form input { flex: 1 1 auto; min-width: 0; padding: 0 14px; background: var(--paper-light); }
.newsletter-form button { flex: 0 0 auto; padding: 0 18px; color: var(--paper-light); background: var(--moss-deep); font-family: "Trebuchet MS", sans-serif; font-size: 0.76rem; font-weight: bold; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; }

.trailer-body { min-height: 100vh; color: var(--paper-light); background: #050705; }
.trailer-stage {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background: radial-gradient(circle at 50% 52%, rgba(195, 149, 80, 0.18), transparent 22%), radial-gradient(circle at 50% 55%, rgba(56, 85, 107, 0.16), transparent 42%), #050705;
}
.trailer-audio { position: absolute; left: 24px; bottom: 24px; width: min(320px, calc(100% - 48px)); opacity: 0.76; z-index: 4; }
.trailer-diagram { position: absolute; width: min(68vw, 520px); aspect-ratio: 1; border: 1px solid rgba(238, 233, 220, 0.18); border-radius: 50%; animation: trailer-pulse 5s ease-in-out infinite; }
.trailer-diagram span { position: absolute; left: 50%; top: 50%; width: 42%; height: 1px; background: rgba(195, 149, 80, 0.42); transform-origin: left center; }
.trailer-diagram span:nth-child(1) { transform: rotate(0deg); }
.trailer-diagram span:nth-child(2) { transform: rotate(90deg); }
.trailer-diagram span:nth-child(3) { transform: rotate(180deg); }
.trailer-diagram span:nth-child(4) { transform: rotate(270deg); }
.trailer-line, .trailer-title, .trailer-actions { position: absolute; text-align: center; }
.trailer-line { max-width: 720px; margin: 0; color: rgba(238, 233, 220, 0); font-size: clamp(1.35rem, 4vw, 3.6rem); line-height: 1.1; animation: trailer-fade 24s linear infinite; }
.line-one { animation-delay: 0s; }
.line-two { animation-delay: 5s; }
.line-three { animation-delay: 10s; }
.line-four { animation-delay: 15s; }
.trailer-title { margin: 0; color: rgba(238, 233, 220, 0); font-size: clamp(4rem, 12vw, 9rem); animation: trailer-title 24s linear infinite; }
.trailer-title em { color: var(--gold); font-size: 0.34em; letter-spacing: 0.12em; text-transform: uppercase; }
.trailer-actions { bottom: 42px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; animation: trailer-actions 24s linear infinite; }
@keyframes trailer-pulse { 0%, 100% { transform: scale(0.92); opacity: 0.42; } 50% { transform: scale(1.04); opacity: 0.84; } }
@keyframes trailer-fade { 0%, 15%, 100% { opacity: 0; color: rgba(238, 233, 220, 0); transform: translateY(14px); } 5%, 11% { opacity: 1; color: rgba(238, 233, 220, 0.94); transform: translateY(0); } }
@keyframes trailer-title { 0%, 76% { opacity: 0; color: rgba(238, 233, 220, 0); transform: scale(0.98); } 84%, 100% { opacity: 1; color: rgba(238, 233, 220, 0.98); transform: scale(1); } }
@keyframes trailer-actions { 0%, 82% { opacity: 0; pointer-events: none; } 90%, 100% { opacity: 1; pointer-events: auto; } }

footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 30px clamp(24px, 6vw, 92px); color: var(--moss); font-size: 0.85rem; }
footer a { color: var(--moss-deep); text-decoration: none; }
.donate-btn {
  padding: 8px 14px;
  border: 1px solid var(--rust);
  border-radius: 20px;
  color: var(--rust) !important;
  font-family: "Trebuchet MS", sans-serif;
  font-size: 0.72rem;
  font-weight: bold;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.donate-btn:hover { background: var(--rust); color: var(--paper-light) !important; }

@media (max-width: 700px) {
  .site-header { align-items: flex-start; flex-direction: column; gap: 18px; }
  nav { gap: 12px 18px; }
  .hero { min-height: 620px; padding-top: 70px; }
  .home-hero-mark { width: 190px; right: 18px; bottom: 26px; opacity: 0.42; }
  .portus-landing-hero { display: flex; }
  .portus-map { width: min(100%, 320px); }
  .live-banner { align-items: flex-start; flex-direction: column; }
  .section { display: block; padding-top: 90px; padding-bottom: 90px; }
  .section-marker { margin-bottom: 28px; }
  .seasons { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .content-index-grid { grid-template-columns: 1fr; }
  .newsletter-form div { flex-direction: column; }
  .tree-copy { grid-column: auto; }
  .tree-diagram { position: relative; right: auto; top: auto; width: 170px; margin: 60px auto 0; }
  footer { flex-direction: column; }
}

/* --- Tree section: branch grid (merged from homepage/tree/index.html) --- */
.tree-section { padding-bottom: clamp(80px, 12vw, 170px); }
.branch-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 40px clamp(24px, 12vw, 190px) 0;
}
.branch-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper-light);
  text-decoration: none;
  color: var(--ink);
  transition: border-color .2s ease, transform .2s ease;
}
.branch-card:hover, .branch-card:focus-visible { border-color: var(--rust); transform: translateY(-2px); outline: none; }
.branch-num { font-family: "Trebuchet MS", sans-serif; font-size: 0.7rem; letter-spacing: 0.1em; color: var(--rust); }
.branch-card strong { font-size: 1.05rem; font-weight: normal; color: var(--moss-deep); }
.branch-card small { color: var(--moss); line-height: 1.4; }

.nav-play {
  padding: 6px 14px !important;
  border: 1px solid var(--rust);
  border-radius: 20px;
  color: var(--rust) !important;
}
.nav-play:hover { background: var(--rust); color: var(--paper-light) !important; }

@media (max-width: 900px) {
  .branch-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .branch-grid { grid-template-columns: 1fr; }
}
