/* ==========================================================================
   Smeaton Hall Farm — Stylesheet
   ========================================================================== */

:root {
  /* Colours */
  --green-dark: #2c4a3b;
  --green: #3f6b4f;
  --green-mid: #587f5f;
  --green-light: #a9c6a1;
  --brown-dark: #4a3324;
  --brown: #6b4a34;
  --brown-light: #a9784f;
  --gold: #c9a15a;
  --gold-dark: #ab8442;
  --cream: #f7f2e7;
  --cream-dark: #efe6d3;
  --white: #ffffff;
  --ink: #26291f;
  --ink-soft: #4d5346;

  /* Type */
  --font-head: "Fraunces", Georgia, serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;

  /* Layout */
  --max-width: 1200px;
  --radius: 10px;
  --shadow-sm: 0 2px 8px rgba(38, 41, 31, 0.08);
  --shadow-md: 0 8px 28px rgba(38, 41, 31, 0.14);
  --transition: 0.25s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--green-dark);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 600;
}
p { margin: 0 0 1em; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

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

.section { padding: 80px 0; }
.section--tight { padding: 56px 0; }
.section--cream { background: var(--cream); }
.section--dark {
  background: var(--green-dark);
  color: var(--cream);
}
.section--dark h2, .section--dark h3 { color: var(--white); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--gold-dark);
  margin-bottom: 12px;
}
.section--dark .eyebrow { color: var(--gold); }

.section-head { max-width: 700px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.section-head p { color: var(--ink-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gold); color: var(--green-dark); }
.btn-primary:hover { background: var(--gold-dark); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.7); }
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-dark { background: var(--green-dark); color: var(--white); }
.btn-dark:hover { background: var(--green); }
.btn-ghost { background: transparent; color: var(--green-dark); border-color: var(--green-dark); }
.btn-ghost:hover { background: var(--green-dark); color: var(--white); }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(247, 242, 231, 0.98);
  border-bottom: 1px solid rgba(44, 74, 59, 0.1);
  transition: box-shadow var(--transition);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 600; font-size: 1.25rem; color: var(--green-dark); }
.brand svg { flex-shrink: 0; }
.brand span.sub { display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brown); }

.main-nav ul { display: flex; gap: 4px; align-items: center; }
.main-nav a {
  display: inline-block;
  padding: 10px 16px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  border-radius: 999px;
  transition: background var(--transition), color var(--transition);
}
.main-nav a:hover { background: var(--cream-dark); color: var(--green-dark); }
.main-nav a.is-active { color: var(--green-dark); font-weight: 700; background: var(--cream-dark); }
.main-nav .btn { margin-left: 8px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}
.nav-toggle span { width: 26px; height: 2px; background: var(--green-dark); border-radius: 2px; transition: transform var(--transition), opacity var(--transition); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  color: var(--white);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 32, 24, 0.55) 0%, rgba(20, 32, 24, 0.35) 45%, rgba(20, 32, 24, 0.75) 100%);
}
.hero-content { position: relative; z-index: 1; max-width: 760px; padding: 90px 24px 60px; margin: 0 auto; text-align: center; }
.hero-content .eyebrow { color: var(--gold); }
.hero-content h1 { color: var(--white); font-size: clamp(2.3rem, 5vw, 3.8rem); margin-bottom: 0.4em; }
.hero-content p.lead { font-size: 1.15rem; max-width: 600px; margin: 0 auto 32px; color: rgba(255,255,255,0.92); }
.hero-content .btn-row { justify-content: center; }

