/* ============================================
   IIFS - Inter Island Freight Solutions
   Design System: Maritime Professional
   Colors: Navy #1B3A5C, Gold #E8A838, Sky #EFF6FF
   Typography: Inter
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --navy: #1B3A5C;
  --navy-dark: #122840;
  --navy-light: #2A4F73;
  --gold: #E8A838;
  --gold-hover: #D4952E;
  --gold-light: rgba(232, 168, 56, 0.15);
  --sky: #EFF6FF;
  --sky-deep: #DBEAFE;
  --white: #FFFFFF;
  --bg: #F8FAFC;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --card-shadow-hover: 0 10px 25px rgba(27, 58, 92, 0.1), 0 4px 10px rgba(27, 58, 92, 0.05);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: 200ms ease;
  --max-width: 1200px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
}

input, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* --- Focus States (Accessibility) --- */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  background-color: #f7f7f7;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-img {
  height: 48px;
  width: auto;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  z-index: 1001;
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--navy);
  background: var(--sky);
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 16px;
  transition: color var(--transition);
}

.auth-link:hover {
  color: var(--navy);
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  border: 2px solid var(--navy);
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}

.auth-btn:hover {
  background: var(--navy);
  color: var(--white);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  padding-top: 72px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* background-image set via inline style in view using asset_path */
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(239, 246, 255, 0.40) 50%,
    rgba(212, 232, 247, 0.30) 100%
  );
  z-index: 1;
}

.hero-bg-waves {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

.wave-top-left {
  position: absolute;
  top: 80px;
  left: -50px;
  width: 300px;
  opacity: 0.5;
}

.wave-top-right {
  position: absolute;
  top: 100px;
  right: -50px;
  width: 250px;
  opacity: 0.4;
  transform: scaleX(-1);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 80px 24px 60px;
  max-width: 800px;
  margin: auto;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
}

/* Hero CTA Buttons */
.hero-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.hero-cta-primary {
  display: inline-flex;
  align-items: center;
  padding: 16px 36px;
  background: var(--gold);
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: background var(--transition), transform var(--transition);
}

.hero-cta-primary:hover {
  background: var(--gold-hover);
  transform: translateY(-2px);
}

.hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  padding: 16px 36px;
  border: 2px solid var(--navy);
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}

.hero-cta-secondary:hover {
  background: var(--navy);
  color: var(--white);
}

/* Tracking Box */
.tracking-box {
  max-width: 560px;
  margin: 0 auto 28px;
}

.tracking-form {
  display: flex;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(27, 58, 92, 0.1);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.tracking-form:focus-within {
  border-color: var(--gold);
  box-shadow: 0 4px 20px rgba(232, 168, 56, 0.15);
}

.tracking-input {
  flex: 1;
  padding: 16px 20px;
  border: none;
  outline: none;
  font-size: 16px;
  color: var(--text-primary);
  background: transparent;
}

.tracking-input::placeholder {
  color: var(--text-muted);
}

.tracking-btn {
  padding: 16px 32px;
  background: var(--gold);
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  border-radius: 0 var(--radius) var(--radius) 0;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
}

.tracking-btn:hover {
  background: var(--gold-hover);
}

.tracking-btn:active {
  transform: scale(0.97);
}

/* Hero Features */
.hero-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px 32px;
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.check-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Hero Illustration (hidden when using bg image approach) */
.hero-illustration {
  display: none;
}

.hero-image {
  width: 100%;
  max-width: 1200px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* ============================================
   SECTIONS - Shared
   ============================================ */
.section-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--navy);
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}

/* ============================================
   WHY CHOOSE US
   ============================================ */
.why-choose {
  padding: 100px 0;
  background: var(--white);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.feature-card {
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 100%;
  height: 100%;
}

.feature-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   HOW IT WORKS
   ============================================ */
.how-it-works {
  padding: 100px 0;
  background: var(--sky);
}

.steps-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: 48px;
}

.step-card {
  flex: 1;
  max-width: 300px;
  padding: 36px 28px;
  background: var(--white);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.step-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}

