/* HiddenCHI Roadoors — portal threshold + coordinate trail */

:root {
  --abyss: #080a17;
  --stone: #141726;
  --slate: #1c1f33;
  --arch: #26243d;
  --ember: #ff6b2e;
  --lantern: #ffc738;
  --mystic: #9452ff;
  --portal: #2ee0d1;
  --rose: #ff528c;
  --moss: #59eb8c;
  --text: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.72);
  --text-muted: rgba(255, 255, 255, 0.45);
  --border: rgba(255, 255, 255, 0.08);
  --glow-ember: rgba(255, 107, 46, 0.35);
  --glow-portal: rgba(46, 224, 209, 0.25);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --max: 1120px;
  --radius: 18px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--abyss);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--portal);
  text-decoration: none;
}

a:hover {
  color: var(--lantern);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.75rem 1rem;
  background: var(--ember);
  color: #fff;
  z-index: 9999;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* ── Top bar ── */

.site-bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(180deg, rgba(8, 10, 23, 0.92) 0%, rgba(8, 10, 23, 0) 100%);
  backdrop-filter: blur(8px);
}

.site-bar__brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--ember), var(--rose));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-bar__menu {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-bar__menu a {
  color: var(--text-secondary);
}

.site-bar__menu a:hover {
  color: var(--text);
}

/* ── Hero: portal threshold ── */

.portal-hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 6rem 1.5rem 4rem;
}

.coord-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(46, 224, 209, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 224, 209, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, black 20%, transparent 75%);
  pointer-events: none;
}

.coord-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 42%, var(--glow-ember) 0%, transparent 55%);
  opacity: 0.6;
}

.film-grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.portal-frame {
  position: relative;
  width: min(92vw, 520px);
  aspect-ratio: 3 / 4;
  display: grid;
  place-items: center;
}

.portal-frame__arch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.portal-frame__glow {
  position: absolute;
  width: 55%;
  height: 45%;
  bottom: 18%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, var(--ember) 0%, rgba(255, 107, 46, 0.2) 45%, transparent 70%);
  filter: blur(28px);
  animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.75; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}

.portal-copy {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: 420px;
}