.page-hero {
  position: relative;
  min-height: 46vh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  background-size: cover;
  background-position: center;
}
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,32,24,0.35), rgba(20,32,24,0.75)); }
.page-hero .container { position: relative; z-index: 1; padding-bottom: 48px; }
.page-hero .breadcrumb { font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.page-hero h1 { color: var(--white); font-size: clamp(2rem, 4vw, 3rem); margin: 0; }

/* ---------- Grid / Cards ---------- */
.grid { display: grid; gap: 32px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split img { border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.split .eyebrow { display: inline-block; }

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.card-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 1.15rem; }
.card-body p { color: var(--ink-soft); flex: 1; }
.card-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: var(--cream-dark);
  border-radius: 50%;
  color: var(--green-dark);
  margin-bottom: 16px;
}

.pill {
  display: inline-block;
  background: var(--cream-dark);
  color: var(--brown-dark);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ---------- Values / Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat strong { display: block; font-family: var(--font-head); font-size: 2.4rem; color: var(--gold); }
.stat span { color: var(--cream); font-size: 0.9rem; }

/* ---------- Timeline ---------- */
.timeline { position: relative; margin: 0 auto; max-width: 800px; }
.timeline::before { content: ""; position: absolute; left: 20px; top: 0; bottom: 0; width: 2px; background: var(--cream-dark); }
.timeline-item { position: relative; padding: 0 0 40px 60px; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: 12px; top: 4px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--green-dark);
}
.timeline-item .year { font-family: var(--font-head); color: var(--green); font-weight: 700; margin-bottom: 4px; display: block; }

/* ---------- Testimonials ---------- */
.testimonial-track { display: flex; overflow: hidden; position: relative; min-height: 260px; }
.testimonial-slide {
  min-width: 100%;
  transition: transform 0.5s ease;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}
.testimonial-slide blockquote { font-family: var(--font-head); font-size: 1.4rem; color: var(--green-dark); margin: 0 0 20px; font-weight: 500; }
.testimonial-author { display: flex; align-items: center; justify-content: center; gap: 12px; }
.testimonial-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--gold);
  color: var(--green-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-family: var(--font-head);
}
.testimonial-controls { display: flex; justify-content: center; gap: 10px; margin-top: 28px; }
.testimonial-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cream-dark); border: none; padding: 0; }
.testimonial-dot.is-active { background: var(--gold); }

/* ---------- FAQ ---------- */
.faq { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--cream-dark); }
.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--green-dark);
  font-weight: 600;
}
.faq-question .icon { transition: transform var(--transition); flex-shrink: 0; margin-left: 16px; color: var(--gold-dark); }
.faq-item.is-open .faq-question .icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-item.is-open .faq-answer { max-height: 300px; }
.faq-answer p { padding-bottom: 20px; color: var(--ink-soft); margin: 0; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-weight: 600; font-size: 0.9rem; color: var(--green-dark); }
.form-field input,
.form-field select,
.form-field textarea {
  padding: 13px 16px;
  border: 1.5px solid var(--cream-dark);
  border-radius: 8px;
  background: var(--white);
  transition: border-color var(--transition);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { outline: none; border-color: var(--green); }
.form-field textarea { resize: vertical; min-height: 130px; }
.file-input {
  border: 1.5px dashed var(--cream-dark);
  border-radius: 8px;
  padding: 22px;
  text-align: center;
  color: var(--ink-soft);
  background: var(--cream);
  cursor: pointer;
  transition: border-color var(--transition);
  position: relative;
}
.file-input:hover { border-color: var(--gold); }
.file-input input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-input .file-name { font-weight: 600; color: var(--green-dark); }
.form-note { font-size: 0.82rem; color: var(--ink-soft); margin-top: -8px; }
.form-success {
  display: none;
  background: var(--cream-dark);
  border: 1.5px solid var(--green-light);
  color: var(--green-dark);
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 600;
}
.form-success.is-visible { display: block; }
.form-error {
  display: none;
  background: #fbeee9;
  border: 1.5px solid #d98b6a;
  color: #7a3a1f;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 600;
}
.form-error.is-visible { display: block; }
.form-error a { color: #7a3a1f; text-decoration: underline; }
.checkbox-field { display: flex; align-items: flex-start; gap: 10px; }
.checkbox-field input { margin-top: 4px; }
.checkbox-field label { font-weight: 400; font-size: 0.88rem; color: var(--ink-soft); }

/* ---------- Gallery ---------- */
.gallery-filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 40px; }
.gallery-filter {
  background: var(--cream);
  border: 1.5px solid var(--cream-dark);
  padding: 9px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink-soft);
  transition: all var(--transition);
}
.gallery-filter.is-active, .gallery-filter:hover { background: var(--green-dark); color: var(--white); border-color: var(--green-dark); }

