/* ============================================================
   Seaflux Logistics — styles.css
   Organized as: 1) Design tokens (variables)  2) Reset/base
   3) Layout helpers  4) Buttons  5) Header/nav  6) Hero
   7) Placeholders  8) Footer  9) Responsive (media queries)
   Colors and type come from brand_assets/BRAND_GUIDELINES.md.
   ============================================================ */

/* ---------- 1. DESIGN TOKENS ----------
   CSS custom properties = reusable variables. Change a value here
   and it updates everywhere it's used. */
:root {
  /* Brand colors (sampled from the deck) */
  --color-navy:     #012069;  /* main text + dark sections */
  --color-brand:    #004890;  /* logo blue / primary */
  --color-azure:    #0078BE;  /* bright headings + links */
  --color-sky:      #489CD8;  /* accents / gradients */
  --color-sky-soft: #A0C8E6;  /* light gradient wash */
  --color-mist:     #EAF3FB;  /* faint section tint */
  --color-white:    #FFFFFF;
  --color-ink-60:   #4A5A7A;  /* muted body text */

  /* Gradients */
  --grad-sky:   linear-gradient(120deg, #489CD8 0%, #A0C8E6 45%, #FFFFFF 100%);
  --grad-brand: linear-gradient(135deg, #0078BE 0%, #004890 100%);
  /* Brighter gradient used specifically for buttons (kept lighter than --grad-brand) */
  --grad-btn:   linear-gradient(135deg, #36ADE6 0%, #0E8FD4 100%);

  /* Typography */
  --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing + sizing */
  --header-h: 76px;          /* height of the fixed header */
  --container: 1200px;       /* max content width */
  --radius: 12px;
  --shadow: 0 10px 30px rgba(1, 32, 105, 0.12);
  --transition: 0.3s ease;
}

/* ---------- 2. RESET / BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }          /* native smooth scrolling for anchors */

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;                     /* 17px base body */
  line-height: 1.65;
  color: var(--color-ink-60);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3 {
  margin: 0;
  color: var(--color-navy);
  line-height: 1.2;
  font-weight: 600;
}

/* Honor users who prefer reduced motion: turn off smooth scroll + animations */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- 3. LAYOUT HELPERS ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- 4. BUTTONS ---------- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;             /* pill shape */
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}

/* Solid gradient button (main call-to-action) */
.btn--primary {
  background: var(--grad-btn);
  color: var(--color-white);
  box-shadow: 0 8px 20px rgba(14, 143, 212, 0.32);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(14, 143, 212, 0.45); }

/* Outlined "ghost" button (secondary action) */
.btn--ghost {
  background: rgba(255, 255, 255, 0.6);
  color: var(--color-brand);
  border-color: var(--color-brand);
}
.btn--ghost:hover { background: var(--color-brand); color: var(--color-white); transform: translateY(-2px); }

/* Smaller button used inside the nav bar */
.btn--nav {
  background: var(--grad-btn);
  color: var(--color-white);
  padding: 10px 22px;
  font-size: 0.9rem;
}
.btn--nav:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(14, 143, 212, 0.4); }

/* ---------- 5. HEADER / NAVIGATION ---------- */
.site-header {
  position: fixed;            /* stays at the top while scrolling */
  inset: 0 0 auto 0;          /* top:0; left:0; right:0 */
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
  padding: 14px 0;
}

/* JS adds .scrolled once the user scrolls past the hero top */
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 16px rgba(1, 32, 105, 0.08);
  padding: 8px 0;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo-img {
  height: 48px;
  width: auto;
  display: block;
  transition: height var(--transition);
}
.site-header.scrolled .header__logo-img { height: 40px; }

/* Logo swap: white over the hero (top), colour once scrolled.
   Only one is ever displayed, so screen readers announce it once. */
.header__logo-img--color { display: none; }                       /* hidden at the top */
.site-header.scrolled .header__logo-img--white { display: none; } /* hide white when scrolled */
.site-header.scrolled .header__logo-img--color { display: block; }/* show colour when scrolled */

/* Desktop nav: a horizontal list */
.primary-nav__list {
  display: flex;
  align-items: center;
  gap: 28px;
}
.primary-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-navy);
  transition: color var(--transition);
}
.primary-nav a:not(.btn):hover { color: var(--color-azure); }

