:root {
  --ink: #102326;
  --deep: #123f4d;
  --reef: #0f6f78;
  --foam: #f5f7f2;
  --mist: #dce7e0;
  --brass: #8d681f;
  --coral: #d86140;
  --white: #ffffff;
  --shadow: 0 18px 48px rgba(10, 35, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--foam);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 64px);
  color: var(--white);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.32);
  transition: background 180ms ease, box-shadow 180ms ease, padding 180ms ease;
}

.site-header.is-scrolled,
.site-header.nav-open {
  padding-top: 12px;
  padding-bottom: 12px;
  color: var(--ink);
  background: rgba(245, 247, 242, 0.95);
  box-shadow: 0 8px 28px rgba(16, 35, 38, 0.12);
  text-shadow: none;
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: block;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
  line-height: 1.1;
}

.brand small {
  margin-top: 2px;
  color: currentColor;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.93rem;
  font-weight: 700;
}

.site-nav a {
  padding: 8px 0;
}

.nav-cta {
  border-bottom: 2px solid var(--brass);
}

.nav-toggle {
  display: none;
}

.hero {
  position: relative;
  min-height: 92svh;
  overflow: hidden;
  color: var(--white);
  background: #102326;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  background:
    linear-gradient(90deg, rgba(8, 25, 29, 0.86) 0%, rgba(8, 25, 29, 0.62) 38%, rgba(8, 25, 29, 0.16) 76%),
    url("assets/koa-marine-boatyard-hero.webp") center / cover;
  transform: scale(1.01);
}

.hero-overlay {
  background:
    linear-gradient(180deg, rgba(11, 32, 37, 0.36) 0%, rgba(11, 32, 37, 0.04) 48%, rgba(11, 32, 37, 0.72) 100%);
}

.hero-logo {
  position: absolute;
  z-index: 1;
  top: clamp(116px, 17vh, 164px);
  right: clamp(24px, 7vw, 104px);
  width: clamp(280px, 32vw, 470px);
  height: auto;
  max-height: 54svh;
  opacity: 0.88;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.34));
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  min-height: 92svh;
  max-width: 760px;
  padding: 124px clamp(20px, 5vw, 64px) 88px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--brass);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(4rem, 11vw, 8rem);
  line-height: 0.88;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 680px;
  margin: 24px 0 0;
  font-size: clamp(1.55rem, 3vw, 2.55rem);
  font-weight: 800;
  line-height: 1.04;
}

.hero-copy {
  max-width: 650px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 2px solid transparent;
  border-radius: 6px;
  font-weight: 900;
  line-height: 1.1;
}

.button.primary {
  color: var(--white);
  background: var(--brass);
}

.button.secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.56);
}

.button.outline {
  color: var(--ink);
  border-color: rgba(16, 35, 38, 0.28);
  background: transparent;
}

.button.full {
  width: 100%;
}

.intro-band {
  background: var(--deep);
  color: var(--white);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px clamp(20px, 5vw, 64px);
}

.intro-grid > p {
  margin: 0;
  font-size: clamp(1.04rem, 2.2vw, 1.45rem);
  font-weight: 700;
}

.intro-grid dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.intro-grid div {
  padding: 14px;
  border-left: 3px solid var(--coral);
  background: rgba(255, 255, 255, 0.08);
}

.intro-grid dt {
  font-size: 1.1rem;
  font-weight: 900;
}

.intro-grid dd {
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.86rem;
}

.section,
.gallery-section,
.split-section,
.area-section,
.request-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(68px, 10vw, 120px) clamp(20px, 5vw, 64px);
}

section[id] {
  scroll-margin-top: 96px;
}

.section-heading {
  max-width: 770px;
  margin-bottom: 34px;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 4.4rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.24rem;
  line-height: 1.14;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.service-card {
  min-height: 245px;
  padding: 24px;
  border: 1px solid rgba(16, 35, 38, 0.12);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(16, 35, 38, 0.06);
}

.service-number {
  display: block;
  margin-bottom: 42px;
  color: var(--reef);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.service-card p {
  margin: 14px 0 0;
  color: rgba(16, 35, 38, 0.74);
}

.accent-card {
  color: var(--white);
  background: var(--reef);
}

.accent-card p,
.accent-card .service-number {
  color: rgba(255, 255, 255, 0.82);
}

.gallery-section {
  padding-top: 0;
}

.gallery-grid {
  display: grid;
  grid-auto-flow: dense;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.gallery-item {
  position: relative;
  min-height: 280px;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: var(--ink);
  box-shadow: 0 14px 34px rgba(16, 35, 38, 0.12);
}

.gallery-wide {
  grid-column: span 2;
}

.gallery-tall {
  grid-row: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  transition: transform 240ms ease;
}

.gallery-item:hover img {
  transform: scale(1.035);
}

.gallery-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 42px 16px 14px;
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 900;
  background: linear-gradient(180deg, rgba(16, 35, 38, 0) 0%, rgba(16, 35, 38, 0.82) 100%);
}

.split-section,
.area-section,
.request-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 6vw, 82px);
  align-items: start;
}

