/* ==========================================================================
   Moshark Planets — main stylesheet (loaded after Bootstrap 5)
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --paper: oklch(100% 0 0);
  --ink: oklch(25.45% .0249 229.1);
  --brand: oklch(54.44% .1146 242.4);
  --lime: oklch(79.08% .1706 121.6);
  --whatsapp: oklch(72.3% .192 149.6);
  --whatsapp-hover: oklch(62% .17 149.6);

  --font-body: "Barlow", sans-serif;
  --font-display: "Bebas Neue", sans-serif;

  --muted-foreground: color-mix(in oklab, var(--ink) 70%, var(--paper));
  --border: color-mix(in oklab, var(--ink) 12%, var(--paper));
  --editorial-shadow: 0 8px 32px color-mix(in oklab, var(--ink) 8%, transparent);
  --floating-shadow: 0 6px 24px color-mix(in oklab, var(--ink) 25%, transparent);
  --hero-shade: linear-gradient(90deg, color-mix(in oklab, var(--ink) 66%, transparent), color-mix(in oklab, var(--ink) 12%, transparent));
  --hero-bottom: linear-gradient(to top, color-mix(in oklab, var(--ink) 85%, transparent), transparent);

  /* Bootstrap overrides */
  --bs-body-font-family: var(--font-body);
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--paper);
  --bs-link-color-rgb: inherit;
}

/* ---------- Base (neutralise Bootstrap reboot spacing) ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { font-family: var(--font-body); color: var(--ink); background: var(--paper); letter-spacing: 0; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: 0; font-weight: 400; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover { color: inherit; }
img, video { max-width: 100%; height: auto; display: block; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible { outline: 2px solid var(--brand); outline-offset: 5px; }

.text-brand { color: var(--brand); }
.text-lime { color: var(--lime); }

.site-wrap { max-width: 1200px; margin-inline: auto; padding-inline: 32px; }

/* ---------- Buttons ---------- */
.moshark-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  white-space: nowrap; cursor: pointer; border: 0;
  height: 36px; padding: 8px 16px;
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  border-radius: 999px;
  transition: background .2s, color .2s;
}
.moshark-button svg { width: 16px; height: 16px; flex-shrink: 0; pointer-events: none; }
.moshark-button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.moshark-button-icon { width: 36px; padding: 0; }

.moshark-button-brand { background: var(--brand); color: var(--paper); }
.moshark-button-brand:hover { background: var(--ink); color: var(--paper); }
.moshark-button-hero { background: var(--lime); height: 46px; color: var(--ink); padding: 0 23px; }
.moshark-button-hero:hover { background: var(--paper); color: var(--ink); }
.moshark-button-editorial { height: auto; color: var(--brand); background: none; border-radius: 0; justify-content: flex-start; padding: 0; }
.moshark-button-editorial:hover { color: var(--ink); }
.moshark-button-navigation { color: var(--ink); background: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in oklab, var(--paper) 94%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; height: 72px; }
.site-logo { display: flex; align-items: center; flex-shrink: 0; }
.site-logo img { width: auto; height: 46px; }
.header-nav { display: flex; gap: 32px; }
.header-nav a, .login-link { color: var(--muted-foreground); font-size: 14px; font-weight: 500; transition: color .2s; }
.header-nav a:hover, .login-link:hover { color: var(--brand); }
.header-actions { display: flex; align-items: center; gap: 20px; }
.mobile-toggle { display: none; }
.mobile-toggle .icon-close { display: none; }
.mobile-toggle[aria-expanded="true"] .icon-open { display: none; }
.mobile-toggle[aria-expanded="true"] .icon-close { display: block; }
.mobile-nav { display: none !important; }

/* ---------- Hero slider ---------- */
.editorial-hero {
  position: relative; overflow: hidden; display: grid; align-items: center;
  height: min(92svh, 850px); min-height: 650px;
  background: var(--ink); color: var(--paper);
}
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-slide-photo { opacity: 0; transform: scale(1.04); transition: opacity 1s, transform 6s linear; }
.hero-slide-photo.is-active { opacity: 1; transform: scale(1); }
.hero-shade { position: absolute; inset: 0; background: var(--hero-shade); }
.hero-bottom { position: absolute; inset: auto 0 0; height: 160px; background: var(--hero-bottom); }

