/*
Theme Name: Hartley's Garden Centre
Theme URI: https://hartleysgardencentre.co.uk/
Author: Hartley's Garden Centre & Coffee Shop
Description: A custom theme for Hartley's Garden Centre & Coffee Shop, Glossop. All text, photos, menu images, opening hours, contact details and social links are edited from the WordPress dashboard (Pages and Hartley's Details). No plugins required.
Version: 1.6.5
Requires at least: 6.0
Tested up to: 6.8
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: hartleys
*/

/* ---------- Shared design (header, footer, buttons, split/collage layouts, animations) ---------- */
:root{--green:#16432c;--green-d:#123a26;--cream:#f4f2eb;--sage:#d3dfc8;--ink:#133A14;--paper:#f8f7f3;--r:10px;--pink:#eab5c6;--ic:#1d5a3e;--head:'Poppins',system-ui,sans-serif;--body:'Courier Prime','Courier New',monospace;--max:1440px;--gutter:clamp(20px,8.333vw,120px);--sec:clamp(56px,7vw,96px);--bg:var(--cream);color-scheme:light}
*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:64px}
body{margin:0;background:var(--cream);color:var(--ink);font:400 16px/1.7 var(--body);overflow-x:hidden}
body::before{content:"";position:fixed;inset:0;pointer-events:none;opacity:.05;z-index:100;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}
img{display:block;max-width:100%}h1,h2,h3{font-family:var(--head);font-weight:700;line-height:1.2;margin:0}
p{margin:0 0 1.1em}a{color:inherit}
.wrap{max-width:var(--max);margin:0 auto;padding-inline:var(--gutter)}
.eyebrow{font:500 11px var(--head);letter-spacing:.18em;text-transform:uppercase;opacity:.7;margin-bottom:12px}
.btn{display:inline-flex;align-items:center;min-height:44px;padding:0 26px;background:var(--green);color:var(--paper);font:500 14px var(--head);border-radius:999px;text-decoration:none;transition:background-color .3s ease,color .3s ease}
.btn:hover{background:#0c2a1a}a:focus-visible,button:focus-visible{outline:3px solid #8fc29f;outline-offset:3px}
header{position:fixed;top:0;left:0;right:0;z-index:50;background:var(--green);color:var(--paper);padding-top:env(safe-area-inset-top,0px)}
header .wrap{display:flex;justify-content:space-between;align-items:center;min-height:64px}
.logo{display:inline-flex;align-items:center;gap:10px;text-decoration:none;color:inherit;line-height:1}.logo img{height:48px;width:auto;max-width:min(260px,55vw);object-fit:contain}footer .logo img{height:76px;max-width:min(300px,100%)}.logo b{display:block;font:700 19px var(--head)}.logo small{display:block;font:400 6.5px var(--head);letter-spacing:.14em;text-transform:uppercase;margin-top:3px;opacity:.85}
nav ul{display:flex;gap:6px;list-style:none;margin:0;padding:0}
nav a{display:block;padding:10px 12px;font:500 13px var(--head);text-decoration:none;transition:color .3s ease}nav a:hover{color:#c6e3bd}
#menu-btn{display:none;flex-direction:column;justify-content:center;gap:5px;width:44px;height:44px;padding:0 10px;background:none;border:0;color:#fff;cursor:pointer}#menu-btn span{display:block;height:2px;background:currentColor;border-radius:2px;transition:transform .2s,opacity .2s}#menu-btn[aria-expanded=true] span:nth-child(1){transform:translateY(7px) rotate(45deg)}#menu-btn[aria-expanded=true] span:nth-child(2){opacity:0}#menu-btn[aria-expanded=true] span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
.hero{position:sticky;top:0;height:100svh;min-height:520px;overflow:hidden;color:#fff;display:flex;align-items:center}
.hero-bg{position:absolute;left:0;right:0;top:0;height:100%;transform-origin:center;background-size:cover;background-position:center;will-change:transform}
.hero::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,#0a1f1488,#0a1f1455 50%,#0a1f1499)}
.hero .wrap{position:relative;z-index:2;padding-top:56px;width:100%}
.hero h1{font-size:clamp(32px,5.2vw,76px);font-weight:700;max-width:none;white-space:nowrap}@media(max-width:860px){.hero h1{white-space:normal;font-size:clamp(32px,10vw,46px)}}
.hero p{max-width:700px;margin-top:20px}
.scroll{position:absolute;z-index:2;bottom:102px;left:50%;transform:translateX(-50%);width:48px;height:48px;border:1.5px solid #fff;border-radius:50%;display:grid;place-items:center;color:#fff;background:#0003}
main{position:relative;z-index:3;margin-top:-40px;background:var(--cream);border-radius:36px 36px 0 0}
section{padding:var(--sec) 0}
.split{display:grid;grid-template-columns:1fr 1fr;gap:80px;align-items:stretch}
.split+.split{margin-top:clamp(56px,9.7vw,140px)}#garden{padding-top:calc(var(--sec) + 24px)}
.split h2{font-size:clamp(30px,3.2vw,46px);margin-bottom:24px}.split>div>p:last-child{margin-bottom:0}main p,.hero p{font-size:clamp(16px,1.667vw,24px);line-height:1.45}
.collage{position:relative;width:100%;max-width:560px;align-self:stretch}
.collage img{position:absolute;object-fit:cover;border-radius:var(--r)}
.c1 .a{top:0;left:18.2%;width:81.8%;height:52%}.c1 .b{top:47.9%;left:0;width:82.1%;height:52.1%}.c2 .a{top:8.9%;left:0;width:57.1%;height:66.7%}.c2 .b{top:0;left:51.8%;width:48.2%;height:40.9%}.c2 .c{top:48.5%;left:46.4%;width:53.6%;height:51.5%}.c3 .a{top:0;left:0;width:66.4%;height:43.1%}.c3 .b{top:23.7%;left:34.1%;width:65.7%;height:43.1%}.c3 .c{top:56.9%;left:1%;width:65.5%;height:43%}.c4 .a{inset:0;width:100%;height:100%;object-position:50% 20%}
.fac{background:var(--sage);text-align:center;border-radius:0}
.fac>.wrap>p{max-width:640px;margin:0 auto 40px}
.fac ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(6,1fr);gap:20px}
.fac li{font-size:13px;line-height:1.35}.ic{width:100px;height:100px;margin:0 auto 12px;border-radius:50%;background:var(--paper);border:1.5px solid #d6d2c4;display:grid;place-items:center;color:var(--ic)}.ic svg{width:42px;height:42px;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}@media(max-width:860px){.ic{width:72px;height:72px}.ic svg{width:32px;height:32px}}
.coffee{--bg:var(--green);background:var(--green);color:var(--paper)}
.coffee h2{text-align:center;max-width:820px;margin:0 auto 48px;font-size:clamp(30px,3.1vw,44px)}
.eyebrow.c{text-align:center}
.trio{display:grid;grid-template-columns:1fr 1fr 1fr;gap:20px;align-items:end;margin-bottom:48px}
.trio img{width:100%;aspect-ratio:3/4;object-fit:cover;border-radius:var(--r)}.trio img:nth-child(2){aspect-ratio:3/4.7;border-radius:50% 50% var(--r) var(--r)/31.91% 31.91% var(--r) var(--r)}
.cols{columns:2;column-gap:56px}.cols p{break-inside:avoid-column}.coffee .cols{columns:1;max-width:none;margin:0;text-align:left}.coffee .cols p{margin:0 0 16px}.coffee .cols p:last-child{margin:0}
.c8 .a{top:0;left:0;width:60%;height:72%}.c8 .b{top:28%;left:40%;width:60%;height:72%}
.coffee .btn{background:var(--paper);color:var(--ink)}.coffee .btn:hover{background:#d6e5cd}
.coffee .split{margin-top:clamp(48px,7.5vw,108px);align-items:stretch}
.gal-head{display:flex;justify-content:space-between;align-items:end;margin-bottom:24px}
.gal-head h2{font-size:32px}.arrows button{width:44px;height:44px;border-radius:50%;border:1.5px solid var(--ink);background:none;font-size:18px;cursor:pointer;color:var(--ink)}
.track{--n:4;--gg:18px;display:flex;gap:var(--gg);overflow-x:auto;overscroll-behavior-x:contain;padding-bottom:12px;container-type:inline-size;cursor:grab;-webkit-overflow-scrolling:touch;--gh:calc((100vw - 2*var(--gutter) - (var(--n) - 1)*var(--gg))/var(--n)/.75);--gh:calc((100cqw - (var(--n) - 1)*var(--gg))/var(--n)/.75)}
.track.drag{cursor:grabbing;user-select:none}
/* Frame with rounded corners: a photo sliding in or out is clipped with the same corner radius as the photos */
.track{scrollbar-width:none;clip-path:inset(0 0 12px 0 round var(--r))}.track::-webkit-scrollbar{display:none}
.track:focus-visible{outline:2px solid var(--green);outline-offset:2px;clip-path:none}
.track figure{margin:0;flex:0 0 auto}.track img{height:var(--gh);width:auto;max-width:none;border-radius:var(--r);-webkit-user-drag:none;user-select:none}
@media(max-width:1299px){.track{--n:3}}
@media(max-width:860px){.track{--n:2}}
@media(max-width:560px){.track{--n:1.25;--gg:12px}}
.about h2{font-size:clamp(30px,3.33vw,48px);margin-bottom:20px}.about .cols{columns:1;margin-top:80px}
.contact{background:#efece3;text-align:left}.contact h2{font-size:clamp(30px,3.1vw,44px);text-align:center;margin-bottom:48px}
.card{background:#fff8;border:1px solid #16432c22;border-radius:18px;padding:32px;display:grid;grid-template-columns:1fr 1.2fr;gap:36px}
.card h3{font-size:20px;margin-bottom:16px}.card h4{font:500 11px var(--head);letter-spacing:.16em;text-transform:uppercase;margin:16px 0 6px;opacity:.7}
.card address{font-style:normal}.hrs div{display:flex;justify-content:space-between;gap:8px;white-space:nowrap;border-bottom:1px dotted #16432c44;padding:4px 0;font-size:clamp(10px,2.9vw,14px)}@media(max-width:340px){.hrs div{flex-direction:column;gap:0}}
.dir{background:var(--sage);border-radius:10px;padding:14px;font-size:14px;margin:16px 0}
.map{border-radius:var(--r);overflow:hidden;min-height:300px;background:var(--sage)}.map svg{width:100%;height:100%;display:block}.map iframe{display:block;width:100%;height:100%;min-height:inherit;border:0}
.rv-on .rv{opacity:0;transform:translateY(22px);transition:opacity .9s ease,transform .9s cubic-bezier(.22,.61,.36,1)}.rv-on .rv.in{opacity:1;transform:none}footer{position:relative;z-index:3;background:var(--green-d);color:var(--paper);padding:56px 0 28px;font-size:14px}
footer .g{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:32px}footer h4{font:500 11px var(--head);letter-spacing:.16em;text-transform:uppercase;margin:0 0 12px}
footer ul{list-style:none;margin:0;padding:0}footer li{padding:2px 0}footer li a{text-decoration:none}footer li a{transition:color .3s ease}footer li a:hover,footer p a:hover{color:#c6e3bd}footer a{transition:color .3s ease}.tel{transition:color .3s ease}.tel:hover{color:#5f9a6e}.soc a:hover{color:#c6e3bd;border-color:#c6e3bd}footer .tel:hover,footer a:hover{color:#c6e3bd}.soc{display:flex;gap:12px;margin-top:16px}.soc a{transition:color .3s ease,border-color .3s ease;width:44px;height:44px;border:1px solid #fff5;border-radius:50%;display:grid;place-items:center;font:500 12px var(--head);text-decoration:none}
.copy{border-top:1px solid #fff2;margin-top:36px;padding-top:18px;font-size:12px;opacity:.7}
@media(max-width:860px){
#menu-btn{display:flex}nav{display:none;position:absolute;top:100%;left:0;right:0;background:var(--green);padding:8px 16px 16px}nav.open{display:block}nav ul{flex-direction:column}nav a{padding:14px 8px}
.split,.card{grid-template-columns:1fr;gap:32px}.card{padding:18px}.collage{margin:0 auto}.split .collage{order:-1;align-self:auto;min-height:0}.c1{aspect-ratio:560/680}.c2{aspect-ratio:560/660}.c3{aspect-ratio:560/1128}.coffee .cols{text-align:left;margin:0;max-width:none}.c8{aspect-ratio:560/420}.c4{aspect-ratio:560/530}
.fac ul{grid-template-columns:repeat(3,1fr)}.trio{gap:10px}.trio img{border-radius:var(--r)}.trio img:nth-child(2){border-radius:50% 50% var(--r) var(--r)/31.91% 31.91% var(--r) var(--r)}.cols{columns:1}footer .g{grid-template-columns:1fr 1fr}
.hero-bg{top:0;height:100%}}
@media(max-width:860px){#garden{padding-top:var(--sec)}.about .cols{margin-top:var(--sec)}.gal-head{gap:16px}.gal-head h2{font-size:30px}.split>div>.collage{margin:28px auto 32px;max-width:100%}.split{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.track{scroll-behavior:auto}.hero-bg{top:0;height:100%;transform:none!important}}

/* ---------- WordPress additions ---------- */
.admin-bar header{top:32px}@media(max-width:782px){.admin-bar header{top:46px}}
.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}
.skip-link:focus{clip:auto;clip-path:none;height:auto;width:auto;margin:0;z-index:100000;left:8px;top:8px;background:#fff;color:#133A14;padding:12px 18px;border-radius:8px;font:500 14px var(--head)}
nav li{margin:0;padding:0}

/* Long email addresses must wrap instead of widening the page */
a[href^="mailto:"]{overflow-wrap:anywhere}

/* Announcement ticker: sits under the header inside the hero, so it leaves with the hero (never fixed) */
.ticker{position:absolute;z-index:3;left:0;right:0;top:calc(64px + env(safe-area-inset-top,0px));height:26px;overflow:hidden;background:var(--cream);color:var(--ink);display:flex;align-items:center}
.ticker-track{display:flex;width:max-content;will-change:transform;animation:hg-ticker var(--ticker-dur,60s) linear infinite}
.ticker-group{display:flex;flex:none}
.ticker-item{flex:none;font:500 11.5px var(--head);white-space:nowrap;padding:0 28px;display:flex;align-items:center}
.ticker-item::after{content:"";width:4px;height:4px;border-radius:50%;background:currentColor;opacity:.45;margin-left:56px}
@keyframes hg-ticker{from{transform:translateX(0)}to{transform:translateX(-50%)}}
.hero.has-ticker .wrap{padding-top:82px}
/* Push the photo down by the bar's height so the bar sits above the photo instead of covering its top edge */
.hero.has-ticker .hero-bg{top:26px}
@media(prefers-reduced-motion:reduce){.ticker{justify-content:center}.ticker-track{animation:none;width:auto}.ticker-group:nth-child(n+2),.ticker-item:nth-child(n+2){display:none}.ticker-item::after{display:none}}

/* iPhone: keep the whole top safe area (status bar / Dynamic Island) solid forest green.
   - the fixed header already includes env(safe-area-inset-top) in its padding;
   - this bar covers the same inset on its own, so nothing can ever show through above the header;
   - on touch devices the page canvas behind everything is green too, so pull-down bounce shows green, not cream.
   On screens without a notch the inset is 0, so nothing changes (desktop included). */
/* Touch devices: html AND body are forest green. Newer iPhone Safari takes the colour for the area under the status bar from the page background it finds at the top edge. Every visible part of the page (hero, main, footer) paints its own background on top, so nothing else changes. */
@media (pointer:coarse){html,body{background-color:var(--green)}body{min-height:100vh;min-height:100dvh}}

/* Safari can lay the fixed header out BELOW the status bar / Dynamic Island, leaving the page showing through above it.
   This green block hangs directly above the header, so whatever sits above it is the same solid forest green.
   Off-screen (and invisible) wherever the header already starts at the very top of the screen, e.g. desktop. */
header::before{content:"";position:absolute;left:0;right:0;bottom:100%;height:140px;background:var(--green);pointer-events:none}

/* Touch devices: the grain overlay starts below the header, so the header is the only thing fixed to the top edge of the screen
   (Safari reads that edge to colour the status-bar area). */
@media (pointer:coarse){body::before{top:calc(64px + env(safe-area-inset-top,0px))}}
/* Version marker, shown by the ?hgdebug=1 check page */
:root{--hg-css:"1.6.5"}

/* ---------- v1.6.4: safe areas, header fade, Directions button on phones ---------- */
/* Left/right safe areas (landscape notch / camera cut-out). Never smaller than the existing gutter, so portrait and desktop are unchanged. */
header .wrap{padding-left:max(var(--gutter),env(safe-area-inset-left,0px));padding-right:max(var(--gutter),env(safe-area-inset-right,0px))}
/* The Directions button appears twice in the markup; the copy under the map is hidden except on phones. */
.dir-m{display:none}
@media(max-width:860px){
nav{padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
.card>div:first-child .btn{display:none}
.card>div:first-child .dir{margin-bottom:0}
.dir-m{display:block;margin-top:-12px}
}
