/* ==========================================================================
   BLACK BUOY — Coastal Web Craft
   Site stylesheet
   --------------------------------------------------------------------------
   Design language: New England maritime. Deep navy ink, weathered whites,
   slate blue-gray, a single buoy-red accent reserved for calls to action.
   Headings set in Fraunces (editorial serif); body in Inter.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Palette */
  --ink: #12162a;          /* "black buoy" navy — matches the logo artwork background exactly */
  --ink-soft: #1c2236;     /* raised dark surface */
  --navy: #24384a;         /* deep harbor navy */
  --slate: #5d6f7d;        /* muted slate blue-gray — secondary text */
  --slate-light: #8fa0ac;  /* hairlines, quiet labels on dark */
  --sand: #f5f2ea;         /* sandy off-white page background */
  --shell: #fdfcf8;        /* weathered white — cards, light surfaces */
  --mist: #e7e2d5;         /* borders, dividers on light */
  --buoy-red: #b23a2a;     /* warm buoy red — CTAs only, used sparingly */
  --buoy-red-deep: #96301f;
  --brass: #a98b4f;        /* brass accent — small details, eyebrow labels */

  /* Type */
  --font-serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-sans: "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Rhythm */
  --measure: 62ch;
  --radius: 6px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-pad: clamp(4rem, 9vw, 7.5rem);
  --shadow-card: 0 1px 2px rgba(16, 24, 32, 0.06), 0 8px 28px rgba(16, 24, 32, 0.07);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 3.9rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }

p { margin: 0 0 1.1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--buoy-red); }

ul, ol { padding-left: 1.2em; }

::selection { background: var(--navy); color: var(--shell); }

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

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--shell);
  padding: 0.6rem 1rem;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* Screen-reader-only text */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Layout primitives ---------- */
.wrap {
  width: min(1120px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.section { padding-block: var(--section-pad); }
.section--tight { padding-block: calc(var(--section-pad) * 0.6); }

/* Dark sections invert the palette */
.section--dark {
  background: var(--ink);
  color: var(--sand);
}
.section--dark h2, .section--dark h3 { color: var(--shell); }
.section--dark p { color: #c9cfd4; }
.section--dark a { color: var(--shell); }
.section--dark a:hover { color: #e8a094; }

.section--shell { background: var(--shell); }

/* Eyebrow label above section headings */
.eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 1rem;
}

.lede {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  color: var(--slate);
  max-width: 56ch;
}
.section--dark .lede { color: var(--slate-light); }

/* Two-column split used on several pages */
.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
@media (min-width: 800px) {
  .split { grid-template-columns: 5fr 6fr; }
  .split--even { grid-template-columns: 1fr 1fr; }
}

/* Card grid */
.grid {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
}
@media (min-width: 640px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Rope divider motif ----------
   A quiet dashed hairline with a knot dot at center — evokes a rope line
   without literal illustration. */
.rope {
  border: none;
  height: 1px;
  margin: 0 auto;
  width: min(280px, 60%);
  background-image: linear-gradient(90deg, var(--slate-light) 33%, transparent 0);
  background-size: 9px 1px;
  position: relative;
  overflow: visible;
}
.rope::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 7px; height: 7px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--brass);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.btn:hover { transform: translateY(-1px); }

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

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--slate);
}
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }

.section--dark .btn--ghost,
.hero .btn--ghost,
.cta-band .btn--ghost {
  color: var(--sand);
  border-color: var(--slate);
}
.section--dark .btn--ghost:hover,
.hero .btn--ghost:hover,
.cta-band .btn--ghost:hover { border-color: var(--sand); color: var(--shell); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 252, 248, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--mist);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.9rem;
}

/* ---------- Logo lockup (artwork from /Logos) ----------
   Header uses the horizontal transparent logo (navy text → light bg only).
   Hero and footer use the stacked primary-navy logo, whose background
   (#12162a) matches --ink exactly so it blends seamlessly. */
.lockup {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.lockup__img { height: 48px; width: auto; }

/* "EST. NEW HAMPSHIRE" caption shown beneath the stacked logo artwork */
.lockup__est {
  display: block;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--slate-light);
}

/* ---------- Navigation ---------- */
.site-nav { display: flex; align-items: center; gap: 1.6rem; }