/* The hamburger button is hidden on desktop (shown in the mobile media query) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1100;
}
.nav-toggle__bar {
  display: block;
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: var(--color-navy);
  transition: transform var(--transition), opacity var(--transition);
}

/* ---------- 6. HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Background photo fills the whole hero */
.hero__bg, .hero__bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__bg img { object-fit: cover; }

/* Gradient overlay: brightens the right side so the navy text reads clearly.
   The deck fades sky-blue (left) to white (right) — we mirror that. */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(72,156,216,0.10) 0%, rgba(255,255,255,0.20) 45%, rgba(255,255,255,0.85) 100%);
}

.hero__inner {
  position: relative;       /* sits above the overlay */
  z-index: 2;
  display: flex;
  justify-content: flex-end; /* text on the right, like the deck */
  width: 100%;
}

.hero__content {
  max-width: 600px;
  text-align: left;
  padding: 120px 0;
}

.hero__title {
  font-size: 3.5rem;
  font-weight: 600;
  color: var(--color-navy);
  letter-spacing: -0.01em;
}

.hero__tagline {
  margin: 18px 0 0;
  font-style: italic;
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--color-azure);
}

.hero__actions {
  margin-top: 36px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Scroll-down chevron, centered at the bottom of the hero */
.hero__scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 34px;
  height: 34px;
}
.hero__chevron {
  display: block;
  width: 16px;
  height: 16px;
  margin: 0 auto;
  border-right: 3px solid var(--color-brand);
  border-bottom: 3px solid var(--color-brand);
  transform: rotate(45deg);
  animation: bounce 1.8s infinite;
}
@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 1; }
  50%      { transform: rotate(45deg) translate(6px, 6px); opacity: 0.5; }
}

/* ---------- 7. PLACEHOLDER SECTIONS (temporary) ---------- */
.section { padding: 96px 0; }
.section--placeholder { border-top: 1px solid var(--color-mist); }
.placeholder-note {
  text-align: center;
  color: var(--color-sky);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin: 0;
}

/* ---------- 8. FOOTER ---------- */
.site-footer {
  background: var(--color-navy);
  color: rgba(255, 255, 255, 0.85);
  padding: 56px 0 36px;
  text-align: center;
}
.site-footer__logo { height: 60px; width: auto; margin: 0 auto 24px; }
.site-footer__tagline {
  font-size: 1.25rem;
  color: var(--color-white);
  margin: 0 0 24px;
  line-height: 1.5;
}
.site-footer__tagline em { color: var(--color-sky-soft); font-size: 1rem; }
.site-footer__copy { font-size: 0.85rem; color: rgba(255, 255, 255, 0.55); margin: 0; }

/* ============================================================
   9. RESPONSIVE — breakpoints at 1024px and 768px
   ============================================================ */

/* Tablet and below */
@media (max-width: 1024px) {
  .hero__title { font-size: 2.75rem; }
  .primary-nav__list { gap: 18px; }
  .primary-nav a:not(.btn) { font-size: 0.9rem; }
}

/* Mobile: switch to the hamburger overlay menu */
@media (max-width: 768px) {
  :root { --header-h: 64px; }

  .nav-toggle { display: flex; }   /* show hamburger */

  /* The nav becomes a full-height panel sliding in from the right.
     It's hidden off-screen until JS adds .open to the header. */
  .primary-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(80vw, 320px);
    background: var(--color-white);
    box-shadow: -8px 0 30px rgba(1, 32, 105, 0.15);
    transform: translateX(100%);
    transition: transform var(--transition);
    padding: calc(var(--header-h) + 24px) 32px 32px;
    display: flex;
  }
  .site-header.open .primary-nav { transform: translateX(0); }

  /* IMPORTANT: backdrop-filter on the scrolled header creates a containing
     block that breaks the fixed full-height menu panel (it collapses into the
     short header → "no background"). Remove the blur while the menu is open so
     the panel is sized to the viewport again. */
  .site-header.scrolled.open { backdrop-filter: none; -webkit-backdrop-filter: none; }

  .primary-nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    width: 100%;
  }
  .primary-nav a:not(.btn) { font-size: 1.05rem; }
  .btn--nav { width: 100%; text-align: center; }

  /* Turn the hamburger into an "X" when the menu is open */
  .site-header.open .nav-toggle__bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .site-header.open .nav-toggle__bar:nth-child(2) { opacity: 0; }
  .site-header.open .nav-toggle__bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  /* Hero text centers and shrinks on phones */
  .hero__inner { justify-content: center; }
  .hero__content { text-align: center; padding: 110px 0 90px; }
  .hero__title { font-size: 2.25rem; }
  .hero__tagline { font-size: 1.1rem; }
  .hero__actions { justify-content: center; }
  .hero__overlay {
    background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.8) 100%);
  }
}

