/* =========================================================
   Cowes 2 Coast Lawns & Gardens
   Pure HTML/CSS — no JavaScript
   ========================================================= */

:root {
  --navy-900: #06203d;
  --navy-800: #0a2a4e;
  --navy-700: #103a68;
  --blue-500: #2f8fe0;
  --green-600: #3f9a3c;
  --green-500: #5ab634;
  --green-400: #7cc93f;

  --ink: #16202c;
  --ink-soft: #4a5a6b;
  --line: #dfe6ec;
  --bg: #ffffff;
  --bg-alt: #f4f7f9;

  --wrap: 1140px;
  /* sticky header height: 136px logo + 20px padding + 1px border */
  --header-h: 157px;
  --radius: 10px;
  --shadow: 0 2px 4px rgba(6, 32, 61, .06), 0 8px 24px rgba(6, 32, 61, .08);
}

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

html {
  scroll-behavior: smooth;
  /* stop iOS inflating text when the phone is turned to landscape */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* belt-and-braces: nothing should ever cause sideways scroll on a phone */
  overflow-x: hidden;
}

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

h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 .5em;
  letter-spacing: -.015em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.13rem; letter-spacing: -.005em; }

p { margin: 0 0 1em; }

a { color: var(--navy-700); }

/* physical properties throughout (not padding-inline / margin-inline) so the
   layout still holds on older iOS and Android WebView builds */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy-800);
  color: #fff;
  padding: 12px 20px;
  z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--green-500);
  outline-offset: 3px;
}

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

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 6px;
  font-weight: 700;
  font-size: .97rem;
  text-decoration: none;
  letter-spacing: .01em;
  transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--green-600);
  color: #fff;
  box-shadow: 0 4px 14px rgba(63, 154, 60, .35);
}
.btn-primary:hover {
  background: var(--green-500);
  transform: translateY(-2px);
}

.btn-ghost {
  background: rgba(255, 255, 255, .1);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, .75);
  padding: 11px 24px;
}
.btn-ghost:hover { background: rgba(255, 255, 255, .2); }

.btn-lg { padding: 17px 40px; font-size: 1.1rem; }

.btn-call {
  background: var(--green-600);
  color: #fff;
  padding: 11px 20px;
}
.btn-call:hover { background: var(--green-500); }

/* Email — secondary to the green phone CTA, so outlined rather than filled.
   9px padding + 2px border equals .btn-call's 11px, so the two line up. */
.btn-email {
  background: #fff;
  color: var(--navy-800);
  border: 2px solid var(--line);
  padding: 9px 18px;
}
.btn-email:hover {
  background: var(--bg-alt);
  border-color: var(--navy-700);
}

/* Same button on dark grounds — the contact panel and the footer */
.btn-email-dark {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, .3);
  padding: 9px 18px;
}
.btn-email-dark:hover {
  background: rgba(255, 255, 255, .12);
  border-color: #fff;
}
/* .site-footer a sets a link colour that would otherwise win on specificity */
.site-footer .btn-email-dark { color: #fff; }

/* At .btn-lg size the 2px border again has to come out of the padding
   so this button matches the green one beside it */
.btn-lg.btn-email-dark { padding: 15px 38px; }

/* Phone + email side by side, mirroring the header pairing */
.contact-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 18px;
}

/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 84px;
  padding-top: 10px;
  padding-bottom: 10px;
  flex-wrap: wrap;
}

.brand { display: block; line-height: 0; margin-right: auto; }
.brand img { width: 190px; height: auto; }

.site-nav {
  display: flex;
  gap: 30px;
}

.site-nav a {
  color: var(--navy-800);
  text-decoration: none;
  font-weight: 600;
  font-size: .97rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover {
  color: var(--green-600);
  border-bottom-color: var(--green-500);
}

/* ---------------------------------------------------------
   Social links + phone button
   --------------------------------------------------------- */

.header-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  /* four items now — let them wrap rather than overflow on narrow screens */
  flex-wrap: wrap;
  gap: 8px;
}

