/* Public marketing home (`/`) — Anchored reference layout */

body.fs-public-landing {
  --navy: #06172e;
  --navy-dark: #031326;
  --navy-soft: #08213f;
  --cyan: #38bdf8;
  --cyan-strong: #0ea5e9;
  --text: #0f2340;
  --muted: #6b7a90;
  --line: #dceaf3;
  --page: #f4f9fd;
  --white: #ffffff;
}

body.fs-public-landing,
body.fs-public-landing * {
  box-sizing: border-box;
}

.fs-skip-link {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 5000;
  padding: 10px 14px;
  border-radius: 8px;
  background: #38bdf8;
  color: #041018;
  font-weight: 700;
  text-decoration: none;
}

.fs-skip-link:focus {
  top: 12px;
}

body.fs-public-landing {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--page);
  overflow-x: clip;
}

body.fs-public-landing::before,
body.fs-public-landing::after {
  display: none;
}

.site-container {
  width: min(1380px, calc(100% - 96px));
  margin: 0 auto;
}

/* HERO */
.hero {
  position: relative;
  min-height: 455px;
  overflow: hidden;
  color: white;
  background-color: #030a14;
  background-image:
    linear-gradient(90deg, rgba(3, 19, 38, 0.96) 0%, rgba(3, 19, 38, 0.82) 38%, rgba(3, 19, 38, 0.32) 72%, rgba(3, 19, 38, 0.18) 100%),
    image-set(
      url("assets/freighter-hero.webp") type("image/webp"),
      url("assets/freighter-hero.jpg") type("image/jpeg")
    );
  background-repeat: no-repeat;
  /* Image height capped so more scene is visible (zoomed out vs cover). */
  background-size: cover, auto min(68vh, 70%);
  background-position: center, 86% 52%;
}

.hero-inner {
  width: min(1380px, calc(100% - 96px));
  margin: 0 auto;
  padding: 70px 0 100px;
  position: relative;
  z-index: 2;
}

