/*
Theme Name: Green's of Pangbourne
Theme URI: https://greensofpangbourne.com/
Author: Hot Cake
Author URI: https://hotcake.ltd/
Description: Custom theme for Green's of Pangbourne — master butchers and pie makers. Includes the Christmas order form (Pages › Template: Christmas Orders) and an Our Story template. Contact details, opening hours and Christmas dates are edited under Appearance › Customize › Green's Settings.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: greens
*/

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face{font-family:"DM Serif Display";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/dm-serif-display-latin-400-normal.woff2") format("woff2")}
@font-face{font-family:"Figtree";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/figtree-latin-400-normal.woff2") format("woff2")}
@font-face{font-family:"Figtree";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/figtree-latin-600-normal.woff2") format("woff2")}
@font-face{font-family:"Figtree";font-style:normal;font-weight:700;font-display:swap;src:url("assets/fonts/figtree-latin-700-normal.woff2") format("woff2")}

/* ---------- Tokens ---------- */
:root{
  --green:#113e1e;
  --green-deep:#0b2a14;
  --olive:#6b6640;
  --olive-light:#c9c28e;
  --paper:#f5f2ea;
  --paper-dark:#e9e4d4;
  --white:#ffffff;
  --ink:#1d1d1b;
  --muted:#45443d;
  --line:#e6e1d3;
  --line-dark:#ddd8c8;
  --on-green:#e6e2c8;
  --serif:"DM Serif Display",Georgia,"Times New Roman",serif;
  --sans:"Figtree",system-ui,-apple-system,"Segoe UI",sans-serif;
  --wrap:1280px;
  --radius:4px;
}

/* ---------- Base ---------- */
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:var(--sans);font-size:17px;line-height:1.6;color:var(--ink);background:var(--paper);-webkit-font-smoothing:antialiased}
img{max-width:100%;height:auto;display:block}
a{color:var(--green)}
a:hover{color:var(--green-deep)}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--olive-light);outline-offset:2px}
h1,h2,h3,h4{font-family:var(--serif);font-weight:400;color:var(--green);line-height:1.1;margin:0}
p{margin:0}
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}
.skip-link:focus{position:fixed;left:16px;top:16px;z-index:100;width:auto;height:auto;clip:auto;background:var(--white);padding:12px 16px}

.wrap{max-width:var(--wrap);margin:0 auto;padding-left:32px;padding-right:32px}
.section{padding-top:96px;padding-bottom:96px}
.section--white{background:var(--white);border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.section--green{background:var(--green);color:var(--white)}
.section--green h1,.section--green h2,.section--green h3{color:var(--white)}
.eyebrow{font-size:14px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--olive)}
.section--green .eyebrow{color:var(--olive-light)}
.h1{font-size:clamp(40px,5vw,68px);line-height:1.04;letter-spacing:-.01em}
.h2{font-size:clamp(34px,3.6vw,48px)}
.h3{font-size:28px}
.lead{font-size:20px;color:var(--muted);max-width:34em}
.section--green .lead{color:var(--on-green)}
.muted{color:var(--muted)}
.stack{display:flex;flex-direction:column;gap:20px}
.stack--lg{gap:28px}
.split{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:56px;align-items:center}
.photo{width:100%;object-fit:cover;border-radius:var(--radius)}
.ratio-4-3{aspect-ratio:4/3}
.ratio-5-4{aspect-ratio:5/4}
.ratio-3-2{aspect-ratio:3/2}
.ratio-16-9{aspect-ratio:16/9}
.ratio-21-9{aspect-ratio:21/9}

/* ---------- Buttons ---------- */
.btn{display:inline-block;font:inherit;font-weight:600;text-decoration:none;padding:15px 26px;border-radius:3px;border:1.5px solid var(--green);cursor:pointer;line-height:1.3}
.btn--solid{background:var(--green);color:var(--white)}
.btn--solid:hover{background:var(--green-deep);color:var(--white)}
.btn--outline{background:transparent;color:var(--green)}
.btn--outline:hover{background:var(--green);color:var(--white)}
.btn--white{background:var(--white);color:var(--green);border-color:var(--white);font-weight:700}
.btn--white:hover{background:var(--paper);color:var(--green)}
.btn--ghost-white{background:transparent;color:var(--white);border-color:var(--white)}
.btn--ghost-white:hover{background:var(--white);color:var(--green)}
.btn-row{display:flex;flex-wrap:wrap;gap:12px;padding-top:8px}

