/* =========================================================
   Tidewell: coastal palette, mobile-first
   Change colors here and they update everywhere.
   ========================================================= */
:root {
  --white: #ffffff;
  --sand-50: #fbf8f3;
  --sand-100: #f4ede1;
  --sand-300: #e3d3bb;
  --ocean-100: #dcebef;
  --ocean-300: #8fbccb;
  --ocean-500: #2b7491;
  --ocean-700: #1f5f7a;
  --ocean-900: #133f52;
  --ink: #1d2b33;
  --muted: #5a6a72;
  --line: #e7e1d6;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(19, 63, 82, .05), 0 8px 24px rgba(19, 63, 82, .07);
  --header-h: 64px;
}

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

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

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

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ocean-700); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  color: var(--ocean-900);
  margin: 0 0 .5em;
  letter-spacing: -.005em;
}
h1 { font-size: clamp(2.4rem, 8.5vw, 4.25rem); }
h2 { font-size: clamp(2rem, 6vw, 3rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 760px; }

.sr-only, .hp {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ocean-900); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--ocean-500); outline-offset: 3px; border-radius: 4px; }

.eyebrow {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ocean-500);
  margin-bottom: .9rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 26px;
  font: 600 1rem/1 var(--sans);
  text-decoration: none; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ocean-700); color: #fff; }
