:root {
  color-scheme: dark;
  --ocean: #071414;
  --ocean-deep: #040b0c;
  --ink: #edf1e6;
  --muted: #8ca29a;
  --line: rgba(198, 221, 205, 0.14);
  --land: #16302b;
  --land-edge: #315249;
  --mint: #a8f0cf;
  --acid: #d8ff72;
  --orange: #ff9d66;
  --blue: #8edaff;
  font-family: "SFMono-Regular", "Cascadia Code", "Liberation Mono", monospace;
  background: var(--ocean-deep);
  color: var(--ink);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 72% 12%, rgba(43, 115, 100, .12), transparent 32rem),
    linear-gradient(180deg, var(--ocean) 0%, var(--ocean-deep) 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  content: "";
  opacity: .21;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.11'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

a { color: inherit; }

.shell { overflow: hidden; }

.topbar {
  position: relative;
  z-index: 5;
  height: 76px;
  padding: 0 clamp(22px, 4vw, 68px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  letter-spacing: .13em;
  font: 650 12px/1 system-ui, sans-serif;
}

.wordmark-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(216, 255, 114, .58);
  color: var(--acid);
  font: 700 11px/1 var(--font-mono, monospace);
  transform: rotate(-3deg);
}

.topbar-meta {
  display: flex;
  gap: 26px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .14em;
}

.signal { color: var(--mint); }
.signal i, .card-state i {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.hero {
  position: relative;
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(290px, .72fr) minmax(620px, 1.75fr);
  align-items: center;
  padding: 45px clamp(22px, 4vw, 68px) 68px;
}

.hero-copy {
  position: relative;
  z-index: 4;
  padding-top: 12px;
}

.eyebrow {
  margin: 0 0 25px;
  color: var(--mint);
  font-size: 9px;
  letter-spacing: .24em;
}

h1 {
  max-width: 720px;
  margin: 0;
  font: 500 clamp(66px, 8vw, 128px)/.82 Georgia, "Times New Roman", serif;
  letter-spacing: -.075em;
}

h1 em {
  color: var(--acid);
  font-weight: 400;
}

.hero-description {
  max-width: 390px;
  margin: 42px 0 34px;
  color: #a8b8b0;
  font: 400 14px/1.75 system-ui, sans-serif;
}

.explore-link {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(216,255,114,.5);
  color: var(--acid);
  font-size: 10px;
  letter-spacing: .15em;
  text-decoration: none;
  text-transform: uppercase;
}

.explore-link span { font-size: 18px; transition: transform .25s ease; }
.explore-link:hover span { transform: translate(4px, 4px); }

.map-stage {
  position: relative;
  width: 112%;
  margin-left: -7%;
  transform: translate3d(var(--map-x, 0), var(--map-y, 0), 0);
  transition: transform .25s ease-out;
}

.map-head, .map-legend {
  display: flex;
  justify-content: space-between;
  color: #607b72;
  font-size: 8px;
  letter-spacing: .16em;
}

.map-head { padding: 0 5% 10px; }
.map-legend { justify-content: flex-end; gap: 22px; padding: 8px 5% 0; }

.map-legend i { display: inline-block; margin-right: 7px; vertical-align: middle; }
.legend-route { width: 19px; border-top: 1px dashed var(--mint); }
.legend-port { width: 6px; height: 6px; border-radius: 50%; background: var(--acid); }
.legend-vessel { width: 11px; height: 5px; background: var(--orange); }

.world-map { display: block; width: 100%; overflow: visible; }

.graticule path, .graticule ellipse {
  fill: none;
  stroke: rgba(132, 174, 158, .10);
  stroke-width: 1;
}

.continents path {
  fill: var(--land);
  stroke: var(--land-edge);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.routes use {
  fill: none;
  stroke: rgba(168, 240, 207, .38);
  stroke-width: 1.35;
  stroke-dasharray: 4 8;
  animation: route-flow 22s linear infinite;
}

.routes use:nth-child(even) { stroke: rgba(255, 157, 102, .30); animation-direction: reverse; }

@keyframes route-flow { to { stroke-dashoffset: -180; } }

.ports circle:first-child { fill: var(--acid); filter: url(#softGlow); }
.ports .port-pulse { fill: none; stroke: var(--acid); opacity: .26; animation: port-pulse 2.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.ports text { fill: #78948a; font: 9px/1 monospace; letter-spacing: .08em; }

@keyframes port-pulse { 0% { transform: scale(.45); opacity: .5; } 80%, 100% { transform: scale(1.25); opacity: 0; } }

.ship { fill: var(--orange); filter: url(#softGlow); }
.ship rect { fill: #ffe0c8; }
.ship-alt { fill: var(--blue); }
.ship-alt rect { fill: #dff5ff; }

.projects {
  position: relative;
  padding: 110px clamp(22px, 4vw, 68px) 130px;
  border-top: 1px solid var(--line);
  background: #061010;
}

.projects::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, transparent 49.95%, rgba(168,240,207,.05) 50%, transparent 50.05%);
  pointer-events: none;
}

.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 48px; }
.section-heading .eyebrow { margin: 0; }

.section-heading h2 {
  margin: 0;
  font: 400 clamp(34px, 4vw, 62px)/1 Georgia, serif;
  letter-spacing: -.045em;
}

.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }

.project-card {
  position: relative;
  min-height: 370px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: rgba(9, 26, 24, .64);
  text-decoration: none;
  transition: background .3s ease, transform .3s ease;
}

.project-card + .project-card { border-left: 1px solid var(--line); }
.project-card::before { position: absolute; inset: auto 0 0; height: 3px; content: ""; background: var(--card-color); transform: scaleX(0); transform-origin: left; transition: transform .35s ease; }
.project-card:not(.is-coming):hover { background: rgba(18, 47, 42, .8); transform: translateY(-5px); }
.project-card:not(.is-coming):hover::before { transform: scaleX(1); }
.money-card { --card-color: var(--acid); }
.travel-card { --card-color: var(--blue); }
.bot-card { --card-color: var(--orange); }

.card-index { align-self: flex-end; color: #536d64; font-size: 9px; }
.card-icon { width: 62px; height: 62px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--card-color); }
.card-icon svg { width: 34px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.card-state { color: var(--card-color); font-size: 8px; letter-spacing: .16em; }
.card-copy h3 { margin: 15px 0 13px; font: 400 38px/1 Georgia, serif; }
.card-copy p { max-width: 340px; margin: 0; color: #829990; font: 400 12px/1.7 system-ui, sans-serif; }
.card-arrow { position: absolute; right: 28px; bottom: 28px; color: var(--card-color); font-size: 20px; }
.is-coming { opacity: .64; }
.is-coming .card-arrow { font-size: 8px; letter-spacing: .15em; }

footer {
  min-height: 90px;
  padding: 0 clamp(22px, 4vw, 68px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: #536d64;
  font-size: 8px;
  letter-spacing: .14em;
}

@media (max-width: 1040px) {
  .hero { min-height: auto; grid-template-columns: 1fr; padding-top: 80px; }
  .hero-copy { max-width: 620px; }
  .map-stage { width: 120%; margin: 30px 0 0 -10%; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 310px; }
  .project-card + .project-card { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 680px) {
  .topbar { height: 66px; }
  .wordmark-name { display: none; }
  .topbar-meta span:not(.signal) { display: none; }
  .hero { padding-top: 58px; padding-bottom: 48px; }
  h1 { font-size: clamp(58px, 20vw, 86px); }
  .hero-description { margin-top: 30px; }
  .map-stage { width: 166%; margin-left: -34%; margin-top: 44px; }
  .map-head { padding-left: 21%; padding-right: 21%; }
  .map-head span:last-child, .map-legend { display: none; }
  .ports text { display: none; }
  .projects { padding-top: 78px; padding-bottom: 80px; }
  .section-heading { display: block; }
  .section-heading .eyebrow { margin-bottom: 18px; }
  .project-card { min-height: 330px; }
  footer { gap: 20px; line-height: 1.5; }
  footer span:last-child { text-align: right; }
}

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

/* Full-screen ambient map */
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.visual {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.visual .map-stage {
  width: min(96vw, 192vh);
  margin: 0;
  flex: none;
}

.visual .world-map {
  width: 100%;
  height: auto;
}

.home-overlay { position: fixed; z-index: 30; top: 20px; left: 24px; right: 24px; display: flex; align-items: center; gap: 22px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(4, 15, 15, .78); backdrop-filter: blur(18px); }
.home-brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.home-brand > span { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(216,255,114,.55); color: var(--acid); font-weight: 800; }
.home-brand div { display: grid; gap: 2px; }
.home-brand strong { font: 700 12px/1.2 system-ui, sans-serif; }
.home-brand small { color: var(--muted); font-size: 9px; }
.app-links { display: flex; gap: 8px; }
.app-links a, .auth-toggle { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.025); color: var(--ink); text-decoration: none; font: 650 10px/1 system-ui, sans-serif; cursor: pointer; }
.auth-control { position: relative; }
.home-auth-form { position: absolute; top: 48px; right: 0; width: min(360px, calc(100vw - 32px)); padding: 22px; border: 1px solid rgba(168,240,207,.22); border-radius: 14px; background: rgba(4, 15, 15, .97); box-shadow: 0 24px 70px rgba(0,0,0,.38); }
.home-auth-form:not([hidden]) { display: grid; gap: 13px; }
.home-auth-form strong { font: 750 17px/1.2 system-ui, sans-serif; }
.home-auth-form > span { color: var(--muted); font: 11px/1.5 system-ui, sans-serif; }
.home-auth-form label { display: grid; gap: 6px; color: var(--muted); font: 650 9px/1 system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.home-auth-form input { min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: #0b1d1b; color: var(--ink); font: 13px/1.2 system-ui, sans-serif; }
.home-auth-form button { padding: 11px; border: 0; border-radius: 8px; background: var(--acid); color: #132016; font-weight: 800; cursor: pointer; }
.auth-error { margin: 0; color: #ff9d8c; font: 11px/1.4 system-ui, sans-serif; }
@media (max-width: 620px) { .home-overlay { top: 10px; left: 10px; right: 10px; } .home-brand div { display: none; } .app-links a { padding: 9px; } }
