/* ============================================
   Canton Maritime - Styles
   Derived from Canton Advisors V2 Light Theme
   ============================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --navy: #0a1628;
  --navy-light: #121f36;
  --navy-mid: #1a2a45;
  --red: #c5303c;
  --red-dark: #a82832;
  --red-light: #e04450;
  --white: #ffffff;
  --gray-50: #f8f9fb;
  --gray-100: #f0f2f5;
  --gray-200: #e1e5eb;
  --gray-300: #c8cdd6;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.1);
  --shadow-xl: 0 20px 50px rgba(0,0,0,.12);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --transition: 0.3s cubic-bezier(.4,0,.2,1);
  --transition-slow: 0.5s cubic-bezier(.4,0,.2,1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--gray-700);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
}

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--gray-500);
  max-width: 640px;
  line-height: 1.7;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  outline: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(197,48,60,.35);
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--gray-300);
}

.btn-secondary:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(197,48,60,.04);
  transform: translateY(-2px);
}

.btn-icon {
  width: 20px;
  height: 20px;
  transition: transform var(--transition);
}

.btn:hover .btn-icon {
  transform: translateX(3px);
}

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all var(--transition);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
}

.navbar.scrolled {
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(16px);
  padding: 12px 0;
  box-shadow: 0 1px 20px rgba(0,0,0,.08);
}

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

.nav-brand {
  display: inline-flex;
  align-items: center;
}

.nav-logo {
  height: 44px;
  width: auto;
  transition: filter var(--transition);
}

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

.nav-link {
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-600);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-link:hover {
  color: var(--navy);
  background: var(--gray-50);
}

.nav-cta {
  margin-left: 12px;
  padding: 10px 24px;
  font-size: 0.875rem;
  background: var(--red);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: all var(--transition);
}

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

/* Hero navbar variant */
.navbar--hero {
  background: transparent;
  backdrop-filter: none;
}

.navbar--hero .nav-link {
  color: rgba(255,255,255,.85);
}

.navbar--hero .nav-link:hover {
  color: var(--white);
  background: rgba(255,255,255,.1);
}

.navbar--hero .nav-toggle span {
  background: var(--white);
}

/* The supplied logo is red + white text — keep as-is on dark hero.
   When scrolled, invert the white text so it reads on a white bar. */
.navbar--hero.scrolled {
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(16px);
}

.navbar--hero.scrolled .nav-logo {
  /* Swap white text portions to dark so the logo reads on white */
  filter: invert(1) hue-rotate(180deg) brightness(.95);
}

.navbar--hero.scrolled .nav-link {
  color: var(--gray-600);
}

.navbar--hero.scrolled .nav-link:hover {
  color: var(--navy);
  background: var(--gray-50);
}

.navbar--hero.scrolled .nav-toggle span {
  background: var(--navy);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--navy);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  background-image: url('https://publicprimary.s3.us-east-1.amazonaws.com/CantonAdvisors/CantonMaritime/brendan-beale-3LW-MzohI2o-unsplash.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.hero-bg-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(10, 22, 40, .90) 0%,
    rgba(10, 22, 40, .78) 40%,
    rgba(10, 22, 40, .55) 70%,
    rgba(10, 22, 40, .42) 100%
  );
}

.hero-bg-image::after {
  content: '';
  position: absolute;
  top: -20%;
  right: 10%;
  width: 50%;
  height: 80%;
  background: radial-gradient(ellipse at center, rgba(197,48,60,.12) 0%, transparent 65%);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: .4;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 720px;
  padding: 140px 0 100px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(197,48,60,.15);
  border: 1px solid rgba(197,48,60,.35);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--red-light);
  margin-bottom: 28px;
}

.hero-eyebrow-dot {
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

.hero h1 {
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  color: var(--white);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--red-light), var(--red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.1875rem;
  color: rgba(255,255,255,.88);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero .btn-secondary {
  color: var(--white);
  border-color: rgba(255,255,255,.45);
}

.hero .btn-secondary:hover {
  border-color: var(--white);
  color: var(--white);
  background: rgba(255,255,255,.1);
}

.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 72px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,.12);
}

.hero-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
}

.hero-stat-label {
  font-size: 0.8125rem;
  color: rgba(255,255,255,.7);
  margin-top: 4px;
  font-weight: 500;
}

/* ---------- About ---------- */
.about {
  padding: 120px 0;
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.about-content p {
  color: var(--gray-500);
  line-height: 1.8;
  margin-bottom: 20px;
  font-size: 1.0625rem;
}

.about-content p:last-child {
  margin-bottom: 0;
}

.about-values-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.about-value {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.about-value-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(197,48,60,.08);
  flex-shrink: 0;
}

.about-value-icon svg {
  width: 22px;
  height: 22px;
  color: var(--red);
}

.about-value h4 {
  font-size: 1.0625rem;
  color: var(--navy);
  margin-bottom: 6px;
}

.about-value p {
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.6;
}

/* ---------- Pillars ---------- */
.pillars {
  padding: 120px 0;
  background: var(--gray-50);
}

.pillars-header {
  text-align: center;
  margin-bottom: 64px;
}

.pillars-header .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.pillars-grid--three {
  grid-template-columns: repeat(3, 1fr);
}

.pillar-card {
  position: relative;
  padding: 44px 36px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-slow);
  background: var(--white);
  border: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
}