.copy-stack p,
.area-copy p,
.request-copy p {
  margin: 0 0 18px;
  color: rgba(16, 35, 38, 0.78);
  font-size: 1.08rem;
}

.area-section {
  max-width: none;
  background: #e5ece7;
}

.area-section > * {
  max-width: 560px;
}

.area-copy {
  justify-self: end;
}

.area-panel,
.request-panel {
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.area-panel {
  padding: 28px;
}

.area-panel p,
.request-panel h3 {
  margin: 0 0 16px;
  font-weight: 900;
}

.area-panel ul,
.request-panel ul {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.area-panel li,
.request-panel li {
  padding-left: 18px;
  border-left: 3px solid var(--coral);
}

.request-section {
  align-items: stretch;
}

.request-panel {
  display: grid;
  align-content: start;
  gap: 22px;
  padding: clamp(24px, 4vw, 38px);
}

.contact-actions {
  display: grid;
  gap: 10px;
}

.contact-note {
  margin: -8px 0 0;
  color: rgba(16, 35, 38, 0.62);
  font-size: 0.88rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 30px clamp(20px, 5vw, 64px);
  color: var(--white);
  background: var(--ink);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  font-weight: 800;
}

@media (max-width: 900px) {
  .nav-toggle {
    position: relative;
    z-index: 25;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 2px solid currentColor;
    border-radius: 6px;
    color: currentColor;
    background: transparent;
  }

  .nav-toggle span:not(.sr-only),
  .nav-toggle span:not(.sr-only)::before,
  .nav-toggle span:not(.sr-only)::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    content: "";
  }

  .nav-toggle span:not(.sr-only)::before {
    transform: translateY(-6px);
  }

  .nav-toggle span:not(.sr-only)::after {
    transform: translateY(4px);
  }

  .site-nav {
    position: fixed;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    padding: 18px;
    border-radius: 8px;
    color: var(--ink);
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: grid;
    gap: 10px;
  }

  .site-nav a {
    padding: 10px;
  }

  .hero {
    min-height: 88svh;
  }

  .hero-logo {
    top: 118px;
    right: 22px;
    width: clamp(150px, 32vw, 230px);
    opacity: 0.44;
  }

  .hero-content {
    min-height: 88svh;
  }

  .intro-grid,
  .split-section,
  .area-section,
  .request-section {
    grid-template-columns: 1fr;
  }

  .intro-grid dl,
  .service-grid,
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-wide {
    grid-column: span 2;
  }

  .area-section > * {
    max-width: none;
  }

  .area-copy {
    justify-self: auto;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 14px 18px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .brand small {
    display: none;
  }

  .hero-media {
    background:
      linear-gradient(180deg, rgba(8, 25, 29, 0.9) 0%, rgba(8, 25, 29, 0.58) 58%, rgba(8, 25, 29, 0.88) 100%),
      url("assets/koa-marine-boatyard-hero.webp") 63% center / cover;
  }

  .hero-content {
    padding-top: 104px;
    padding-bottom: 54px;
  }

  .hero-logo {
    position: absolute;
    top: 112px;
    right: -30px;
    left: auto;
    width: 190px;
    opacity: 0.24;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.22));
  }

  h1 {
    font-size: clamp(3.4rem, 19vw, 5.2rem);
  }

  .hero-lede {
    font-size: clamp(1.55rem, 9vw, 2.35rem);
  }

  .hero-actions,
  .site-footer {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .intro-grid dl,
  .service-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: 210px;
  }

  .gallery-wide,
  .gallery-tall {
    grid-column: auto;
    grid-row: auto;
  }

  .gallery-item {
    min-height: 340px;
  }
}
