/* ==========================================================================
   Cargo-GO — landing site
   Single stylesheet. No build step, no framework, no JavaScript.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand */
  --navy: #0b1c2c;
  --navy-soft: #13293d;
  --sky: #1489dc;
  --sky-bright: #43c6f5;
  --turquoise: #1bc7c9;
  --green: #17864b;
  --coral: #e2543f;

  /* Surfaces */
  --page: #eef6fc;
  --page-warm: #f7f4ec;
  --surface: #ffffff;
  --surface-muted: #f2f8fd;
  --stroke: #d6e4ef;
  --stroke-strong: #b9d2e4;

  /* Text — checked for AA contrast on --surface and --page */
  --text: #10263a;
  --text-muted: #4a6b85;
  --text-on-dark: #f4f9fd;

  /* Shape */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(16, 38, 58, 0.06), 0 2px 8px rgba(16, 38, 58, 0.05);
  --shadow-md: 0 4px 12px rgba(16, 38, 58, 0.07), 0 12px 28px rgba(16, 38, 58, 0.08);
  --shadow-lg: 0 18px 50px rgba(11, 28, 44, 0.18), 0 6px 16px rgba(11, 28, 44, 0.1);

  /* Rhythm */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --content-max: 1180px;
  --prose-max: 68ch;
}

/* --------------------------------------------------------------------------
   2. Reset / base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--page);
  /* Gentle background glows — decorative only. */
  background-image:
    radial-gradient(38rem 26rem at 88% -8%, rgba(67, 198, 245, 0.28), transparent 62%),
    radial-gradient(32rem 24rem at -6% 4%, rgba(247, 244, 236, 0.95), transparent 60%),
    radial-gradient(34rem 30rem at 14% 108%, rgba(27, 199, 201, 0.16), transparent 64%);
  background-attachment: fixed;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--sky);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--navy);
}

/* Visible, consistent keyboard focus everywhere. */
:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Skip link — first tab stop. */
.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%);
  z-index: 100;
  padding: 0.7rem 1.15rem;
  background: var(--navy);
  color: var(--text-on-dark);
  font-weight: 600;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  text-decoration: none;
}

.skip-link:focus-visible {
  transform: translate(-50%, 0);
}

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

/* --------------------------------------------------------------------------
   3. Brand lockup
   -------------------------------------------------------------------------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text);
}

.brand__mark {
  width: clamp(40px, 3.4vw, 50px);
  height: auto;
  border-radius: 24%;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(16, 38, 58, 0.06);
}

.brand__name {
  font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.4rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--navy);
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px; /* comfortable touch target */
  padding: 0.72rem 1.4rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease,
    border-color 0.18s ease, color 0.18s ease;
}

.btn--primary {
  background-image: linear-gradient(135deg, var(--sky-bright), var(--sky));
  color: #fff;
  box-shadow: 0 8px 20px rgba(20, 137, 220, 0.32);
}

.btn--primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(20, 137, 220, 0.38);
}

.btn--secondary {
  background: var(--surface);
  color: var(--navy);
  border-color: var(--stroke-strong);
  box-shadow: var(--shadow-sm);
}

.btn--secondary:hover {
  color: var(--navy);
  transform: translateY(-1px);
  border-color: var(--sky);
}

.btn:active {
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   5. Layout shell
   -------------------------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --------------------------------------------------------------------------
   6. Homepage hero
   -------------------------------------------------------------------------- */
.hero {
  flex: 1;
  display: flex;
  align-items: center;
  padding-block: clamp(1.25rem, 2.6vh, 2.25rem);
  position: relative;
  /* Clips the decorative route arc, which is intentionally drawn past the edge. */
  overflow: hidden;
}

/* Decorative dashed route arc behind the hero. */
.hero__route {
  position: absolute;
  inset-block-start: 8%;
  inset-inline-end: -6%;
  width: min(760px, 74vw);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  width: 100%;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(0.72rem, 1.15vh, 1.05rem);
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(20, 137, 220, 0.1);
  color: #0f6ca9;
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--turquoise);
  box-shadow: 0 0 0 3px rgba(27, 199, 201, 0.22);
}

.hero__title {
  font-size: clamp(1.9rem, 1.3rem + 2.1vw, 2.9rem);
  font-weight: 800;
  color: var(--navy);
  max-width: 17ch;
}

.hero__lede {
  font-size: clamp(1rem, 0.97rem + 0.22vw, 1.125rem);
  color: var(--text-muted);
  max-width: 52ch;
}

/* --- Feature highlights --- */
.features {
  display: grid;
  gap: 0.5rem;
  width: 100%;
}

.feature {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.75rem;
  padding: 0.66rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.feature__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 11px;
  background: linear-gradient(140deg, rgba(67, 198, 245, 0.2), rgba(27, 199, 201, 0.18));
  color: #0f6ca9;
  flex-shrink: 0;
}

.feature__icon svg {
  width: 17px;
  height: 17px;
}

.feature__title {
  display: block; /* keep the label off the description line */
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}

.feature__text {
  display: block;
  font-size: 0.8375rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* --- Calls to action --- */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  width: 100%;
}

/* --- Download block --- */
.download {
  width: 100%;
}

.download__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}

.download__text {
  margin-top: 0.2rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.7rem;
}