/* ============================================================
   10. SHARED CONTENT COMPONENTS
   (eyebrow labels, headings, bullet lists, scroll-reveal)
   ============================================================ */

/* Small uppercase label that sits above each section heading */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-azure);
  margin: 0 0 14px;
}
.eyebrow--light { color: var(--color-sky-soft); }   /* used on the dark section */

/* Centered heading block (used by the Services section) */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head h2 { font-size: 2.25rem; }

/* Bullet lists. Two flavours:
   .list--dot  = small dot marker (used for "problem" points)
   .list--check = check-in-a-circle marker (used for features/benefits) */
.list { margin: 24px 0 0; display: grid; gap: 14px; }
.list li { position: relative; padding-left: 34px; color: var(--color-ink-60); }

.list--dot li::before {
  content: "";
  position: absolute; left: 6px; top: 11px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--color-sky);
}
.list--check li::before {
  content: "✓";
  position: absolute; left: 0; top: 2px;
  width: 22px; height: 22px; line-height: 22px; text-align: center;
  font-size: 0.72rem; font-weight: 700; color: #fff;
  background: var(--grad-brand); border-radius: 50%;
}
.list--light li { color: rgba(255, 255, 255, 0.88); }  /* lists on dark backgrounds */

/* Scroll-reveal: elements start slightly down + transparent, then JS adds
   .is-visible when they enter the viewport (see main.js). */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* Highlight the nav link for the section you're currently viewing */
.primary-nav a.active:not(.btn) { color: var(--color-azure); }

/* ============================================================
   11. INTRODUCTION
   ============================================================ */
.intro__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.intro__lead { font-size: 1.6rem; font-weight: 600; color: var(--color-navy); line-height: 1.3; }
.intro__solution { margin-top: 28px; font-weight: 600; color: var(--color-navy); font-size: 1.1rem; }

/* Decorative gradient "blob" holding the faded flux chevron */
.intro__mark {
  aspect-ratio: 1 / 1;
  max-width: 380px;
  width: 100%;
  margin: 0 auto;
  border-radius: 38% 62% 58% 42% / 42% 42% 58% 58%;
  background: var(--grad-sky);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}
.flux-mark { width: 52%; }
.flux-mark path { fill: rgba(255, 255, 255, 0.9); }

/* ============================================================
   12. SPLIT SECTIONS (text panel + full-bleed photo, "flux edge")
   ============================================================ */
.split { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }

.split__text { display: flex; align-items: center; background: var(--color-white); }
.split__text-inner { max-width: 600px; padding: 88px 56px; margin-left: auto; }
.split--reverse .split__text-inner { margin-right: auto; margin-left: 0; }
.split__intro { margin-top: 16px; }
/* Closing summary paragraph under a section's bullet list */
.split__note { margin-top: 22px; color: var(--color-ink-60); }
.split--dark .split__note { color: rgba(255, 255, 255, 0.82); }

.split__media { position: relative; min-height: 520px; overflow: hidden; }
.split__media picture { position: absolute; inset: 0; display: block; }
.split__media img { width: 100%; height: 100%; object-fit: cover; }

/* The angled "flux edge": clip the photo so its inner edge is diagonal,
   revealing the white panel behind it (mirrors the presentation). */
.split__media--right { clip-path: polygon(7% 0, 100% 0, 100% 100%, 0 100%); }
.split__media--left  { clip-path: polygon(0 0, 100% 0, 93% 100%, 0 100%); }

