@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');

/* palette */
:root {
  --red: #df4300; --red-d: #be3900;
  --orange: #f48a32; --orange-d: #cf752b;
  --light-orange: #ffab68; --pink: #dc7bb3; --pink-d: #bb6998;
  --purple: #c46ea1; --dark-pink: #b42075; --dark-pink-d: #991b63;
  --bg: #1f1a18; --card: #2a2420; --text: #f5ebe0; --muted: #b8a99a; --muted2: #8a7e72;
  --heading-section: 1.5rem;
  --heading-hero: 1.75rem;
  --intro-text: 1rem;
  --page-max: 850px;
  --page-pad-inline: 1.5rem;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: 'JetBrains Mono', monospace; background: var(--bg); color: var(--text); line-height: 1.65; min-height: 100vh; }

/* logo — one left-aligned brand row so hero matches main column (no center/left split) */
.site-banner {
  margin: 0;
  font-size: 100%;
  font-weight: inherit;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  line-height: 1.1;
}
.logo-wrap {
  max-width: min(88px, 22vw);
  flex-shrink: 0;
  line-height: 0;
}
.site-logo-img {
  display: block;
  width: 100%;
  height: auto;
}
.archive-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--heading-hero);
  font-weight: 700;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--orange);
  flex: 1 1 auto;
  min-width: 0;
}
.tagline { 
  font-family: 'JetBrains Mono', monospace; 
  font-weight: 500; 
  color: var(--muted); 
  margin: 1rem 0 0; 
  padding-top: 0.85rem;
  border-top: 1px solid rgba(220, 123, 179, 0.2);
  font-size: var(--intro-text);
  line-height: 1.65;
  width: 100%;
}
.archive-stats {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0.85rem 0 0;
  line-height: 1.65;
  max-width: 42rem;
}
.archive-stats time { color: var(--text); font-weight: 500; }
.archive-stats-strong {
  font-weight: 600;
  color: var(--light-orange);
}
.banner-note {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--muted2);
  margin: 0;
  line-height: 1.6;
  padding: 1rem 0 0;
  border-top: 1px solid rgba(220, 123, 179, 0.28);
  text-align: left;
  max-width: 42rem;
}

/* page shell — hero copy aligns with main so the column feels like one layout */
header { padding: 1.25rem var(--page-pad-inline) 0.5rem; }
.hero-inner {
  max-width: var(--page-max);
  margin-left: auto;
  margin-right: auto;
  padding: 1.15rem 1.25rem 1.1rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(220, 123, 179, 0.28);
  border-radius: 16px;
  text-align: left;
}
main { max-width: var(--page-max); margin: 0 auto; padding: 1.25rem var(--page-pad-inline) 4rem; }
h2 { font-family: 'JetBrains Mono', monospace; font-size: var(--heading-section); color: var(--orange); margin-bottom: 0.75rem; }
.section-intro { font-size: var(--intro-text); color: var(--muted); margin-bottom: 1.5rem; line-height: 1.65; }
.section { margin-bottom: 2.5rem; }

/* ship images privacy toggle */
.ship-privacy-bar {
  margin-bottom: 1.35rem;
  padding: 1rem 1.15rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(220, 123, 179, 0.28);
  border-radius: 16px;
}
.ship-privacy-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  user-select: none;
}
.ship-privacy-label { flex: 1; min-width: 0; line-height: 1.4; }
.ship-privacy-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.ship-privacy-switch {
  flex-shrink: 0;
  position: relative;
  width: 3rem;
  height: 1.65rem;
  border-radius: 999px;
  background: rgba(184, 169, 154, 0.35);
  border: 2px solid rgba(220, 123, 179, 0.35);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.ship-privacy-switch::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0.2rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--text);
  transform: translateY(-50%);
  transition: transform 0.2s, background 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.ship-privacy-input:focus-visible + .ship-privacy-switch {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}
.ship-privacy-input:checked + .ship-privacy-switch {
  background: rgba(220, 123, 179, 0.35);
  border-color: var(--pink);
  box-shadow: 0 0 12px rgba(220, 123, 179, 0.25);
}
.ship-privacy-input:checked + .ship-privacy-switch::after {
  transform: translate(1.25rem, -50%);
  background: var(--orange);
}
html.ship-images-off .ship-card .ship-images {
  display: none;
}

/* pairing cards */
.ship-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.ship-card {
  background: var(--card);
  border-radius: 24px;
  overflow: hidden;
  border: 2px solid rgba(220,123,179,0.3);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}

