/* Wavy Taylors — site styles
   One stylesheet for every page. Mobile-first; colors are tokens on :root
   with a dark set under prefers-color-scheme. */

:root {
  color-scheme: light dark;

  /* Page colors */
  --bg: #fbf7ef;          /* sand */
  --surface: #ffffff;
  --surface-2: #f2ecdf;
  --text: #1c2a30;
  --muted: #4b5b62;
  --heading: #0f3b4c;     /* bay navy */
  --teal-text: #1a6670;
  --link: #155e6a;
  --link-hover: #0f3b4c;
  --border: #ddd3c1;
  --accent: #b5461c;      /* rust, like a workboat's bottom paint */
  --accent-hover: #963712;
  --on-accent: #ffffff;
  --primary: #0f3b4c;
  --on-primary: #ffffff;
  --on-primary-link: #f6cf8f;
  --focus: #c2410c;
  --footer-bg: #0f3b4c;
  --footer-text: #e6eef0;
  --footer-link: #f6cf8f;

  /* Scene colors (the bay illustration) */
  --sky-top: #cfe7ea;
  --sky-bottom: #fbf7ef;
  --sun: #f2c879;
  --shore-far: #b9cfc6;
  --shore: #8fae95;
  --cliff: #d7c29b;
  --water-1: #7fbcc2;
  --water-2: #2f8790;
  --water-3: #0f3b4c;
  --hull: #ffffff;
  --cabin: #eef3f2;
  --glass: #23505d;
  --rig: #1c2a30;
  --roof: #a8411b;
  --lamp: #f2c879;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 59, 76, .06), 0 8px 24px rgba(15, 59, 76, .07);
  --font-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1d24;
    --surface: #132a33;
    --surface-2: #10252d;
    --text: #e8eef0;
    --muted: #b4c3c9;
    --heading: #d5ecef;
    --teal-text: #8fd3dc;
    --link: #8fd3dc;
    --link-hover: #c4ecf1;
    --border: #2a4651;
    --accent: #f0915f;
    --accent-hover: #f6ad85;
    --on-accent: #1a1006;
    --primary: #17404e;
    --on-primary: #f2f6f7;
    --on-primary-link: #f6cf8f;
    --focus: #ffb37a;
    --footer-bg: #081419;
    --footer-text: #d6e1e4;
    --footer-link: #f6cf8f;

    --sky-top: #0b2430;
    --sky-bottom: #0d1d24;
    --sun: #ece4cb;       /* moon */
    --shore-far: #1d3a44;
    --shore: #1a3a35;
    --cliff: #3c4a45;
    --water-1: #1f5560;
    --water-2: #163f4a;
    --water-3: #0a2730;
    --hull: #dfe7e8;
    --cabin: #c5d1d3;
    --glass: #0d1d24;
    --rig: #b4c3c9;
    --roof: #c4643c;
    --lamp: #ffd88a;

    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

/* ---------- Base ---------- */

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

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

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--heading);
  line-height: 1.15;
  font-weight: 650;
  margin: 0 0 .75rem;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 4.5vw + 1rem, 3.3rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 2vw + 1rem, 2.15rem); }
h3 { font-size: 1.25rem; }

p, ul, ol { margin: 0 0 1rem; }

a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }

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

[id] { scroll-margin-top: 1.5rem; }

.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 48rem) {
  .container { padding-inline: 1.5rem; }
}

.prose { max-width: 42rem; }
.lead { font-size: 1.2rem; max-width: 40rem; }
.small { font-size: .92rem; color: var(--muted); }
.muted { color: var(--muted); }

.eyebrow {
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--teal-text);
  margin-bottom: .5rem;
}

.visually-hidden {
  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 ---------- */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--primary);
  color: var(--on-primary);
  padding: .7rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; color: var(--on-primary); }

