/*
  ptgs.co.uk - Patrick Thomas Gardening
  Mobile-first stylesheet (replaces global.css, which is kept on the server for rollback).
*/

:root {
  --green-950: #18240f;
  --green-900: #22341a;
  --green-800: #2b4420;
  --green-700: #3a5c29;
  --green-600: #4a7531;
  --lawn: #95d56f;
  --lawn-soft: #eaf4df;
  --cream: #f7f5ee;
  --line: #d9d3c1;
  --ink: #1f271b;
  --muted: #59624f;
  --white: #fff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(24, 36, 15, .06), 0 10px 30px rgba(24, 36, 15, .10);
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --header-h: 84px;
}

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

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 1rem/1.65 var(--font-body);
}

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

h1, h2, h3 {
  margin: 0 0 .5em;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--green-900);
  text-wrap: balance;
}

p { margin: 0 0 1em; }

a { color: var(--green-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-900); }

:focus-visible { outline: 3px solid var(--lawn); outline-offset: 2px; }

.wrap { width: min(100% - 32px, 1120px); margin-inline: auto; }
.narrow { max-width: 640px; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 16px; border-radius: 8px;
  background: var(--white); color: var(--green-900); font-weight: 600;
}
.skip-link:focus { top: 12px; }

.icon { width: 20px; height: 20px; fill: currentColor; flex: none; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  border: 2px solid transparent; border-radius: 999px;
  font: 600 1rem/1.2 var(--font-body);
  text-decoration: none; text-align: center;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-small { min-height: 42px; padding: 8px 18px; font-size: .9375rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--green-600); color: var(--white); }
.btn-primary:hover { background: var(--green-700); color: var(--white); }

.btn-light { background: var(--white); color: var(--green-800); }
.btn-light:hover { background: var(--lawn-soft); color: var(--green-900); }

.btn-ghost { border-color: rgba(255, 255, 255, .75); color: var(--white); }
.btn-ghost:hover { background: rgba(255, 255, 255, .14); color: var(--white); }

/* ---------- Header (sits over each page's hero) ---------- */

