/* Zodiac Quill — editorial celestial publication */
:root {
  --navy: #0b1220;
  --navy-2: #121a2b;
  --navy-3: #1a2438;
  --line: #2a3348;
  --cream: #f4ede1;
  --muted: #c9c0b3;
  --gold: #c6a572;
  --gold-2: #e0c48a;
  --ink: #0b1220;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --max: 1120px;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Literata, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  background: var(--navy);
  color: var(--cream);
  line-height: 1.7;
  font-size: 1.0625rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--cream);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: absolute;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  left: 1rem;
  top: 1rem;
  background: var(--gold);
  color: var(--ink);
  padding: 0.5rem 0.75rem;
  z-index: 1000;
}

.wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.kicker {
  font-family: "Source Serif 4", Literata, serif;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.6rem;
}

h1,
h2,
h3,
.wordmark {
  font-family: "Playfair Display", "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin: 0 0 0.75rem;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 0 0 0.75rem;
}

h3 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

p {
  color: var(--muted);
  margin: 0 0 1rem;
}

.lede {
  font-size: 1.2rem;
  color: var(--cream);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 18, 32, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
  flex-wrap: wrap;
}

.wordmark {
  color: var(--cream);
  text-decoration: none;
  font-size: 1.35rem;
}

.wordmark span {
  color: var(--gold);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--cream);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
}

.site-nav ul {
  display: flex;
  gap: 0.65rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  color: var(--cream);
  text-decoration: none;
  font-size: 0.9rem;
}

.site-nav a[aria-current="page"] {
  color: var(--gold);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--gold);
  color: var(--ink);
}

.btn-primary:hover {
  color: var(--ink);
  background: var(--gold-2);
}

.btn-ghost {
  border-color: var(--gold);
  color: var(--gold);
  background: transparent;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: 72vh;
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.25) 0%, rgba(11, 18, 32, 0.88) 78%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0 3.5rem;
}

.page-hero {
  padding: 2.5rem 0 1.5rem;
}

.crumbs {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.crumbs a {
  color: var(--muted);
}

.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0;
}

.crumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.4rem;
  color: var(--line);
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

.section-tight {
  padding: 2rem 0 3rem;
}

.panel {
  background: var(--navy-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
}

.grid-2 {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sign-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.sign-card,
.guide-card,
.meta-card {
  background: var(--navy-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 100%;
}

a.sign-card:hover,
a.guide-card:hover {
  border-color: var(--gold);
}

.glyph {
  font-size: 2rem;
  color: var(--gold);
  line-height: 1;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--gold);
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  color: var(--muted);
}

.figure {
  margin: 0 0 1.5rem;
}

.figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--navy-2);
}

.figure--portrait {
  max-width: min(26rem, 100%);
  margin-inline: auto 0;
}

.figure--portrait img {
  width: 100%;
  height: auto;
}

.prose .figure--portrait {
  margin-inline: auto;
}

.caption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.45rem;
}

.prose {
  max-width: 72ch;
  overflow-x: auto;
}

.prose h2 {
  margin-top: 2rem;
}

.prose ul,
.prose ol {
  color: var(--muted);
}

.chart-wheel {
  width: min(420px, 100%);
  margin: 1.5rem auto;
}

.pair-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

details.faq {
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0;
}

details.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--cream);
}

.form {
  display: grid;
  gap: 0.85rem;
  max-width: 36rem;
}

label {
  display: grid;
  gap: 0.3rem;
  color: var(--cream);
  font-size: 0.95rem;
}

input,
select,
textarea {
  font: inherit;
  background: var(--navy-3);
  color: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
}

textarea {
  min-height: 8rem;
}

.note {
  font-size: 0.92rem;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 2rem;
  margin-top: 2rem;
  background: #090e19;
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1.4fr 1fr 1fr;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.legal {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 0.55rem 0.4rem;
  vertical-align: top;
  color: var(--muted);
}

th {
  color: var(--gold);
  font-weight: 600;
}

@media (max-width: 1280px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--navy-2);
    border-bottom: 1px solid var(--line);
    padding: 1rem 1.25rem 1.25rem;
  }

  .site-nav.open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
  }
}

@media (max-width: 860px) {
  .grid-2,
  .grid-3,
  .grid-4,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