/* ---------- Top bar & header ---------- */
.topbar{background:var(--green-deep);color:var(--white);font-size:15px}
.topbar .wrap{display:flex;flex-wrap:wrap;gap:8px 24px;align-items:center;justify-content:space-between;padding-top:10px;padding-bottom:10px}
.topbar a{color:var(--white)}
.topbar__notice{display:flex;gap:10px;align-items:center;text-decoration:none}
.topbar__badge{background:var(--olive-light);color:var(--green-deep);font-weight:700;font-size:12px;letter-spacing:.08em;text-transform:uppercase;padding:3px 8px;border-radius:2px}
.topbar__link{text-decoration:underline}

.site-header{background:var(--paper);border-bottom:1px solid var(--line-dark);position:relative;z-index:10}
.site-header .wrap{display:flex;gap:16px 32px;align-items:center;justify-content:space-between;padding-top:16px;padding-bottom:16px}
.site-logo img{height:72px;width:auto}
.nav-toggle{display:none;font:inherit;font-weight:600;background:none;border:1.5px solid var(--green);color:var(--green);padding:10px 16px;border-radius:3px;cursor:pointer}
.main-nav ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:4px 28px;align-items:center}
.main-nav a{display:block;text-decoration:none;font-weight:600;font-size:16px;padding:10px 0}
.main-nav .current-menu-item>a,.main-nav .current_page_item>a{text-decoration:underline;text-underline-offset:6px}
.header-call{text-decoration:none;font-weight:600;background:var(--green);color:var(--white);padding:12px 20px;border-radius:3px;white-space:nowrap}
.header-call:hover{background:var(--green-deep);color:var(--white)}
.header-right{display:flex;gap:28px;align-items:center}

/* ---------- Home: hero ---------- */
.hero{padding-top:72px;padding-bottom:88px}
.hero__media{position:relative}
.hero__badge{position:absolute;left:-24px;bottom:-28px;background:var(--green);color:var(--white);padding:20px 24px;border-radius:var(--radius);max-width:260px}
.hero__badge strong{display:block;font-family:var(--serif);font-weight:400;font-size:30px;line-height:1.1}
.hero__badge span{display:block;margin-top:4px;font-size:14px;color:var(--on-green)}

/* ---------- Cards & grids ---------- */
.section-head{display:flex;flex-wrap:wrap;gap:16px 48px;align-items:flex-end;justify-content:space-between;margin-bottom:48px}
.section-head .h2{max-width:14em}
.section-head p{max-width:30em}
.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:32px}
.grid-4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
.card{display:flex;flex-direction:column;gap:16px}
.card p{color:var(--muted)}
.tile{position:relative;border-radius:var(--radius);overflow:hidden;aspect-ratio:1/1;background:var(--green)}
.tile img{width:100%;height:100%;object-fit:cover;opacity:.82}
.tile__label{position:absolute;left:20px;right:20px;bottom:16px;color:var(--white);font-family:var(--serif);font-size:30px;line-height:1.15;text-shadow:0 1px 12px rgba(0,0,0,.5)}
.tile--text{background:var(--paper-dark);padding:28px;display:flex;flex-direction:column;justify-content:space-between}
.tile--text .tile__title{font-family:var(--serif);font-size:30px;line-height:1.15;color:var(--green)}
.tile--text p{color:var(--muted)}

.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;border-top:1px solid #3b5c43;padding-top:28px}
.stats strong{display:block;font-family:var(--serif);font-weight:400;font-size:40px;line-height:1}
.stats span{display:block;margin-top:6px;font-size:15px;color:var(--on-green)}
.section--green a:not(.btn){color:var(--white)}

/* ---------- News ---------- */
.news-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.news-card{background:var(--white);border:1px solid var(--line);border-radius:var(--radius);padding:28px;display:flex;flex-direction:column;gap:10px}
.news-card time{font-size:14px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--olive)}
.news-card h3{font-size:26px}
.news-card h3 a{text-decoration:none}
.news-card p{color:var(--muted);font-size:16px}