.site-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: var(--header-h);
}
.logo img { width: auto; height: 50px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions .btn-light { display: none; }

.header-phone {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  color: var(--white); font-weight: 600; text-decoration: none;
}
.header-phone:hover { background: rgba(255, 255, 255, .26); color: var(--white); }
.header-phone span { display: none; }

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

.hero {
  position: relative;
  color: var(--white);
  background: var(--green-900) center / cover no-repeat;
}
.hero-home {
  background-image:
    linear-gradient(180deg, rgba(18, 28, 12, .55) 0%, rgba(18, 28, 12, 0) 30%),
    linear-gradient(90deg, rgba(18, 28, 12, .82) 0%, rgba(18, 28, 12, .5) 55%, rgba(18, 28, 12, .12) 100%),
    url("/images/large/gardening-by-ptgs.jpg");
}
.hero-page {
  background-image:
    linear-gradient(180deg, rgba(18, 28, 12, .72), rgba(18, 28, 12, .6)),
    url("/images/large/gardening-work-by-pat-thomas.jpg");
  background-position: center 40%;
}
.hero-inner { padding: calc(var(--header-h) + 40px) 0 56px; }
.hero-page .hero-inner { padding-bottom: 40px; }

/* On the home page the small eyebrow line is the <h1> (it carries the search keywords)
   and the big "The art of gardening" title is a styled paragraph. */
.hero-title, .hero-page h1 { color: var(--white); }
.hero-title {
  margin: 0 0 .5em;
  font-family: var(--font-display); font-weight: 700; line-height: 1.15; text-wrap: balance;
  font-size: clamp(2.25rem, 8vw, 4rem);
  max-width: 14ch;
}
.hero-page h1 { font-size: clamp(1.875rem, 6vw, 2.75rem); max-width: 22ch; margin-bottom: 0; }

.eyebrow {
  margin: 0 0 .75em;
  color: var(--lawn);
  font-family: var(--font-body); line-height: 1.5;
  font-size: .8125rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.hero-lead { max-width: 34em; font-size: 1.125rem; color: rgba(255, 255, 255, .92); }

.hero-actions, .cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-actions .btn, .cta-actions .btn { flex: 1 1 200px; }
/* Phones: main button on its own row, the secondary ones share the row below */
.hero-actions .btn-ghost { flex: 1 1 auto; padding-inline: 16px; }
.hero-actions .btn-primary { flex-basis: 100%; }

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

.section { padding: 56px 0; }
.section-cream { background: var(--cream); }
.section-title { font-size: clamp(1.75rem, 5vw, 2.5rem); }
.section-lead { color: var(--muted); font-size: 1.0625rem; margin-bottom: 28px; }

.split { display: grid; gap: 40px; }
.intro h2 { font-size: clamp(1.5rem, 4.5vw, 2rem); }
.intro p { color: #3a4334; font-size: 1.125rem; line-height: 1.7; }
.signature { margin-top: 8px; mix-blend-mode: multiply; }

.contact-list { list-style: none; margin: 0; padding: 0; font-size: 1.25rem; font-weight: 600; }
.contact-list li { margin-bottom: 6px; }
.contact-list a { text-decoration: none; }

/* ---------- Form ---------- */

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 20px;
}
.form-card { border-top: 6px solid var(--green-600); }
.card-title { margin-bottom: 0; font-size: 1.75rem; }
.card-sub { margin-bottom: 20px; color: var(--green-600); font-family: var(--font-display); font-style: italic; font-size: 1.125rem; }

.field { margin-bottom: 16px; }
.field-row { display: grid; gap: 0 14px; }

.field label { display: block; margin-bottom: 6px; font-size: .9375rem; font-weight: 600; color: var(--green-900); }
.optional { font-weight: 400; color: var(--muted); }

.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fdfcf9;
  color: var(--ink);
  font: 400 1rem/1.4 var(--font-body); /* 16px stops iOS zooming into fields */
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field select {
  appearance: none; -webkit-appearance: none;
  padding-right: 40px;
  background: #fdfcf9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%234a7531'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5' stroke='%234a7531' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center / 18px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(149, 213, 111, .45);
  background-color: var(--white);
}
.field input:user-invalid { border-color: #b3261e; }

.form-alert {
  margin-bottom: 18px; padding: 12px 14px;
  border-left: 4px solid #b3261e; border-radius: 8px;
  background: #fbeae8; color: #6d1a14;
}
.form-note { margin: 12px 0 0; font-size: .875rem; color: var(--muted); text-align: center; }

/* Spam trap field: kept off-screen rather than display:none so naive bots still fill it */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

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

.services {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 12px;
}
.services li {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border: 1px solid #e7e3d6; border-radius: 12px;
  background: var(--white);
  font-weight: 600; color: var(--green-900);
}
.services li::before {
  content: ""; flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--lawn-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234a7531' d='M20 4c-7.5 0-13 3.6-13 10.2 0 1.2.2 2.3.6 3.3L5 20.1 6.4 21.5l2.5-2.5c1 .5 2.1.7 3.4.7C18.4 19.7 20 12.4 20 4Zm-7.7 13.7c-.7 0-1.4-.1-2-.3l5.4-5.4-1.4-1.4-5.4 5.4c-.2-.6-.3-1.2-.3-1.8C8.6 9.6 12.4 6.5 18 6c-.5 6.4-2.2 11.7-5.7 11.7Z'/%3E%3C/svg%3E") no-repeat center / 20px;
}

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

.cta-band {
  padding: 48px 0;
  color: var(--white);
  background: linear-gradient(110deg, var(--green-900) 0%, var(--green-800) 55%, var(--green-700) 100%);
}
.cta-band h2 { color: var(--white); font-size: clamp(1.5rem, 4.5vw, 2rem); margin-bottom: .25em; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .88); }
.cta-actions { margin-top: 20px; }

/* ---------- Gallery ---------- */

.gallery {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 14px;
  grid-template-columns: 1fr;
}
.gallery a {
  display: block;
  border-radius: 12px;
  overflow: hidden; /* clips the hover zoom; never scrolls */
  background: var(--cream);
}
.gallery img {
  width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  transition: transform .35s ease;
}
.gallery a:hover img { transform: scale(1.04); }

/* ---------- Lightbox ---------- */

.lightbox {
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: transparent; color: var(--white);
}
.lightbox[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(12, 18, 8, .94); }
.lightbox img {
  max-width: min(94vw, 1200px); max-height: 78vh; width: auto; height: auto;
  border-radius: 8px; object-fit: contain;
  touch-action: pan-y;
}
.lightbox-caption { margin: 14px 16px 0; text-align: center; color: rgba(255, 255, 255, .85); font-size: .9375rem; }
.lightbox-btn {
  position: absolute;
  width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: var(--white);
  font-size: 2rem; line-height: 1; cursor: pointer;
}
.lightbox-btn:hover { background: rgba(255, 255, 255, .26); }
.lightbox-close { top: 14px; right: 14px; }
.lightbox-prev, .lightbox-next { bottom: 18px; }
.lightbox-prev { left: calc(50% - 60px); }
.lightbox-next { right: calc(50% - 60px); }

/* ---------- Thanks page ---------- */

.thanks { text-align: center; }
.thanks-lead { font-family: var(--font-display); font-size: 1.75rem; color: var(--green-900); }

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

.mower {
  height: 92px;
  background: var(--white) url("/images/mower.jpg") no-repeat 62% bottom;
}

.site-footer { background: var(--green-900); color: #d6e0cc; padding: 44px 0 0; font-size: .9375rem; }
.site-footer a { color: #bfe6a1; }
.site-footer a:hover { color: var(--white); }
.footer-grid { display: grid; gap: 28px; }
.footer-title { font-family: var(--font-body); font-size: 1rem; color: var(--lawn); margin-bottom: .6em; }
.site-footer address { font-style: normal; }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { margin-bottom: 4px; }
.footer-bottom { margin-top: 36px; padding: 18px 0 24px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .8125rem; color: #a9b69e; }
.footer-bottom p { margin: 0; }

/* ---------- Larger screens ---------- */

@media (min-width: 520px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .services { grid-template-columns: repeat(2, 1fr); }
  .card { padding: 28px; }
}

@media (min-width: 640px) {
  :root { --header-h: 104px; }
  .logo img { height: 64px; }
  .header-actions .btn-light { display: inline-flex; }
  .header-phone { width: auto; height: auto; padding: 8px 4px; background: none; }
  .header-phone:hover { background: none; text-decoration: underline; }
  .header-phone span { display: inline; }
  .hero-actions .btn, .cta-actions .btn { flex: 0 0 auto; }
  .hero-actions .btn-ghost { padding-inline: 22px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .lightbox-prev, .lightbox-next { top: 50%; bottom: auto; transform: translateY(-50%); }
  .lightbox-prev { left: 16px; }
  .lightbox-next { right: 16px; }
}

@media (min-width: 900px) {
  :root { --header-h: 120px; }
  .logo img { height: 80px; }
  .section { padding: 88px 0; }
  .hero-home .hero-inner { padding: calc(var(--header-h) + 72px) 0 112px; }
  .hero-page .hero-inner { padding: calc(var(--header-h) + 24px) 0 56px; }
  .split { grid-template-columns: minmax(0, 1fr) 460px; gap: 64px; align-items: start; }
  .intro p { font-size: 1.1875rem; }
  .split-quote { grid-template-columns: minmax(0, 1fr) 560px; }
  .services { grid-template-columns: repeat(3, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
  .cta-actions { margin-top: 0; flex: none; }
  .card { padding: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