.ship-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(220,123,179,0.2); border-color: var(--pink); }
.ship-images { padding: 0.75rem; background: rgba(0,0,0,0.2); border-radius: 16px 16px 0 0; min-height: 90px; }
.ship-img { width: 100%; max-width: 110px; height: 75px; object-fit: cover; border-radius: 12px; }
.ship-card .ship-images .ship-img:only-child { max-width: 100%; width: 100%; height: auto; aspect-ratio: 16/9; }
/* Opt out of full-width :only-child hero — match other ships’ inset thumbnail */
.ship-card .ship-images .ship-img.ship-img--thumb {
  max-width: 110px;
  width: 100%;
  height: 75px;
  aspect-ratio: auto;
  object-fit: cover;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.ship-img-crop-right { object-position: 55% center; }
.ship-content { padding: 1.25rem; }
.ship-content h3 { font-family: 'JetBrains Mono', monospace; font-size: 1.1rem; margin: 0 0 0.5rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.ship-meta { color: var(--muted); font-size: 0.85rem; }
.ship-badge {display: inline-flex;align-items: center; gap: 0.3rem; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.18rem 0.45rem; border: 1.5px solid var(--orange); background: transparent; color: var(--orange); border-radius: 999px; line-height: 1; }
.ship-badge::before { content: "✸"; font-size: 1.55em; line-height: 1; }
.ship-desc { font-size: 0.9rem; color: var(--muted); margin: 0 0 1rem; }
.ship-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}
.ship-links .ship-badge { grid-column: 1 / -1; justify-self: start; }
.ship-links > .ship-link:only-child,
.ship-links > .ship-badge ~ .ship-link:only-of-type { grid-column: 1 / -1; }
.ship-link {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.45rem 1rem;
  background: rgba(220,123,179,0.2);
  color: var(--pink);
  text-decoration: none;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}
.ship-link:hover { background: var(--pink-d); color: var(--bg); }

.ship-link--official {
  border: 1px solid rgba(100, 200, 160, 0.35);
  background: rgba(100, 200, 160, 0.12);
  color: #a8e6cf;
}
.ship-link--official:hover {
  background: rgba(100, 200, 160, 0.28);
  color: var(--bg);
}

.ship-link--social {
  background: rgba(184, 169, 154, 0.15);
  color: var(--muted);
  border: 1px solid rgba(184, 169, 154, 0.35);
}
.ship-link--social:hover {
  background: rgba(244, 138, 50, 0.25);
  color: var(--text);
}

.ship-img--placeholder {
  object-fit: contain;
  background: rgba(0, 0, 0, 0.15);
}

/* fan archive (Drive / MEGA) — collapsed by default */
.ship-archive {
  margin-top: 0.65rem;
  border: 0;
  padding: 0;
}
.ship-archive-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  padding: 0.4rem 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(220, 123, 179, 0.28);
  border-radius: 12px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  user-select: none;
}
.ship-archive-summary::-webkit-details-marker { display: none; }
.ship-archive-summary::after {
  content: " ▼";
  font-size: 0.75em;
  opacity: 0.85;
  margin-left: 0.35rem;
}
.ship-archive[open] .ship-archive-summary::after { content: " ▲"; }
.ship-archive-summary:hover {
  background: rgba(220, 123, 179, 0.12);
  border-color: rgba(220, 123, 179, 0.45);
  color: var(--text);
}
.ship-archive-summary:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}
.ship-archive[open] .ship-archive-summary {
  border-radius: 12px 12px 0 0;
  margin-bottom: 0;
  border-bottom-color: transparent;
}
.ship-archive:not([open]) .ship-archive-summary { border-radius: 12px; }

.ship-archive-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem 0.5rem 0.6rem;
  border-radius: 0 0 12px 12px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(220, 123, 179, 0.22);
  border-top: 0;
}
.ship-archive-note {
  margin: 0 0 0.15rem;
  padding: 0 0.15rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted2);
}
.ship-archive-note strong {
  color: var(--muted);
  font-weight: 600;
}

/* app */
.highlight-section .app-box { background: linear-gradient(135deg, var(--card) 0%, rgba(244,138,50,0.1) 100%); border: 2px solid var(--orange); border-radius: 20px; padding: 2rem; box-shadow: 0 0 0 1px rgba(244,138,50,0.22), 0 0 18px rgba(244,138,50,0.45), 0 0 36px rgba(220,123,179,0.28); }
.app-content h3 { font-family: 'JetBrains Mono', monospace; font-size: 1.25rem; margin-bottom: 1rem; color: var(--orange); }
.app-content p, .app-content ul { color: var(--muted); margin-bottom: 1rem; }
.app-content ul { padding-left: 1.25rem; }
.app-link { display: inline-block; padding: 0.6rem 1.25rem; background: var(--orange); color: var(--bg); text-decoration: none; font-weight: 600; border-radius: 12px; transition: all 0.2s; box-shadow: 2px 2px 0 rgba(0,0,0,0.2); }
.app-link:hover { background: var(--orange-d); transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(0,0,0,0.2); }

/* about */
.about-box { background: var(--card); border-radius: 20px; padding: 2rem; border: 2px solid rgba(220,123,179,0.2); }
.about-box p { color: var(--muted); margin: 0 0 1rem; }
.about-box p:last-child { margin-bottom: 0; }

/* more */
.more-box { background: transparent; border: 2px dashed rgba(184,169,154,0.4); border-radius: 20px; padding: 2rem; }
.more-box p { color: var(--muted); margin: 0; font-style: italic; }

/* footer */
footer { text-align: center; padding: 2rem; }
footer p { margin: 0; font-size: 0.9rem; color: var(--muted); }
footer .footer-note {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  line-height: 1.45;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 420px) {
  .site-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
  }
  .logo-wrap {
    max-width: min(104px, 42vw);
  }
}

@media (max-width: 600px) { .ship-grid { grid-template-columns: 1fr; } }