.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery-item { border-radius: var(--radius); overflow: hidden; cursor: pointer; position: relative; aspect-ratio: 1/1; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .cap {
  position: absolute; inset: auto 0 0 0;
  background: linear-gradient(0deg, rgba(20,32,24,0.85), transparent);
  color: var(--white);
  padding: 26px 14px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity var(--transition);
}
.gallery-item:hover .cap { opacity: 1; }
.gallery-item.is-hidden { display: none; }

.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(20, 24, 18, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 900px; max-height: 80vh; border-radius: 8px; box-shadow: var(--shadow-md); }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.12);
  color: var(--white);
  border: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  transition: background var(--transition);
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.25); }
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-caption { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; color: var(--cream); font-size: 0.9rem; }

/* ---------- Blog / News ---------- */
.post-card { display: flex; flex-direction: column; }
.post-meta { display: flex; gap: 14px; align-items: center; font-size: 0.8rem; color: var(--brown); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 10px; }
.post-card h3 { font-size: 1.2rem; }
.post-card .read-more { color: var(--green-dark); font-weight: 700; margin-top: auto; display: inline-flex; align-items: center; gap: 6px; }

.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(20, 24, 18, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.is-open { display: flex; }
.modal-box {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 720px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  position: relative;
}
.modal-box img { width: 100%; aspect-ratio: 16/8; object-fit: cover; }
.modal-box .modal-body { padding: 32px; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(20,32,24,0.6); color: var(--white); border: none;
  font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
}

/* ---------- Job listings ---------- */
.job-card {
  background: var(--white);
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.job-card h3 { margin-bottom: 6px; font-size: 1.15rem; }
.job-meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--ink-soft); font-size: 0.88rem; }
.job-meta span { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: var(--green-dark);
  border-radius: 20px;
  padding: 60px;
  text-align: center;
  color: var(--white);
  background-image: linear-gradient(135deg, rgba(44,74,59,0.94), rgba(44,74,59,0.86));
  background-size: cover;
  background-position: center;
}
.cta-banner h2 { color: var(--white); }
.cta-banner p { color: var(--cream); max-width: 560px; margin: 0 auto 28px; }
.cta-banner .btn-row { justify-content: center; }

/* ---------- Map ---------- */
.map-frame { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); border: none; width: 100%; height: 420px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brown-dark); color: var(--cream); padding: 72px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.footer-brand .brand { color: var(--white); }
.footer-brand .brand span.sub { color: var(--gold); }
.footer-brand p { color: rgba(247,242,231,0.75); margin-top: 14px; max-width: 320px; }
.site-footer h4 { color: var(--white); font-size: 1rem; margin-bottom: 18px; }
.site-footer ul li { margin-bottom: 10px; }
.site-footer a { color: rgba(247,242,231,0.78); transition: color var(--transition); }
.site-footer a:hover { color: var(--gold); }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact svg { flex-shrink: 0; margin-top: 3px; color: var(--gold); }
.social-row { display: flex; gap: 12px; margin-top: 18px; }
.social-row a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.social-row a:hover { background: var(--gold); color: var(--brown-dark); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 22px 0; font-size: 0.85rem; color: rgba(247,242,231,0.6); }
.footer-bottom a { color: rgba(247,242,231,0.6); }
.footer-bottom a:hover { color: var(--gold); }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--green-dark);
  color: var(--white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
  z-index: 900;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
[data-animate] { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-animate].is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .split { grid-template-columns: 1fr; }
  .split .split-media { order: -1; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}

@media (max-width: 760px) {
  .main-nav { position: fixed; top: 73px; left: 0; right: 0; bottom: 0; background: var(--cream); padding: 24px; transform: translateX(100%); transition: transform 0.3s ease; overflow-y: auto; }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 6px; }
  .main-nav a { padding: 14px 18px; font-size: 1.05rem; }
  .main-nav .btn { margin-left: 0; margin-top: 10px; }
  .nav-toggle { display: flex; }
  .section { padding: 56px 0; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-banner { padding: 40px 24px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .job-card { flex-direction: column; align-items: flex-start; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-content h1 { font-size: 2rem; }
}