/* ---------- Visit ---------- */
.visit{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:48px}
.address{font-size:18px;font-style:normal}
.phone-big{font-weight:600;font-size:20px}
.socials{display:flex;gap:20px;font-weight:600}
.hours{border-collapse:collapse;width:100%;font-size:17px}
.hours td{padding:10px 0;border-bottom:1px solid var(--line-dark)}
.hours tr:last-child td{border-bottom:0}
.hours td:last-child{text-align:right;font-weight:600}
.hours .is-today td{color:var(--green);font-weight:700}

/* ---------- Footer ---------- */
.site-footer{background:var(--green-deep);color:var(--on-green)}
.site-footer .wrap{display:flex;flex-wrap:wrap;gap:32px 64px;align-items:flex-start;justify-content:space-between;padding-top:56px;padding-bottom:40px}
.site-footer img{height:64px;width:auto}
.site-footer ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:12px 28px}
.site-footer a{color:var(--white);text-decoration:none}
.site-footer a:hover{text-decoration:underline;color:var(--white)}
.site-footer__legal{width:100%;border-top:1px solid #2c4a33;padding-top:24px;font-size:15px}

/* ---------- Christmas ---------- */
.key-dates{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
.key-date{background:var(--white);border:1px solid var(--line);border-radius:var(--radius);padding:28px;display:flex;flex-direction:column;gap:8px}
.key-date__label{font-size:13px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--olive)}
.key-date__value{font-family:var(--serif);font-size:30px;line-height:1.15;color:var(--green)}
.key-date__note{color:var(--muted);font-size:15px}

.order-layout{display:flex;flex-wrap:wrap;gap:48px;align-items:flex-start}
.order-aside{flex:1 1 280px;display:flex;flex-direction:column;gap:20px}
.order-aside .entry-content{color:var(--muted)}
.order-main{flex:999 1 640px;min-width:0}
.downloads{display:flex;flex-direction:column;gap:10px;border-top:1px solid var(--line-dark);padding-top:20px}
.downloads a{font-weight:600}

.order-form{display:flex;flex-direction:column;gap:28px}
.fs{margin:0;border:1px solid var(--line);border-radius:var(--radius);background:var(--white);padding:0;overflow:hidden;min-width:0}
.fs legend{float:left;width:100%;margin:0;background:var(--green);color:var(--white);padding:14px 24px;font-family:var(--serif);font-size:26px}
.fs__body{clear:both}
.fs__pad{clear:both;padding:20px 24px 24px}
.row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);gap:8px 16px;align-items:center;padding:14px 24px;border-bottom:1px solid #efebdf}
.row:last-child{border-bottom:0}
.row label{font-weight:600}
.row label small,.hint{display:block;font-weight:400;font-size:14px;color:#5f5a3a}
.row__inputs{display:flex;gap:8px}
.row__inputs input{flex:1;min-width:0}
.order-form input[type=text],.order-form input[type=email],.order-form input[type=tel],.order-form select,.order-form textarea{font:inherit;padding:10px 12px;border:1px solid #c9c5b8;border-radius:3px;background:var(--white);color:var(--ink);width:100%}
.order-form select{width:auto;max-width:48%;padding:10px 8px}
.order-form textarea{resize:vertical}
.choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.details-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 20px}
.details-grid .full{grid-column:1/-1}
.field{display:flex;flex-direction:column;gap:6px}
.field label{font-weight:600}
.check{display:flex;gap:10px;align-items:center;min-height:44px;cursor:pointer}
.check input{width:20px;height:20px;accent-color:var(--green);flex:none}
.group-label{font-weight:600;margin-bottom:6px}
.delivery-note{margin:0 24px 24px;background:#f1edde;padding:16px 18px;border-radius:3px;color:#3d3c35;font-size:15px}
.hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}
.notice{border-radius:var(--radius);padding:24px 28px;margin-bottom:28px}
.notice--error{background:#fbeaea;border:2px solid #a12c2c;color:#5c1515}
.notice--error ul{margin:8px 0 0;padding-left:20px}
.thanks{background:var(--white);border:2px solid var(--green);border-radius:var(--radius);padding:48px;display:flex;flex-direction:column;gap:16px}
.closed{background:var(--white);border:1px solid var(--line);border-radius:var(--radius);padding:40px;display:flex;flex-direction:column;gap:12px}

.cook-table{border-collapse:collapse;width:100%;font-size:17px}
.cook-table th{text-align:left;padding:10px 0;border-bottom:2px solid var(--green)}
.cook-table td{padding:10px 0;border-bottom:1px solid var(--line)}
.cook-table tr:last-child td{border-bottom:0}
.cook-table td:first-child{font-weight:600}

/* ---------- Our Story ---------- */
.timeline{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:32px}
.timeline li{display:flex;flex-direction:column;gap:12px;border-top:3px solid var(--green);padding-top:20px}
.timeline strong{font-family:var(--serif);font-weight:400;font-size:34px;line-height:1;color:var(--green)}
.timeline p{color:var(--muted)}
.person{background:var(--white);border:1px solid var(--line);border-radius:var(--radius);padding:28px;display:flex;flex-direction:column;gap:10px}
.person h3{font-size:26px}
.person .role{font-size:14px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--olive)}
.person p{color:var(--muted);font-size:16px}
.standards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:28px}
.standards div{border-top:1px solid #3b5c43;padding-top:20px;display:flex;flex-direction:column;gap:8px}
.standards strong{font-family:var(--serif);font-weight:400;font-size:24px}
.standards p{color:var(--on-green);font-size:16px}

/* ---------- Generic pages & posts ---------- */
.page-hero{padding-top:64px;padding-bottom:40px}
.entry{max-width:760px}
.entry-content{font-size:18px}
.entry-content>*+*{margin-top:1.1em}
.entry-content h2{font-size:34px;margin-top:1.6em}
.entry-content h3{font-size:26px;margin-top:1.4em}
.entry-content img{border-radius:var(--radius)}
.entry-content table{border-collapse:collapse;width:100%;max-width:100%;display:block;overflow-x:auto}
.entry-content td,.entry-content th{border-bottom:1px solid var(--line);padding:8px 12px 8px 0;text-align:left;vertical-align:top}
.entry-content .alignright{float:right;margin:0 0 1em 1.5em;max-width:45%}
.entry-content .alignleft{float:left;margin:0 1.5em 1em 0;max-width:45%}
.entry-content .aligncenter{margin-left:auto;margin-right:auto}
.entry-content iframe{max-width:100%}
.entry-meta{font-size:14px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--olive);margin-bottom:12px}
.pagination{display:flex;gap:16px;margin-top:48px;font-weight:600}
.post-list{display:grid;gap:24px;grid-template-columns:repeat(2,minmax(0,1fr))}

