/* ===== DESIGN TOKENS ===== */
:root {
  /* Type Scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Fonts */
  --font-display: 'Cabinet Grotesk', 'Arial Black', sans-serif;
  --font-body: 'Satoshi', 'Inter', sans-serif;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;
}

/* ===== HARBOR SAFETY — BLUE + WHITE PALETTE ===== */
:root, [data-theme="light"] {
  --color-bg:             #FFFFFF;
  --color-surface:        #FFFFFF;
  --color-surface-2:      #EEF3FB;
  --color-surface-offset: #E2EAF6;
  --color-divider:        #C2D0E8;
  --color-border:         #AABFD8;

  --color-text:           #1E3054;
  --color-text-muted:     #3A5278;
  --color-text-faint:     #7A96B8;
  --color-text-inverse:   #FFFFFF;

  /* Navy — primary brand + CTA */
  --color-primary:        #1E3054;
  --color-primary-hover:  #162542;
  --color-primary-active: #101C33;
  --color-primary-light:  #E2EAF6;

  /* Accent = navy (blue/white scheme — no orange) */
  --color-accent:         #1E3054;
  --color-accent-hover:   #162542;
  --color-accent-active:  #101C33;

  /* Semantic */
  --color-success:        #1B6B3A;
  --color-error:          #C62828;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(30,48,84,0.08);
  --shadow-md: 0 4px 12px rgba(30,48,84,0.14);
  --shadow-lg: 0 12px 32px rgba(30,48,84,0.18);
}

/* ===== DARK MODE (keep navy-based) ===== */
[data-theme="dark"] {
  --color-bg:             #0E1929;
  --color-surface:        #132136;
  --color-surface-2:      #172744;
  --color-surface-offset: #0B1522;
  --color-divider:        #1E3054;
  --color-border:         #2A4470;

  --color-text:           #D4E0F0;
  --color-text-muted:     #89A8CC;
  --color-text-faint:     #4A6A8A;
  --color-text-inverse:   #0E1929;

  --color-primary:        #5B8AC4;
  --color-primary-hover:  #4472A8;
  --color-primary-active: #305C90;
  --color-primary-light:  #1A2E4A;

  --color-accent:         #5B8AC4;
  --color-accent-hover:   #4472A8;
  --color-accent-active:  #305C90;

  --color-success:        #4CAF73;
  --color-error:          #EF5350;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #0E1929;
    --color-surface:        #132136;
    --color-surface-2:      #172744;
    --color-surface-offset: #0B1522;
    --color-divider:        #1E3054;
    --color-border:         #2A4470;
    --color-text:           #D4E0F0;
    --color-text-muted:     #89A8CC;
    --color-text-faint:     #4A6A8A;
    --color-text-inverse:   #0E1929;
    --color-primary:        #5B8AC4;
    --color-primary-hover:  #4472A8;
    --color-primary-active: #305C90;
    --color-primary-light:  #1A2E4A;
    --color-accent:         #5B8AC4;
    --color-accent-hover:   #4472A8;
    --color-accent-active:  #305C90;
    --color-success:        #66BB6A;
    --color-error:          #EF5350;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
  }
}

/* ===== GLOBAL ===== */
a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute; top: -100%; left: var(--space-4);
  background: var(--color-primary); color: var(--color-text-inverse);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm);
  z-index: 100; font-size: var(--text-sm);
}
.skip-link:focus { top: var(--space-2); }