.site-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--slate);
  padding-block: 0.3rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--buoy-red);
}
.site-nav .btn { padding: 0.55rem 1.15rem; font-size: 0.88rem; }
.site-nav .btn:hover { transform: none; }
/* Keep the CTA's white text — .site-nav a's slate color must not win here */
.site-nav a.btn--primary,
.site-nav a.btn--primary:hover { color: #fff; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--slate-light);
  border-radius: var(--radius);
  color: var(--ink);
  padding: 0.45rem 0.7rem;
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; align-items: center; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--shell);
    border-bottom: 1px solid var(--mist);
    box-shadow: var(--shadow-card);
    padding: 0.5rem var(--gutter) 1.25rem;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a {
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--mist);
  }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--buoy-red); }
  .site-nav .btn { margin-top: 1rem; text-align: center; }
}

/* ---------- Hero ---------- */
.hero {
  /* Flat --ink so the primary-navy logo artwork blends in seamlessly */
  background: var(--ink);
  color: var(--sand);
  text-align: center;
  padding-block: clamp(4rem, 9vw, 7rem);
  position: relative;
  overflow: hidden;
}

.hero__logo {
  width: min(330px, 72%);
  height: auto;
  margin-inline: auto;
}
.hero .lockup__est { margin-top: 1rem; }

.hero h1 {
  color: var(--shell);
  max-width: 21ch;
  margin-inline: auto;
}

.hero .lede {
  margin-inline: auto;
  margin-top: 1.4rem;
  color: #aeb9c2;
}

.hero .btn-row { justify-content: center; margin-top: 2.6rem; }

.hero__kicker {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 2.8rem auto 1.6rem;
}

/* Page-level hero (interior pages) */
.page-hero {
  background: var(--ink);
  color: var(--sand);
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
  border-bottom: 3px solid var(--buoy-red);
}
.page-hero h1 { color: var(--shell); max-width: 24ch; }
.page-hero .lede { margin-top: 1rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--shell);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.1rem);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.card h3 { margin-top: 0.9rem; }
.card p { font-size: 0.98rem; color: var(--slate); flex-grow: 1; }

.card__icon {
  width: 42px;
  height: 42px;
  color: var(--navy);
}

.card__link {
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--buoy-red);
  margin-top: 1.1rem;
}
.card__link:hover { color: var(--buoy-red-deep); text-decoration: underline; }

/* Dark cards (on dark sections) */
.section--dark .card {
  background: var(--ink-soft);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: none;
}
.section--dark .card p { color: #aab4bc; }
.section--dark .card__icon { color: var(--brass); }

/* ---------- Feature list (numbered, chart-style) ---------- */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.75rem;
}

.feature-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  align-items: start;
}

.feature-list__num {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brass);
  border: 1px solid var(--mist);
  border-radius: 50%;
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  background: var(--shell);
}
.section--dark .feature-list__num {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.18);
}

.feature-list h3 { font-size: 1.12rem; margin-bottom: 0.3em; }
.feature-list p { font-size: 0.98rem; color: var(--slate); }
.section--dark .feature-list p { color: #aab4bc; }

/* ---------- Stats / trust strip ---------- */
.trust-strip {
  display: grid;
  gap: 2rem;
  text-align: center;
}
@media (min-width: 640px) { .trust-strip { grid-template-columns: repeat(3, 1fr); } }

.trust-strip__item strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--shell);
  margin-bottom: 0.3rem;
}
.trust-strip__item span { font-size: 0.92rem; color: var(--slate-light); }

/* ---------- Answer block ----------
   Answer-first content pattern: a direct, extractable answer set off
   from surrounding prose. */
.answer-block {
  background: var(--shell);
  border-left: 3px solid var(--brass);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.4rem 1.7rem;
  margin-block: 1.75rem;
}
.answer-block p {
  font-size: 1.05rem;
  color: var(--ink);
  max-width: none;
}
.section--dark .answer-block {
  background: var(--ink-soft);
}
.section--dark .answer-block p { color: var(--sand); }

/* ---------- FAQ (details/summary) ---------- */
.faq { display: grid; gap: 0.9rem; }

.faq details {
  background: var(--shell);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.08rem;
}
.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--brass);
  flex: none;
  transition: transform 160ms ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }

.faq details > div {
  padding: 0 1.4rem 1.25rem;
  color: var(--slate);
  font-size: 0.99rem;
}

/* ---------- Pricing note ---------- */
.pricing-note {
  background: var(--shell);
  border: 1px dashed var(--brass);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  max-width: 700px;
}
.pricing-note p { font-size: 0.98rem; color: var(--slate); max-width: none; }

