/* Gonyea's Marine Service — colors carried over from the original site */
:root {
  --navy: #15284b;        /* original "navy" address text */
  --navy-2: #1e3763;
  --periwinkle: #7a99d5;  /* original page background */
  --periwinkle-soft: #e9eef9;
  --slate: #6a8995;       /* original menu panel */
  --ocean: #2982ad;       /* original menu rules */
  --gold: #c2ae6b;        /* propeller in the logo */
  --gold-light: #e6d9a6;
  --ink: #1d2533;
  --muted: #55607a;
  --card: #ffffff;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(21, 40, 75, .08), 0 8px 24px rgba(21, 40, 75, .10);
  --max: 1080px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: Verdana, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--periwinkle-soft);
}

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

a { color: var(--ocean); text-underline-offset: 2px; }
a:hover { color: var(--navy); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 10; }

/* ---------- Header ---------- */
.site-header {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  border-bottom: 4px solid var(--gold);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; }
.brand img { width: 84px; height: 84px; flex: none; }
.brand-name { font-size: 1.35rem; font-weight: bold; letter-spacing: .02em; line-height: 1.2; }
.brand-tag { display: block; font-size: .8rem; font-weight: normal; color: var(--gold-light); letter-spacing: .04em; }
.brand:hover { color: #fff; }

.header-call { text-align: right; font-size: .85rem; color: #c9d5ee; line-height: 1.4; }
.header-call a { color: #fff; font-size: 1.15rem; font-weight: bold; text-decoration: none; white-space: nowrap; }
.header-call a:hover { color: var(--gold-light); }

/* ---------- Nav ---------- */
.site-nav { background: var(--periwinkle); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.site-nav a {
  display: block;
  padding: 12px 16px;
  color: var(--navy);
  font-weight: bold;
  font-size: .92rem;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover { color: #fff; }
.site-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--navy); }
.site-nav .nav-feature { margin-left: auto; }
.site-nav .nav-feature a { color: #fff; background: var(--slate); }
.site-nav .nav-feature a:hover { background: var(--navy); }

.nav-toggle { display: none; }

/* ---------- Hero (home only) ---------- */
.hero {
  position: relative;
  color: #fff;
  background: var(--navy) center 40% / cover no-repeat;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(21,40,75,.05) 20%, rgba(21,40,75,.85) 100%);
}
.hero .wrap { position: relative; padding-top: 48px; padding-bottom: 32px; width: 100%; }
.hero h1 { margin: 0 0 6px; font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.2; text-shadow: 0 2px 8px rgba(0,0,0,.35); }
.hero p { margin: 0 0 18px; font-size: 1.05rem; color: #e6ecf8; max-width: 40em; }

.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 6px;
  background: var(--gold);
  color: var(--navy);
  font-weight: bold;
  text-decoration: none;
  border: 0;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
}
.btn:hover { background: var(--gold-light); color: var(--navy); }
.btn-outline { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); margin-left: 8px; }
.btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- Layout ---------- */
main { padding: 32px 0 48px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; align-items: start; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 36px;
}
.card h1 {
  margin: 0 0 20px;
  font-size: 1.7rem;
  line-height: 1.25;
  color: var(--navy);
  padding-bottom: 12px;
  border-bottom: 3px solid var(--periwinkle);
}
.card h2 { color: var(--navy); font-size: 1.2rem; margin: 28px 0 10px; }
.card p { margin: 0 0 16px; }
.card blockquote {
  margin: 20px 0;
  padding: 12px 18px;
  border-left: 4px solid var(--gold);
  background: #faf7ec;
  font-style: italic;
  color: #3d4659;
}
.card ol, .card ul { padding-left: 1.4em; margin: 0 0 18px; }
.card li { margin-bottom: 8px; }

.figure-right { float: right; margin: 4px 0 16px 24px; max-width: 45%; border-radius: 8px; box-shadow: var(--shadow); }
.figure-wide { display: block; width: 100%; border-radius: 8px; margin: 0 0 24px; box-shadow: var(--shadow); }
.clear { clear: both; }

.brands { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 28px; margin-top: 28px; padding-top: 24px; border-top: 1px solid #e3e8f2; }
.brands img { height: 40px; width: auto; }

.signoff { font-style: italic; font-weight: bold; color: var(--navy); }

/* Winterization Q&A */
.qa { list-style: none; padding: 0 !important; counter-reset: qa; }
.qa li { counter-increment: qa; position: relative; padding: 14px 16px 14px 56px; border: 1px solid #e3e8f2; border-radius: 8px; margin-bottom: 10px; }
.qa li::before { content: counter(qa); position: absolute; left: 16px; top: 14px; width: 26px; height: 26px; border-radius: 50%; background: var(--periwinkle-soft); color: var(--navy); font-weight: bold; font-size: .85rem; display: grid; place-items: center; }
.qa strong { color: var(--navy); }
.tag { display: inline-block; font-size: .72rem; font-weight: bold; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; margin-left: 6px; vertical-align: 2px; }
.tag-yes { background: #dff1e4; color: #1d6b35; }
.tag-no { background: #fbe3e1; color: #9b2c22; }
.tag-both { background: #fbf1d6; color: #7a5b0b; }

/* ---------- Sidebar ---------- */
.sidebar .panel {
  background: var(--slate);
  color: #fff;
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.sidebar .panel h2 { margin: 0 0 10px; font-size: 1rem; letter-spacing: .04em; text-transform: uppercase; color: var(--gold-light); }
.sidebar .panel p { margin: 0 0 12px; font-size: .92rem; }
.sidebar .panel a { color: #fff; }
.sidebar .phone { font-size: 1.3rem; font-weight: bold; text-decoration: none; }
.sidebar .panel .btn { color: var(--navy); width: 100%; text-align: center; margin-top: 4px; }
.sidebar .panel-light { background: var(--card); color: var(--ink); }
.sidebar .panel-light h2 { color: var(--slate); }
.sidebar .panel-light a { color: var(--ocean); }
.sidebar img.side-photo { border-radius: 6px; display: block; margin-bottom: 10px; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 8px; }
.gallery-grid a { display: block; border-radius: 8px; overflow: hidden; background: var(--periwinkle-soft); aspect-ratio: 4 / 3; box-shadow: 0 1px 3px rgba(21,40,75,.15); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.gallery-grid a:hover img, .gallery-grid a:focus img { transform: scale(1.04); }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
.lightbox::backdrop { background: rgba(10, 20, 40, .88); }
.lightbox figure { margin: 0; text-align: center; }
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 6px; display: block; margin: 0 auto; }
.lightbox figcaption { color: #fff; margin-top: 10px; font-size: .95rem; min-height: 1.4em; }
.lb-btn { position: fixed; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.15); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; cursor: pointer; }
.lb-btn:hover { background: rgba(255,255,255,.3); }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-close { position: fixed; top: 14px; right: 16px; transform: none; font-size: 1.3rem; }

/* ---------- Contact form ---------- */
.form-grid { display: grid; gap: 18px; max-width: 560px; }
fieldset { border: 1px solid #d8dfee; border-radius: 8px; padding: 12px 16px 14px; margin: 0; }
legend { font-weight: bold; color: var(--navy); padding: 0 6px; }
.radio-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 16px; }
.radio-row label { font-weight: normal; display: flex; gap: 8px; align-items: center; }
label { font-weight: bold; color: var(--navy); display: block; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=tel], textarea {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid #b9c5df;
  border-radius: 6px;
  background: #fbfcff;
}
input:focus, textarea:focus { outline: 3px solid rgba(122, 153, 213, .45); border-color: var(--periwinkle); }
textarea { min-height: 160px; resize: vertical; }
.hint { font-size: .8rem; color: var(--muted); font-weight: normal; }
.hp { position: absolute; left: -5000px; }
.notice { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; }
.notice-error { background: #fbe3e1; color: #7d2119; }
.notice-ok { background: #dff1e4; color: #1d6b35; }

/* ---------- Footer ---------- */
.site-footer { background: var(--periwinkle); color: var(--navy); padding: 28px 0; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; align-items: center; }
.footer-inner p { margin: 0; font-size: .9rem; }
.footer-tagline { color: #fff; font-style: italic; font-weight: bold; font-size: 1.05rem; text-shadow: 0 1px 2px rgba(21,40,75,.35); }
.site-footer a { color: var(--navy); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .sidebar .panel { margin-bottom: 0; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .brand img { width: 60px; height: 60px; }
  .brand { gap: 10px; }
  .brand-name { font-size: 1.05rem; }
  .brand-tag { display: none; }
  .header-inner { padding-top: 10px; padding-bottom: 10px; }
  .header-call span { display: none; }
  .header-call a { font-size: 1rem; }

  .nav-toggle {
    display: flex; align-items: center; gap: 8px;
    width: 100%; background: none; border: 0; color: var(--navy);
    font: inherit; font-weight: bold; padding: 12px 0; cursor: pointer;
  }
  .nav-toggle .bars { width: 20px; height: 2px; background: currentColor; position: relative; }
  .nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: currentColor; }
  .nav-toggle .bars::before { top: -6px; } .nav-toggle .bars::after { top: 6px; }
  .site-nav ul { display: none; flex-direction: column; padding-bottom: 8px; }
  .site-nav.open ul { display: flex; }
  .site-nav a { padding: 10px 4px; border-bottom: 1px solid rgba(21,40,75,.12); }
  .site-nav a[aria-current="page"] { border-bottom-color: rgba(21,40,75,.12); background: rgba(255,255,255,.18); padding-left: 10px; }
  .site-nav .nav-feature { margin-left: 0; }
  .site-nav .nav-feature a { padding-left: 10px; }

  .hero { min-height: 300px; }
  .hero::before { background: linear-gradient(180deg, rgba(21,40,75,.35) 0%, rgba(21,40,75,.92) 75%); }
  .btn-outline { margin: 8px 0 0; }
  main { padding: 20px 0 32px; }
  .card { padding: 22px 18px; }
  .card h1 { font-size: 1.4rem; }
  .figure-right { float: none; display: block; max-width: 100%; margin: 0 0 18px; }
  .sidebar { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .qa li { padding-left: 48px; }
  .qa li::before { left: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-grid img { transition: none; }
}