.badge-link {
  display: inline-block;
  border-radius: var(--radius-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.badge-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Preserve each badge's own proportions — height fixed, width follows. */
.badge-link img {
  height: clamp(42px, 3.5vw, 48px);
  width: auto;
}

/* --------------------------------------------------------------------------
   7. Phone mockup (pure CSS frame, brand-neutral)
   -------------------------------------------------------------------------- */
.preview {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.phone {
  /* Sized against both axes so the hero stays inside one desktop viewport. */
  width: clamp(208px, min(27vw, 33vh), 302px);
  padding: 9px;
  border-radius: 44px;
  position: relative;
  /* Dark metallic bezel */
  background:
    linear-gradient(160deg, #4c5966 0%, #222c37 22%, #161e27 52%, #2b3641 78%, #55636f 100%);
  box-shadow:
    var(--shadow-lg),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    inset 0 0 0 3px rgba(0, 0, 0, 0.55);
}

.phone__screen {
  position: relative;
  aspect-ratio: 1206 / 2622; /* exact intrinsic ratio of home.png */
  border-radius: 36px;
  overflow: hidden;
  background: var(--page-warm);
}

.phone__screen img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* never distort or crop the interface */
  display: block;
}

/* Subtle sensor / camera area. */
.phone__sensor {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 20px;
  border-radius: 999px;
  background: #0d1218;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  z-index: 2;
  pointer-events: none;
}

.phone__sensor::after {
  content: "";
  position: absolute;
  right: 16%;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 32%, #35506b, #0a0f14 68%);
}

/* Restrained diagonal highlight across the glass. */
.phone__glare {
  position: absolute;
  inset: 0;
  border-radius: 36px;
  background: linear-gradient(
    118deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0.06) 22%,
    rgba(255, 255, 255, 0) 46%
  );
  z-index: 3;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .phone {
    animation: phone-float 7s ease-in-out infinite;
  }

  @keyframes phone-float {
    0%,
    100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-9px);
    }
  }
}

/* --------------------------------------------------------------------------
   8. Legal / support pages
   -------------------------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
}

.site-header__back {
  font-size: 0.9375rem;
  font-weight: 650;
  text-decoration: none;
  color: var(--sky);
  padding: 0.5rem 0.25rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.doc {
  flex: 1;
  padding-block: clamp(2rem, 5vw, 3.5rem);
}

.doc__inner {
  max-width: var(--prose-max);
  margin-inline: auto;
}

.doc h1 {
  font-size: clamp(1.85rem, 1.5rem + 1.6vw, 2.6rem);
  font-weight: 800;
  color: var(--navy);
}

.doc__meta {
  margin-top: 0.6rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.doc h2 {
  margin-top: 2.15rem;
  font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem);
  font-weight: 750;
  color: var(--navy);
}

.doc h3 {
  margin-top: 1.5rem;
  font-size: 1.03rem;
  font-weight: 700;
  color: var(--navy);
}

.doc p,
.doc li {
  margin-top: 0.7rem;
  color: #2c4256;
}

.doc ul {
  list-style: disc;
  padding-left: 1.35rem;
  margin-top: 0.4rem;
}

.doc li {
  margin-top: 0.35rem;
}

.doc a {
  font-weight: 600;
}

/* Support page pieces */
.topics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.7rem;
  margin-top: 1.1rem;
}

.topic {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 0.95rem;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--navy);
}

.topic::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--turquoise);
}

.contact-card {
  margin-top: 1.75rem;
  padding: clamp(1.25rem, 3vw, 1.85rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, #ffffff, var(--surface-muted));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.contact-card h2 {
  margin-top: 0;
}

.contact-card .btn {
  margin-top: 1.1rem;
}

.contact-card__email {
  margin-top: 0.85rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   9. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.6);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.25rem;
  padding-block: 0.8rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.1rem;
}

.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  font-weight: 600;
  color: var(--text-muted);
}

.site-footer__links a:hover {
  color: var(--sky);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   10. Responsive
   -------------------------------------------------------------------------- */

/* Tablet — keep two columns but tighten. */
@media (max-width: 960px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: clamp(1.5rem, 3.5vw, 2.5rem);
  }

  .hero__route {
    opacity: 0.32;
  }
}

/* Mobile — stack, centre, and allow the page to scroll normally. */
@media (max-width: 760px) {
  body {
    background-attachment: scroll;
  }

  .hero {
    padding-block: 2rem 2.5rem;
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.25rem;
  }

  .hero__copy {
    align-items: center;
    text-align: center;
  }

  .hero__title,
  .hero__lede {
    max-width: 100%;
  }

  .feature {
    text-align: left;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-row .btn {
    width: 100%;
  }

  .badges {
    justify-content: center;
  }

  /* Order: copy, then preview, then the download block stays with the copy. */
  .preview {
    order: 2;
  }

  .phone {
    width: min(255px, 68vw);
  }

  .hero__route {
    display: none;
  }

  .site-footer__inner {
    justify-content: center;
    text-align: center;
  }

  .site-footer__links {
    justify-content: center;
  }
}

@media (max-width: 380px) {
  .badge-link img {
    height: 42px;
  }
}

/* --------------------------------------------------------------------------
   11. Motion & contrast preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (forced-colors: active) {
  .btn,
  .feature,
  .topic,
  .phone {
    border: 1px solid CanvasText;
  }
}

/* Print — legal pages are the likely target. */
@media print {
  body {
    background: #fff;
  }

  .site-header,
  .site-footer,
  .hero__route {
    display: none;
  }
}