/* ---------- Responsive ---------- */
@media (max-width:1100px){
  .grid-4,.key-dates{grid-template-columns:repeat(2,minmax(0,1fr))}
  .timeline{grid-template-columns:repeat(2,minmax(0,1fr))}
  .standards{grid-template-columns:repeat(3,minmax(0,1fr))}
  .visit{grid-template-columns:repeat(2,minmax(0,1fr))}
  .visit>img{grid-column:1/-1}
  .main-nav ul{gap:4px 20px}
}
@media (max-width:900px){
  .split,.grid-3,.news-grid,.stats,.post-list{grid-template-columns:minmax(0,1fr)}
  .split{gap:40px}
  .section{padding-top:64px;padding-bottom:64px}
  .hero{padding-top:40px;padding-bottom:64px}
  .hero__badge{left:12px;bottom:-24px}
  .site-header .wrap{flex-wrap:wrap}
  .nav-toggle{display:inline-block}
  .header-right{width:100%;display:none;flex-direction:column;align-items:stretch;gap:8px}
  .site-header.is-open .header-right{display:flex}
  .main-nav ul{flex-direction:column;align-items:stretch;gap:0}
  .main-nav a{padding:14px 0;border-top:1px solid var(--line-dark)}
  .header-call{text-align:center}
  .site-logo img{height:56px}
  .standards{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:640px){
  body{font-size:16px}
  .wrap{padding-left:20px;padding-right:20px}
  .grid-4,.key-dates,.timeline,.standards,.visit,.choice-grid,.details-grid{grid-template-columns:minmax(0,1fr)}
  .row{grid-template-columns:minmax(0,1fr);padding:14px 18px}
  .fs legend{padding:12px 18px;font-size:23px}
  .fs__pad{padding:18px}
  .delivery-note{margin:0 18px 18px}
  .thanks,.closed{padding:28px}
  .topbar__hours{display:none}
  .hero__badge{position:static;max-width:none;margin-top:12px}
  .entry-content .alignright,.entry-content .alignleft{float:none;margin:0 0 1em;max-width:100%}
}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