.btn-primary:hover { background: var(--ocean-900); }
.btn-ghost { color: #fff; border-color: rgba(255,255,255,.7); }
.btn-ghost:hover { background: rgba(255,255,255,.14); }
.btn-outline { color: var(--ocean-700); border-color: var(--ocean-300); background: transparent; }
.btn-outline:hover { border-color: var(--ocean-700); background: var(--ocean-100); }
.btn-sand { background: var(--sand-100); color: var(--ocean-900); }
.btn-sand:hover { background: #fff; }
.btn-block { width: 100%; }
.btn-small { min-height: 40px; padding: 0 18px; font-size: .92rem; }

/* ---------- Wordmark ---------- */
.wordmark { display: inline-flex; flex-direction: column; align-items: flex-start; text-decoration: none; line-height: 1; }
.wordmark-text {
  font-family: var(--serif); font-weight: 600; font-size: 1.85rem;
  letter-spacing: .02em; color: var(--ocean-900);
}
.wordmark-wave { width: 62px; height: 8px; margin-top: 3px; }
.wordmark-wave path { fill: none; stroke: var(--ocean-300); stroke-width: 2.4; stroke-linecap: round; }
.wordmark-light .wordmark-text { color: #fff; }
.wordmark-light .wordmark-wave path { stroke: var(--sand-300); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 6px;
  width: 44px; height: 44px; padding: 0 10px; background: none; border: 0; cursor: pointer;
}
.nav-toggle .bar { display: block; height: 2px; background: var(--ocean-900); border-radius: 2px; transition: transform .25s; }
.nav-toggle[aria-expanded="true"] .bar:first-of-type { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:last-of-type { transform: translateY(-4px) rotate(-45deg); }

.site-nav {
  position: absolute; left: 0; right: 0; top: var(--header-h);
  display: none; flex-direction: column; gap: 4px;
  padding: 12px 20px 22px; background: #fff; border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 24px rgba(19,63,82,.08);
}
.site-nav.open { display: flex; }
.site-nav a { padding: 12px 4px; color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav a.btn { margin-top: 8px; color: #fff; background: var(--ocean-700); padding: 0 18px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: calc(92svh - var(--header-h));
  display: flex; align-items: flex-end;
  padding: 120px 0 56px;
  color: #fff;
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-overlay {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(19,63,82,.10) 0%, rgba(19,63,82,.35) 45%, rgba(19,63,82,.82) 100%);
}
.hero h1 { color: #fff; max-width: 15ch; }
.hero h1 em { font-style: italic; font-weight: 500; color: var(--sand-100); }
.hero .eyebrow { color: var(--sand-100); }
.hero .lede { font-size: 1.08rem; max-width: 36rem; color: rgba(255,255,255,.92); margin-bottom: 1.8rem; }
.hero-actions { display: flex; flex-direction: column; gap: 12px; }
.hero-actions .btn-primary { background: var(--sand-100); color: var(--ocean-900); }
.hero-actions .btn-primary:hover { background: #fff; }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-sand { background: var(--sand-50); }
.section-ocean { background: var(--ocean-900); color: rgba(255,255,255,.88); }
.section-ocean h2 { color: #fff; }
.section-ocean .eyebrow { color: var(--ocean-300); }

.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head.left { text-align: left; margin-left: 0; }
.section-sub { color: var(--muted); font-size: 1.05rem; }

/* ---------- Cards ---------- */
.card-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px;
}
.card h3 { margin-bottom: .35em; }
.card p { color: var(--muted); margin: 0; }
.icon {
  width: 44px; height: 44px; padding: 10px; margin-bottom: 16px;
  border-radius: 12px; background: var(--ocean-100);
  fill: none; stroke: var(--ocean-700); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- How it works ---------- */
.how-layout { display: grid; gap: 48px; align-items: center; }
.steps { list-style: none; margin: 0 0 36px; padding: 0; display: grid; gap: 28px; }
.steps li { display: grid; grid-template-columns: 52px 1fr; gap: 18px; }
.steps h3 { margin-bottom: .25em; }
.steps p { color: var(--muted); margin: 0; }
.step-num {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  font: 600 1.6rem/1 var(--serif); color: var(--ocean-700);
  background: #fff; border: 1.5px solid var(--ocean-300);
}
.how-figure { margin: 0; }
.how-figure img { border-radius: 200px 200px var(--radius) var(--radius); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; gap: 20px; }
.price-card {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 26px;
}
.price-card.featured { border: 1.5px solid var(--ocean-500); box-shadow: var(--shadow); }
.price-tag {
  position: absolute; top: -13px; left: 26px; margin: 0;
  background: var(--ocean-700); color: #fff; font-size: .74rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px;
}
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 4px 0 22px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.price-from { width: 100%; font-size: .85rem; color: var(--muted); }
.price-num { font: 600 3.2rem/1 var(--serif); color: var(--ocean-900); }
.price-num-sm { font-size: 1.9rem; }
.price-unit { color: var(--muted); }
.checks { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 10px; flex: 1; align-content: start; }
.checks li { position: relative; padding-left: 28px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--ocean-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f5f7a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 20px 56px 20px 22px;
  font: 600 1.35rem/1.25 var(--serif); color: var(--ocean-900);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 2px solid var(--ocean-500); border-bottom: 2px solid var(--ocean-500);
  transform: rotate(45deg); transition: transform .25s, margin-top .25s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 22px 20px; margin: 0; color: var(--muted); }

/* ---------- Testimonials ---------- */
.quote {
  margin: 0; padding: 30px 26px; border-radius: var(--radius);
  background: var(--sand-50); border: 1px dashed var(--sand-300);
}
.quote blockquote { margin: 0 0 20px; font: italic 500 1.35rem/1.4 var(--serif); color: var(--ocean-900); }
.quote figcaption { display: flex; flex-direction: column; font-size: .92rem; }
.quote figcaption span { color: var(--muted); }

/* ---------- Contact ---------- */
.contact-layout { display: grid; gap: 40px; }
.contact-intro p { font-size: 1.05rem; }
.contact-email a { color: var(--sand-100); }
.contact-form {
  background: #fff; color: var(--ink); border-radius: var(--radius);
  padding: 26px 20px; box-shadow: 0 20px 50px rgba(0,0,0,.18);
}
.contact-form .btn-sand { background: var(--ocean-700); color: #fff; margin-top: 6px; }
.contact-form .btn-sand:hover { background: var(--ocean-900); }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 500; font-size: .92rem; margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%; font: 400 1rem/1.4 var(--sans); color: var(--ink);  /* 16px+ stops iPhone zoom */
  padding: 13px 14px; border: 1px solid var(--sand-300); border-radius: 10px; background: var(--sand-50);
  transition: border-color .2s, background .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ocean-500); background: #fff; box-shadow: 0 0 0 3px var(--ocean-100); }
.field input[aria-invalid="true"] { border-color: #b4533c; }
.field textarea { resize: vertical; }
.form-status { margin: 14px 0 0; font-size: .95rem; min-height: 1.4em; }
.form-status.success { color: #24704f; }
.form-status.error { color: #b4533c; }
.contact-form.sent .field, .contact-form.sent button { display: none; }
.contact-form.sent .form-status { font: 600 1.5rem/1.35 var(--serif); color: var(--ocean-900); text-align: center; padding: 24px 0; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ocean-900); color: rgba(255,255,255,.7); padding: 0 0 40px; font-size: .95rem; }
.footer-inner { border-top: 1px solid rgba(255,255,255,.12); padding-top: 40px; }
.site-footer .wordmark { margin-bottom: 16px; }
.site-footer a:not(.wordmark) { color: var(--sand-100); }
.site-footer .fine { font-size: .8rem; color: rgba(255,255,255,.5); margin: 24px 0 0; }

/* =========================================================
   Larger screens
   ========================================================= */
@media (min-width: 600px) {
  .hero-actions { flex-direction: row; }
  .card-grid.services, .card-grid.testimonials { grid-template-columns: repeat(2, 1fr); }
  .contact-form { padding: 34px 32px; }
}

@media (min-width: 900px) {
  :root { --header-h: 76px; }
  .container { padding: 0 32px; }
  .section { padding: 120px 0; }

  .nav-toggle { display: none; }
  .site-nav {
    position: static; display: flex; flex-direction: row; align-items: center; gap: 28px;
    padding: 0; background: none; border: 0; box-shadow: none;
  }
  .site-nav a { padding: 6px 0; font-size: .95rem; }
  .site-nav a:not(.btn):hover { color: var(--ocean-700); }
  .site-nav a.btn { margin: 0 0 0 8px; }

  .hero { align-items: center; padding: 120px 0; min-height: 88vh; }
  .hero .lede { font-size: 1.2rem; }

  .card-grid.services, .card-grid.testimonials { grid-template-columns: repeat(3, 1fr); gap: 22px; }
  .card { padding: 32px 28px; }
  .how-layout { grid-template-columns: 1.1fr .9fr; gap: 80px; }
  .pricing-grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
  .contact-layout { grid-template-columns: 1fr 1.1fr; gap: 72px; align-items: start; }
  .contact-intro { padding-top: 12px; }
  .hero h1 { max-width: 17ch; }
}