.hero-content { position: relative; z-index: 1; width: 100%; padding-block: 100px 155px; }
.hero-content h1 { font-size: 136px; line-height: .9; }
.hero-content p:not(.eyebrow) { max-width: 470px; margin-top: 24px; font-size: 18px; line-height: 1.6; color: color-mix(in oklab, var(--paper) 86%, transparent); }
.hero-content .moshark-button { margin-top: 32px; }

.hero-slide-copy { animation: banner-copy-in .7s both; }
.hero-slide-copy .eyebrow { margin-top: 24px; margin-bottom: 0; }
.hero-slide-copy p:not(.eyebrow) { min-height: 87px; }

.hero-slider-controls { position: absolute; left: 0; right: 0; bottom: 112px; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.hero-slider-dots, .hero-slider-arrows { display: flex; align-items: center; gap: 8px; }
.hero-slider-dot { width: 32px; height: 40px; padding: 0; color: var(--paper); }
.hero-slider-dot span { display: block; width: 8px; height: 8px; border-radius: 50%; background: color-mix(in oklab, var(--paper) 50%, transparent); transition: width .3s, background .3s; }
.hero-slider-dot[aria-pressed="true"] span { width: 26px; border-radius: 5px; background: var(--lime); }
.hero-slider-control { width: 40px; height: 40px; padding: 0; border-radius: 50%; color: var(--paper); border: 1px solid color-mix(in oklab, var(--paper) 40%, transparent); background: color-mix(in oklab, var(--ink) 30%, transparent); }
.hero-slider-control:hover { background: var(--paper); color: var(--ink); }
.hero-slider-control .icon-play { display: none; }
.hero-slider-control.is-paused .icon-play { display: block; }
.hero-slider-control.is-paused .icon-pause { display: none; }
.hero-slide-count { margin-right: 8px; font-size: 13px; font-variant-numeric: tabular-nums; }

@keyframes banner-copy-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow { font-family: var(--font-display); font-size: 16px; margin-bottom: 14px; }

/* ---------- Service overview ---------- */
.service-overview { position: relative; z-index: 2; margin-top: -96px; }
.overview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.overview-item {
  min-width: 0; padding: 28px; border-radius: 18px;
  background: color-mix(in oklab, var(--paper) 94%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: var(--editorial-shadow); border: 1px solid var(--border);
}
.overview-item h2 { font-size: 32px; line-height: 1.05; }
.overview-item p:not(.eyebrow) { margin-top: 10px; font-size: 14px; line-height: 1.6; color: var(--muted-foreground); }
.tracking-overview { grid-area: span 2 / span 2; }
.tracking-overview h2 { max-width: 400px; font-size: 46px; }
.tracking-overview img { width: 100%; margin-top: 22px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; }
.fleet-overview { grid-column: span 2; display: flex; align-items: center; gap: 20px; }
.fleet-overview img { width: 150px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.blue-overview { background: var(--brand); color: var(--paper); }
.blue-overview p:not(.eyebrow) { color: color-mix(in oklab, var(--paper) 85%, transparent); }
.lime-overview { background: var(--lime); }
.lime-overview p:not(.eyebrow) { color: color-mix(in oklab, var(--ink) 80%, transparent); }
.photo-overview { display: flex; flex-direction: column; }
.photo-overview p:not(.eyebrow) { margin-bottom: 18px; }
.photo-overview img { width: 100%; margin-top: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; }

/* ---------- Story sections ---------- */
.story-section { padding-block: 112px; }
.story-grid { display: grid; grid-template-columns: 7fr 5fr; align-items: center; gap: 64px; }
.story-grid.reverse { grid-template-columns: 5fr 7fr; }
.story-copy h2 { max-width: 530px; font-size: 60px; line-height: 1; }
.story-copy > p:not(.eyebrow) { max-width: 490px; margin-top: 20px; line-height: 1.75; color: var(--muted-foreground); }
.story-copy .moshark-button { margin-top: 28px; }
.story-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 18px; }
.company-photo { aspect-ratio: 4 / 3; }
.dark-story { background: var(--ink); color: var(--paper); }
.dark-story .story-copy > p:not(.eyebrow) { color: color-mix(in oklab, var(--paper) 80%, transparent); }
.dark-story .moshark-button-editorial { color: var(--lime); }
.dark-story .moshark-button-editorial:hover { color: var(--paper); }
.client-list { display: flex; flex-wrap: wrap; gap: 18px 26px; margin-top: 32px; font-size: 14px; font-weight: 600; color: var(--muted-foreground); }

.feature-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding: 0; list-style: none; }
.feature-list li { padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink); }

