:root {
  /* The whole palette. Everything else is one of these at some opacity. */
  --orange: #f47920;
  --white: #ffffff;
  --navy: #0a2540;
  --off-navy: #dce5ee;
  --navy-rgb: 10, 37, 64;
  --white-rgb: 255, 255, 255;
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --section-y: clamp(3.5rem, 7vw, 5.5rem);
  --topbar-h: 82px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--navy); line-height: 1.6; background: var(--navy); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
p { margin: 0 0 1em; }
.wrap { width: min(1180px, 92vw); margin: 0 auto; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--orange); margin: 0 0 .6rem; }
.eyebrow.center, .section-title { text-align: center; }
.section-title { font-size: clamp(1.7rem, 3vw, 2.3rem); color: inherit; }
.section-title.left { text-align: left; }

/* Buttons: orange with navy text (passes contrast) */
.btn { display: inline-block; background: var(--orange); color: var(--navy); font: 700 1rem var(--font); padding: .85rem 1.5rem; border: 0; border-radius: 8px; text-decoration: none; cursor: pointer; box-shadow: 0 6px 18px rgba(var(--navy-rgb), .35); transition: filter .15s, transform .15s; }
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }
.btn-sm { padding: .55rem 1rem; font-size: .95rem; box-shadow: none; }
.btn-block { display: block; width: 100%; }
.btn-ghost { background: transparent; color: var(--white); border: 2px solid rgba(var(--white-rgb), .7); box-shadow: none; }
.btn-ghost:hover { background: rgba(var(--white-rgb), .12); }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(var(--navy-rgb), .96); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(var(--white-rgb), .08); }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem 0; }
.brand img { height: 62px; width: auto; }
.top-actions { display: flex; align-items: center; gap: 1.25rem; }
.top-link { color: rgba(var(--white-rgb), .85); text-decoration: none; font-weight: 600; }
.top-link:hover { color: var(--white); }
.top-phone { color: rgba(var(--white-rgb), .85); text-decoration: none; font-size: 1rem; }
.top-phone strong { color: var(--orange); font-size: 1.1rem; }
.mobile-only { display: none !important; }

/* Hero: moving underwater scene */
.hero { position: relative; overflow: hidden; clip-path: inset(0); color: var(--white); padding: 4rem 0;
  /* Fill the first screen so Services stays out of view until they scroll */
  min-height: calc(100vh - var(--topbar-h)); min-height: calc(100svh - var(--topbar-h)); display: flex; align-items: center; background: var(--navy); isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -3; background: url('/img/hero.webp') 50% 50% / 140% auto no-repeat, var(--navy); animation: drift 12s ease-in-out infinite alternate; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(var(--navy-rgb), .6) 0%, rgba(var(--navy-rgb), .8) 60%, rgba(var(--navy-rgb), .92) 100%); }
.caustics { position: absolute; inset: 0; background-size: 140% 140%; z-index: -2; opacity: .45; mix-blend-mode: screen;
  background:
    radial-gradient(ellipse 22% 8% at 20% 30%, rgba(var(--white-rgb), .22), transparent 70%),
    radial-gradient(ellipse 18% 6% at 70% 20%, rgba(var(--white-rgb), .18), transparent 70%),
    radial-gradient(ellipse 25% 7% at 45% 60%, rgba(var(--white-rgb), .15), transparent 70%),
    radial-gradient(ellipse 15% 5% at 85% 70%, rgba(var(--white-rgb), .18), transparent 70%),
    radial-gradient(ellipse 20% 6% at 10% 80%, rgba(var(--white-rgb), .15), transparent 70%);
  animation: shimmer 5s ease-in-out infinite alternate; }
@keyframes drift {
  0%   { background-position: 40% 35%; background-size: 140% auto; }
  50%  { background-position: 60% 55%; background-size: 152% auto; }
  100% { background-position: 48% 65%; background-size: 144% auto; }
}
@keyframes shimmer {
  0%   { background-position: 0% 0%;    opacity: .3; }
  50%  { background-position: 60% 40%;  opacity: .55; }
  100% { background-position: 100% 80%; opacity: .35; }
}