.pillar-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  transition: opacity var(--transition-slow);
  pointer-events: none;
  background: radial-gradient(circle at 80% 20%, rgba(197,48,60,.04) 0%, transparent 60%);
}

.pillar-card--realestate::before {
  background: radial-gradient(circle at 20% 80%, rgba(197,48,60,.04) 0%, transparent 60%);
}

.pillar-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.pillar-card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  background: rgba(197,48,60,.08);
  border: 1px solid rgba(197,48,60,.12);
}

.pillar-card-icon svg {
  width: 28px;
  height: 28px;
  color: var(--red);
}

.pillar-card h3 {
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 14px;
}

.pillar-card p {
  color: var(--gray-500);
  font-size: 0.9875rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.pillar-card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.pillar-tag {
  padding: 5px 14px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 100px;
  font-size: 0.8125rem;
  color: var(--gray-600);
  font-weight: 500;
}

/* ---------- Why / Operations Section ---------- */
.why-section {
  padding: 120px 0;
  background: var(--white);
  position: relative;
  overflow: hidden;
}

.why-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(ellipse at 80% 50%, rgba(197,48,60,.03) 0%, transparent 60%);
  pointer-events: none;
}

.why-header {
  text-align: center;
  margin-bottom: 64px;
  position: relative;
}

.why-header .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  position: relative;
}

.why-card {
  padding: 40px 32px;
  border-radius: var(--radius-md);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
}

.why-card:hover {
  background: var(--white);
  border-color: rgba(197,48,60,.2);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.why-card-number {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.why-card h4 {
  font-size: 1.1875rem;
  color: var(--navy);
  margin-bottom: 12px;
}

.why-card p {
  font-size: 0.9375rem;
  color: var(--gray-500);
  line-height: 1.7;
}

/* ---------- CTA / Contact ---------- */
.cta-section {
  padding: 100px 0;
  background: var(--gray-50);
  text-align: center;
}

.cta-inner {
  max-width: 640px;
  margin: 0 auto;
}

.cta-inner h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.cta-inner p {
  font-size: 1.0625rem;
  color: var(--gray-500);
  margin-bottom: 36px;
  line-height: 1.7;
}

.contact-form {
  max-width: 560px;
  margin: 0 auto 8px;
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--gray-800);
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--gray-400);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(197, 48, 60, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form .btn {
  width: 100%;
  justify-content: center;
}

.cta-contact-row {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  gap: 32px;
  font-size: 0.9rem;
  color: var(--gray-500);
  flex-wrap: wrap;
}

.cta-contact-row a {
  color: var(--gray-600);
  font-weight: 500;
}

.cta-contact-row a:hover {
  color: var(--red);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--navy);
  padding: 72px 0 0;
  color: rgba(255,255,255,.7);
}

.footer-top {
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-brand {
  max-width: 520px;
}

.footer-logo {
  height: 48px;
  width: auto;
  margin-bottom: 20px;
}

.footer-brand p {
  color: rgba(255,255,255,.65);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.footer-brand-contact {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-brand-contact a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.8);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}

.footer-brand-contact a:hover {
  color: var(--red-light);
}

.footer-brand-contact svg {
  width: 16px;
  height: 16px;
  color: var(--red-light);
  flex-shrink: 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  color: rgba(255,255,255,.55);
  font-size: 0.8125rem;
}

.footer-locations {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-locations span {
  color: rgba(255,255,255,.55);
  font-size: 0.8125rem;
}

/* ---------- Animations ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s cubic-bezier(.4,0,.2,1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .pillars-grid,
  .pillars-grid--three {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin: 0 auto;
  }

  .why-grid {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    padding: 100px 32px 40px;
    gap: 4px;
    transition: right var(--transition);
    box-shadow: -4px 0 30px rgba(0,0,0,.1);
    align-items: stretch;
  }

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

  .nav-link {
    width: 100%;
    padding: 12px 16px;
    color: var(--gray-600);
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 16px;
    text-align: center;
    width: 100%;
    justify-content: center;
  }

  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.3);
    z-index: 998;
  }

  .nav-overlay.open {
    display: block;
  }

  .hero-content {
    padding: 140px 0 80px;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 28px;
    margin-top: 56px;
  }

  .about,
  .pillars,
  .why-section,
  .cta-section {
    padding: 72px 0;
  }

  .nav-logo {
    height: 36px;
  }

  .footer-logo {
    height: 40px;
  }

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

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero h1 {
    font-size: 2.125rem;
  }

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

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-stats {
    gap: 20px;
  }

  .hero-stat-value {
    font-size: 1.5rem;
  }

  .pillar-card,
  .why-card {
    padding: 32px 24px;
  }

  .about-values-card {
    padding: 32px 24px;
  }
}