/* ---------- Header and nav ---------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .25rem 1.5rem;
  padding-block: .6rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--heading);
  text-decoration: none;
  min-height: 48px;
}
.brand:hover { color: var(--heading); }
.brand svg { width: 36px; height: 36px; flex: none; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1rem;
}

.site-nav a:not(.btn) {
  display: inline-block;
  padding: .7rem .1rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
}
.site-nav a:not(.btn):hover { color: var(--heading); text-decoration: underline; }
.site-nav a[aria-current="page"] {
  color: var(--heading);
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-decoration-color: var(--accent);
}

.nav-cta { margin-left: .25rem; }

@media (max-width: 40rem) {
  .site-nav { width: 100%; }
  .nav-cta { display: none; } /* the hero and footer carry the button on phones */
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding: .75rem 1.35rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--heading); border-color: currentColor; }
.btn-secondary:hover { background: var(--surface-2); color: var(--heading); }
.btn-small { min-height: 42px; padding: .5rem 1.05rem; font-size: .95rem; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.5rem;
}

/* ---------- Hero (home) ---------- */

.hero {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  padding-top: clamp(2.25rem, 6vw, 4.5rem);
}

.hero .small { margin-top: 1rem; }

.scene {
  display: block;
  width: 100%;
  height: clamp(170px, 26vw, 380px);
  margin-top: 2rem;
}

.scene .sky-top { stop-color: var(--sky-top); }
.scene .sky-bottom { stop-color: var(--sky-bottom); }
.scene .sun { fill: var(--sun); }
.scene .shore-far { fill: var(--shore-far); }
.scene .shore { fill: var(--shore); }
.scene .cliff { fill: var(--cliff); }
.scene .w1 { fill: var(--water-1); }
.scene .w2 { fill: var(--water-2); }
.scene .w3 { fill: var(--water-3); }
.scene .hull, .scene .lh-house { fill: var(--hull); }
.scene .stripe { fill: var(--accent); }
.scene .cabin { fill: var(--cabin); }
.scene .glass { fill: var(--glass); }
.scene .rig { stroke: var(--rig); fill: none; }
.scene .rig-fill { fill: var(--rig); }
.scene .lh-roof { fill: var(--roof); }
.scene .lh-lamp { fill: var(--lamp); }
.scene .gull { stroke: var(--rig); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

@media (prefers-reduced-motion: no-preference) {
  .scene .bob { animation: bob 7s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  @keyframes bob {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(3px) rotate(-.6deg); }
  }
}

/* ---------- Inner page header ---------- */

.page-head {
  background: var(--surface);
  padding-top: 1.25rem;
}
.page-head .lead { margin-bottom: 0; }
.page-head .wave {
  display: block;
  width: 100%;
  height: clamp(36px, 6vw, 72px);
  margin-top: 1.75rem;
}
.page-head .wave .w-back { fill: var(--water-1); opacity: .45; }
.page-head .wave .w-front { fill: var(--bg); }

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .4rem;
  margin: 0 0 1.5rem;
  padding: 0;
  font-size: .95rem;
  color: var(--muted);
}
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; color: var(--muted); }
.breadcrumb a { display: inline-block; padding-block: .35rem; }

/* ---------- Sections ---------- */

.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section-alt { background: var(--surface-2); }
.section-head { max-width: 44rem; margin-bottom: 1.75rem; }
.section-head p { color: var(--muted); }

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem 1.1rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .more { font-weight: 700; }

.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}
.steps > li {
  counter-increment: step;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3.6rem 1.35rem 1.2rem;
  box-shadow: var(--shadow);
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  top: 1.1rem;
  left: 1.35rem;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  display: grid;
  place-items: center;
  font-weight: 700;
}
.steps h3 { margin-bottom: .35rem; }
.steps p { margin: 0; }

.dots { list-style: none; padding: 0; }
.dots li { position: relative; padding-left: 1.4rem; margin-bottom: .5rem; }
.dots li::before {
  content: "";
  position: absolute;
  left: .2rem;
  top: .62em;
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--accent);
}

.two-col { display: grid; gap: 1.5rem 3rem; }
@media (min-width: 52rem) {
  .two-col { grid-template-columns: 1fr 1fr; }
}

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.1rem 1.35rem;
  max-width: 46rem;
}
.callout p:last-child { margin-bottom: 0; }

.towns {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: 0;
  margin: 0 0 1rem;
}
.towns li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .25rem .8rem;
  font-size: .95rem;
}

/* ---------- Services ---------- */