.bubbles { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bubbles span { position: absolute; top: 100%; opacity: 0; width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(var(--white-rgb), .9), rgba(var(--white-rgb), .3) 45%, rgba(var(--white-rgb), .06) 70%);
  border: 1px solid rgba(var(--white-rgb), .35); animation: rise 7s linear infinite; }
.bubbles span:nth-child(1)  { left: 4%;  width: 8px;  height: 8px;  animation-duration: 6s;   animation-delay: 0s; }
.bubbles span:nth-child(2)  { left: 9%;  width: 14px; height: 14px; animation-duration: 8s;   animation-delay: 1.5s; }
.bubbles span:nth-child(3)  { left: 15%; width: 6px;  height: 6px;  animation-duration: 5s;   animation-delay: 3s; }
.bubbles span:nth-child(4)  { left: 22%; width: 18px; height: 18px; animation-duration: 9s;   animation-delay: .5s; }
.bubbles span:nth-child(5)  { left: 28%; width: 7px;  height: 7px;  animation-duration: 6.5s; animation-delay: 2.2s; }
.bubbles span:nth-child(6)  { left: 34%; width: 11px; height: 11px; animation-duration: 7.5s; animation-delay: 4s; }
.bubbles span:nth-child(7)  { left: 41%; width: 5px;  height: 5px;  animation-duration: 4.5s; animation-delay: 1s; }
.bubbles span:nth-child(8)  { left: 47%; width: 13px; height: 13px; animation-duration: 8.5s; animation-delay: 3.5s; }
.bubbles span:nth-child(9)  { left: 53%; width: 8px;  height: 8px;  animation-duration: 6s;   animation-delay: 5s; }
.bubbles span:nth-child(10) { left: 59%; width: 16px; height: 16px; animation-duration: 9.5s; animation-delay: 2s; }
.bubbles span:nth-child(11) { left: 64%; width: 6px;  height: 6px;  animation-duration: 5.5s; animation-delay: .8s; }
.bubbles span:nth-child(12) { left: 70%; width: 10px; height: 10px; animation-duration: 7s;   animation-delay: 4.5s; }
.bubbles span:nth-child(13) { left: 76%; width: 20px; height: 20px; animation-duration: 10s;  animation-delay: 1.2s; }
.bubbles span:nth-child(14) { left: 81%; width: 7px;  height: 7px;  animation-duration: 6s;   animation-delay: 3.2s; }
.bubbles span:nth-child(15) { left: 86%; width: 12px; height: 12px; animation-duration: 8s;   animation-delay: .3s; }
.bubbles span:nth-child(16) { left: 91%; width: 5px;  height: 5px;  animation-duration: 5s;   animation-delay: 2.7s; }
.bubbles span:nth-child(17) { left: 95%; width: 9px;  height: 9px;  animation-duration: 7s;   animation-delay: 5.5s; }
.bubbles span:nth-child(18) { left: 38%; width: 4px;  height: 4px;  animation-duration: 4s;   animation-delay: 6s; }
@keyframes rise {
  0%   { top: 92%; opacity: 0; transform: translateX(0); }
  12%  { opacity: .85; }
  50%  { transform: translateX(14px); }
  85%  { opacity: .6; }
  100% { top: 8%;  opacity: 0; transform: translateX(-10px); }
}

