/* ============================================================
   Global Marine Eyes — style.css
   "Survey-report letterhead meets admiralty chart"
   ============================================================ */

/* ── 1. Custom properties ── */
:root {
  --bg: oklch(1 0 0);
  --surface: oklch(0.965 0.005 250);
  --ink: oklch(0.22 0.02 250);
  --muted: oklch(0.44 0.02 250);
  --line: oklch(0.88 0.01 250);
  --brass: oklch(0.55 0.124 60);
  --brass-deep: oklch(0.48 0.12 60);
  --navy: oklch(0.30 0.055 250);
  --navy-deep: oklch(0.24 0.05 250);
  --on-navy: oklch(0.97 0.005 250);
  --on-navy-muted: oklch(0.82 0.02 250);
}

/* ── 2. @font-face ── */
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4-v14-latin-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4-v14-latin-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3-v19-latin-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3-v19-latin-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

/* ── 3. Reset / base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── 4. Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  max-width: 68ch;
  text-wrap: pretty;
}

a {
  color: var(--brass);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--brass-deep);
}

a:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 2px;
}

ul {
  list-style: none;
}

/* ── 5. Skip link ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--brass);
  color: #fff;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  z-index: 9999;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
}

/* ── 6. Header / nav ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 96px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

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

.site-logo .wordmark {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.site-logo:hover .wordmark {
  color: var(--brass);
}

.site-logo:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 2px;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--ink);
  text-decoration: none;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}

.site-nav a:hover {
  color: var(--brass);
  background: oklch(0.965 0.005 250);
}

.site-nav a[aria-current="page"] {
  color: var(--brass);
  font-weight: 600;
}

.site-nav a:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--ink);
  margin-left: auto;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
  border-radius: 2px;
}

.hamburger-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hamburger-bar + .hamburger-bar {
  margin-top: 5px;
}

/* Mobile nav */
@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    position: absolute;
    top: 96px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1rem 1rem;
    margin-left: 0;
  }

  .site-nav[hidden] {
    display: none;
  }

  .site-nav a {
    padding: 0.75rem 0.5rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--line);
  }

  .site-nav a:last-child {
    border-bottom: none;
  }
}

/* ── 7. Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  border: 1px solid transparent;
  line-height: 1.3;
}

.btn-primary {
  background: var(--brass);
  color: #fff;
  border-color: var(--brass);
}

.btn-primary:hover {
  background: var(--brass-deep);
  border-color: var(--brass-deep);
  color: #fff;
}

.btn-primary:focus-visible {
  outline: 2px solid var(--brass-deep);
  outline-offset: 3px;
}

/* Secondary on white bg */
.btn-secondary {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn-secondary:hover {
  background: var(--navy);
  color: var(--on-navy);
}

.btn-secondary:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

/* Secondary on navy bg */
.btn-secondary-inv {
  background: transparent;
  color: var(--on-navy);
  border-color: var(--on-navy);
}

.btn-secondary-inv:hover {
  background: var(--on-navy);
  color: var(--navy-deep);
}

.btn-secondary-inv:focus-visible {
  outline: 2px solid var(--on-navy);
  outline-offset: 3px;
}

/* ── 8. Layout helpers ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-sm {
  padding: 3rem 0;
}

.surface-bg {
  background: var(--surface);
}

.navy-bg {
  background: var(--navy);
  color: var(--on-navy);
}

.navy-deep-bg {
  background: var(--navy-deep);
  color: var(--on-navy);
}

/* ── 9. Hero ── */
.hero {
  background: var(--navy);
  color: var(--on-navy);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: min(72vh, 660px);
}

/* 3D gallery layer: decorative backdrop behind the hero content.
   pointer-events none — the canvas must never capture wheel/touch input.
   From tablet width up the canvas is confined to the right side so the
   photos run BESIDE the headline, not behind it. */
#gme-gallery {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

@media (min-width: 768px) {
  #gme-gallery {
    left: 42%;
    mask-image: linear-gradient(to right, transparent 0%, black 16%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 16%);
  }
}

/* Readability scrim between gallery canvas and hero text */
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    oklch(0.30 0.055 250 / 0.88) 0%,
    oklch(0.30 0.055 250 / 0.55) 55%,
    oklch(0.30 0.055 250 / 0.15) 100%
  );
}

@media (min-width: 768px) {
  /* Text zone is photo-free — only a light safety fade near the seam. */
  .hero-scrim {
    background: linear-gradient(
      90deg,
      oklch(0.30 0.055 250 / 0.85) 0%,
      oklch(0.30 0.055 250 / 0.45) 44%,
      transparent 62%
    );
  }
}