.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* 44px keeps it a comfortable tap target even though the mark is 24px */
  width: 44px;
  height: 44px;
  border-radius: 50%;
  text-decoration: none;
  transition: background-color .18s ease, transform .18s ease;
}

.social svg { width: 24px; height: 24px; display: block; }

.social:hover {
  background: var(--bg-alt);
  transform: translateY(-2px);
}

/* Same marks on the dark contact panel. They need a light ground: the "f"
   in Facebook's logo is a knockout, so on navy it would fill with navy. */
.social-label {
  margin: 36px 0 14px;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 700;
  color: rgba(255, 255, 255, .6);
}

.social-row {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.social-on-dark {
  width: 48px;
  height: 48px;
  background: #fff;
}

.social-on-dark svg { width: 26px; height: 26px; }

.social-on-dark:hover {
  background: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
}

/* Anchor offset — without this the sticky header covers the heading of
   whichever section a nav link jumps to. Only needed while the header is
   sticky; it goes static at <=780px, where the extra gap isn't wanted. */
@media (min-width: 781px) {
  section[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
}

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */

.hero {
  position: relative;
  background-image:
    linear-gradient(100deg, rgba(6, 32, 61, .88) 0%, rgba(6, 32, 61, .72) 45%, rgba(6, 32, 61, .35) 100%),
    url("images/hero_smaller.jpg");
  background-size: cover;
  /* hero_smaller.jpg is pre-cropped (1536x642), so centre it */
  background-position: 50% 50%;
  background-repeat: no-repeat;
  color: #fff;
}

.hero-inner {
  padding-top: clamp(72px, 10vw, 128px);
  padding-bottom: clamp(72px, 10vw, 128px);
}

/* keep hero copy to a comfortable measure without shrinking the container */
.hero-inner > * { max-width: 640px; }
.hero-inner > h1 { max-width: 16ch; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--green-400);
  margin: 0 0 14px;
}

.eyebrow-dark { color: var(--green-600); }

.hero h1 {
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}

.lede {
  font-size: clamp(1.05rem, 1.9vw, 1.22rem);
  color: rgba(255, 255, 255, .92);
  max-width: 52ch;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 38px;
}

.hero-badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 0;
  padding: 0;
  font-size: .93rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .9);
}

.hero-badges li { position: relative; padding-left: 24px; }
.hero-badges li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 13px;
  height: 7px;
  border-left: 2.5px solid var(--green-400);
  border-bottom: 2.5px solid var(--green-400);
  transform: rotate(-45deg);
}

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

.section {
  padding-top: clamp(56px, 8vw, 92px);
  padding-bottom: clamp(56px, 8vw, 92px);
}
.section-alt { background: var(--bg-alt); }

.section h2 { color: var(--navy-800); }

.section-lede {
  color: var(--ink-soft);
  max-width: 58ch;
  font-size: 1.05rem;
  margin-bottom: 44px;
}

/* ---------------------------------------------------------
   Service cards
   --------------------------------------------------------- */

.cards {
  display: grid;
  /* min() guard stops the track overflowing on very narrow phones */
  grid-template-columns: repeat(auto-fit, minmax(min(255px, 100%), 1fr));
  gap: 22px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px 24px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: #c9d8e4;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--navy-800), var(--navy-700));
  color: var(--green-400);
  margin-bottom: 18px;
}
.card-icon svg { width: 26px; height: 26px; }

.card h3 { color: var(--navy-800); margin-bottom: .35em; }

.card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: .96rem;
}

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

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.about-text p { color: var(--ink-soft); }

