/* =========================================================
   Boat Hands: styles
   Mobile-first. Colors live in :root so they're easy to tweak.
   ========================================================= */

:root {
  --ink: #0f2a3d;        /* deep navy: text, dark sections */
  --ink-2: #1d4560;
  --sand: #f7f2e8;       /* warm deck-paint off-white */
  --sand-2: #efe6d4;
  --card: #fffdf8;
  --orange: #c8441b;     /* life-ring orange (passes contrast with white text) */
  --orange-hot: #f26a3d; /* brighter orange, used on navy */
  --teal: #1f6f6b;       /* sea glass */
  --teal-soft: #d6ebe7;
  --line: #e2d7c1;

  --font: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --gutter: 16px;
  --shadow: 0 1px 2px rgba(15, 42, 61, .06), 0 6px 20px rgba(15, 42, 61, .07);
  color-scheme: light;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px; /* larger base size for older eyes */
  line-height: 1.55;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible { outline: 3px solid var(--orange-hot); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 .5em; }
h2 { font-size: clamp(1.9rem, 6vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 800; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--ink); color: var(--sand); padding: 10px 14px; border-radius: 8px;
}
.skip:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 48px; padding: 0 1.4em;
  border: 2px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 1.05rem;
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: #a9380f; color: #fff; }
.btn-ghost { border-color: rgba(247, 242, 232, .7); color: var(--sand); }
.btn-ghost:hover { background: rgba(247, 242, 232, .12); color: #fff; }
.btn-small { min-height: 44px; padding: 0 1em; font-size: .95rem; }
.btn-block { width: 100%; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px var(--gutter);
  background: rgba(15, 42, 61, .96);
  backdrop-filter: saturate(140%) blur(6px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--sand); font-weight: 800; font-size: 1.25rem; text-decoration: none; letter-spacing: -0.02em; }
.brand picture { display: contents; }
.brand-logo { width: 36px; height: 36px; flex: none; }
.brand:hover { color: #fff; }
.topnav { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--ink); /* shows while the photo loads */
  color: var(--sand);
  padding: 56px 0 104px;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
/* navy wash over the photo so the text stays readable */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg,
    rgba(15, 42, 61, .80) 0%, rgba(15, 42, 61, .55) 40%,
    rgba(15, 42, 61, .60) 60%, rgba(15, 42, 61, .85) 100%);
}
.hero .wrap { position: relative; z-index: 2; }
.hero .wave { z-index: 3; }
.hero h1, .hero .lede, .hero-sub { text-shadow: 0 2px 14px rgba(5, 18, 28, .45); }
.eyebrow {
  letter-spacing: .02em; font-size: .875rem; font-weight: 700;
  color: var(--orange-hot); margin-bottom: .75em;
}
.eyebrow-label { color: #c9d6df; font-weight: 600; }
.hero h1 {
  font-size: clamp(3.2rem, 17vw, 6.5rem);
  font-weight: 900; letter-spacing: -0.04em; margin-bottom: .15em;
}
.lede { font-size: clamp(1.3rem, 5vw, 1.7rem); font-weight: 700; line-height: 1.25; max-width: 30ch; }
.hero-sub { max-width: 46ch; color: #d9e3ea; }
.badge {
  display: inline-flex; align-items: flex-start; gap: .6em;
  background: rgba(15, 42, 61, .55); border: 1px solid rgba(247, 242, 232, .25);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  padding: .55em 1em; border-radius: 12px; font-size: .95rem; font-weight: 600;
}
.dot { flex: none; width: 10px; height: 10px; margin-top: .45em; border-radius: 50%; background: #5fd3a6; box-shadow: 0 0 0 4px rgba(95, 211, 166, .25); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.cta-row { max-width: 460px; }
.cta-row .btn { flex: 1 1 140px; }
.wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: 40px; fill: var(--sand); }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-intro { font-size: 1.1rem; color: #3b5568; max-width: 52ch; margin-bottom: 1.6em; }
.section-ink { background: var(--ink); color: var(--sand); }
.section-ink .section-intro { color: #c9d6df; }

/* rope divider: twisted-rope stripes */
.rope {
  height: 10px; max-width: 1080px; margin: 0 auto;
  background: repeating-linear-gradient(-55deg, #c9a66b 0 6px, #e8d3a6 6px 12px);
  border-radius: 999px; opacity: .8;
  width: calc(100% - 2 * var(--gutter));
}

/* ---------- Services ---------- */
.small { font-size: .95rem; color: #3f5566; }

/* jump links: one chip per category */
.svc-jump { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: -0.4em 0 24px; }
.svc-jump a {
  display: flex; align-items: center; gap: .5em; min-height: 44px; padding: 0 .9em;
  background: var(--card); border: 2px solid var(--line); border-radius: 999px;
  color: var(--ink); font-weight: 700; font-size: .95rem; text-decoration: none;
}
.svc-jump a::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.svc-jump a:hover { border-color: var(--accent); }

.svc-grid { display: grid; gap: 18px; }
.svc-card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--accent);
  border-radius: var(--radius); padding: 20px 20px 18px; box-shadow: var(--shadow);
  scroll-margin-top: 72px;
}
/* optional photo strip at the top of a service card */
.svc-card { overflow: hidden; }
.svc-photo { position: relative; margin: -20px -20px 18px; background: var(--accent-soft); }
.svc-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.svc-photo figcaption {
  position: absolute; left: 12px; bottom: 12px;
  background: rgba(15, 42, 61, .82); color: var(--sand);
  font-size: .875rem; font-weight: 700; padding: .3em .75em; border-radius: 999px;
}
.svc-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.svc-icon {
  flex: none; display: grid; place-items: center; width: 48px; height: 48px;
  border-radius: 12px; background: var(--accent-soft); color: var(--accent);
}
.svc-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.svc-head h3 { font-size: 1.45rem; margin: .1em 0 .15em; }
.svc-tagline { margin: 0; color: #3b5568; font-size: 1rem; line-height: 1.4; }
.svc-note { background: var(--accent-soft); border-radius: 10px; padding: .7em .9em; font-size: .95rem; margin-bottom: .6em; }
.svc-list { list-style: none; margin: 0; padding: 0; }
.svc-list li { padding: .7em 0 .7em 16px; border-top: 1px dashed var(--line); position: relative; }
.svc-list li:first-child { border-top: 0; }
.svc-list li::before { content: ""; position: absolute; left: 0; top: 1.15em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.svc-list strong { display: block; }
.svc-price {
  margin: auto 0 0; padding-top: 14px; border-top: 2px solid var(--accent-soft);
  font-weight: 700; font-size: .95rem;
}
.svc-price span { display: block; text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; color: #4a5f6e; font-weight: 800; }

/* ---------- Gallery ---------- */
.gallery { display: grid; gap: 28px; }
.pair { margin: 0; }
.pair-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.shot {
  position: relative; display: block; width: 100%; padding: 0; margin: 0;
  border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in;
  background: var(--sand-2); aspect-ratio: 1 / 1;
}
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.shot:hover img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .shot img { transition: none; } .shot:hover img { transform: none; } }
.tag {
  position: absolute; left: 8px; top: 8px;
  background: var(--ink); color: var(--sand);
  font-size: .82rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: .3em .65em; border-radius: 999px;
}
.tag-after { background: var(--teal); color: #fff; }
.pair figcaption { margin-top: .6em; font-size: .97rem; color: #3b5568; }

/* ---------- Rates ---------- */
.rates { display: grid; gap: 12px; margin: 0; }
.rate {
  background: rgba(247, 242, 232, .06); border: 1px solid rgba(247, 242, 232, .16);
  border-radius: var(--radius); padding: 16px 18px;
}
.rate dt { text-transform: uppercase; letter-spacing: .1em; font-size: .875rem; font-weight: 800; color: #ff9a73; } /* lighter orange: 6:1 on the navy box */
.rate dd { margin: .2em 0 0; color: #d9e3ea; }
.price { display: block; font-size: 2.2rem; font-weight: 900; color: #fff; letter-spacing: -0.03em; line-height: 1.15; }
.price small { font-size: .5em; font-weight: 700; color: #c9d6df; }
.price-word { font-size: 1.6rem; }
.rates-foot { margin: 1.4em 0 0; color: #c9d6df; }

/* ---------- About ---------- */
.about { display: grid; gap: 24px; }
.about-photo img {
  width: 100%; border-radius: 18px; box-shadow: var(--shadow);
  border: 6px solid var(--card); transform: rotate(-1.2deg);
}
.about-close { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; }
.area { background: var(--card); border-left: 4px solid var(--orange); padding: .8em 1em; border-radius: 0 10px 10px 0; }

/* ---------- Contact ---------- */
.form {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 18px; box-shadow: var(--shadow); max-width: 680px;
}
.field { margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { display: block; font-weight: 700; margin-bottom: 6px; }
.field legend { padding: 0; }
.req { font-weight: 400; font-size: .9rem; color: #4a5f6e; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field textarea {
  width: 100%; font: inherit; font-size: 16px; /* 16px stops iOS zoom-on-focus */
  padding: 12px 14px; border: 2px solid #cdbfa3; border-radius: 10px;
  background: #fff; color: var(--ink);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { border-color: var(--teal); outline: 3px solid rgba(31, 111, 107, .25); outline-offset: 0; }
.field [aria-invalid="true"] { border-color: #b3261e; }
.hint { font-size: .95rem; color: #4a5f6e; margin: 6px 0 0; }
#f-contact-hint { margin: -6px 0 22px; }
#f-contact-hint.error, .error-msg { color: #b3261e; font-weight: 600; }
.error-msg { font-size: .95rem; margin: 6px 0 0; }
.field-row { display: grid; gap: 0 14px; }
/* contact: centered heading, intro and form box (fields inside stay left-aligned) */
.contact-section h2, .contact-section .section-intro { text-align: center; margin-left: auto; margin-right: auto; }
.contact-section .form { margin: 0 auto; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 14px 0 0; font-weight: 600; }
.form-status:empty { margin: 0; }
.form-status.ok { color: var(--teal); }
.form-status.err { color: #b3261e; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #c9d6df; padding: 40px 0 24px; }
.footer a { color: var(--sand); }
.footer a:hover { color: var(--orange-hot); }
.footer-grid { display: grid; gap: 18px; }
.footer-logo { width: 64px; height: 64px; margin-bottom: 10px; }
.footer-name { font-size: 1.6rem; font-weight: 900; color: var(--sand); margin-bottom: .2em; letter-spacing: -0.03em; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.footer-links a { overflow-wrap: anywhere; display: inline-flex; align-items: center; min-height: 44px; } /* big enough to tap */
.copyright { margin-top: 24px; font-size: .95rem; color: #c9d6df; }

/* ---------- Lightbox ---------- */
.lightbox {
  border: 0; padding: 0; background: transparent; color: var(--sand);
  max-width: min(94vw, 900px); max-height: 92vh; width: auto;
}
.lightbox::backdrop { background: rgba(10, 24, 35, .88); }
.lightbox img { max-height: 80vh; width: auto; margin: 0 auto; border-radius: 10px; }
.lb-caption { text-align: center; margin: 10px 0 0; }
.lb-close {
  position: fixed; top: 12px; right: 12px; width: 48px; height: 48px;
  border-radius: 50%; border: 0; background: var(--sand); color: var(--ink);
  font-size: 1.3rem; font-weight: 800; cursor: pointer;
}

/* ---------- Projects ---------- */
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--sand); }

.topnav a[aria-current="page"] { color: #fff; text-decoration: underline; text-decoration-color: var(--orange-hot); text-decoration-thickness: 3px; text-underline-offset: 8px; }

.page-hero {
  position: relative; color: var(--sand); padding: 32px 0 76px;
  background: radial-gradient(120% 80% at 100% 0%, rgba(47, 143, 138, .35), transparent 60%), var(--ink);
}
.page-hero h1 { font-size: clamp(2.4rem, 11vw, 4rem); font-weight: 900; letter-spacing: -0.035em; margin-bottom: .2em; }
.page-hero .lede { max-width: 40ch; font-size: clamp(1.1rem, 4.4vw, 1.4rem); font-weight: 600; margin-bottom: 0; }
.breadcrumb { font-size: 1rem; color: #c9d6df; margin-bottom: .8em; }
.breadcrumb a { color: var(--sand); display: inline-flex; align-items: center; min-height: 44px; }
.breadcrumb a:hover { color: var(--orange-hot); }
.breadcrumb span[aria-hidden] { margin: 0 .35em; opacity: .6; }

.project-grid { display: grid; gap: 24px; }
.project-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.project-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(15, 42, 61, .08), 0 14px 32px rgba(15, 42, 61, .12); }
.project-card:focus-within { outline: 3px solid var(--orange-hot); outline-offset: 3px; }
.project-card:focus-within .stretched:focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) { .project-card, .project-card:hover { transition: none; transform: none; } }
.pc-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; background: var(--card); }
.pc-shot { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--sand-2); }
.pc-shot img { width: 100%; height: 100%; object-fit: cover; }
.pc-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.pc-meta { font-size: .875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin-bottom: .4em; }
.pc-title { font-size: 1.4rem; margin-bottom: .4em; }
.pc-title a { color: var(--ink); text-decoration: none; }
.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.pc-more { margin-top: auto; padding-top: 12px; font-weight: 800; color: var(--orange); }

.tags { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { background: var(--teal-soft); color: #134744; font-size: .9rem; font-weight: 700; padding: .25em .7em; border-radius: 999px; }

.section-tight { padding: 40px 0 8px; }
.project-intro { display: grid; gap: 28px; }
.facts {
  margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); align-self: start;
}
.facts dt { text-transform: uppercase; letter-spacing: .1em; font-size: .82rem; font-weight: 800; color: var(--teal); }
.facts dd { margin: .15em 0 0; font-weight: 600; }
.facts-wide { grid-column: 1 / -1; }
.prose { max-width: 62ch; }
.prose h2 { font-size: 1.7rem; }

.pair-lg figcaption { font-size: 1rem; }

.photo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 8px; }
.photo-cap { font-size: .9rem; color: #3b5568; margin: .45em 0 0; }

/* project pages: extra photos sorted into Before and After panels */
.ba-cols { display: grid; gap: 20px; }
.ba-col {
  background: var(--card); border: 1px solid var(--line); border-top: 5px solid var(--ink);
  border-radius: var(--radius); padding: 16px 16px 18px; box-shadow: var(--shadow);
}
.ba-col-after { border-top-color: var(--teal); }
.ba-col-h { margin: 0 0 14px; }
.ba-col-h .tag { position: static; display: inline-block; font-size: .85rem; padding: .35em .9em; }
.ba-col .photo-grid { grid-template-columns: 1fr 1fr; gap: 14px 10px; }
.ba-col .shot .tag { display: none; } /* the panel label already says Before/After; the lightbox still reads it */

.pager { display: grid; gap: 10px; padding-top: 40px; padding-bottom: 48px; }
.pager a {
  display: block; padding: 14px 18px; border: 2px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--ink); font-weight: 800; text-decoration: none;
}
.pager a:hover { border-color: var(--ink); }
.pager-label { display: block; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); }
.pager-next { text-align: right; }

.cta-band { background: var(--teal); color: #fff; padding: 48px 0; }
.cta-band h2 { font-size: clamp(1.7rem, 6vw, 2.3rem); }
.cta-band .btn-ghost { border-color: rgba(255, 255, 255, .8); color: #fff; }
.cta-band .btn-ghost:hover { background: rgba(255, 255, 255, .14); }

/* =========================================================
   Larger screens
   ========================================================= */
@media (min-width: 560px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .rates { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 760px) {
  :root { --gutter: 28px; }
  .topnav { display: flex; gap: 22px; margin-left: auto; }
  .topnav a { color: #d9e3ea; text-decoration: none; font-weight: 600; }
  .topnav a:hover { color: #fff; }
  .hero { padding: 104px 0 150px; }
  .hero-bg img { object-position: 50% 40%; }
  /* on wide screens, darken the left (behind the text) and let the sunset show on the right */
  .hero::before {
    background: linear-gradient(90deg,
      rgba(15, 42, 61, .90) 0%, rgba(15, 42, 61, .70) 40%,
      rgba(15, 42, 61, .15) 75%, rgba(15, 42, 61, .05) 100%);
  }
  .wave { height: 60px; }
  .section { padding: 84px 0; }
  .svc-jump { display: flex; flex-wrap: wrap; }
  .svc-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 36px 28px; }
  .about { grid-template-columns: 360px 1fr; gap: 48px; align-items: center; }
  .footer-grid { grid-template-columns: 1fr auto; align-items: start; }
  .page-hero { padding: 56px 0 100px; }
  .project-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; } /* fills the row whether there are 2 or 3+ projects */
  .project-intro { grid-template-columns: 340px 1fr; gap: 48px; align-items: start; }
  .gallery-lg { grid-template-columns: 1fr; max-width: 900px; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 20px 14px; }
  .ba-cols { grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
  .ba-col { padding: 20px 20px 22px; }
  .ba-col:only-child { grid-column: 1 / -1; }
  .ba-col:only-child .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager-next { grid-column: 2; }
  .section-tight { padding: 56px 0 8px; }
}

@media (min-width: 1000px) {
  .rates { grid-template-columns: repeat(4, 1fr); }
}