.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.hero-content {
  animation: hero-rise 0.5s ease-out both;
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-content {
    animation: none;
  }
}

.hero h1 {
  color: var(--on-navy);
  margin-bottom: 1.25rem;
}

.hero-sub {
  color: var(--on-navy-muted);
  font-size: 1.125rem;
  max-width: 56ch;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Large seal on the hero's right — photos drift behind it */
.hero-compass {
  position: absolute;
  right: 5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 380px;
  height: 380px;
  pointer-events: none;
}

@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-compass {
    width: 170px;
    height: 170px;
    opacity: 0.25;
    right: -1.5rem;
    top: 1rem;
    transform: none;
  }
}

/* ── 10. Services overview (home) ── */
.services-list {
  list-style: none;
  border-top: 1px solid var(--line);
}

.services-list li {
  border-bottom: 1px solid var(--line);
  padding: 1.5rem 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: start;
}

.services-list .svc-title {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.services-list .svc-title:hover {
  color: var(--brass);
}

.services-list .svc-desc {
  color: var(--muted);
  font-size: 0.9375rem;
  max-width: none;
  margin-top: 0.25rem;
}

.services-list .svc-more {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--brass);
  text-decoration: none;
  white-space: nowrap;
  padding-top: 0.2rem;
}

.services-list .svc-more:hover {
  color: var(--brass-deep);
}

/* ── 11. How we work ── */
.how-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
  list-style: none;
  counter-reset: steps;
}

.how-steps li {
  counter-increment: steps;
  position: relative;
  padding-top: 1rem;
}

.how-steps li::before {
  content: counter(steps, decimal-leading-zero);
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 700;
  font-size: 2.5rem;
  color: var(--line);
  letter-spacing: -0.03em;
  display: block;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.how-steps h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.how-steps p {
  color: var(--muted);
  font-size: 0.9375rem;
  max-width: none;
}

/* ── 12. Closing band (navy) ── */
.closing-band {
  background: var(--navy);
  color: var(--on-navy);
  padding: 4.5rem 0;
  text-align: center;
}

.closing-band h2 {
  color: var(--on-navy);
  margin-bottom: 1rem;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.closing-band p {
  color: var(--on-navy-muted);
  max-width: 56ch;
  margin: 0 auto 2rem;
  font-size: 1.0625rem;
}

.closing-band a:not(.btn) {
  color: inherit;
}

/* ── 14. Services page ── */
.services-section {
  padding: 3.5rem 0 2rem;
  border-bottom: 1px solid var(--line);
}

.services-section:last-of-type {
  border-bottom: none;
}

.services-section h2 {
  margin-bottom: 1.25rem;
}

.services-section p {
  margin-bottom: 1rem;
}

.services-section ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.services-section ul li {
  color: var(--ink);
  margin-bottom: 0.35rem;
  font-size: 0.9375rem;
}

.service-link {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--brass);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.5rem;
  transition: color 0.15s ease, gap 0.15s ease;
}

.service-link:hover {
  color: var(--brass-deep);
  gap: 0.5rem;
}

/* ── 15. About page ── */
.about-expectations {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 1rem 0 2rem;
}

.about-expectations li {
  margin-bottom: 0.4rem;
}

/* ── 16. Contact page ── */
.contact-email-link {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  font-weight: 600;
  color: var(--brass);
  text-decoration: underline;
  text-underline-offset: 0.12em;
  letter-spacing: -0.01em;
  display: inline-block;
  margin: 0.75rem 0;
}

.contact-email-link:hover {
  color: var(--brass-deep);
}

address {
  font-style: normal;
  margin: 1.5rem 0;
  color: var(--ink);
  line-height: 1.8;
}

.urgent-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.25rem 1.5rem;
  border-radius: 4px;
  margin: 1.5rem 0;
  max-width: 52ch;
}

.urgent-panel p {
  color: var(--navy);
  font-weight: 600;
  max-width: none;
}

/* ── 17. Legal pages ── */
.legal-section {
  margin-bottom: 2.5rem;
}

.legal-section h2 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}

.legal-section p {
  margin-bottom: 0.75rem;
}

.placeholder {
  background: oklch(0.97 0.03 60);
  border: 1px dashed var(--brass);
  padding: 0.2em 0.5em;
  border-radius: 3px;
  font-style: italic;
  font-size: 0.875em;
  color: var(--brass-deep);
}