.clients-block { margin-top: 72px; }
.client-logo { display: grid; place-items: center; height: 100%; padding: 14px; background: var(--paper); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--editorial-shadow); }
.client-logo img { width: 100%; max-width: 177px; height: auto; mix-blend-mode: multiply; }

/* ---------- Section heading ---------- */
.section-head { margin-bottom: 40px; }
.section-head h2 { font-size: 60px; line-height: 1; }

/* ---------- Solutions ---------- */
.solutions-section { padding-block: 112px 0; }
.solution-card { height: 100%; padding: 28px; border-radius: 18px; background: var(--paper); border: 1px solid var(--border); box-shadow: var(--editorial-shadow); }
.solution-card h3 { font-size: 32px; line-height: 1.05; }
.solution-card p:not(.eyebrow) { margin-top: 12px; font-size: 15px; line-height: 1.65; color: var(--muted-foreground); }
.solution-list { margin: 14px 0 0; padding: 0; list-style: none; }
.solution-list li { position: relative; padding: 8px 0 8px 22px; font-size: 15px; line-height: 1.5; border-top: 1px solid var(--border); }
.solution-list li::before { content: ""; position: absolute; left: 0; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }

/* ---------- Videos ---------- */
.videos-section { padding-block: 112px; background: var(--ink); color: var(--paper); }
.video-frame { overflow: hidden; border-radius: 18px; background: #000; border: 1px solid color-mix(in oklab, var(--paper) 15%, transparent); }
.video-frame video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.video-featured { max-width: 900px; }
.video-group-title { margin: 48px 0 16px; font-size: 32px; color: var(--lime); }

/* ---------- Contact ---------- */
.contact-section { padding-block: 88px; background: var(--brand); color: var(--paper); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; }
.contact-section h2 { font-size: 64px; line-height: 1; }
.contact-section .contact-intro { max-width: 400px; margin-top: 20px; line-height: 1.7; color: color-mix(in oklab, var(--paper) 85%, transparent); }
.contact-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-width: 0; }
.contact-option {
  min-width: 0; padding: 20px; border-radius: 14px;
  background: color-mix(in oklab, var(--paper) 10%, transparent);
  border: 1px solid color-mix(in oklab, var(--paper) 15%, transparent);
  transition: background .2s;
}
.contact-option:hover { background: color-mix(in oklab, var(--paper) 18%, transparent); color: var(--paper); }
.contact-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: color-mix(in oklab, var(--paper) 80%, transparent); }
.contact-label svg { width: 14px; height: 14px; }
.contact-value { margin-top: 8px; font-family: var(--font-display); font-size: 23px; overflow-wrap: anywhere; }
.contact-email { font-family: var(--font-body); font-size: 14px; line-height: 1.6; }

.contact-extra { margin-top: 56px; }
.contact-form { height: 100%; padding: 28px; border-radius: 18px; background: var(--paper); color: var(--ink); }
.contact-form h3 { margin-bottom: 20px; font-size: 32px; }
.contact-form .form-label { font-size: 14px; font-weight: 600; }
.contact-form .form-control { border-radius: 12px; border-color: var(--border); padding: 10px 14px; }
.contact-form .form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 20%, transparent); }
.contact-form .moshark-button-hero { margin-top: 4px; }
.contact-form .moshark-button-hero:hover { background: var(--ink); color: var(--paper); }
.form-note { margin-top: 14px; font-size: 12px; color: var(--muted-foreground); }
.map-frame { height: 100%; min-height: 360px; overflow: hidden; border-radius: 18px; border: 1px solid color-mix(in oklab, var(--paper) 15%, transparent); }
.map-frame iframe { display: block; width: 100%; height: 100%; min-height: 360px; border: 0; }