/* Dark variant (Technology) */
.split--dark .split__text { background: var(--color-navy); }
.split--dark h2 { color: #fff; }
.split--dark .split__intro { color: rgba(255, 255, 255, 0.82); }

/* ============================================================
   13. SERVICE CARDS
   ============================================================ */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: #fff;
  border: 1px solid #e3ecf6;
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex; flex-direction: column; gap: 16px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card__icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--color-mist);
  display: flex; align-items: center; justify-content: center;
}
.card__icon svg {
  width: 28px; height: 28px;
  fill: none; stroke: var(--color-azure);
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.card h3 { font-size: 1.15rem; }

.services__note {
  max-width: 760px; margin: 48px auto 0; text-align: center;
  font-size: 1.1rem; color: var(--color-navy); font-weight: 500;
}

/* ============================================================
   14. CHIPS (Drone section highlights)
   ============================================================ */
.chips { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.chip {
  background: var(--color-mist); color: var(--color-brand);
  font-weight: 600; font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 8px 18px; border-radius: 999px;
}

/* ============================================================
   15. CTA BAND + CONTACT FORM
   ============================================================ */
.cta { background: var(--grad-sky); text-align: center; padding: 84px 0; }
.cta__title { font-size: 2.4rem; color: var(--color-navy); }
.cta__sub { font-size: 1.3rem; color: var(--color-brand); margin: 14px 0 0; }
.cta__sub em { font-style: italic; }
.cta__evolve { margin: 14px 0 0; font-style: italic; font-weight: 600; font-size: 1.15rem; color: var(--color-azure); }

.contact__grid {
  display: grid; grid-template-columns: 1.3fr 0.7fr;
  gap: 56px; padding: 80px 24px; align-items: start;
}
.form__intro { margin: 0 0 26px; color: var(--color-ink-60); }

.field { margin-bottom: 20px; display: flex; flex-direction: column; }
.field label { font-weight: 600; color: var(--color-navy); margin-bottom: 8px; font-size: 0.95rem; }
.req { color: var(--color-azure); }
.field input, .field textarea {
  font-family: inherit; font-size: 1rem;
  padding: 12px 14px; border: 1.5px solid #d6e2f0; border-radius: 10px;
  background: #fff; color: var(--color-navy);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--color-azure);
  box-shadow: 0 0 0 3px rgba(0, 120, 190, 0.15);
}
/* Red state when a required field fails validation */
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #d64545; }
.field__error { color: #d64545; font-size: 0.82rem; margin-top: 6px; min-height: 1em; }

.form__success {
  margin-top: 18px; color: #1a7f4b; font-weight: 600;
  background: #e6f6ee; padding: 12px 16px; border-radius: 10px;
}
/* Error banner shown if the message fails to send */
.form__error-msg {
  margin-top: 18px; color: #b3261e; font-weight: 600;
  background: #fdecea; padding: 12px 16px; border-radius: 10px;
}
/* Honeypot anti-spam field — hidden off-screen and not focusable */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

.contact__details { background: var(--color-mist); border-radius: var(--radius); padding: 32px; }
.contact__details h3 { margin-bottom: 20px; }
.contact__list { display: grid; gap: 18px; }
.contact__list li { display: flex; flex-direction: column; gap: 2px; }
.contact__label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-sky); font-weight: 600; }
.contact__list a { color: var(--color-brand); font-weight: 500; }
.contact__list a:hover { color: var(--color-azure); }

/* ============================================================
   16. RESPONSIVE for the new sections
   ============================================================ */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .split__text-inner { padding: 72px 40px; }
  .section-head h2, .cta__title { font-size: 2rem; }
}

@media (max-width: 768px) {
  /* Stack split sections; photo always on top, edge straightens out */
  .split { grid-template-columns: 1fr; }
  .split__media { order: -1; min-height: 300px; }
  .split__media--right, .split__media--left { clip-path: none; }
  .split__text-inner { padding: 48px 24px; margin: 0 auto; max-width: none; }

  /* Introduction stacks, decorative blob moves below the text and shrinks */
  .intro__grid { grid-template-columns: 1fr; gap: 36px; }
  .intro__mark { max-width: 260px; }
  .intro__lead { font-size: 1.4rem; }

  .cards { grid-template-columns: 1fr; }

  .cta { padding: 60px 0; }
  .cta__title { font-size: 1.7rem; }
  .cta__sub { font-size: 1.1rem; }

  .contact__grid { grid-template-columns: 1fr; gap: 36px; padding: 56px 0; }
}