/* ── 18. Footer ── */
.site-footer {
  background: var(--navy-deep);
  color: var(--on-navy);
  padding: 3.5rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footer-identity .wordmark {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--on-navy);
  display: block;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.footer-identity address {
  color: var(--on-navy-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0;
}

.footer-identity address a {
  color: var(--on-navy-muted);
  text-underline-offset: 0.12em;
}

.footer-identity address a:hover {
  color: var(--on-navy);
}

.footer-col h4 {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--on-navy-muted);
  text-transform: none;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.4rem;
}

.footer-col ul a {
  color: var(--on-navy-muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-col ul a:hover {
  color: var(--on-navy);
}

.footer-col ul a:focus-visible {
  outline: 2px solid var(--on-navy);
  outline-offset: 2px;
  border-radius: 2px;
}

.footer-bottom {
  border-top: 1px solid oklch(0.32 0.04 250);
  padding: 1.25rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-bottom p {
  color: var(--on-navy-muted);
  font-size: 0.8125rem;
  max-width: none;
}

/* ── 19. Page intro ── */
.page-intro {
  padding: 3.5rem 0 2rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
}

.page-intro h1 {
  margin-bottom: 0.75rem;
}

.page-intro p {
  color: var(--muted);
  font-size: 1.0625rem;
}

/* ── 20. 404 page ── */
.not-found {
  padding: 6rem 0;
  text-align: center;
}

.not-found h1 {
  margin-bottom: 1rem;
}

.not-found p {
  color: var(--muted);
  max-width: none;
  margin: 0 auto 2rem;
}

/* ── 21. Section headings ── */
.section-heading {
  margin-bottom: 2.5rem;
}

.section-heading h2 {
  margin-bottom: 0.5rem;
}

.section-heading p {
  color: var(--muted);
}

/* ── 22. Responsive ── */
@media (max-width: 480px) {
  .hero {
    padding: 3rem 0 3rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .footer-bottom p {
    font-size: 0.75rem;
  }
}

/* ── 23. Hero compact (services page) ── */
.hero-compact {
  min-height: min(48vh, 440px);
  padding: 3.5rem 0;
}

.hero-compact h1 {
  font-size: clamp(2.2rem, 4vw, 3rem);
}

/* ── 24. Hero logo plate ── */
.hero-logo-plate {
  display: inline-block;
  background: oklch(1 0 0);
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.hero-logo-plate img {
  display: block;
  height: 132px;
  width: auto;
}

/* ── 25. Footer logo plate ── */
.footer-logo-plate {
  display: inline-block;
  background: oklch(1 0 0);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.footer-logo-plate img {
  display: block;
  height: 130px;
  width: auto;
}

/* ── 26. Service photos ── */
.svc-photo {
  width: 100%;
  max-width: 560px;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 6px;
  margin: 1rem 0 1.5rem;
}

/* ── 27. About photo ── */
.about-photo {
  width: 100%;
  aspect-ratio: 21/9;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 2.5rem;
}

@media (max-width: 640px) {
  .about-photo {
    aspect-ratio: 16/9;
  }
}

/* ── 28. Services parallax mount ── */
/* Parallax sections sit on the white page background; text inherits site colors. */
.services-parallax p,
.services-parallax li {
  color: var(--muted);
}

/* ── 29. Anchor scroll offset for sticky header ── */
section[id] {
  scroll-margin-top: 116px;
}

/* ── 23. Print ── */
@media print {
  .site-header nav,
  .nav-toggle,
  .site-footer,
  .hero-compass {
    display: none !important;
  }

  .site-header {
    position: static;
  }

  body {
    font-size: 11pt;
    color: #000;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}

/* ── 21. Footer identity: seal beside the contact data ── */
.footer-identity { display: grid; grid-template-columns: 1fr auto; column-gap: 2rem; align-items: center; }
.footer-identity .wordmark, .footer-identity address { grid-column: 1; }
.footer-logo-plate { grid-column: 2; grid-row: 1 / span 2; margin-bottom: 0; }

/* Contact page: seal beside the contact block — same size as the home hero seal */
.contact-split { display: grid; grid-template-columns: 1fr auto; gap: 3rem; align-items: center; }
.contact-seal { width: 380px; height: 380px; }
@media (max-width: 900px) { .contact-seal { width: 250px; height: 250px; } }
@media (max-width: 768px) { .contact-split { grid-template-columns: 1fr; } .contact-seal { width: 200px; height: 200px; justify-self: center; } }

/* Compact hero bands (services): seal sized to fit the slimmer band */
.hero-compact .hero-compass {
  width: 320px;
  height: 320px;
  right: 4rem;
}
