/* Probus Produce — shared stylesheet v3
   Black & white theme (Cornish flag, Cornish Black pork, Cornish Whites eggs).
   Fixed: section+container were combined on one element in v2, and since
   .container's own padding overrode the section tag's vertical padding,
   several sections silently lost their top/bottom spacing. Now every
   section always wraps a separate .container div, never carries the
   class itself, so vertical rhythm is consistent everywhere. */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;1,400&family=Inter:wght@400;500;700&display=swap');

:root {
  --cream: #FAFAF7;
  --cream-panel: #F0EFEA;
  --ink: #1B1A17;
  --ink-soft: #56534C;
  --muted: #8C887E;
  --line: #DEDBD2;
  --accent: #1B1A17;
  --dark: #141311;
  --dark-line: #38352F;
  --white: #FFFFFF;
  --max-width: 1200px;
  --radius: 3px;
  --section-space: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: 'Lora', Georgia, serif;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 2.1rem); }
h3 { font-size: clamp(1.1rem, 1.8vw, 1.4rem); }
p { margin: 0 0 1em; color: var(--ink-soft); }

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

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--white);
  padding: 10px 16px; z-index: 200;
}
.skip-link:focus { left: 12px; top: 12px; }

/* Utility bar */
.utility {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 40px; background: var(--dark); color: #C8C4BA;
  font-size: 0.7rem; letter-spacing: 0.5px;
}
.utility .social a { margin-left: 16px; color: #C8C4BA; }
.utility .social a:hover { color: #fff; }

/* Nav */
header.site-header { border-bottom: 1px solid var(--line); background: var(--cream); position: sticky; top: 0; z-index: 100; }
.nav-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 40px; max-width: var(--max-width); margin: 0 auto;
}
.logo-link { display: flex; align-items: center; }
.logo-img { height: 72px; width: auto; }
nav.main-nav { display: flex; gap: 2px; font-size: 0.9rem; flex-wrap: wrap; }
nav.main-nav a { padding: 7px 12px; border-radius: 3px; transition: background 0.15s ease, color 0.15s ease; }
nav.main-nav a:hover { background: var(--ink); color: var(--cream); text-decoration: none; }
nav.main-nav a[aria-current="page"] { border-bottom: 1px solid var(--ink); }
.nav-cta {
  font-size: 0.82rem; border: 1px solid var(--ink); padding: 9px 18px;
  border-radius: 2px; white-space: nowrap;
}
.nav-cta:hover { background: var(--ink); color: var(--cream); text-decoration: none; }

/* Mobile nav toggle — hidden on desktop, becomes a hamburger under 900px */
.nav-toggle-label { display: none; }
#nav-check { display: none; }

/* Hero */
.hero {
  position: relative; height: 56vh; min-height: 360px; max-height: 520px;
  background-size: cover; background-position: center;
}
.hero-overlay {
  position: absolute; inset: 0; background: rgba(20,19,17,0.5);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 20px;
}
.hero-eyebrow { color: #F0EEE6; font-size: 0.82rem; letter-spacing: 2.5px; text-transform: uppercase; margin: 0 0 14px; text-shadow: 0 1px 4px rgba(0,0,0,0.55); }
.hero-title { color: #fff; font-weight: 600; font-size: clamp(2.2rem, 5vw, 4rem); max-width: 780px; line-height: 1.15; margin: 0 0 14px; letter-spacing: 0.5px; text-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.hero-title-mark {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.13em;
  font-size: clamp(2rem, 5.2vw, 4.2rem);
}
.hero-sub { color: #F0EEE6; font-size: 1.12rem; margin: 0 0 26px; max-width: 560px; text-shadow: 0 1px 5px rgba(0,0,0,0.5); }

.btn {
  display: inline-block; padding: 13px 30px; border: 1px solid var(--ink);
  border-radius: 2px; color: var(--ink); font-size: 0.85rem; letter-spacing: 0.3px;
}
.btn:hover { background: var(--ink); color: var(--cream); text-decoration: none; }
.btn-solid { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.btn-solid:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn-dark { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn-dark:hover { background: var(--cream); color: var(--ink); border-color: var(--ink); }

/* Gap below hero before whatever follows */
.hero-gap { height: var(--section-space); background: var(--cream); }

/* Category tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); max-width: var(--max-width); margin: 0 auto; }
.tile { position: relative; height: 260px; background-size: cover; background-position: center; background-color: var(--cream-panel); display: block; }
.tile-overlay {
  position: absolute; inset: 0; background: rgba(20,19,17,0.38);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 22px;
  transition: background 0.15s ease;
}
.tile:hover .tile-overlay { background: rgba(20,19,17,0.55); text-decoration: none; }
.tile-eyebrow { color: #F0EEE6; font-size: 0.75rem; letter-spacing: 1.5px; text-transform: uppercase; margin: 0 0 4px; text-shadow: 0 1px 4px rgba(0,0,0,0.55); }
.tile-title { color: #fff; font-size: 1.6rem; margin: 0; text-shadow: 0 1px 6px rgba(0,0,0,0.5); }

/* Sections — always section > .container, never combined on one element */
section { padding: var(--section-space) 0; }
section.tight { padding: 40px 0; }
section.flush-top { padding-top: 0; }
.section-panel { background: var(--cream-panel); }
.eyebrow { font-size: 0.78rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.grid-2-stretch { align-items: stretch; }
.grid-2-stretch .card { height: 100%; box-sizing: border-box; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 780px) {
  .grid-2, .grid-3, .tiles { grid-template-columns: 1fr; }
}

.media-frame {
  aspect-ratio: 4 / 3; width: 100%; border-radius: var(--radius);
  background-color: var(--cream-panel); background-size: cover; background-position: center;
  border: 1px solid var(--line);
}

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }

/* Clickable bio cards (About page) — built on <details>/<summary> so it works with no JS */
.person-card summary { cursor: pointer; list-style: none; }
.person-card summary::-webkit-details-marker { display: none; }
.person-card summary::marker { content: ""; }
.person-photo { border-radius: 50%; width: 120px; height: 120px; object-fit: cover; margin: 0 auto 12px; transition: width 0.2s ease, height 0.2s ease; }
.person-card[open] .person-photo { width: 220px; height: 220px; }
.person-card .person-hint { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.3px; margin: 4px 0 0; transition: opacity 0.15s ease; }
.person-card[open] .person-hint { opacity: 0; height: 0; margin: 0; overflow: hidden; }
.person-card .person-bio { text-align: left; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.person-card .person-bio p { margin: 0 0 1em; }
.person-card .person-bio p:last-child { margin-bottom: 0; }

.prose-center { text-align: center; }

.testimonial { margin-bottom: 24px; }
.testimonial p:first-child { font-family: 'Lora', Georgia, serif; font-size: 1.05rem; color: var(--ink); }
.testimonial cite { font-style: normal; font-size: 0.85rem; color: var(--muted); }

/* CTA band */
.cta-band { background: var(--cream-panel); text-align: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cta-band p { color: var(--ink-soft); margin: 0 auto 22px; max-width: 480px; }

/* Accreditation strip */
.accred-row { display: flex; justify-content: center; gap: 44px; flex-wrap: wrap; align-items: center; }
.accred-row span { font-size: 0.72rem; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }

/* Journal */
.journal-entry { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); align-items: start; }
.journal-entry .media-frame { aspect-ratio: 1; }
.journal-date { font-size: 0.8rem; color: var(--muted); margin: 0 0 6px; }
@media (max-width: 780px) { .journal-entry { grid-template-columns: 1fr; } }

.journal-article { max-width: 720px; margin: 0 auto; text-align: left; }
.journal-article ul { margin: 0 0 1em; padding-left: 1.3em; color: var(--ink-soft); }
.journal-article li { margin-bottom: 0.4em; }
.journal-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 24px 0; }
.journal-gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }

/* Scrollable photo carousel — for larger photo sets where a grid would run too long */
.photo-carousel-wrap { position: relative; margin: 24px 0; }
.photo-carousel {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 4px 16px; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.photo-carousel a { flex: 0 0 auto; scroll-snap-align: start; }
.photo-carousel img {
  height: 300px; width: auto; aspect-ratio: 4/3; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--line); display: block;
}
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--cream); display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 5; box-shadow: none;
}
.carousel-arrow:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.carousel-arrow.prev { left: -8px; }
.carousel-arrow.next { right: -8px; }
@media (max-width: 700px) {
  .photo-carousel img { height: 220px; }
  .carousel-arrow { display: none; } /* touch swipe handles it on phones */
}
.journal-post-nav {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  max-width: 720px; margin: 40px auto 0; padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 0.9rem;
}
@media (max-width: 600px) {
  .journal-gallery { grid-template-columns: repeat(2, 1fr); }
  .journal-post-nav { flex-direction: column; gap: 10px; text-align: center; }
}

/* Map */
.map-frame { width: 100%; height: 380px; border: 1px solid var(--line); border-radius: var(--radius); }

/* Footer */
footer.site-footer { background: var(--dark); color: #C8C4BA; padding: 24px 0 18px; margin-top: 0; }
.footer-logo { height: 96px; width: auto; filter: invert(1); flex-shrink: 0; }
.footer-inner {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 28px; font-size: 0.92rem;
}
.footer-inner > div:first-child { justify-self: start; }
.footer-inner > div:last-child { justify-self: end; }
.footer-inner .footer-logo { justify-self: center; }
.footer-inner a { color: #C8C4BA; }
.footer-inner a:hover { color: #fff; }
.footer-inner h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; }
.footer-social-icons { display: flex; gap: 14px; justify-content: center; }
.footer-social-icons a {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border: 1px solid var(--dark-line); border-radius: 50%;
  color: #C8C4BA;
}
.footer-social-icons a:hover { border-color: #C8C4BA; color: #fff; }
.footer-social-icons svg { width: 24px; height: 24px; }
.footer-follow { text-align: center; }

.whatsapp-link { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--ink); font-weight: 500; }
.whatsapp-link svg { width: 18px; height: 18px; flex-shrink: 0; }

.contact-primary { margin-bottom: 50px; text-align: center; }
.contact-primary h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.contact-primary-links { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.contact-primary-links a { display: inline-flex; align-items: center; gap: 9px; }
.contact-primary-links svg { width: 19px; height: 19px; flex-shrink: 0; }
.footer-bottom {
  max-width: var(--max-width); margin: 14px auto 0; padding: 12px 40px 0;
  border-top: 1px solid var(--dark-line); font-size: 0.75rem; color: #96917F;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ================= MOBILE ================= */

/* Nav collapses to a hamburger under 900px — plenty of room for
   logo + 8 links + CTA button breaks well before phone width. */
@media (max-width: 900px) {
  .nav-bar { padding: 14px 20px; }
  .logo-img { height: 54px; }

  .nav-toggle-label {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 3px;
    cursor: pointer; position: relative; flex-shrink: 0;
  }
  .nav-toggle-label span {
    content: ''; position: absolute; left: 9px; right: 9px; height: 2px; top: 19px;
    background: var(--ink); transition: transform 0.2s ease, background 0.2s ease;
  }
  .nav-toggle-label span::before,
  .nav-toggle-label span::after {
    content: ''; position: absolute; left: 50%; margin-left: -4px; width: 0; height: 0;
    border-left: 4px solid transparent; border-right: 4px solid transparent;
    transition: transform 0.2s ease;
  }
  /* Triangles point away from the centre bar, hinting the menu opens outward.
     Positioned relative to span's own box (span is the containing block for
     its ::before/::after since it's itself position: absolute), not the
     40px icon box — hence the small, span-relative offsets here. */
  .nav-toggle-label span::before { top: -9px; border-bottom: 5px solid var(--ink); }
  .nav-toggle-label span::after { top: 6px; border-top: 5px solid var(--ink); }
  #nav-check:checked ~ .nav-toggle-label span { background: transparent; }
  #nav-check:checked ~ .nav-toggle-label span::before { transform: rotate(180deg); }
  #nav-check:checked ~ .nav-toggle-label span::after { transform: rotate(180deg); }

  nav.main-nav {
    display: none; flex-direction: column; gap: 0;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--cream); border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    z-index: 500;
  }
  #nav-check:checked ~ nav.main-nav { display: flex; }
  nav.main-nav a {
    padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 1rem;
  }
  nav.main-nav a[aria-current="page"] { border-bottom: 1px solid var(--line); background: var(--cream-panel); }
  nav.main-nav .nav-cta-mobile {
    margin: 14px 20px; text-align: center; border: 1px solid var(--ink);
    padding: 12px; border-radius: 2px;
  }

  .nav-cta { display: none; }
}

@media (min-width: 901px) {
  .nav-cta-mobile { display: none; }
}

/* General spacing/type tightening for phones */
@media (max-width: 640px) {
  :root { --section-space: 44px; }
  .container { padding: 0 20px; }
  .utility { padding: 8px 16px; flex-direction: column; gap: 4px; text-align: center; }
  .utility .social a:first-child { margin-left: 0; }

  .hero { min-height: 300px; }
  .hero-title-mark { letter-spacing: 0.06em; }
  .hero-sub { font-size: 0.95rem; }

  .tiles { grid-template-columns: 1fr; }
  .tile { height: 200px; }

  section { padding: 44px 0; }
  .cta-band { padding-top: 44px; padding-bottom: 44px; }

  .footer-inner { grid-template-columns: 1fr; text-align: center; gap: 24px; }
  .footer-inner > div:first-child, .footer-inner > div:last-child, .footer-inner .footer-logo { justify-self: center; }
  .footer-social-icons { justify-content: center; }
  .footer-bottom { padding-left: 20px; padding-right: 20px; flex-direction: column; text-align: center; }

  .map-frame { height: 280px; }
  .journal-entry img, .journal-entry .media-frame { max-width: 100%; }
}

/* Contact form */
input, textarea {
  width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 3px;
  font-family: 'Inter', sans-serif; font-size: 0.95rem; background: var(--white);
}
label { font-size: 0.88rem; color: var(--ink); }