/* ---------- Login page ---------- */
.login-link.is-current { color: var(--brand); }
.page-hero { position: relative; overflow: hidden; display: grid; align-items: center; min-height: 460px; background: var(--ink); color: var(--paper); }
.page-hero-content { position: relative; z-index: 1; width: 100%; padding-block: 88px 150px; }
.page-hero h1 { font-size: 96px; line-height: .92; }
.page-hero p:not(.eyebrow) { max-width: 500px; margin-top: 20px; font-size: 18px; line-height: 1.6; color: color-mix(in oklab, var(--paper) 86%, transparent); }

.login-steps { position: relative; z-index: 2; margin-top: -88px; }
.steps-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 0; padding: 0; list-style: none; }
.steps-list li { display: flex; gap: 16px; align-items: flex-start; }
.step-num { flex-shrink: 0; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--brand); color: var(--paper); font-family: var(--font-display); font-size: 22px; }
.steps-list h3 { font-size: 28px; line-height: 1.05; }
.steps-list p { margin-top: 6px; font-size: 14px; line-height: 1.6; color: var(--muted-foreground); }

.servers-section { padding-block: 96px; }
.server-card {
  display: flex; flex-direction: column; height: 100%; padding: 28px; border-radius: 18px;
  background: var(--paper); border: 1px solid var(--border); box-shadow: var(--editorial-shadow);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.server-card:hover { transform: translateY(-4px); border-color: var(--brand); color: inherit; }
.server-badge { align-self: flex-start; padding: 4px 12px; border-radius: 999px; background: var(--lime); color: var(--ink); font-family: var(--font-display); font-size: 16px; }
.server-card h3 { margin-top: 18px; font-size: 40px; line-height: 1; }
.server-host { margin-top: 6px; font-size: 14px; color: var(--muted-foreground); overflow-wrap: anywhere; }
.server-go { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 28px; font-size: 14px; font-weight: 600; color: var(--brand); }
.server-go svg { width: 16px; height: 16px; }
.server-card-primary { background: var(--brand); color: var(--paper); border-color: var(--brand); }
.server-card-primary:hover { color: var(--paper); border-color: var(--ink); }
.server-card-primary .server-host { color: color-mix(in oklab, var(--paper) 80%, transparent); }
.server-card-primary .server-go { color: var(--lime); }
.servers-note { max-width: 620px; margin-top: 28px; font-size: 15px; line-height: 1.7; color: var(--muted-foreground); }

/* ---------- Footer ---------- */
.site-footer { padding-block: 40px; background: var(--ink); color: color-mix(in oklab, var(--paper) 70%, transparent); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.site-logo-footer { padding: 8px 14px; border-radius: 12px; background: var(--paper); }
.site-logo-footer img { height: 38px; }
.footer-nav { display: flex; gap: 22px; font-size: 13px; }
.footer-nav a:hover { color: var(--paper); }
.copyright { font-size: 12px; }

/* ---------- WhatsApp floating button ---------- */
.whatsapp-float {
  position: fixed; z-index: 50;
  right: max(24px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom));
  width: 58px; height: 58px; padding: 0; border-radius: 50%;
  background: var(--whatsapp); color: var(--paper); box-shadow: var(--floating-shadow);
  transition: transform .2s, background .2s;
}
.whatsapp-float svg { width: 30px; height: 30px; }
.whatsapp-float:hover { background: var(--whatsapp-hover); color: var(--paper); transform: translateY(-3px); }

/* ---------- Responsive ---------- */
@media (min-width: 1440px) {
  .hero-content h1 { font-size: 160px; }
}

@media (max-width: 1023px) {
  .header-nav { gap: 20px; }
  .site-wrap { padding-inline: 24px; }
  .hero-content h1 { font-size: 100px; }
  .overview-grid { grid-template-columns: 1fr 1fr; }
  .tracking-overview { grid-row: auto; }
  .fleet-overview { flex-direction: column; grid-column: auto; align-items: flex-start; }
  .fleet-overview img { width: 100%; aspect-ratio: 16 / 9; }
  .story-grid, .story-grid.reverse { gap: 36px; }
  .story-copy h2 { font-size: 48px; }
  .contact-grid { gap: 32px; }
  .contact-section h2 { font-size: 50px; }
}

@media (max-width: 767px) {
  .site-wrap { padding-inline: 20px; }
  .header-inner { gap: 12px; height: 64px; }
  .site-logo img { height: 40px; }
  .site-logo-footer img { height: 34px; }
  .header-nav, .login-link, .header-call { display: none; }
  .header-actions { gap: 8px; }
  .mobile-toggle { display: inline-flex; }
  .mobile-nav { display: block !important; }
  .mobile-nav.collapse:not(.show) { display: none !important; }
  .mobile-nav-inner { display: flex; flex-direction: column; padding: 8px 20px 24px; background: var(--paper); }
  .mobile-nav a { padding: 12px 0; font-size: 15px; border-bottom: 1px solid var(--border); }
  .mobile-nav a svg { display: inline; width: 16px; height: 16px; vertical-align: -2px; }

  .editorial-hero { height: 650px; min-height: 0; max-height: calc(100svh - 25px); }
  .hero-photo { object-position: 60% center; }
  .hero-content { padding-block: 72px 115px; }
  .hero-content h1 { max-width: 320px; font-size: 76px; }
  .hero-content .eyebrow { font-size: 14px; }
  .hero-content p:not(.eyebrow) { max-width: 330px; font-size: 16px; }
  .hero-content .moshark-button { margin-top: 24px; }
  .hero-slide-copy p:not(.eyebrow) { min-height: 103px; }
  .hero-slider-controls { bottom: 76px; }
  .hero-slider-arrows { gap: 6px; }
  .hero-slide-count { display: none; }
  .hero-slider-control { width: 36px; height: 36px; }

  .service-overview { margin-top: -64px; }
  .overview-grid { gap: 12px; }
  .overview-item { padding: 22px; }
  .overview-item h2 { font-size: 28px; }
  .overview-item p:not(.eyebrow) { font-size: 13px; }
  .tracking-overview { grid-column: span 2; }
  .tracking-overview h2 { font-size: 36px; }
  .fleet-overview { flex-direction: row; grid-column: span 2; align-items: center; }
  .fleet-overview img { width: 100px; aspect-ratio: 4 / 3; }

  .story-section { padding-block: 64px; }
  .story-grid, .story-grid.reverse { grid-template-columns: 1fr; gap: 32px; }
  .story-copy { order: 2; }
  .story-copy h2 { font-size: 44px; }
  .story-copy > p:not(.eyebrow) { font-size: 15px; }
  .story-photo { max-height: 430px; object-position: center; }
  .company-photo { max-height: none; }

  .page-hero { min-height: 0; }
  .page-hero-content { padding-block: 64px 120px; }
  .page-hero h1 { font-size: 60px; }
  .page-hero p:not(.eyebrow) { font-size: 16px; }
  .login-steps { margin-top: -72px; }
  .steps-list { grid-template-columns: 1fr; gap: 20px; }
  .steps-list h3 { font-size: 24px; }
  .servers-section { padding-block: 64px; }
  .server-card { padding: 22px; }
  .server-card h3 { font-size: 34px; }

  .section-head { margin-bottom: 28px; }
  .section-head h2 { font-size: 44px; }
  .solutions-section { padding-block: 64px 0; }
  .solution-card { padding: 22px; }
  .solution-card h3 { font-size: 28px; }
  .clients-block { margin-top: 48px; }
  .videos-section { padding-block: 64px; }
  .video-group-title { margin-top: 36px; font-size: 26px; }
  .contact-extra { margin-top: 40px; }
  .contact-form { padding: 22px; }
  .map-frame, .map-frame iframe { min-height: 300px; }

  .contact-section { padding-block: 64px; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-section h2 { font-size: 48px; }
  .contact-option { padding: 16px; }
  .contact-value { font-size: 22px; }
  .contact-email { font-size: 13px; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-nav { flex-wrap: wrap; gap: 16px; }

  .whatsapp-float { width: 54px; height: 54px; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); }
}

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