/* Sea You Soon — web
   Design law carried over from the iOS app: data informs in sans, the app
   narrates in serif; text in oceanInk RGB(0,0,94); photos and maps
   full-bleed, never under glass. Liquid Glass stays Apple's — the web
   gets its own honest glass. */

:root {
  --ink: rgb(0, 0, 94);
  --ink-soft: rgba(0, 0, 94, 0.62);
  --teal: #30B0C7;
  --glass: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.7);
  --shadow: 0 10px 30px rgba(0, 0, 94, 0.15);
  --serif: ui-serif, "New York", Georgia, "Times New Roman", serif;
  --sans: -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 17px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ffffff;
    --ink-soft: rgba(255, 255, 255, 0.7);
    --glass: rgba(255, 255, 255, 0.10);
    --glass-border: rgba(255, 255, 255, 0.22);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

/* The shared ocean backdrop: pale sea-sky by day, navy → teal after dark. */
.ocean {
  position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(180deg, #dff3f8 0%, #bfe4ee 45%, #a9d8e5 100%);
}
@media (prefers-color-scheme: dark) {
  .ocean { background: linear-gradient(180deg, #00003a 0%, #003a5e 60%, #0b6e86 100%); }
}

.masthead {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 32px);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: var(--glass);
  border-bottom: 1px solid var(--glass-border);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; letter-spacing: 0.2px; }
.brand img { border-radius: 50%; }
.topnav { display: flex; gap: 6px; align-items: center; }
.topnav a, .lang {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 8px 14px; border-radius: 999px; border: 1px solid transparent; background: transparent;
  font-family: var(--sans); cursor: pointer;
}
.topnav a:hover, .lang:hover { background: var(--glass); border-color: var(--glass-border); }
.topnav a.active { color: var(--teal); border-color: transparent; background: transparent; box-shadow: inset 0 -2px 0 var(--teal); border-radius: 0; }
.navlinks { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.topnav a.gear { font-size: 1.15rem; padding: 6px 10px; }
.titlebar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Setup form */
.form label { display: block; font-weight: 600; margin-top: 12px; }
.form label:first-child { margin-top: 0; }
.form select, .form input[type="date"] {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: inherit; color: var(--ink);
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: 12px;
}
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form label.check { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.form .row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
button.primary { background: var(--teal); color: #fff; border: 0; padding: 12px 22px; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; }
button.quiet { background: transparent; color: var(--ink-soft); border: 1px solid var(--glass-border); padding: 12px 18px; border-radius: 999px; font: inherit; cursor: pointer; }
.capsule.indigo { background: rgba(88, 86, 214, 0.28); }
.tile.link.quiet { color: var(--ink-soft); font-weight: 500; }

.content { max-width: 760px; margin: 0 auto; padding: 22px clamp(16px, 4vw, 32px) 40px; }
.colophon { text-align: center; font-size: 0.8rem; color: var(--ink-soft); padding: 12px 16px 28px; }
.colophon .dot { margin: 0 8px; }
.colophon .motto { white-space: nowrap; letter-spacing: 0.06em; font-weight: 700; }
.colophon { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 0; }

.muted { color: var(--ink-soft); }
.narrate { font-family: var(--serif); font-size: 1.05rem; line-height: 1.45; }
h1, h2, h3 { margin: 0; }
h1 { font-size: clamp(1.6rem, 4vw, 2rem); font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 700; }

/* Glass tiles */
.tile {
  background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
}
.tile + .tile, .stack > * + * { margin-top: 16px; }
.tile.link { display: block; color: inherit; text-decoration: none; transition: transform 0.15s ease; }
.tile.link:hover { transform: translateY(-1px); }

/* Fleet overview rows */
.fleet-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; }
.fleet-row .ship { font-weight: 800; font-size: 1.1rem; }
.fleet-row .where { font-family: var(--serif); font-size: 1.02rem; }
.fleet-row .hours { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--ink-soft); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px rgba(48,176,199,0.25); }
.wave { color: #2aa198; }
.chev { color: var(--ink-soft); }

/* Ship page */
.hero { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hero img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.hero.port img { aspect-ratio: 16 / 10; }
.headline { text-align: center; padding: 18px 24px; }
.headline .place { font-size: clamp(1.5rem, 4vw, 1.9rem); font-weight: 800; }
.headline .hours { font-weight: 600; margin-top: 6px; }
.headline .aside { font-family: var(--serif); color: var(--ink-soft); margin-top: 6px; }
.capsule {
  display: flex; justify-content: center; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-border);
  font-family: var(--serif); box-shadow: var(--shadow);
}
.capsule.teal { background: rgba(48,176,199,0.35); font-weight: 700; }
.capsule.orange { background: rgba(255,149,0,0.35); }
.segmented { display: inline-flex; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 999px; padding: 3px; }
.segmented button { border: 0; background: transparent; color: var(--ink); font-weight: 600; padding: 7px 16px; border-radius: 999px; cursor: pointer; font-family: var(--sans); }
.segmented button.on { background: var(--teal); color: #fff; }

/* Itinerary */
details.cruise summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
details.cruise summary::-webkit-details-marker { display: none; }
details.cruise summary .dates { color: var(--ink-soft); font-weight: 500; font-variant-numeric: tabular-nums; }
.day { display: grid; grid-template-columns: 5.2em 1fr auto; gap: 10px; padding: 8px 0; border-top: 1px solid var(--glass-border); font-size: 0.95rem; }
.day .d { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.day.today { font-weight: 700; }
.day .sea { color: var(--ink-soft); }

/* Live map */
#map { height: min(70vh, 640px); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.ship-marker img { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.ship-marker.east img { transform: scaleX(-1); }
.ship-marker.planned img { opacity: 0.55; }
.leaflet-container { font-family: var(--sans); }
.status-line { font-family: var(--serif); text-align: center; margin-top: 12px; }
.fresh { font-size: 0.85rem; color: var(--ink-soft); text-align: center; }


/* Bottom tab bar (phones). Material's quiet indicator: a teal pill behind
   the active icon, label in teal — no white capsules. */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: none; justify-content: space-around; align-items: stretch;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: var(--glass); border-top: 1px solid var(--glass-border);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.tabbar a {
  flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none; color: var(--ink-soft); font-size: 0.7rem; font-weight: 600; padding: 4px 0;
}
.tabbar a .icon {
  width: 56px; height: 30px; display: grid; place-items: center; border-radius: 15px;
  transition: background 0.15s ease;
}
.tabbar a .icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a .icon img { width: 24px; height: 24px; border-radius: 50%; }
.tabbar a.active { color: var(--teal); }
.tabbar a.active .icon { background: rgba(48, 176, 199, 0.22); }

@media (max-width: 699px) {
  .topnav .navlinks { display: none; }
  .tabbar { display: flex; }
  .content { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .colophon { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
}
