:root {
  --navy-950: #03131f;
  --navy-900: #061b2a;
  --navy-800: #092a3a;
  --ink: #edf5f1;
  --muted: #9eb5b2;
  --gold: #e9b85a;
  --gold-light: #f5d88c;
  --teal: #55d2bd;
  --line: rgba(174, 220, 211, .18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--navy-950); font-family: "DM Sans", sans-serif; }
a { color: inherit; text-decoration: none; }

.site-header {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  margin: auto;
  padding: 14px 5vw;
}
.site-header.is-fixed {
  position: fixed;
  max-width: none;
  padding-top: 6px;
  padding-bottom: 6px;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  animation: header-return .28s ease both;
  isolation: isolate;
}
.site-header.is-fixed::before {
  position: absolute;
  z-index: -1;
  inset: 0 0 -34px;
  content: "";
  background: linear-gradient(180deg, rgba(2,14,23,.98) 0%, rgba(2,14,23,.9) 45%, rgba(2,14,23,.48) 72%, transparent 100%);
  pointer-events: none;
}
.site-header.is-fixed .site-logo { width: clamp(92px, 8vw, 116px); }
@keyframes header-return {
  from { opacity: 0; transform: translateY(-100%); }
  to { opacity: 1; transform: translateY(0); }
}

.brand, .brand picture { display: inline-flex; align-items: center; }
.site-logo { display: block; width: clamp(150px, 15vw, 205px); height: auto; filter: drop-shadow(0 5px 12px rgba(0,0,0,.35)); }
nav { display: flex; align-items: center; gap: 34px; color: rgba(255,255,255,.78); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
nav a { transition: color .2s ease; }
nav a:hover { color: #fff; }
.account-link, .profile-link { border: 0; color: inherit; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.account-link:hover { color: #fff; }
.profile-link { display: inline-flex; gap: 9px; align-items: center; padding: 0; color: #fff; }
.profile-link[hidden] { display: none; }
.profile-link > span:first-child { display: grid; width: 34px; height: 34px; place-items: center; overflow: hidden; border: 1px solid rgba(233,184,90,.72); border-radius: 50%; color: #251b0b; background: var(--gold); background-position: center; background-size: cover; font-size: 12px; font-weight: 700; }
.nav-cta { padding: 11px 18px; border: 1px solid rgba(233,184,90,.7); color: var(--gold-light); }

.auth-modal { width: min(440px, calc(100% - 32px)); max-height: calc(100svh - 32px); margin: auto; padding: 0; overflow: visible; border: 0; border-radius: 20px; outline: 0; color: var(--ink); background: transparent; opacity: 0; transform: translateY(12px) scale(.98); transition: opacity .18s ease, transform .18s ease, overlay .18s allow-discrete, display .18s allow-discrete; }
.auth-modal[open] { opacity: 1; transform: none; }
.auth-modal::backdrop { background: rgba(1,11,18,.76); backdrop-filter: blur(12px) saturate(.75); }
@starting-style { .auth-modal[open] { opacity: 0; transform: translateY(12px) scale(.98); } }
.auth-card { position: relative; width: 100%; max-height: calc(100svh - 32px); overflow: auto; padding: 38px; border: 1px solid rgba(174,220,211,.2); border-radius: 20px; background: radial-gradient(circle at 85% 0, rgba(85,210,189,.12), transparent 35%), linear-gradient(155deg, rgba(10,43,57,.98), rgba(3,19,31,.99) 70%); box-shadow: 0 32px 100px rgba(0,0,0,.58), inset 0 1px rgba(255,255,255,.04); }
.auth-card h2 { font-size: 39px; line-height: 1.05; letter-spacing: -.02em; }
.auth-close { position: absolute; top: 14px; right: 15px; display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; color: var(--muted); background: rgba(255,255,255,.035); font-size: 21px; line-height: 1; cursor: pointer; }
.auth-intro { margin: 14px 0 25px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 20px; padding: 4px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: rgba(1,11,18,.38); }
.auth-tabs button { padding: 10px; border: 0; border-radius: 8px; color: var(--muted); background: none; font: inherit; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: .18s ease; }
.auth-tabs button.active { color: #09231f; background: var(--teal); box-shadow: 0 5px 16px rgba(0,0,0,.2); }
#landingAuthForm { display: grid; gap: 13px; }
#landingAuthForm [hidden] { display: none !important; }
#landingAuthForm .signup-only { display: none !important; }
#landingAuthForm.signup-mode .signup-only { display: grid !important; }
#landingAuthForm.signup-mode .signin-only { display: none !important; }
#landingAuthForm label { display: grid; gap: 7px; color: #a8bdb9; font-size: 9px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
#landingAuthForm input { width: 100%; padding: 13px 14px; border: 1px solid rgba(174,220,211,.16); border-radius: 11px; outline: none; color: var(--ink); background: rgba(1,11,18,.62); box-shadow: inset 0 1px 3px rgba(0,0,0,.24); color-scheme: dark; font: inherit; font-size: 14px; transition: border-color .18s, box-shadow .18s; }
#landingAuthForm input:focus { border-color: rgba(85,210,189,.72); box-shadow: 0 0 0 3px rgba(85,210,189,.09), inset 0 1px 3px rgba(0,0,0,.2); }
#landingAuthForm input:-webkit-autofill { -webkit-text-fill-color: var(--ink); box-shadow: 0 0 0 1000px #061d2a inset; caret-color: var(--ink); }
.auth-submit { width: 100%; margin-top: 5px; border-radius: 11px; background: linear-gradient(135deg, var(--gold-light), var(--gold)); box-shadow: 0 9px 25px rgba(0,0,0,.22); cursor: pointer; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: #708b89; font-size: 10px; text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { flex: 1; height: 1px; content: ""; background: var(--line); }
.google-button { display: flex; width: 100%; align-items: center; justify-content: center; gap: 12px; padding: 13px; border: 1px solid rgba(255,255,255,.16); border-radius: 11px; color: var(--ink); background: rgba(255,255,255,.045); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .18s, background .18s; }
.google-button:hover { border-color: rgba(255,255,255,.34); background: rgba(255,255,255,.075); }
.google-button b { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: #174ea6; background: #fff; }
.auth-message { min-height: 20px; margin: 16px 0 0; color: var(--gold-light); font-size: 12px; line-height: 1.5; }
.profile-card { text-align: center; }
.profile-card h2 { margin-top: 13px; }
.profile-avatar { display: grid; width: 76px; height: 76px; margin: 15px auto 0; place-items: center; overflow: hidden; border: 2px solid var(--gold); border-radius: 50%; color: #251b0b; background: var(--gold); background-position: center; background-size: cover; box-shadow: 0 10px 28px rgba(0,0,0,.3); font-size: 25px; font-weight: 700; }
.profile-card > p:not(.eyebrow) { color: var(--muted); }
.profile-provider { margin-bottom: 28px; font-size: 12px; text-transform: capitalize; }
.profile-signout { display: block; margin: 25px auto 0; border: 0; color: var(--muted); background: none; font: inherit; font-size: 11px; text-decoration: underline; cursor: pointer; }

.hero { position: relative; display: flex; align-items: center; min-height: min(900px, 100svh); overflow: hidden; isolation: isolate; }
.hero-art { position: absolute; z-index: -3; inset: 0; background: url("assets/hero-v2.webp") center 45% / cover no-repeat; transform: scale(1.015); }
.hero-shade { position: absolute; z-index: -2; inset: 0; background: linear-gradient(90deg, rgba(2,16,26,.96) 0%, rgba(3,19,30,.78) 37%, rgba(3,17,26,.22) 66%, rgba(2,13,21,.18)), linear-gradient(0deg, var(--navy-950) 0%, transparent 28%, rgba(1,11,18,.42) 100%); }
.hero-content { width: min(660px, 90vw); margin-left: max(5vw, calc((100vw - 1300px) / 2)); padding: 140px 0 110px; }
.eyebrow { margin: 0 0 18px; color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .25em; }
h1, h2, h3 { margin: 0; font-family: "Marcellus", serif; font-weight: 400; }
h1 { font-size: clamp(54px, 7.2vw, 108px); line-height: .89; letter-spacing: -.035em; text-shadow: 0 8px 30px rgba(0,0,0,.34); }
h1 em { color: var(--gold-light); font-style: normal; }
.hero-copy { max-width: 550px; margin: 30px 0 0; color: rgba(237,245,241,.82); font-size: clamp(16px, 1.5vw, 20px); line-height: 1.65; }
.hero-actions { display: flex; gap: 12px; margin-top: 34px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-width: 164px; padding: 15px 24px; border: 1px solid rgba(255,255,255,.28); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button.primary { border-color: var(--gold); color: #251b0b; background: var(--gold); box-shadow: 0 9px 28px rgba(0,0,0,.22); }
.button.primary:hover { background: var(--gold-light); }
.button.secondary { background: rgba(4,24,35,.38); backdrop-filter: blur(8px); }
.button.secondary:hover { border-color: rgba(255,255,255,.7); background: rgba(4,24,35,.64); }
.build-note { display: flex; align-items: center; gap: 9px; margin-top: 24px; color: rgba(255,255,255,.57); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.build-note span { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 12px var(--teal); }
.scroll-cue { position: absolute; right: 5vw; bottom: 34px; display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.66); font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; writing-mode: vertical-rl; }
.scroll-cue span { width: 1px; height: 46px; background: linear-gradient(var(--gold), transparent); }

.devices-showcase {
  position: relative;
  overflow: hidden;
  padding: 82px 0 22px;
  border-top: 1px solid rgba(174,220,211,.08);
  border-bottom: 1px solid rgba(174,220,211,.1);
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 64%, rgba(24,113,127,.2), transparent 48%),
    linear-gradient(180deg, #03131f, #051d2a 62%, #03131f);
  isolation: isolate;
}
.devices-showcase::before {
  position: absolute;
  z-index: -1;
  top: 0;
  left: 50%;
  width: min(1180px, 88vw);
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(233,184,90,.55), transparent);
  transform: translateX(-50%);
}
.devices-copy { position: relative; z-index: 1; width: min(840px, calc(100% - 44px)); margin: 0 auto; }
.devices-copy h2 { font-size: clamp(38px, 4.4vw, 60px); line-height: 1.04; }
.devices-copy h2 em { color: var(--gold-light); font-style: normal; }
.devices-copy > p:not(.eyebrow) { max-width: 760px; margin: 18px auto 20px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.devices-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin: 0 0 24px; padding: 0; color: rgba(237,245,241,.76); font-size: 10px; font-weight: 700; letter-spacing: .09em; list-style: none; text-transform: uppercase; }
.devices-facts li { display: flex; align-items: center; gap: 8px; }
.devices-facts li::before { width: 4px; height: 4px; border-radius: 50%; content: ""; background: var(--teal); box-shadow: 0 0 8px rgba(85,210,189,.65); }
.devices-art { display: block; width: min(1180px, calc(100% - 48px)); margin: 8px auto -2.5%; }
.devices-art img { display: block; width: 100%; height: auto; filter: drop-shadow(0 28px 34px rgba(0,0,0,.42)); }

.section { max-width: 1240px; margin: auto; padding: 120px 5vw; }
.intro { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(50px, 9vw, 140px); align-items: start; }
.section-heading h2, .voyage h2, .final-cta h2 { font-size: clamp(38px, 4.6vw, 68px); line-height: 1.08; }
.intro-copy { padding-top: 12px; }
.intro-copy p, .voyage-content > p { margin: 0 0 20px; color: var(--muted); font-size: 16px; line-height: 1.8; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; max-width: 1440px; padding-top: 20px; }
.feature-card { position: relative; display: flex; align-items: flex-end; min-height: 520px; overflow: hidden; padding: 34px; border: 1px solid var(--line); background-position: center; background-size: cover; isolation: isolate; }
.feature-card::before { position: absolute; z-index: -1; inset: 0; content: ""; background: linear-gradient(0deg, rgba(3,18,28,.98), rgba(3,18,28,.08) 70%), linear-gradient(90deg, rgba(3,18,28,.46), transparent); transition: background-color .25s ease, transform .5s ease; }
.feature-card::after { position: absolute; z-index: -2; inset: 0; content: ""; background: inherit; transition: transform .6s ease; }
.feature-card:hover::after { transform: scale(1.035); }
.feature-card.navigation { background-image: url("../assets/ui/harbour-owned-ships.webp"); }
.feature-card.shipyard { background-image: url("../assets/ui/harbour-build-ship.webp"); }
.feature-card.combat { background-image: url("../assets/ui/harbour-ship-market.webp"); }
.feature-number { position: absolute; top: 25px; right: 27px; color: rgba(255,255,255,.7); font: 17px "Marcellus", serif; }
.feature-card h3 { margin-bottom: 12px; font-size: 31px; }
.feature-card p:last-child { max-width: 370px; margin: 0; color: rgba(237,245,241,.7); font-size: 13px; line-height: 1.7; }

.voyage { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(45px, 8vw, 110px); align-items: center; }
.voyage-image { min-height: 590px; border: 1px solid var(--line); background: linear-gradient(0deg, rgba(3,18,28,.25), rgba(3,18,28,.05)), url("../assets/ui/harbour-build-ship.webp") center / cover no-repeat; box-shadow: -22px 22px 0 rgba(85,210,189,.045); }
.voyage-content > p { margin-top: 28px; }
.voyage ul { display: grid; gap: 15px; margin: 30px 0 0; padding: 26px 0 0; border-top: 1px solid var(--line); list-style: none; color: rgba(237,245,241,.83); font-size: 13px; }
.voyage li { display: flex; gap: 13px; align-items: center; }
.voyage li span { color: var(--teal); }

.final-cta { display: grid; place-items: center; min-height: 590px; padding: 90px 5vw; text-align: center; background: linear-gradient(rgba(3,18,28,.72), rgba(3,18,28,.9)), url("../assets/ui/harbour-resource-market.webp") center / cover no-repeat; }
.final-cta h2 { margin-bottom: 34px; font-size: clamp(48px, 6vw, 86px); }

footer { display: grid; grid-template-columns: 1.2fr 1fr auto auto; gap: 34px; align-items: center; padding: 38px max(5vw, calc((100vw - 1300px) / 2)); border-top: 1px solid var(--line); color: var(--muted); background: #02111b; font-size: 11px; }
.footer-brand { color: var(--ink); }
.footer-brand .site-logo { width: 150px; }
.footer-links { display: flex; gap: 24px; color: var(--ink); font-weight: 600; }
footer > small { white-space: nowrap; }

@media (max-width: 900px) {
  .site-header { padding-top: 18px; }
  nav > a:not(.nav-cta) { display: none; }
  .hero { min-height: 780px; }
  .hero-art { background-position: 68% center; }
  .hero-shade { background: linear-gradient(90deg, rgba(2,16,26,.95), rgba(3,18,28,.55)), linear-gradient(0deg, var(--navy-950), transparent 42%); }
  .devices-showcase { padding-top: 82px; }
  .devices-art { width: calc(100% - 32px); margin-top: 26px; }
  .intro, .voyage { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 430px; }
  .voyage-image { min-height: 460px; }
  footer { grid-template-columns: 1fr 1fr; }
  footer > p { text-align: right; }
}

@media (max-width: 560px) {
  .site-header { padding-top: 12px; }
  .site-header.is-fixed { padding-top: 5px; padding-bottom: 5px; }
  .site-header.is-fixed::before { bottom: -24px; }
  .site-header.is-fixed .site-logo { width: 46px; }
  nav { gap: 11px; }
  .account-link { font-size: 10px; }
  .profile-link > span:last-child { display: none; }
  .site-logo { width: 62px; }
  .footer-brand .site-logo { width: 82px; }
  .nav-cta { padding: 10px 13px; }
  .hero { min-height: 740px; }
  .hero-content { margin: 0; padding: 140px 22px 90px; }
  .hero-copy { font-size: 15px; }
  .hero-actions { flex-direction: column; align-items: stretch; max-width: 280px; }
  .scroll-cue { display: none; }
  .devices-showcase { padding: 78px 0 30px; }
  .devices-copy > p:not(.eyebrow) { font-size: 14px; }
  .devices-facts { gap: 8px 14px; margin-bottom: 22px; font-size: 9px; }
  .devices-art { width: calc(100% - 24px); margin-top: 30px; margin-bottom: -8px; }
  .section { padding: 82px 22px; }
  .feature-grid { padding: 0 14px 82px; }
  .feature-card { min-height: 390px; padding: 26px; }
  .voyage-image { min-height: 350px; }
  .final-cta { min-height: 500px; padding: 70px 22px; }
  footer { grid-template-columns: 1fr; padding: 32px 22px; text-align: left; }
  footer > p { text-align: left; }
  .auth-card { padding: 36px 24px 28px; }
  .auth-card h2 { font-size: 35px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