.hero-title {
  margin: 0;
  max-width: 680px;
  font-size: clamp(44px, 4.6vw, 66px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.hero-title-line {
  display: block;
}

.hero-subtitle {
  margin: 22px 0 0;
  max-width: 530px;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(18px, 2.1vw, 21px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 32px;
}

.hero-btn {
  width: 230px;
  height: 64px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-decoration: none;
  font-weight: 800;
  font-size: 17px;
  box-sizing: border-box;
}

.hero-btn.primary {
  color: white;
  background: linear-gradient(135deg, #4dd3ff, #1699e4);
  box-shadow: 0 18px 40px rgba(14, 165, 233, 0.22);
}

.hero-btn.primary:hover {
  filter: brightness(1.04);
}

.hero-btn.secondary {
  color: white;
  background: rgba(3, 19, 38, 0.45);
  border: 1.5px solid rgba(56, 189, 248, 0.88);
}

.hero-btn.secondary:hover {
  background: rgba(3, 19, 38, 0.62);
  border-color: #7dd3fc;
}

.hero-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 72px;
  z-index: 3;
  pointer-events: none;
}

.hero-wave svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* FEATURES */
.features-section {
  background: #f8fcff;
  padding: 36px 0 28px;
}

.features-grid {
  width: min(1380px, calc(100% - 96px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  min-height: 122px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(16, 42, 74, 0.06);
}

.feature-icon {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text);
  background: #e8f6ff;
}

.feature-icon svg {
  display: block;
}

.feature-body {
  min-width: 0;
  flex: 1;
}

.feature-card h2 {
  margin: 0 0 7px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 15px;
}

/* STATS */
.stats-section {
  background: linear-gradient(180deg, #eef8ff, #f8fcff);
  padding: 30px 0 36px;
}

.stats-inner {
  width: min(1380px, calc(100% - 96px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 420px 1fr;
  align-items: center;
  gap: 40px;
}

.stats-title {
  margin: 0;
  font-size: 26px;
  line-height: 1.35;
  font-weight: 900;
  color: var(--text);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
}

.stat-item {
  min-height: 76px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 28px;
  border-left: 1px solid rgba(15, 35, 64, 0.12);
}

.stat-item:first-child {
  border-left: 0;
  padding-left: 0;
}

.stat-icon {
  color: var(--cyan-strong);
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}

.stat-number {
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  color: var(--text);
}

.stat-label {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

/* FOOTER */
.site-footer.fs-pl-footer {
  background: var(--navy-dark);
  color: white;
  padding: 38px 0 24px;
  position: relative;
  overflow: hidden;
}

.footer-inner {
  width: min(1380px, calc(100% - 96px));
  margin: 0 auto;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1.35fr;
  gap: 38px;
}

.footer-brand,
.footer-col {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding-right: 34px;
}

.footer-newsletter {
  padding-right: 0;
  border-right: 0;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
}

.footer-logo-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.footer-logo-icon svg {
  display: block;
}

.footer-logo-text-farseep {
  color: #fff;
}

.footer-logo-text-front {
  color: var(--cyan);
}

.footer-brand p,
.footer-newsletter p {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.55;
  font-size: 14px;
}

.socials {
  display: flex;
  gap: 14px;
  margin-top: 24px;
}

.socials a {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  text-decoration: none;
  font-size: 0.75rem;
}

.socials a:hover {
  background: rgba(56, 189, 248, 0.2);
  color: var(--cyan);
}

.footer-col h4,
.footer-newsletter h4 {
  margin: 0 0 16px;
  font-size: 16px;
  color: white;
  font-weight: 700;
}

.footer-col a {
  display: flex;
  align-items: center;
  min-height: 24px;
  margin: 4px 0;
  padding: 6px 0;
  color: rgba(255, 255, 255, 0.66);
  text-decoration: none;
  font-size: 14px;
}

.footer-col a:hover {
  color: var(--cyan);
}

.newsletter-form {
  display: flex;
  height: 46px;
  margin-top: 20px;
}

.newsletter-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-right: 0;
  border-radius: 6px 0 0 6px;
  background: rgba(255, 255, 255, 0.04);
  color: white;
  padding: 0 16px;
  outline: none;
  font-size: 14px;
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.newsletter-form button {
  width: 52px;
  flex-shrink: 0;
  border: 0;
  border-radius: 0 6px 6px 0;
  background: var(--cyan);
  color: white;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.newsletter-form button svg {
  display: block;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
}

.fs-pl-footer-tools {
  margin-top: 16px;
}

.fs-pl-footer-tools button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  font-size: 12px;
  text-decoration: underline;
  padding: 0;
}

.fs-pl-footer-tools button:hover {
  color: rgba(255, 255, 255, 0.75);
}

.fs-pl-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 18px;
  background: #0f172a;
  color: #f8fafc;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  font-size: 0.9rem;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.fs-pl-toast.is-on {
  opacity: 1;
  pointer-events: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-inner {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 0;
  }

  .stat-item {
    border-left: 1px solid rgba(15, 35, 64, 0.12);
    padding: 12px 16px;
  }

  .stat-item:nth-child(2n + 1) {
    border-left: 0;
    padding-left: 0;
  }

  .footer-main {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-brand,
  .footer-col {
    border-right: 0;
    padding-right: 0;
  }
}

@media (max-width: 720px) {
  .fs-global-header-inner,
  .hero-inner,
  .features-grid,
  .stats-inner,
  .footer-inner {
    width: min(100% - 32px, 1380px);
  }

  .hero {
    min-height: 520px;
    background-size: cover, auto min(52vh, 62%);
    background-position: center, 80% 56%;
  }

  .hero-title {
    font-size: 40px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-btn {
    width: 100%;
    max-width: 100%;
  }

  .features-grid,
  .stats-grid,
  .footer-main {
    grid-template-columns: 1fr;
  }

  .stat-item {
    border-left: 0;
    padding: 16px 0;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

/* —— Sign-in modal (landing header) — Anchored light maritime —— */
/* Matches /register.html and /farseer-login-dialog.css visual language. */
.auth-modal {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 24px;
  border: none;
  background: transparent;
  color: inherit;
  overflow: visible;
}

.auth-modal::backdrop {
  background:
    radial-gradient(circle at 18% 12%, rgba(56, 189, 248, 0.22), transparent 45%),
    radial-gradient(circle at 82% 20%, rgba(167, 139, 250, 0.16), transparent 44%),
    rgba(17, 38, 74, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.auth-modal:not([open]) {
  display: none;
}

.auth-modal[open],
.auth-modal.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-modal__overlay {
  display: none;
}

.auth-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(470px, calc(100% - 32px));
  max-width: 480px;
  padding: 36px 38px;
  border-radius: 24px;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8fd 100%);
  border: 1px solid #d9e6f4;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.8) inset,
    0 24px 60px rgba(43, 72, 112, 0.14);
  color: #11264a;
}

.auth-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid #d9e6f4;
  background: #ffffff;
  color: #5f7393;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.auth-modal__close:hover {
  color: #2f7df6;
  border-color: #9cc7ff;
  background: #f8fbff;
}

.auth-modal__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #fbfdff 0%, #eef4fb 100%);
  border: 1px solid rgba(157, 199, 255, 0.55);
  box-shadow: 0 6px 18px rgba(43, 72, 112, 0.08);
  color: #2f7df6;
}

.auth-modal__icon svg {
  color: #2f7df6;
}
/* Inline `stroke="#fff"` on the SVG paths wins over CSS `color: currentColor`,
   so force the anchor strokes to the navy accent here. */
.auth-modal__icon svg circle,
.auth-modal__icon svg path,
.auth-modal__icon svg line {
  stroke: #2f7df6 !important;
}

.auth-modal__dialog h2 {
  margin: 0;
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #11264a;
}

.auth-modal__subtitle {
  max-width: 320px;
  margin: 10px auto 28px;
  text-align: center;
  color: #5f7393;
  font-size: 15px;
  line-height: 1.5;
}

.auth-form {
  margin: 0;
}

.auth-field {
  display: block;
  margin-bottom: 16px;
}

.auth-field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #5f7393;
}

.auth-input {
  height: 50px;
  display: flex;
  align-items: center;
  border-radius: 12px;
  border: 1px solid #d7e4f3;
  background: #f8fbff;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.auth-input:focus-within {
  border-color: #9cc7ff;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(47, 125, 246, 0.14);
}

.auth-input__icon {
  width: 46px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: #8a9db8;
}

.auth-input__icon svg {
  display: block;
}

.auth-input input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #11264a;
  font-size: 15px;
  padding-right: 8px;
  font-family: inherit;
}

.auth-input input::placeholder {
  color: #8a9db8;
}

.auth-input__action {
  width: 46px;
  height: 100%;
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #5f7393;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: color 0.15s, background 0.15s;
}

.auth-input__action:hover {
  color: #2f7df6;
  background: #eef4fb;
}

.auth-input__action svg {
  grid-area: 1 / 1;
}

.auth-input__action svg[hidden] {
  display: none !important;
}

.auth-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 4px 0 12px;
  font-size: 14px;
  flex-wrap: wrap;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #11264a;
  cursor: pointer;
  font-weight: 500;
}

.auth-check input {
  width: 16px;
  height: 16px;
  accent-color: #2f7df6;
  cursor: pointer;
}

.auth-link,
.auth-register a {
  color: #2f7df6;
  text-decoration: none;
  font-weight: 700;
}

.auth-link:hover,
.auth-register a:hover {
  color: #1d6be5;
  text-decoration: underline;
}

.auth-status {
  margin: 0 0 12px;
  min-height: 1.25em;
  font-size: 14px;
  color: #b91c1c;
}

.auth-status:empty {
  display: none;
}

.auth-submit {
  width: 100%;
  height: 52px;
  border: 1px solid rgba(6, 23, 46, 0.15);
  border-radius: 999px;
  background: linear-gradient(135deg, #06172e 0%, #0c2744 100%);
  color: #f8fafc;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  box-shadow: 0 12px 28px rgba(43, 72, 112, 0.14);
  transition: filter 0.15s, transform 0.15s, box-shadow 0.15s;
}

.auth-submit:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(43, 72, 112, 0.18);
}

.auth-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.3);
  box-shadow: none;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 16px;
  color: #5f7393;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #d8e5f4;
}

.auth-google-mount {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.auth-google-mount iframe {
  max-width: 100%;
}

.auth-role-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-role-btn {
  height: 44px;
  border-radius: 10px;
  border: 1px solid #d9e6f4;
  background: linear-gradient(180deg, #fbfdff, #f6f9ff);
  color: #11264a;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 8px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.auth-role-btn:hover {
  border-color: #9cc7ff;
  background: #ffffff;
  color: #2f7df6;
}

.auth-role-btn svg {
  flex-shrink: 0;
  color: #2f7df6;
  opacity: 1;
}

.auth-register {
  margin: 22px 0 0;
  text-align: center;
  color: #5f7393;
  font-size: 15px;
}

body.fs-public-landing.auth-lock {
  overflow: hidden;
}

@media (max-width: 560px) {
  .auth-modal {
    padding: 16px;
  }

  .auth-modal__dialog {
    padding: 30px 22px;
  }

  .auth-role-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .site-container,
  .hero-inner,
  .features-grid,
  .stats-inner,
  .footer-inner {
    width: min(100% - 24px, 1380px);
  }

  .hero-inner {
    padding: 48px 0 72px;
  }

  .hero-title {
    font-size: clamp(1.75rem, 9vw, 2.35rem);
  }

  .footer-bottom {
    align-items: flex-start;
    gap: 12px;
  }

  .footer-bottom a {
    display: inline-block;
    margin-right: 12px;
    margin-bottom: 6px;
  }
}