/* ===== HEADER ===== */
.header {
  position: sticky; top: 0; z-index: 50;
  background: #FFFFFF;
  border-bottom: 1px solid rgba(30,48,84,0.10);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.header--scrolled { box-shadow: 0 2px 16px rgba(30,48,84,0.12); }
.header__inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: var(--space-2) var(--space-4);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4);
}
.header__logo { height: 100px; width: auto; }
.header__nav { display: flex; align-items: center; gap: var(--space-6); }
.header__nav a {
  color: #1E3054;
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color var(--transition-interactive);
}
.header__nav a:hover { color: #3A6BB0; }
/* Theme toggle — navy on white header */
.header__theme-toggle { color: #7A96B8; }
.header__theme-toggle:hover { color: #1E3054; }
.header__toggle { color: #1E3054; }
.header__cta {
  display: inline-flex; align-items: center; gap: var(--space-2);
  background: #1E3054;
  color: #FFFFFF;
  font-size: var(--text-sm);
  font-weight: 700;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background var(--transition-interactive), transform var(--transition-interactive), box-shadow var(--transition-interactive);
}
.header__cta:hover {
  background: #162542;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.header__cta:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

.header__toggle { display: none; padding: var(--space-2); color: var(--color-text); }

.header__theme-toggle {
  padding: var(--space-2);
  color: var(--color-text-muted);
  transition: color var(--transition-interactive);
  display: flex; align-items: center;
}
.header__theme-toggle:hover { color: var(--color-text); }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex; align-items: center;
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  background: url('./assets/harbor-hero.png') center/cover no-repeat;
}
.hero__bg::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(18, 30, 52, 0.82);
}
.hero__inner {
  position: relative; z-index: 2;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: var(--space-24) var(--space-4) var(--space-16);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}
.hero__badge {
  display: inline-flex; align-items: center; gap: var(--space-2);
  background: oklch(1 0 0 / 0.12);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  width: fit-content;
  backdrop-filter: blur(4px);
}
.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  color: #FFFFFF;
  max-width: 16ch;
}
.hero__subtitle {
  font-size: var(--text-lg);
  color: oklch(1 0 0 / 0.82);
  max-width: 52ch;
  line-height: 1.5;
}
.hero__actions {
  display: flex; flex-wrap: wrap; gap: var(--space-4);
  padding-top: var(--space-2);
}
.btn-primary {
  display: inline-flex; align-items: center; gap: var(--space-2);
  background: #1E3054;
  color: #FFFFFF;
  font-weight: 700;
  font-size: var(--text-base);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background var(--transition-interactive), transform var(--transition-interactive), box-shadow var(--transition-interactive);
}
.btn-primary:hover {
  background: #162542;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30,48,84,0.25);
  text-decoration: none;
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: var(--space-2);
  background: oklch(1 0 0 / 0.12);
  color: #fff;
  font-weight: 600;
  font-size: var(--text-base);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-md);
  text-decoration: none;
  border: 1px solid oklch(1 0 0 / 0.2);
  backdrop-filter: blur(4px);
  transition: background var(--transition-interactive), transform var(--transition-interactive);
}
.btn-secondary:hover {
  background: oklch(1 0 0 / 0.2);
  transform: translateY(-1px);
  text-decoration: none;
}

.hero__stats {
  display: flex; gap: var(--space-8); padding-top: var(--space-4);
  flex-wrap: wrap;
}
.hero__stat { text-align: left; }
.hero__stat-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: #FFFFFF;
}
/* Dark mode: keep stat values orange for contrast on dark hero */
.hero__stat-label {
  font-size: var(--text-xs);
  color: oklch(1 0 0 / 0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* ===== SECTION COMMON ===== */
.section {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) var(--space-4);
}
.section__inner {
  max-width: var(--content-wide);
  margin-inline: auto;
}
.section__label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}
.section__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.section__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 60ch;
  margin-bottom: var(--space-10);
}

/* ===== SERVICES ===== */
.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: var(--space-6);
}
.service-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.service-card__img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.service-card__body { padding: var(--space-6); }
.service-card__icon {
  width: 40px; height: 40px;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}
.service-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.service-card__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ===== WHY HARBOR ===== */
.why { background: #1E3054; color: #fff; }
.why .section__label { color: rgba(255,255,255,0.65); }
.why .section__title { color: #fff; }
.why .section__desc { color: rgba(255,255,255,0.75); }

.why__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: var(--space-6);
}
.why__item {
  padding: var(--space-6);
  background: rgba(255,255,255,0.07);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.12);
}
.why__item-icon {
  width: 32px; height: 32px;
  color: rgba(255,255,255,0.75);
  margin-bottom: var(--space-4);
}
.why__item-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-2);
}
.why__item-text {
  font-size: var(--text-sm);
  color: oklch(1 0 0 / 0.7);
  line-height: 1.6;
}

/* ===== OSHA CTA ===== */
.osha-cta {
  background: var(--color-surface-offset);
}
.osha-cta__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  align-items: center;
}
.osha-cta__image {
  border-radius: var(--radius-lg);
  width: 100%;
  object-fit: cover;
  aspect-ratio: 16/10;
}
.osha-cta__content { padding: var(--space-6) 0; }
.osha-cta__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.osha-cta__text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  line-height: 1.7;
}
.osha-cta__checklist {
  list-style: none; padding: 0;
  display: flex; flex-direction: column; gap: var(--space-3);
  margin-bottom: var(--space-8);
}
.osha-cta__checklist li {
  display: flex; align-items: flex-start; gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text);
}
.osha-cta__checklist li svg {
  flex-shrink: 0;
  width: 20px; height: 20px;
  color: var(--color-success);
  margin-top: 2px;
}

/* ===== INDUSTRIES ===== */
.industries__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
  gap: var(--space-4);
}
.industry-pill {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.industry-pill:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}
.industry-pill svg {
  width: 20px; height: 20px;
  color: var(--color-primary);
  flex-shrink: 0;
}

