/* ==========================================================
   Vasa Museum Tickets — shared stylesheet
   Nautical & editorial system. Shared by every page in the site.
   ========================================================== */

/* ============ TOKENS ============ */
:root {
  --bg: #efe7d8;
  --surface: #fbf7ee;
  --surface-2: #e4d9c0;
  --surface-3: #d9cbab;
  --ink: #1c1712;
  --ink-muted: #5b5044;
  --ink-faint: #8a7d68;
  --accent: #7a2e27;
  --accent-ink: #fbf7ee;
  --brass: #8f6a2e;
  --line: #c9bb9c;
  --line-strong: #b3a37c;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Serif 4', Georgia, 'Iowan Old Style', serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  --measure: 42rem;
  --wide: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10161b;
    --surface: #161f26;
    --surface-2: #1d2933;
    --surface-3: #253440;
    --ink: #ece3d1;
    --ink-muted: #a89a80;
    --ink-faint: #6f6656;
    --accent: #d06a5c;
    --accent-ink: #16090a;
    --brass: #c99a4a;
    --line: #2e3d47;
    --line-strong: #3c4e59;
  }
}

:root[data-theme="dark"] {
  --bg: #10161b;
  --surface: #161f26;
  --surface-2: #1d2933;
  --surface-3: #253440;
  --ink: #ece3d1;
  --ink-muted: #a89a80;
  --ink-faint: #6f6656;
  --accent: #d06a5c;
  --accent-ink: #16090a;
  --brass: #c99a4a;
  --line: #2e3d47;
  --line-strong: #3c4e59;
}

/* ============ RESET-ISH ============ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

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

/* ============ LAYOUT HELPERS ============ */
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1.75rem; }
.prose { max-width: var(--measure); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  display: flex;
  align-items: center;
  gap: 0.65em;
}
.eyebrow::before {
  content: "";
  width: 1.6em;
  height: 1px;
  background: var(--brass);
  display: inline-block;
}
.tabular { font-variant-numeric: tabular-nums; font-family: var(--font-mono); }

/* ============ MASTHEAD ============ */
header.masthead {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(6px);
}
.masthead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.05rem 0;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
  color: var(--ink);
}
.wordmark small {
  display: block;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.6rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 0.15rem;
}
.anchor-mark { width: 1.5rem; height: 1.5rem; flex: none; color: var(--accent); }
nav.masthead-nav { display: flex; gap: 1.5rem; }
nav.masthead-nav a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-muted);
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  padding-bottom: 0.2rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}
nav.masthead-nav a:hover { color: var(--accent); border-color: var(--accent); }
nav.masthead-nav a[aria-current="page"] { color: var(--accent); border-color: var(--accent); }
@media (max-width: 760px) { nav.masthead-nav { display: none; } }

/* ============ PAGE HEADER (sub-pages) ============ */
.page-header {
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, color-mix(in srgb, var(--brass) 12%, transparent), transparent 65%),
    var(--bg);
}
.page-header h1 { font-size: clamp(2rem, 4.2vw, 3rem); margin-top: 0.6rem; max-width: 22ch; }
.page-header p.dek { margin-top: 1rem; max-width: 38rem; color: var(--ink-muted); font-size: 1.05rem; }

/* ============ HERO (home) ============ */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 50% 8%, color-mix(in srgb, var(--brass) 16%, transparent), transparent 60%),
    var(--bg);
}
:root:not([data-theme="light"]) .hero,
:root[data-theme="dark"] .hero {
  background:
    radial-gradient(ellipse 65% 55% at 50% 0%, color-mix(in srgb, var(--brass) 14%, transparent), transparent 65%),
    radial-gradient(ellipse 90% 70% at 50% 100%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%),
    var(--bg);
}
.hero-inner { padding: 3.5rem 0 2.75rem; display: grid; gap: 2.25rem; }
.hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.1rem);
  line-height: 1.03;
  font-optical-sizing: auto;
  max-width: 15ch;
  margin-top: 0.6rem;
}
.hero-sub { max-width: 40rem; font-size: 1.15rem; color: var(--ink-muted); margin-top: 1.15rem; }
.hero-note {
  margin-top: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
  border-left: 2px solid var(--line-strong);
  padding-left: 0.85rem;
  max-width: 34rem;
  line-height: 1.55;
}
.hero-note a { color: var(--brass); text-decoration-color: color-mix(in srgb, var(--brass) 50%, transparent); }

.option-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 860px) { .option-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .option-cards { grid-template-columns: 1fr; } }
.option-card {
  background: var(--surface);
  padding: 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s ease;
}
.option-card:hover { background: var(--surface-2); }
.option-tag { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brass); }
.option-price { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 500; }
.option-desc { font-size: 0.82rem; color: var(--ink-muted); line-height: 1.45; }