.hero-grid { width: min(1180px, 92vw); display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); text-shadow: 0 2px 16px rgba(var(--navy-rgb), .6); }
.lede { font-size: 1.15rem; max-width: 34em; color: rgba(var(--white-rgb), .9); margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Quote form: frosted dark glass, orange accent */
.quote-card { position: relative; background: rgba(var(--navy-rgb), .74); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  color: var(--white); border: 1px solid rgba(var(--white-rgb), .14); border-top: 4px solid var(--orange); border-radius: var(--radius); padding: 1.75rem; box-shadow: 0 24px 60px rgba(var(--navy-rgb), .55); }
.quote-card h2 { font-size: 1.45rem; margin-bottom: 1rem; color: var(--white); }
.quote-card label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .85rem; color: rgba(var(--white-rgb), .85); }
.quote-card input, .quote-card select, .quote-card textarea { display: block; width: 100%; margin-top: .3rem; padding: .7rem .8rem; border: 1px solid transparent; border-radius: 8px;
  font: 400 1rem var(--font); background: var(--off-navy); color: var(--navy); }
.quote-card ::placeholder { color: rgba(var(--navy-rgb), .5); }
.quote-card input:focus, .quote-card select:focus, .quote-card textarea:focus { outline: 3px solid var(--orange); outline-offset: 0; border-color: var(--orange); }
.quote-card .row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.quote-card .btn { margin-top: .4rem; }
.fineprint { margin: .9rem 0 0; text-align: center; font-size: .9rem; color: rgba(var(--white-rgb), .7); }
.fineprint a { color: var(--orange); font-weight: 700; }
.hp { position: absolute; left: -9999px; }

