/* House of Dreams · Cruise Fleet Hub — shared fleet page styles
   Redesign pass with unslop by @heydamir (CC BY 4.0) */

:root {
  --bg: #F5F6F7;
  --surface: #FFFFFF;
  --surface-2: #EEF0F2;
  --ink: #15202B;
  --ink-2: #4A5562;
  --ink-3: #6B7682;
  --line: rgba(21, 32, 43, 0.10);
  --line-strong: rgba(21, 32, 43, 0.18);
  --brand: #1D4E89;          /* overridden per line */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --sans: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --scale-max: 110;          /* GT per guest, top of the waterline gauge */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 0 64px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* ---------- navigation ---------- */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 246, 247, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-home {
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.nav-home:hover { color: var(--brand); }

.nav-dropdown { position: relative; }
.drop-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: 500 14px/1 var(--sans);
  cursor: pointer;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease);
}
.drop-btn:hover { background: var(--surface-2); }
.drop-btn svg { width: 16px; height: 16px; stroke: var(--ink-3); }

.dropdown-content {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 232px;
  max-height: 420px;
  overflow-y: auto;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(21, 32, 43, 0.10);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 150ms var(--ease), transform 150ms var(--ease), visibility 0s linear 150ms;
}
.nav-dropdown:hover .dropdown-content,
.nav-dropdown:focus-within .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 150ms var(--ease), transform 150ms var(--ease);
}
.dropdown-content a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
  transition: background-color 120ms var(--ease), color 120ms var(--ease);
}
.dropdown-content a:hover { background: var(--surface-2); color: var(--ink); }
.dropdown-content a[aria-current="page"] { color: var(--brand); font-weight: 500; }
.drop-label {
  display: block;
  margin: 8px 12px 4px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-3);
}

/* ---------- page ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

header {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 48px;
}
header h1 {
  margin: 0 0 8px;
  font-size: 40px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-transform: none;
}
header h1::before {
  content: '';
  display: block;
  width: 32px;
  height: 4px;
  margin-bottom: 20px;
  border-radius: 2px;
  background: var(--brand);
}
header p { margin: 0; font-size: 16px; color: var(--ink-2); }

header.has-photo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
  gap: 48px;
  align-items: center;
  padding: 40px 0;
}
.line-photo { margin: 0; }
.line-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  background: var(--surface-2);
}
.photo-credit { overflow-wrap: anywhere; }

.class-group { margin-bottom: 56px; }

.class-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.ship-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 16px;
}

/* ---------- ship card: a spec sheet ---------- */
.ship-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
  transition: border-color 150ms var(--ease);
}
.ship-card:hover { border-color: var(--line-strong); transform: none; box-shadow: none; }

.ship-name {
  order: -3;
  display: block;
  min-height: 0;
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

.data-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  padding: 4px 0;
  font-size: 14px;
}
/* signature: dotted leader between label and value, like a shipyard spec sheet */
.data-row::after { content: none; }
.data-label { color: var(--ink-3); white-space: nowrap; display: flex; flex: 1; align-items: baseline; gap: 8px; }
.data-label::after {
  content: '';
  flex: 1;
  min-width: 16px;
  border-bottom: 1px dotted var(--line-strong);
  transform: translateY(-4px);
}
.data-value {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  white-space: nowrap;
}

/* the moment: space per guest, big figure on a waterline gauge */
.data-row.is-space {
  order: -2;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  margin-bottom: 12px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--line);
}
.data-row.is-space .data-label { order: 2; flex: none; font-size: 12px; }
.data-row.is-space .data-label::after { content: none; }
.data-row.is-space .data-value {
  order: 0;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.data-row.is-space::after {
  content: '';
  order: 1;
  display: block;
  height: 4px;
  margin: 8px 0 4px;
  border-radius: 2px;
  background:
    linear-gradient(var(--brand), var(--brand)) 0 0 / calc(var(--v, 0) / var(--scale-max) * 100%) 100% no-repeat,
    var(--surface-2);
}

.refit-box {
  margin-top: 12px;
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: none;
  text-align: left;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-2);
}
.is-major, .is-amplified { color: var(--brand); font-weight: 600; font-family: var(--mono); font-size: 13px; }

.footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
  color: var(--ink-3);
}
.footer p { margin: 0 0 4px; }

@media (max-width: 860px) {
  header.has-photo { grid-template-columns: 1fr; gap: 24px; }
  header.has-photo .line-photo { order: -1; }
}

@media (max-width: 640px) {
  .nav-container, .container { padding: 0 16px; }
  header { padding: 40px 0 32px; margin-bottom: 32px; }
  header h1 { font-size: 30px; }
  header.has-photo { padding: 24px 0 32px; }
  .ship-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* fleet status notes */
.ship-note {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-3);
}
.ship-card.is-retired { background: var(--surface-2); border-style: dashed; }
.ship-card.is-retired .data-row.is-space .data-value { color: var(--ink-3); }
.ship-card.is-retired .data-row.is-space::after { filter: grayscale(1); opacity: 0.5; }
.ship-card.is-retired .ship-note { color: var(--ink-2); font-weight: 500; }