.ship-frame {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.75rem 0;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.ship-svg { width: 100%; height: auto; color: var(--brass); }
.ship-svg .hull { stroke: var(--ink); }
.ship-svg .water { stroke: var(--line-strong); }
.ship-svg .rig { stroke: var(--brass); opacity: 0.85; }

/* ============ FIELD PLATES ============ */
.plates-section { padding: 3.5rem 0 4.5rem; border-top: 1px solid var(--line); text-align: center; }
.plates-title { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-top: 0.5rem; margin-bottom: 2.25rem; }
.plates-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: left; }
@media (max-width: 860px) { .plates-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .plates-grid { grid-template-columns: 1fr; } }
.plate { margin: 0; }
.plate-frame { background: var(--surface); border: 1px solid var(--line); padding: 0.75rem; aspect-ratio: 1 / 1; }
.plate-frame svg { width: 100%; height: 100%; }
.p-hull { color: var(--ink); }
.p-water { color: var(--line-strong); }
.p-mast { color: var(--brass); }
.plate-cap { margin-top: 0.65rem; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.04em; color: var(--ink-faint); }

.ledger-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.ledger-strip dl { margin: 0; padding: 1.1rem 1.25rem; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.3rem; }
.ledger-strip dl:first-child { border-left: none; }
.ledger-strip dt { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.ledger-strip dd { margin: 0; font-family: var(--font-mono); font-size: 1.05rem; font-weight: 500; color: var(--ink); }
@media (max-width: 720px) {
  .ledger-strip { grid-template-columns: repeat(2, 1fr); }
  .ledger-strip dl:nth-child(3) { border-left: none; }
}

/* ============ SECTIONS ============ */
main { position: relative; z-index: 1; }
section.log { padding: 4.5rem 0; border-top: 1px solid var(--line); }
section.log.alt { background: color-mix(in srgb, var(--surface) 55%, transparent); }
.log-head { margin-bottom: 2.25rem; }
.log-head h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); margin-top: 0.5rem; }
.log-head .dek { color: var(--ink-muted); margin-top: 0.65rem; max-width: 38rem; }

.split { display: grid; grid-template-columns: 1.5fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 2.25rem; } }

.prose p + p { margin-top: 1.1rem; }
.prose p { color: var(--ink); }
.prose .lede { font-size: 1.15rem; }

.fact-card { background: var(--surface); border: 1px solid var(--line); padding: 1.5rem 1.6rem; }
.fact-card h3 { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; font-family: var(--font-mono); font-weight: 500; color: var(--ink-faint); margin-bottom: 1rem; }
.fact-card ul { display: flex; flex-direction: column; gap: 0.85rem; }
.fact-card li { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.92rem; border-bottom: 1px dashed var(--line); padding-bottom: 0.85rem; }
.fact-card li:last-child { border-bottom: none; padding-bottom: 0; }
.fact-card li span:first-child { color: var(--ink-muted); }
.fact-card li span:last-child { font-family: var(--font-mono); text-align: right; }

/* ============ HOURS / LOCATION ============ */
.hours-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.hours-grid > div { background: var(--surface); padding: 1.6rem 1.75rem; }
.hours-grid h3 { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--brass); margin-bottom: 1rem; }
.hours-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); font-size: 0.94rem; }
.hours-row:last-of-type { border-bottom: none; }
.hours-row .days { color: var(--ink-muted); }
.hours-row .time { font-family: var(--font-mono); font-weight: 500; }
@media (max-width: 720px) { .hours-grid { grid-template-columns: 1fr; } }

.addr-block { margin-top: 1.75rem; display: flex; gap: 1.75rem; flex-wrap: wrap; }
.addr-block .item { min-width: 12rem; }
.addr-block .item h4 { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-faint); font-weight: 500; margin-bottom: 0.4rem; }
.addr-block .item p { font-size: 0.95rem; }

/* ============ TICKETS ============ */
.ticket-table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table.tickets { min-width: 560px; }
table.tickets th, table.tickets td { padding: 0.95rem 1.25rem; text-align: left; border-bottom: 1px solid var(--line); }
table.tickets thead th { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); font-weight: 500; background: var(--surface-2); border-bottom: 1px solid var(--line-strong); }
table.tickets tbody tr:last-child td { border-bottom: none; }
table.tickets tbody th { font-weight: 500; }
table.tickets td.price { font-family: var(--font-mono); font-size: 1.02rem; }
table.tickets td.free { color: var(--brass); font-family: var(--font-mono); }

.ticket-notes { margin-top: 1.5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 780px) { .ticket-notes { grid-template-columns: 1fr; } }
.ticket-notes .note { border-left: 2px solid var(--brass); padding-left: 0.95rem; }
.ticket-notes .note h4 { font-size: 0.85rem; font-family: var(--font-body); font-weight: 600; margin-bottom: 0.3rem; }
.ticket-notes .note p { font-size: 0.88rem; color: var(--ink-muted); }

.cta-row { margin-top: 2.25rem; display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.07em; text-transform: uppercase;
  text-decoration: none; padding: 0.9rem 1.4rem; border: 1px solid var(--accent);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.cta-fine { font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-faint); }