.step-desc {
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.step-connector {
  width: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-connector svg {
  width: 100%;
}

/* ============================================
   ROUTES
   ============================================ */
.routes {
  padding: 100px 0;
  background: var(--white);
}

.routes-grid {
  max-width: 700px;
  margin: 0 auto;
}

.route-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--card-shadow);
}

.route-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 32px;
}

.route-port {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
}

.route-icon {
  width: 36px;
  height: 36px;
}

.route-arrow {
  width: 100px;
}

.route-arrow svg {
  width: 100%;
}

.route-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.route-detail {
  text-align: center;
}

.route-detail strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.route-detail span {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
}

.route-cta {
  display: block;
  text-align: center;
  padding: 14px 28px;
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background var(--transition), transform var(--transition);
}

.route-cta:hover {
  background: var(--navy-dark);
  transform: translateY(-1px);
}

/* ============================================
   STATS
   ============================================ */
.stats {
  padding: 80px 0;
  background: var(--navy);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.stat-item {
  text-align: center;
  color: var(--white);
}

.stat-number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}

.stat-suffix {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--gold);
}

.stat-label {
  display: block;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 4px;
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonials {
  padding: 100px 0;
  background: var(--sky);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 48px;
}

.testimonial-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.testimonial-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}

.testimonial-stars {
  display: flex;
  gap: 2px;
  margin-bottom: 16px;
}

.testimonial-stars svg {
  width: 18px;
  height: 18px;
}

.testimonial-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 20px;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.testimonial-author strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.testimonial-author span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ============================================
   TRACK SHIPMENT SECTION
   ============================================ */
.track-section {
  padding: 80px 0;
  background: var(--white);
}

.track-section .tracking-box {
  margin-top: 8px;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  padding: 100px 0;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(232, 168, 56, 0.08);
}

.cta-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.cta-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  color: var(--white);
  margin-bottom: 16px;
}

.cta-desc {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 550px;
  margin: 0 auto 36px;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  padding: 16px 36px;
  background: var(--gold);
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: background var(--transition), transform var(--transition);
}

.cta-primary:hover {
  background: var(--gold-hover);
  transform: translateY(-2px);
}

.cta-secondary {
  display: inline-flex;
  align-items: center;
  padding: 16px 36px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), background var(--transition);
}

.cta-secondary:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 64px 0 32px;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.7);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-logo {
  height: 60px;
  margin-bottom: 16px;
  background: var(--white);
  border-radius: 8px;
  padding: 8px 14px;
  object-fit: contain;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-links h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.85rem;
}

/* ============================================
   ANIMATIONS (Scroll Reveal)
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
  .hero {
    min-height: 80vh;
  }

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

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

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

  .route-details {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .step-connector {
    display: none;
  }

  .steps-grid {
    flex-direction: column;
    gap: 24px;
  }

  .step-card {
    max-width: 100%;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    padding: 88px 24px 24px;
    gap: 4px;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 999;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-link {
    font-size: 16px;
    padding: 12px 16px;
    width: 100%;
  }

  .nav-auth {
    position: fixed;
    bottom: 0;
    right: -100%;
    width: 280px;
    padding: 16px 24px;
    background: var(--white);
    border-top: 1px solid var(--border);
    transition: right 0.3s ease;
    z-index: 999;
    gap: 12px;
  }

  .nav-links.open ~ .nav-auth {
    right: 0;
  }

  /* Overlay */
  .nav-links.open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 280px;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
  }

  .hero {
    min-height: auto;
    background-position: center bottom;
  }

  .hero::before {
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.92) 0%,
      rgba(239, 246, 255, 0.90) 50%,
      rgba(212, 232, 247, 0.85) 100%
    );
  }

  .hero-content {
    padding: 40px 20px 40px;
  }

  .tracking-form {
    flex-direction: column;
  }

  .tracking-btn {
    border-radius: 0 0 var(--radius) var(--radius);
  }

  .features-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .route-header {
    flex-direction: column;
    gap: 16px;
  }

  .route-arrow {
    transform: rotate(90deg);
    width: 60px;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-cta-primary,
  .hero-cta-secondary {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cta-primary,
  .cta-secondary {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
}

/* Small mobile */
@media (max-width: 375px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .hero-features {
    flex-direction: column;
    align-items: center;
  }

  .route-card {
    padding: 24px;
  }
}
