/*
Theme Name: Andover Markets
Theme URI: https://andovermarkets.co.uk
Description: A lightweight Genesis child theme for Andover's market days and special markets.
Author: Andover Markets
Version: 1.0.1
Template: genesis
Text Domain: andover-markets
*/

:root {
  --ink: #173f35;
  --ink-dark: #102f28;
  --cream: #f8f2e7;
  --paper: #fffdf8;
  --tomato: #e45b42;
  --gold: #f4b942;
  --sage: #c9d7c8;
  --sky: #c7dfe3;
  --muted: #5f6f68;
  --line: rgba(23, 63, 53, 0.16);
  --shadow: 0 18px 55px rgba(28, 52, 43, 0.12);
  --radius: 22px;
  --sans: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink-dark);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .18em; }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.wrap { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

.site-header { position: relative; z-index: 20; background: rgba(248,242,231,.96); border-bottom: 1px solid var(--line); }
.site-header__inner { min-height: 94px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.site-logo { display: block; width: min(290px, 56vw); }
.site-logo img { width: 100%; }
.site-nav { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 700; }
.site-nav a { text-decoration: none; }
.site-nav a:not(.button):hover { color: var(--tomato); }
.nav-toggle { display: none; padding: 10px; background: transparent; border: 0; color: var(--ink); }
.nav-toggle span { display: block; width: 26px; height: 2px; margin: 5px; background: currentColor; }

.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 9px; padding: 12px 20px; border: 2px solid var(--ink); border-radius: 999px; background: var(--ink); color: white; font-weight: 800; line-height: 1.1; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); box-shadow: 0 9px 24px rgba(23,63,53,.18); }
.button--tomato { background: var(--tomato); border-color: var(--tomato); }
.button--paper { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.button--outline { background: transparent; color: var(--ink); }
.text-link { font-weight: 800; color: var(--ink); }
.text-link::after { content: " →"; color: var(--tomato); }

.hero { position: relative; min-height: 700px; display: grid; align-items: end; overflow: hidden; background: var(--ink); color: white; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,37,31,.9) 0%, rgba(10,37,31,.72) 34%, rgba(10,37,31,.12) 68%), linear-gradient(0deg, rgba(10,37,31,.54), transparent 45%); z-index: 1; }
.hero__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero__content { position: relative; z-index: 2; width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 104px 0 74px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; color: var(--tomato); font-size: 13px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.hero .eyebrow { color: #ffe0a0; }
.eyebrow::before { content: ""; width: 34px; height: 3px; background: currentColor; }
.hero h1 { max-width: 780px; margin: 0; font-family: var(--serif); font-size: clamp(50px, 7.3vw, 92px); line-height: .96; letter-spacing: -.045em; }
.hero h1 em { color: #ffd46e; font-style: normal; }
.hero__intro { max-width: 610px; margin: 26px 0 30px; color: rgba(255,255,255,.88); font-size: clamp(18px, 2vw, 22px); line-height: 1.55; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 20px; margin: 30px 0 0; padding: 0; list-style: none; color: rgba(255,255,255,.78); font-size: 14px; font-weight: 650; }
.hero__trust li::before { content: "✓"; margin-right: 8px; color: #ffd46e; }

.quick-find { position: relative; z-index: 3; margin-top: -27px; }
.quick-find__inner { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 10px; padding: 16px; border: 1px solid rgba(23,63,53,.08); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); }
.field { display: grid; gap: 4px; padding: 0 16px; border-right: 1px solid var(--line); }
.field label { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.field select { width: 100%; border: 0; background: transparent; color: var(--ink); font-weight: 750; outline: none; }

.section { padding: 100px 0; }
.section--paper { background: var(--paper); }
.section--ink { background: var(--ink); color: white; }
.section--compact { padding: 72px 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 36px; }
.section-heading h2, .editorial h2 { max-width: 760px; margin: 0; font-family: var(--serif); font-size: clamp(36px, 5vw, 62px); line-height: 1.03; letter-spacing: -.035em; }
.section-heading p { max-width: 520px; margin: 12px 0 0; color: var(--muted); }
.section--ink .section-heading p { color: rgba(255,255,255,.7); }

.events-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.event-card { position: relative; display: flex; min-height: 350px; flex-direction: column; padding: 28px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 9px 30px rgba(23,63,53,.06); text-decoration: none; transition: transform .25s ease, box-shadow .25s ease; }
.event-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.event-card--feature { background: var(--ink); color: white; }
.event-card--gold { background: #ffd56f; }
.event-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.date-tile { display: grid; width: 74px; min-width: 74px; height: 82px; place-content: center; border-radius: 14px; background: var(--tomato); color: white; text-align: center; line-height: 1; box-shadow: 5px 5px 0 var(--gold); }
.event-card--feature .date-tile { background: var(--gold); color: var(--ink); box-shadow: 5px 5px 0 var(--tomato); }
.date-tile small { font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.date-tile strong { margin-top: 6px; font-family: var(--serif); font-size: 35px; }
.pill { display: inline-flex; padding: 6px 10px; border: 1px solid currentColor; border-radius: 999px; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.event-card--feature .pill { color: rgba(255,255,255,.7); }
.event-card h3 { margin: auto 0 8px; font-family: var(--serif); font-size: 31px; line-height: 1.05; letter-spacing: -.025em; }
.event-card__meta { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.event-card--feature .event-card__meta { color: rgba(255,255,255,.72); }
.event-card__footer { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; border-top: 1px solid currentColor; font-size: 13px; font-weight: 800; }
.event-card__arrow { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--tomato); color: white; }

.browse-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.browse-card { min-height: 190px; padding: 25px; border-radius: 18px; background: var(--cream); color: var(--ink); text-decoration: none; }
.browse-card:nth-child(2) { background: var(--sage); }
.browse-card:nth-child(3) { background: var(--sky); }
.browse-card:nth-child(4) { background: #f6c9bc; }
.browse-card__icon { font-size: 34px; }
.browse-card h3 { margin: 36px 0 4px; font-family: var(--serif); font-size: 24px; line-height: 1.1; }
.browse-card p { margin: 0; color: var(--muted); font-size: 14px; }

.feature-split { display: grid; grid-template-columns: 1.05fr .95fr; overflow: hidden; border-radius: 30px; background: var(--tomato); color: white; }
.feature-split__image { min-height: 560px; background: url("assets/images/andover-market-day.jpg") center / cover; }
.feature-split__content { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(38px, 6vw, 76px); }
.feature-split h2 { margin: 0 0 18px; font-family: var(--serif); font-size: clamp(40px,5vw,64px); line-height: 1; letter-spacing: -.04em; }
.feature-split p { max-width: 470px; color: rgba(255,255,255,.85); }
.fact-row { display: flex; gap: 32px; margin: 18px 0 30px; padding: 20px 0; border-block: 1px solid rgba(255,255,255,.3); }
.fact-row strong { display: block; font-family: var(--serif); font-size: 25px; }
.fact-row span { color: rgba(255,255,255,.75); font-size: 13px; }

.trader-band { position: relative; overflow: hidden; }
.trader-band::after { content: ""; position: absolute; right: -50px; bottom: -100px; width: 380px; height: 260px; border: 32px solid rgba(244,185,66,.13); border-radius: 50%; transform: rotate(-14deg); }
.trader-band__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr .75fr; gap: 80px; align-items: center; }
.trader-band h2 { margin: 0; font-family: var(--serif); font-size: clamp(44px, 6vw, 76px); line-height: .98; letter-spacing: -.04em; }
.trader-band__panel { padding: 32px; border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius); background: rgba(255,255,255,.07); }
.trader-band__panel ul { display: grid; gap: 12px; margin: 0 0 24px; padding: 0; list-style: none; }
.trader-band__panel li::before { content: "•"; margin-right: 10px; color: var(--gold); }

.accuracy-note { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 30px 0; }
.accuracy-note h2 { margin: 0 0 5px; font-family: var(--serif); font-size: 28px; }
.accuracy-note p { max-width: 700px; margin: 0; color: var(--muted); font-size: 14px; }
.accuracy-note__stamp { flex: 0 0 auto; padding: 10px 15px; border: 2px solid var(--ink); transform: rotate(-2deg); font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }

.site-footer { background: #0d2b24; color: white; }
.site-footer__main { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 50px; padding: 70px 0; }
.site-footer__brand img { width: 260px; filter: brightness(0) invert(1); }
.site-footer__brand p { max-width: 340px; color: rgba(255,255,255,.62); font-size: 14px; }
.site-footer h3 { margin: 0 0 15px; color: var(--gold); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.site-footer ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.site-footer a { text-decoration: none; }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.52); font-size: 12px; }

.page-hero { padding: 80px 0 55px; background: var(--ink); color: white; }
.page-hero h1 { max-width: 850px; margin: 0; font-family: var(--serif); font-size: clamp(50px,7vw,82px); line-height: 1; letter-spacing: -.04em; }
.page-hero p { max-width: 650px; color: rgba(255,255,255,.72); font-size: 20px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 70px; }
.editorial h2 { margin: 50px 0 18px; font-size: 40px; }
.editorial h3 { margin-top: 34px; font-family: var(--serif); font-size: 27px; }
.editorial p, .editorial li { color: #3f514a; }
.info-panel { align-self: start; padding: 28px; border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); }
.info-panel h2 { margin-top: 0; font-family: var(--serif); }
.directory-list { display: grid; gap: 16px; }
.directory-item { display: grid; grid-template-columns: 1.35fr .8fr auto; gap: 25px; align-items: center; padding: 25px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.directory-item h2 { margin: 0 0 3px; font-family: var(--serif); font-size: 27px; }
.directory-item p { margin: 0; color: var(--muted); font-size: 14px; }
.market-form { display: grid; gap: 20px; }
.market-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.market-form label { display: grid; gap: 7px; color: var(--ink); font-weight: 800; }
.market-form input, .market-form select, .market-form textarea { width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink-dark); }
.market-form textarea { min-height: 180px; resize: vertical; }
.market-form .hp-field { position: absolute; left: -9999px; }
.notice { margin-bottom: 28px; padding: 16px 18px; border-left: 5px solid var(--tomato); background: #fff4d7; }

@media (max-width: 980px) {
  .site-nav { position: fixed; inset: 94px 0 auto; display: none; padding: 30px 20px; flex-direction: column; align-items: stretch; background: var(--cream); box-shadow: var(--shadow); }
  .site-nav.is-open { display: flex; }
  .nav-toggle { display: block; }
  .quick-find__inner { grid-template-columns: 1fr 1fr; }
  .field { border-right: 0; }
  .events-grid { grid-template-columns: 1fr 1fr; }
  .browse-grid { grid-template-columns: 1fr 1fr; }
  .feature-split { grid-template-columns: 1fr; }
  .feature-split__image { min-height: 420px; }
  .trader-band__inner { grid-template-columns: 1fr; gap: 40px; }
  .site-footer__main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .wrap, .hero__content { width: min(100% - 28px, 1180px); }
  .site-header__inner { min-height: 80px; }
  .site-nav { top: 80px; }
  .site-logo { width: 226px; }
  .hero { min-height: 680px; }
  .hero::before { background: linear-gradient(0deg, rgba(10,37,31,.94) 8%, rgba(10,37,31,.7) 66%, rgba(10,37,31,.2)); }
  .hero__image { object-position: 58% center; }
  .hero__content { padding-bottom: 58px; }
  .hero h1 { font-size: clamp(48px, 15vw, 70px); }
  .hero__intro { font-size: 18px; }
  .quick-find { margin-top: 0; padding-top: 14px; background: var(--paper); }
  .quick-find__inner { grid-template-columns: 1fr; box-shadow: none; }
  .field { padding: 9px 6px; border-bottom: 1px solid var(--line); }
  .section { padding: 72px 0; }
  .section-heading { display: block; }
  .events-grid, .browse-grid { grid-template-columns: 1fr; }
  .event-card { min-height: 310px; }
  .feature-split__image { min-height: 320px; }
  .fact-row { gap: 18px; flex-wrap: wrap; }
  .accuracy-note { align-items: flex-start; flex-direction: column; }
  .site-footer__main { grid-template-columns: 1fr; gap: 30px; }
  .site-footer__bottom { flex-direction: column; }
  .content-grid { grid-template-columns: 1fr; gap: 35px; }
  .directory-item { grid-template-columns: 1fr; }
  .market-form__row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
