:root {
  --bg-canvas: #160f2e;
  --bg-surface: #281c42;
  --bg-surface-hover: #352557;
  --text-primary: #ffffff;
  --text-muted: #c9bfe0;
  --accent-primary: #e0409b;
  --accent-secondary: #bef264;
  --border-subtle: rgba(255, 255, 255, 0.14);
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 14px 36px -6px rgba(8, 4, 18, 0.55);
  --glow-magenta: 0 0 32px -4px rgba(224, 64, 155, 0.35);
  --glow-lime: 0 0 32px -4px rgba(190, 242, 100, 0.25);
  --font-serif: Charter, Cambria, Georgia, serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-serif);
  line-height: 1.7;
  overflow-wrap: anywhere;
  hyphens: auto;
  background-image: 
    radial-gradient(circle at 12% 18%, rgba(224, 64, 155, 0.14) 0%, transparent 42%),
    radial-gradient(circle at 86% 62%, rgba(190, 242, 100, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 25% 85%, rgba(224, 64, 155, 0.1) 0%, transparent 40%);
}

a {
  color: var(--accent-secondary);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 0.25s ease;
}

a:hover, a:focus-visible {
  color: var(--accent-primary);
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.prose {
  max-width: 70ch;
  margin: 0 auto;
}

.prose p, .prose ul, .prose ol {
  margin-bottom: 1.35rem;
}

.prose h2 {
  font-size: clamp(1.65rem, 2.8vw, 2.25rem);
  margin: 2.5rem 0 1rem;
  line-height: 1.25;
  color: var(--text-primary);
}

.prose h3 {
  font-size: 1.35rem;
  margin: 1.8rem 0 0.75rem;
  color: var(--accent-secondary);
}

.small-caps {
  font-variant: small-caps;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  font-weight: 700;
  color: var(--accent-secondary);
  font-size: 0.95rem;
}

.badge-round {
  display: inline-block;
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
  background: rgba(224, 64, 155, 0.18);
  color: var(--accent-secondary);
  font-variant: small-caps;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

/* Header: normal flow, never sticky or fixed */
.site-header {
  position: relative;
  width: 100%;
  padding: 1.25rem 0;
  background: transparent;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.3s ease;
  z-index: 40;
}

.site-header.scrolled-surface {
  background-color: var(--bg-surface);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.03em;
  margin-right: auto;
}

.brand-link:hover {
  color: var(--accent-secondary);
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-desktop a {
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.98rem;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.nav-desktop a:hover,
.nav-desktop a[aria-current="page"] {
  color: var(--accent-secondary);
  border-bottom-color: var(--accent-primary);
}

.menu-dots-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 42px;
  height: 42px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mobile-nav-drawer {
  display: none;
  background: var(--bg-surface);
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-elevation);
}

.mobile-nav-drawer.is-open {
  display: block;
}

.mobile-nav-list {
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.mobile-nav-list a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.05rem;
  display: block;
  padding: 0.4rem 0;
}

/* Buttons: square-ended outlined with uppercase tracked labels */
.btn-outline {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border: 1.5px solid var(--accent-secondary);
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.35s var(--ease-kinetic), background-color 0.25s ease, color 0.25s ease, box-shadow 0.35s ease;
}

.btn-outline:hover, .btn-outline:focus-visible {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--text-primary);
  transform: translateY(-3px);
  box-shadow: var(--glow-magenta);
}

.btn-outline-magenta {
  border-color: var(--accent-primary);
}

/* Hero Section */
.hero-atlas {
  padding: 4rem 0 3.5rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

.hero-title {
  font-size: clamp(2.25rem, 4.5vw, 3.6rem);
  line-height: 1.12;
  margin-bottom: 1.25rem;
}

.hero-lead {
  font-size: 1.18rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Three overlapping vector illustrations */
.hero-overlap-deck {
  position: relative;
  min-height: 390px;
  display: grid;
  place-items: center;
}

.vector-plate {
  background: var(--bg-surface);
  padding: 1.25rem;
  box-shadow: var(--shadow-elevation);
  border-radius: 0;
  transition: transform 0.45s var(--ease-kinetic), box-shadow 0.45s ease;
}

.vector-plate:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-elevation), var(--glow-magenta);
  z-index: 10;
}

.plate-hull {
  width: 82%;
  position: relative;
  z-index: 3;
  transform: translate(-18px, -25px);
}

.plate-sail {
  width: 72%;
  position: absolute;
  top: 42%;
  right: 0;
  z-index: 4;
}

.plate-fastening {
  width: 66%;
  position: absolute;
  bottom: 0;
  left: 4%;
  z-index: 5;
}

.plate-caption {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* Substantial Lead Study */
.section-block {
  padding: 4rem 0;
  position: relative;
}

.section-header {
  margin-bottom: 2.25rem;
}

.section-title {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  line-height: 1.2;
  margin-top: 0.3rem;
}

.lead-study-card {
  background: var(--bg-surface);
  padding: 2.5rem;
  box-shadow: var(--shadow-elevation);
  border-radius: 0;
  position: relative;
}

.annotated-vessel-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 2.25rem;
  align-items: start;
  margin-top: 1.5rem;
}

.vessel-diagram-frame {
  background: rgba(22, 15, 46, 0.7);
  padding: 1.5rem;
}

.annotation-list {
  list-style: none;
  display: grid;
  gap: 1rem;
}

.annotation-item {
  background: rgba(22, 15, 46, 0.55);
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent-primary);
}

.annotation-item strong {
  display: block;
  color: var(--accent-secondary);
  font-variant: small-caps;
  letter-spacing: 0.08em;
}

/* Two-Column Maritime Studies Grid */
.two-col-studies {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.study-card {
  background: var(--bg-surface);
  padding: 2rem;
  border-radius: 0;
  box-shadow: var(--shadow-elevation);
  transition: transform 0.4s var(--ease-kinetic), background-color 0.3s ease, box-shadow 0.4s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.study-card:hover {
  transform: translateY(-5px);
  background: var(--bg-surface-hover);
  box-shadow: var(--shadow-elevation), var(--glow-lime);
}

.study-card h3 {
  font-size: 1.45rem;
  margin: 0.4rem 0 0.85rem;
}

.study-card p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.study-media {
  margin-bottom: 1.25rem;
  aspect-ratio: 16 / 9;
  background: rgba(22, 15, 46, 0.65);
  overflow: hidden;
  border-radius: 0;
}

.study-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

/* Chronological Vessel Rows */
.vessel-chronology {
  display: grid;
  gap: 1.25rem;
}

.vessel-row {
  background: var(--bg-surface);
  padding: 1.5rem 2rem;
  display: grid;
  grid-template-columns: 160px 1.2fr 1fr auto;
  gap: 1.5rem;
  align-items: center;
  box-shadow: var(--shadow-elevation);
  transition: transform 0.3s var(--ease-kinetic);
}

.vessel-row:hover {
  transform: translateY(-3px);
  background: var(--bg-surface-hover);
}

/* Contributor / Museum Profiles */
.avatar-round {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: var(--bg-canvas);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 2rem 0;
  background: var(--bg-surface);
  box-shadow: var(--shadow-elevation);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  color: var(--accent-secondary);
  font-variant: small-caps;
  letter-spacing: 0.09em;
  background: rgba(22, 15, 46, 0.5);
}

/* FAQ Accordion / List */
.faq-stack {
  display: grid;
  gap: 1.25rem;
}

.faq-card {
  background: var(--bg-surface);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-elevation);
}

.faq-card h2, .faq-card h3 {
  font-size: 1.25rem;
  color: var(--accent-secondary);
  margin-bottom: 0.65rem;
}

/* Contact Tool Form */
.form-grid {
  display: grid;
  gap: 1.25rem;
  background: var(--bg-surface);
  padding: 2.25rem;
  box-shadow: var(--shadow-elevation);
}

.form-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-variant: small-caps;
  letter-spacing: 0.08em;
  color: var(--accent-secondary);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-size: 1rem;
  border-radius: 0;
}

.output-preview {
  background: rgba(22, 15, 46, 0.85);
  padding: 1.25rem;
  border-left: 3px solid var(--accent-secondary);
  font-family: monospace;
  white-space: pre-wrap;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease-kinetic), transform 0.65s var(--ease-kinetic);
}

.reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
.site-footer {
  background: var(--bg-surface);
  padding: 3.5rem 0 2.5rem;
  margin-top: 4rem;
  border-top: 1px solid var(--border-subtle);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-links {
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.footer-bottom {
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .hero-grid,
  .annotated-vessel-grid {
    grid-template-columns: 1fr;
  }
  .vessel-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }
  .menu-dots-btn {
    display: inline-flex;
  }
  .two-col-studies,
  .footer-grid,
  .vessel-row {
    grid-template-columns: 1fr;
  }
  .hero-overlap-deck {
    min-height: 320px;
  }
  .lead-study-card {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  .hero-atlas {
    padding: 2.5rem 0;
  }
  .btn-outline {
    width: 100%;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