.portal-copy h1 {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 700;
  line-height: 1.05;
  background: linear-gradient(135deg, var(--ember) 0%, var(--lantern) 50%, var(--rose) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.portal-copy .subtitle {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.portal-copy .lead {
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.coord-readout {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--portal);
  opacity: 0.85;
}

.coord-readout span {
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(46, 224, 209, 0.25);
  border-radius: 999px;
  background: rgba(28, 31, 51, 0.6);
}

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-cue__line {
  width: 1px;
  height: 36px;
  background: linear-gradient(180deg, var(--ember), transparent);
  animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
  0%, 100% { transform: scaleY(0.6); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ── Category lintels ── */

.lintel-row {
  padding: 4rem 1.5rem;
  background: linear-gradient(180deg, var(--abyss) 0%, var(--stone) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.lintel-row__inner {
  max-width: var(--max);
  margin: 0 auto;
}

.lintel-row__label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--portal);
  margin-bottom: 1.5rem;
}

.lintel-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}

.lintel {
  position: relative;
  padding: 1.25rem 0.85rem 1rem;
  text-align: center;
  border-radius: var(--radius);
  background: var(--slate);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.lintel::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lintel:hover {
  transform: translateY(-3px);
}

.lintel:hover::before {
  opacity: 1;
}

.lintel--castles::before { background: linear-gradient(135deg, rgba(255, 107, 46, 0.15), transparent); }
.lintel--castles { border-color: rgba(255, 107, 46, 0.25); }
.lintel--palaces::before { background: linear-gradient(135deg, rgba(255, 199, 56, 0.15), transparent); }
.lintel--palaces { border-color: rgba(255, 199, 56, 0.25); }
.lintel--cathedrals::before { background: linear-gradient(135deg, rgba(148, 82, 255, 0.15), transparent); }
.lintel--cathedrals { border-color: rgba(148, 82, 255, 0.25); }
.lintel--cities::before { background: linear-gradient(135deg, rgba(46, 224, 209, 0.15), transparent); }
.lintel--cities { border-color: rgba(46, 224, 209, 0.25); }
.lintel--metro::before { background: linear-gradient(135deg, rgba(89, 235, 140, 0.15), transparent); }
.lintel--metro { border-color: rgba(89, 235, 140, 0.25); }

.lintel__glyph {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.lintel__name {
  font-family: var(--serif);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.lintel__tag {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* ── Pin trail ── */

.pin-trail {
  padding: 5rem 1.5rem;
  max-width: var(--max);
  margin: 0 auto;
}

.section-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lantern);
  margin-bottom: 0.5rem;
}

.section-heading {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  margin: 0 0 0.75rem;
  background: linear-gradient(135deg, var(--portal), #1a8cf2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-lead {
  max-width: 540px;
  margin: 0 0 2.5rem;
  color: var(--text-secondary);
  font-size: 0.98rem;
}

.trail {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 2rem;
}

.trail::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--ember), var(--mystic), var(--portal));
  border-radius: 2px;
}

.trail-stop {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding: 1.5rem 0 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.trail-stop:last-child {
  border-bottom: none;
}

.trail-stop__pin {
  position: absolute;
  left: -2rem;
  top: 1.65rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--slate);
  border: 2px solid var(--ember);
  box-shadow: 0 0 12px var(--glow-ember);
}

.trail-stop:nth-child(2) .trail-stop__pin { border-color: var(--lantern); box-shadow: 0 0 12px rgba(255, 199, 56, 0.35); }
.trail-stop:nth-child(3) .trail-stop__pin { border-color: var(--mystic); box-shadow: 0 0 12px rgba(148, 82, 255, 0.35); }

.trail-stop__coords {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--portal);
}

.trail-stop__title {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.trail-stop__place {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.trail-stop__hook {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* ── Field notes (features) ── */

.field-notes {
  padding: 5rem 1.5rem;
  background: var(--stone);
  border-top: 1px solid var(--border);
}

.field-notes__inner {
  max-width: var(--max);
  margin: 0 auto;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.field-note {
  position: relative;
  padding: 1.75rem 1.5rem 1.5rem;
  background: var(--slate);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.field-note__margin {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  opacity: 0.5;
}

.field-note__stamp {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border: 1px dashed var(--ember);
  color: var(--ember);
  margin-bottom: 1rem;
  transform: rotate(-2deg);
}

.field-note:nth-child(2) .field-note__stamp { border-color: var(--mystic); color: var(--mystic); }
.field-note:nth-child(3) .field-note__stamp { border-color: var(--portal); color: var(--portal); }

.field-note h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  margin: 0 0 0.65rem;
}

.field-note p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── Vignettes ── */

.vignette-band {
  padding: 5rem 1.5rem;
  max-width: var(--max);
  margin: 0 auto;
}

.vignette-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1rem;
}

.vignette {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 220px;
  border: 1px solid var(--border);
}

.vignette--hero-span {
  grid-row: span 2;
  min-height: 100%;
}

.vignette__img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  background:
    linear-gradient(145deg, rgba(255, 107, 46, 0.25) 0%, transparent 50%),
    linear-gradient(220deg, rgba(46, 224, 209, 0.15) 0%, transparent 40%),
    var(--arch);
}

.vignette__img[src=""],
.vignette__img:not([src]) {
  background:
    radial-gradient(ellipse 80% 60% at 30% 70%, rgba(255, 107, 46, 0.45), transparent),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(148, 82, 255, 0.3), transparent),
    linear-gradient(160deg, var(--arch), var(--abyss));
}

.vignette__caption {
  position: absolute;
  inset: auto 0 0;
  padding: 1rem 1.1rem;
  background: linear-gradient(0deg, rgba(8, 10, 23, 0.92) 0%, transparent 100%);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

/* ── Legal sections ── */

.legal-stack {
  padding: 5rem 1.5rem 4rem;
  background: var(--abyss);
  border-top: 1px solid var(--border);
}

.legal-stack__inner {
  max-width: 720px;
  margin: 0 auto;
}

.legal-block {
  margin-bottom: 3.5rem;
}

.legal-block:last-child {
  margin-bottom: 0;
}

.legal-block h2 {
  font-family: var(--serif);
  font-size: 1.65rem;
  margin: 0 0 1rem;
  color: var(--text);
}

.legal-block h3 {
  font-size: 1rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--lantern);
}

.legal-block p,
.legal-block li {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.legal-block ul {
  padding-left: 1.25rem;
}

.legal-block a {
  word-break: break-all;
}

.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--slate);
  border: 1px solid rgba(46, 224, 209, 0.3);
  border-radius: 999px;
  font-size: 0.9rem;
}

/* ── Footer ── */

.site-footer {
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.site-footer a {
  color: var(--text-secondary);
}

/* ── Responsive ── */

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

  .lintel-strip .lintel:last-child {
    grid-column: span 2;
  }

  .notes-grid {
    grid-template-columns: 1fr;
  }

  .vignette-grid {
    grid-template-columns: 1fr;
  }

  .vignette--hero-span {
    grid-row: span 1;
    min-height: 280px;
  }
}

@media (max-width: 600px) {
  .site-bar__menu {
    gap: 0.75rem;
    font-size: 0.72rem;
  }

  .lintel-strip {
    grid-template-columns: 1fr;
  }

  .lintel-strip .lintel:last-child {
    grid-column: span 1;
  }

  .trail {
    padding-left: 1.5rem;
  }
}