.ticks {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.ticks li {
  position: relative;
  padding-left: 32px;
  font-weight: 600;
  color: var(--ink);
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .5em;
  width: 14px;
  height: 8px;
  border-left: 3px solid var(--green-600);
  border-bottom: 3px solid var(--green-600);
  transform: rotate(-45deg);
}

.about-figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.about-figure img {
  width: 100%;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
  object-position: 50% 85%;
}

/* ---------------------------------------------------------
   Service areas
   --------------------------------------------------------- */

.areas {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.areas li {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 20px;
  font-weight: 600;
  font-size: .94rem;
  color: var(--navy-800);
}

.areas-note {
  color: var(--ink-soft);
  font-size: .96rem;
  margin: 0;
}

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

.contact {
  background: linear-gradient(160deg, var(--navy-800) 0%, var(--navy-900) 100%);
  color: #fff;
  text-align: center;
}

.contact h2 { color: #fff; }

.contact-inner .eyebrow { color: var(--green-400); }

.contact-lede {
  color: rgba(255, 255, 255, .85);
  max-width: 46ch;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 34px;
  font-size: 1.05rem;
}

.contact-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 26px;
  margin: 52px 0 0;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, .16);
  text-align: left;
}

.contact-details dt {
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: .72rem;
  font-weight: 700;
  color: var(--green-400);
  margin-bottom: 6px;
}

.contact-details dd {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  color: #fff;
}

.contact-details a { color: #fff; text-decoration: none; }
.contact-details a:hover { text-decoration: underline; }

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

.site-footer {
  background: var(--navy-900);
  color: rgba(255, 255, 255, .68);
  padding-top: 38px;
  padding-bottom: 38px;
  font-size: .92rem;
  text-align: center;
}

.footer-brand {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .01em;
  margin-bottom: .4em;
}

.footer-meta { margin-bottom: .8em; }
.site-footer a { color: rgba(255, 255, 255, .9); }

.footer-copy {
  margin: 0;
  font-size: .85rem;
  color: rgba(255, 255, 255, .45);
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-figure { order: -1; }
  .about-figure img { min-height: 260px; }
}

@media (max-width: 780px) {
  body { font-size: 16px; }

  /* the stacked header is far too tall to pin on a phone — let it scroll away.
     The call-to-action is repeated in the hero and the contact section. */
  .site-header { position: static; }

  .header-inner {
    justify-content: center;
    gap: 14px;
    text-align: center;
  }
  .brand { margin-right: 0; width: 100%; display: flex; justify-content: center; }
  .brand img { width: 165px; }
  .site-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 22px;
    border-top: 1px solid var(--line);
    padding-top: 6px;
  }
  /* roomier tap targets — thumbs, not mouse pointers */
  .site-nav a { padding: 12px 4px; }

  .hero { text-align: center; }
  .hero-inner > *,
  .hero-inner > h1 {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions { justify-content: center; }
  .hero-badges { justify-content: center; gap: 10px 20px; }
  .btn { width: auto; }

  .areas { justify-content: flex-start; }
  .contact-details { text-align: center; }
}

@media (max-width: 460px) {
  .wrap { padding-left: 18px; padding-right: 18px; }

  /* full-width buttons = easy thumb targets */
  .hero-actions .btn { width: 100%; text-align: center; }
  .btn-lg {
    display: block;
    width: 100%;
    padding: 17px 12px;
    font-size: 1.05rem;
  }

  .card { padding: 24px 20px 20px; }
  .areas li { padding: 8px 16px; }

  /* .btn is nowrap by default; a long address would overflow a small phone */
  .btn-email-dark {
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: .88rem;
  }
  .btn-lg.btn-email-dark { padding: 15px 12px; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .card:hover, .btn-primary:hover { transform: none; }
}

/* ---------------------------------------------------------
   Print
   --------------------------------------------------------- */

@media print {
  .site-header, .hero-actions, .skip-link { display: none; }
  .hero, .contact, .site-footer { background: none; color: #000; }
  .hero h1, .contact h2, .footer-brand { color: #000; }
}