.service {
  display: grid;
  gap: .5rem 3rem;
  padding-block: 2.25rem;
  border-top: 1px solid var(--border);
}
.service:first-of-type { border-top: 0; padding-top: .5rem; }
@media (min-width: 56rem) {
  .service { grid-template-columns: 1.1fr 1fr; }
}
.service h2 { margin-bottom: .5rem; }
.service h3 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; color: var(--heading); margin-bottom: .4rem; }

/* ---------- Promise ---------- */

.promise-list {
  counter-reset: promise;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
  max-width: 48rem;
}
.promise-list > li {
  counter-increment: promise;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem 1.1rem 4.4rem;
  box-shadow: var(--shadow);
}
.promise-list > li::before {
  content: counter(promise);
  position: absolute;
  left: 1.3rem;
  top: 1.2rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  font-weight: 700;
}
.promise-list h2 { font-size: 1.3rem; margin-bottom: .35rem; }
.promise-list p { margin: 0; }

/* ---------- About ---------- */

.about-grid { display: grid; gap: 2rem; }
@media (min-width: 52rem) {
  .about-grid { grid-template-columns: 22rem 1fr; align-items: start; }
}
.about-photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Story photos under the About text */
.story-photos {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 0;
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 40rem) {
  .story-photos { grid-template-columns: 1fr 1fr; }
}
.story-photos figure { margin: 0; }
.story-photos img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.story-photos figcaption {
  margin-top: .5rem;
  font-size: .92rem;
  color: var(--muted);
}

/* Visible only while the site is a draft. Remove once Tom's photo is in. */
.draft-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 17rem;
  padding: 1rem;
  border: 3px dashed var(--accent);
  border-radius: var(--radius);
  background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 12px, var(--surface-2) 12px, var(--surface-2) 24px);
  color: var(--text);
  font-weight: 700;
  text-align: center;
}

/* ---------- Contact ---------- */

.contact-card .btn { margin-top: .25rem; }
.contact-card .big {
  font-size: 1.25rem;
  font-weight: 700;
  word-break: break-word;
}

/* ---------- Call-to-action band ---------- */

.cta-band {
  background: var(--primary);
  color: var(--on-primary);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.cta-band h2 { color: var(--on-primary); }
.cta-band p { max-width: 40rem; }
.cta-band a:not(.btn) { color: var(--on-primary-link); }
.cta-band .btn-secondary { color: var(--on-primary); }
.cta-band .btn-secondary:hover { background: rgba(255, 255, 255, .1); color: var(--on-primary); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding-block: 2.75rem 1.5rem;
  font-size: .98rem;
}
.site-footer a { color: var(--footer-link); }
.site-footer a:hover { color: #fff; }
.site-footer h2 {
  font-size: 1.05rem;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--footer-text);
  margin-bottom: .5rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .35rem; }
.site-footer li a { display: inline-block; padding-block: .15rem; }

.footer-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
}
.footer-brand {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: .35rem;
}
.footer-base {
  border-top: 1px solid rgba(255, 255, 255, .18);
  margin-top: 2rem;
  padding-top: 1.1rem;
  font-size: .9rem;
}
.footer-base p { margin: 0; }

/* ---------- 404 ---------- */

.not-found { padding-block: clamp(3rem, 8vw, 6rem); }

/* Contact form (posts to the Wavy Taylors Google Form) */
.container.narrow { max-width: 46rem; }
.contact-form { display: grid; gap: 1.1rem; margin-top: 1.5rem; }
.contact-form .field { display: grid; gap: .4rem; }
.contact-form .field-row { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .contact-form .field-row { grid-template-columns: 1fr 1fr; } }
.contact-form label { font-weight: 700; color: var(--heading); }
.contact-form .req { color: var(--accent); }
.contact-form input,
.contact-form textarea {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .7rem .85rem;
  min-height: 48px;
  width: 100%;
}
.contact-form textarea { resize: vertical; min-height: 9rem; }
.contact-form input:focus-visible,
.contact-form textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.contact-form button { justify-self: start; }
.contact-form button[disabled] { opacity: .6; cursor: progress; }
.contact-form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.5em; margin: 0; font-weight: 700; }
.form-status.is-ok { color: var(--teal-text); }
.form-status.is-error { color: var(--accent); }