/* ============ TOURS ============ */
.tour-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 780px) { .tour-cards { grid-template-columns: 1fr; } }
.tour-card { background: var(--surface); border: 1px solid var(--line); padding: 1.75rem; display: flex; flex-direction: column; gap: 1rem; }
.tour-card .tag { align-self: flex-start; font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.28rem 0.6rem; border: 1px solid var(--brass); color: var(--brass); }
.tour-card h3 { font-size: 1.25rem; }
.tour-card p { color: var(--ink-muted); font-size: 0.95rem; }
.schedule-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.25rem; }
.schedule-list .row { display: flex; justify-content: space-between; font-size: 0.88rem; gap: 1rem; }
.schedule-list .row span:first-child { color: var(--ink-muted); }
.schedule-list .row span:last-child { font-family: var(--font-mono); text-align: right; }

/* ============ GETTING THERE ============ */
.skyline-frame { border: 1px solid var(--line); background: var(--surface); margin-bottom: 2.5rem; overflow: hidden; }
.skyline-svg { width: 100%; height: auto; display: block; color: var(--ink); }
.sky-fill { fill: var(--ink); opacity: 0.14; }
.sky-water { stroke: var(--line-strong); }
.sky-route { stroke: var(--brass); }
.sky-ferry { color: var(--brass); }
.sky-ferry path, .sky-ferry line { stroke: currentColor; }

.getting-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 860px) { .getting-grid { grid-template-columns: 1fr; gap: 2rem; } }
.transit-list { display: flex; flex-direction: column; }
.transit-list li { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.transit-list li:last-child { border-bottom: none; }
.transit-list .icon { width: 1.3rem; height: 1.3rem; flex: none; color: var(--brass); margin-top: 0.15rem; }
.transit-list h4 { font-size: 1rem; margin-bottom: 0.2rem; }
.transit-list p { font-size: 0.9rem; color: var(--ink-muted); }
.compass-wrap { display: flex; justify-content: center; }
.compass-svg { width: 14rem; height: 14rem; color: var(--brass); }

/* ============ GENERIC CARD GRID (tips / exhibits / attractions) ============ */
.tips-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 860px) { .tips-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tips-grid { grid-template-columns: 1fr; } }
.tip { background: var(--surface); padding: 1.6rem 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.tip .icon { width: 1.4rem; height: 1.4rem; color: var(--accent); }
.tip h4 { font-size: 1rem; }
.tip p { font-size: 0.88rem; color: var(--ink-muted); }
.tip .tag { align-self: flex-start; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass); }

/* ============ EXPLORE TEASERS (home -> subpages) ============ */
.teaser-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 860px) { .teaser-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .teaser-grid { grid-template-columns: 1fr; } }
.teaser-card { background: var(--surface); padding: 1.6rem 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; text-decoration: none; color: var(--ink); transition: background 0.15s ease; }
.teaser-card:hover { background: var(--surface-2); }
.teaser-card h3 { font-size: 1.05rem; }
.teaser-card p { font-size: 0.85rem; color: var(--ink-muted); }
.teaser-card .arrow { font-family: var(--font-mono); font-size: 0.68rem; color: var(--brass); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.2rem; }

/* ============ FAQ ============ */
.faq-list { display: flex; flex-direction: column; }
.faq-item { padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: none; }
.faq-item h4 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.faq-item p { color: var(--ink-muted); font-size: 0.92rem; }

/* ============ CLOSING / BOOK CARD ============ */
.closing { padding: 4rem 0 3rem; text-align: center; border-top: 1px solid var(--line); }
.closing h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); max-width: 24ch; margin: 0 auto; }
.closing p.dek { max-width: 32rem; margin: 1rem auto 0; color: var(--ink-muted); }
.closing .cta-row { justify-content: center; }
.book-card { margin: 2rem auto 0; max-width: 34rem; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); background: var(--surface); }
.book-card .book-field { padding: 1.1rem 1rem; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.35rem; align-items: center; text-align: center; }
.book-card .book-field:first-child { border-left: none; }
.book-card h4 { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-faint); font-weight: 500; }
.book-card a, .book-card span { font-family: var(--font-mono); font-size: 0.85rem; text-decoration: none; }
.book-card a { color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
@media (max-width: 560px) {
  .book-card { grid-template-columns: 1fr; }
  .book-card .book-field { border-left: none; border-top: 1px solid var(--line); }
  .book-card .book-field:first-child { border-top: none; }
}

/* ============ FOOTER ============ */
footer { border-top: 1px solid var(--line); padding: 2.25rem 0 3rem; background: color-mix(in srgb, var(--surface) 50%, transparent); }
.footer-explore { display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; margin-bottom: 1.75rem; padding-bottom: 1.75rem; border-bottom: 1px solid var(--line); }
.footer-explore a { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.07em; text-transform: uppercase; text-decoration: none; color: var(--ink-muted); transition: color 0.15s ease; }
.footer-explore a:hover { color: var(--accent); }
.footer-grid { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-note { max-width: 34rem; font-size: 0.82rem; color: var(--ink-faint); line-height: 1.65; }
.footer-note a { color: var(--brass); }
.footer-meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-faint); text-align: right; display: flex; flex-direction: column; gap: 0.35rem; }
@media (max-width: 640px) { .footer-meta { text-align: left; } }