/* Services */
.services { background: var(--off-navy); color: var(--navy); padding: var(--section-y) 0; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.25rem, 2.5vw, 2rem); margin-top: 2rem; }
.card { background: var(--navy); color: var(--white); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 14px 34px rgba(var(--navy-rgb), .25); transition: transform .2s; }
.card:hover { transform: translateY(-4px); }
.card .photo { width: 100%; height: auto; aspect-ratio: 4 / 3.4; object-fit: cover; object-position: center 40%; }
.card .photo.top { object-position: center 15%; }
.card-body { padding: 1.25rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.card h3 { color: var(--white); font-size: 1.2rem; margin-bottom: .5rem; }
.card p { flex: 1; color: rgba(var(--white-rgb), .8); }
.card a { font-weight: 700; color: var(--orange); text-decoration: none; }
.card a:hover { text-decoration: underline; }

.about { max-width: 50em; margin: clamp(3rem, 6vw, 4.5rem) auto 0; text-align: center; }
.about p { font-size: 1.06rem; color: rgba(var(--navy-rgb), .85); }
.brands { margin-top: .5rem; }
.brands-label { display: block; text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 700; color: rgba(var(--white-rgb), .7); margin-bottom: .8rem; }
.brand-marks { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2.5rem; }
.brand-marks img { height: 52px; width: auto; opacity: .92; }

/* Bottom: form left, shuffling gallery right */
.work { background: var(--navy); color: var(--white); padding: var(--section-y) 0; }
.work-grid { display: grid; grid-template-columns: minmax(300px, .8fr) 1.6fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.quote-card-bottom { position: sticky; top: 96px; background: rgba(var(--white-rgb), .06); box-shadow: none; }
.quote-card-bottom .eyebrow { margin-bottom: .3rem; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(8, clamp(80px, 8vw, 108px)); gap: 12px; }
.tile { position: relative; display: block; overflow: hidden; border-radius: 10px; background: rgba(var(--white-rgb), .06); }
.tile img { width: 100%; height: 100%; pointer-events: none; user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; object-fit: cover; transition: opacity .6s ease, transform .6s ease; }
.tile.fading img { opacity: 0; transform: scale(1.06); }
/* Fixed masonry layout: every cell filled, shapes match the photos */
.tile:nth-child(1) { grid-area: 1 / 1 / 3 / 3; }  /* wide */
.tile:nth-child(2) { grid-area: 1 / 3 / 4 / 4; }  /* tall */
.tile:nth-child(3) { grid-area: 3 / 1 / 5 / 2; }  /* land */
.tile:nth-child(4) { grid-area: 3 / 2 / 5 / 3; }  /* land */
.tile:nth-child(5) { grid-area: 4 / 3 / 7 / 4; }  /* tall */
.tile:nth-child(6) { grid-area: 5 / 1 / 7 / 3; }  /* wide */
.tile:nth-child(7) { grid-area: 7 / 1 / 9 / 2; }  /* land */
.tile:nth-child(8) { grid-area: 7 / 2 / 9 / 4; }  /* wide */

/* Footer */
.footer { background: var(--navy); color: rgba(var(--white-rgb), .7); padding: 2.5rem 0; font-size: .95rem; border-top: 1px solid rgba(var(--white-rgb), .1); }
.footer a { color: var(--white); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; }
.footer p { margin: 0; }
.footer-logo { height: 46px; width: auto; }

.thanks { color: var(--white); min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 4rem 0; }

@media (max-width: 980px) {
  .work-grid { grid-template-columns: 1fr; }
  .quote-card-bottom { position: static; order: 2; }
}
@media (max-width: 860px) {
  .mobile-only { display: inline-block !important; }
  .hero-actions.mobile-only { display: flex !important; margin-top: 1.5rem; }
  .desktop-only { display: none !important; }
  .hero-grid, .cards { grid-template-columns: 1fr; }
  .top-link { display: none; }
  .brand img { height: 42px; }
}
/* Single-column (tall) hero: size the water by height so it always fills */
@keyframes drift-m {
  0%   { background-position: 35% 40%; background-size: auto 112%; }
  50%  { background-position: 65% 60%; background-size: auto 120%; }
  100% { background-position: 50% 50%; background-size: auto 115%; }
}
@media (max-width: 860px) {
  :root { --topbar-h: 62px; }
  .hero { padding: 3rem 0 3.5rem; }
  .hero-bg { background-size: auto 115%; animation-name: drift-m; }
}
@media (min-width: 521px) and (max-width: 860px) {
  .cards { max-width: 620px; margin-left: auto; margin-right: auto; }
  .card .photo { aspect-ratio: 16 / 9; }
  .hero .quote-card { max-width: 620px; }
}
@media (max-width: 520px) {
  .quote-card .row { grid-template-columns: 1fr; gap: 0; }
  .quote-card { padding: 1.4rem 1.2rem; }
  .hero { padding: 2.25rem 0 2.75rem; }
  .hero h1 { font-size: 1.85rem; }
  .lede { font-size: 1.05rem; margin-bottom: 1.5rem; }
  .brand-marks { flex-wrap: nowrap; gap: 1.25rem; }
  .brand-marks img { height: auto; width: calc(50% - .65rem); max-height: 44px; object-fit: contain; object-position: left center; }
  .hero-actions.mobile-only .btn { width: 100%; text-align: center; }
  .about { text-align: left; }
  .about .section-title { text-align: left; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-logo { margin: 0 auto; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-template-rows: none; grid-auto-rows: 92px; grid-auto-flow: dense; gap: 8px; }
  .tile:nth-child(n) { grid-area: auto; }
  .tile.wide { grid-column: span 2; grid-row: span 2; }
  .tile.tall { grid-row: span 3; }
  .tile.land { grid-row: span 2; }
  .top-actions .btn-sm { padding: .5rem .75rem; font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg, .caustics, .bubbles span { animation: none; }
  .bubbles { display: none; }
  .tile img, .card, .btn { transition: none; }
}

#quote, #quote-bottom { scroll-margin-top: 110px; }
.quote-card select { -webkit-appearance: none; appearance: none; min-height: 2.9rem; padding-right: 2.4rem;
  background: var(--off-navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230a2540' stroke-width='2'/%3E%3C/svg%3E") no-repeat right .9rem center; }
.quote-card input { min-height: 2.9rem; }
.thanks-logo { height: 70px; width: auto; margin: 0 auto 2rem; }
.thanks .wrap, .thanks > div { color: var(--white); }
.thanks a:not(.btn) { color: var(--orange); }