/* ===== PROCESS ===== */
.process__steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: var(--space-6);
  counter-reset: step;
}
.process__step {
  counter-increment: step;
  padding: var(--space-6);
  position: relative;
}
.process__step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  color: rgba(30,48,84,0.12);
  line-height: 1;
  display: block;
  margin-bottom: var(--space-4);
}
.process__step-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.process__step-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ===== CONTACT FORM ===== */
.contact {
  background: var(--color-primary);
  color: #fff;
}
.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: start;
}
.contact__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: #fff;
  margin-bottom: var(--space-4);
}
.contact__text {
  font-size: var(--text-base);
  color: oklch(1 0 0 / 0.7);
  margin-bottom: var(--space-8);
  line-height: 1.7;
}
.contact__info {
  display: flex; flex-direction: column; gap: var(--space-4);
}
.contact__info-item {
  display: flex; align-items: center; gap: var(--space-3);
  font-size: var(--text-sm);
  color: oklch(1 0 0 / 0.8);
}
.contact__info-item svg {
  width: 20px; height: 20px;
  color: rgba(255,255,255,0.65);
  flex-shrink: 0;
}

.contact__form {
  background: oklch(1 0 0 / 0.06);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  border: 1px solid oklch(1 0 0 / 0.1);
}
.form__group {
  margin-bottom: var(--space-5);
}
.form__label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: oklch(1 0 0 / 0.7);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form__input,
.form__select,
.form__textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: oklch(1 0 0 / 0.08);
  border: 1px solid oklch(1 0 0 / 0.15);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: var(--text-sm);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.form__input::placeholder,
.form__textarea::placeholder {
  color: oklch(1 0 0 / 0.35);
}
.form__input:focus,
.form__select:focus,
.form__textarea:focus {
  outline: none;
  border-color: rgba(255,255,255,0.6);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.15);
}
.form__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-10);
}
.form__select option { background: var(--color-primary); color: #fff; }
.form__textarea { resize: vertical; min-height: 100px; }

.form__submit {
  width: 100%;
  padding: var(--space-4);
  background: rgba(255,255,255,0.15);
  color: #FFFFFF;
  font-weight: 700;
  font-size: var(--text-base);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background var(--transition-interactive), transform var(--transition-interactive);
}
.form__submit:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-1px);
}
.form__submit:active { transform: translateY(0); }

/* ===== FOOTER ===== */
.footer {
  background: #1E3054;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: var(--space-12) var(--space-4) var(--space-6);
}
.footer__inner {
  max-width: var(--content-wide);
  margin-inline: auto;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-10);
}
.footer__brand-logo { height: 60px; width: auto; margin-bottom: var(--space-4); }
.footer__brand-text {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.65);
  max-width: 30ch;
  line-height: 1.6;
}
.footer__col-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.footer__links {
  list-style: none; padding: 0;
  display: flex; flex-direction: column; gap: var(--space-3);
}
.footer__links a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color var(--transition-interactive);
}
.footer__links a:hover { color: #FFFFFF; }
.footer__bottom {
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--space-4);
}
.footer__copy {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.45);
}
.footer__legal {
  display: flex; gap: var(--space-4);
}
.footer__legal a {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.45);
  text-decoration: none;
}
.footer__legal a:hover { color: rgba(255,255,255,0.8); }

/* Hide nav CTA on desktop — only show header desktop CTA */
.header__cta--nav { display: none; }

/* ===== SCROLL ANIMATION ===== */
.fade-in { opacity: 1; }
@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 100%;
  }
}
@keyframes reveal-fade { to { opacity: 1; } }

/* ===== MOBILE NAV ===== */
@media (max-width: 768px) {
  .header__nav {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 280px;
    flex-direction: column;
    background: #FFFFFF;
    padding: var(--space-16) var(--space-6);
    gap: var(--space-4);
    transform: translateX(100%);
    transition: transform 0.3s var(--ease-out);
    box-shadow: var(--shadow-lg);
    z-index: 60;
  }
  .header__nav.is-open { transform: translateX(0); }
  .header__nav a { font-size: var(--text-base); color: #1E3054; }
  .header__toggle { display: flex; z-index: 70; }
  .header__cta--nav {
    width: 100%;
    justify-content: center;
    padding: var(--space-3) var(--space-5);
    display: inline-flex;
    background: #1E3054;
    color: #fff;
  }
  .header__cta--desktop { display: none; }

  .hero__inner { padding-top: var(--space-16); }
  .hero__title { font-size: var(--text-2xl); }

  .osha-cta__inner { grid-template-columns: 1fr; }
  .osha-cta__image { order: -1; }

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

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

@media (max-width: 480px) {
  .hero__stats { flex-direction: column; gap: var(--space-4); }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* Mobile nav overlay */
.nav-overlay {
  position: fixed; inset: 0;
  background: oklch(0 0 0 / 0.4);
  z-index: 55;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
}
.nav-overlay.is-open { opacity: 1; pointer-events: auto; }