/* ---------- Portfolio placeholders ---------- */
.work-card {
  background: var(--shell);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.work-card__media {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(36, 56, 74, 0.06) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(36, 56, 74, 0.06) 39px 40px),
    linear-gradient(160deg, #e9e4d8, #dfd9ca);
  color: var(--slate);
  border-bottom: 1px solid var(--mist);
}
.work-card__media svg { width: 48px; height: 48px; opacity: 0.55; }

.work-card__body { padding: 1.35rem 1.5rem; }
.work-card__body h3 { font-size: 1.15rem; margin-bottom: 0.35em; }
.work-card__body p { font-size: 0.95rem; color: var(--slate); }

.work-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.6rem;
}

/* ---------- Founders ---------- */
.founder {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.4rem;
  align-items: start;
}

.founder__mark {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--shell);
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
}

.founder h3 { margin-bottom: 0.2em; }
.founder__role {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  display: block;
  margin-bottom: 0.7rem;
}
.founder p { font-size: 0.98rem; color: var(--slate); }

/* ---------- Contact / forms ---------- */
.form-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--mist);
}

.form-tab {
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 600;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--slate);
  padding: 0.8rem 1.2rem;
  cursor: pointer;
  margin-bottom: -1px;
}
.form-tab:hover { color: var(--ink); }
.form-tab[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--buoy-red);
}

.inquiry-form { display: grid; gap: 1.3rem; }
.inquiry-form[hidden] { display: none; }

.field { display: grid; gap: 0.4rem; }

.field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}
.field .optional { font-weight: 400; color: var(--slate); }

.field input,
.field textarea {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--shell);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  width: 100%;
}
.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--navy);
  outline-offset: 0;
  border-color: var(--navy);
}

.field textarea { resize: vertical; min-height: 8.5rem; }

.field .error-msg {
  font-size: 0.85rem;
  color: var(--buoy-red);
  display: none;
}
.field.has-error input,
.field.has-error textarea { border-color: var(--buoy-red); }
.field.has-error .error-msg { display: block; }

@media (min-width: 640px) {
  .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; }
}

/* Honeypot — visually removed, still in the accessibility-safe DOM flow
   for bots that fill every field */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-status {
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  font-size: 0.98rem;
  display: none;
}
.form-status.is-success {
  display: block;
  background: #eaf2e8;
  border: 1px solid #b7ccae;
  color: #2d4a26;
}
.form-status.is-error {
  display: block;
  background: #f7e9e6;
  border: 1px solid #dcb4ab;
  color: var(--buoy-red-deep);
}

.contact-aside {
  background: var(--ink);
  color: var(--sand);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 3vw, 2.4rem);
}
.contact-aside h2 { color: var(--shell); font-size: 1.4rem; }
.contact-aside p { color: #aab4bc; font-size: 0.97rem; }
.contact-aside a { color: var(--shell); }

.contact-email {
  display: block;
  margin-block: 1.1rem;
}
.contact-email span {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.25rem;
}
.contact-email a {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  text-decoration: none;
}
.contact-email a:hover { text-decoration: underline; }

/* ---------- Closing CTA band ---------- */
.cta-band {
  background:
    radial-gradient(ellipse 80% 70% at 50% 120%, rgba(178, 58, 42, 0.22), transparent 65%),
    var(--ink);
  color: var(--sand);
  text-align: center;
}
.cta-band h2 { color: var(--shell); max-width: 22ch; margin-inline: auto; }
.cta-band .lede { margin-inline: auto; }
.cta-band .btn-row { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--slate-light);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-block: 3.5rem 2rem;
  font-size: 0.92rem;
}

.site-footer__grid {
  display: grid;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
@media (min-width: 800px) {
  .site-footer__grid { grid-template-columns: 2fr 1fr 1fr; }
}

.site-footer h4 {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 1rem;
}

.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.site-footer a { color: #c9cfd4; text-decoration: none; }
.site-footer a:hover { color: var(--shell); text-decoration: underline; }

.site-footer__blurb { max-width: 40ch; margin-top: 1.2rem; font-size: 0.92rem; }

/* Footer logo: stacked artwork over the matching --ink background */
.site-footer .lockup { flex-direction: column; align-items: flex-start; gap: 0.9rem; }
.site-footer__logo { width: 200px; height: auto; }

.site-footer__legal {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
}

/* ---------- Reveal-on-scroll (progressive enhancement) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 500ms ease, transform 500ms ease;
  }
  .reveal.is-visible { opacity: 1; transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .cta-band, .btn { display: none; }
}
