/*
Theme Name: Balsam BakeHouse
Theme URI: https://balsambakehouse.local
Author: Balsam BakeHouse
Description: A warm, story-led WordPress theme for Balsam BakeHouse, a neighbourhood pop-up bake stand.
Version: 1.0.0
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: balsam-bakehouse
Tags: food-and-drink, custom-logo, custom-menu, featured-images, full-width-template, accessibility-ready
*/

:root {
  --cream: #f7f0e3;
  --paper: #fffaf1;
  --ink: #28251f;
  --pine: #294238;
  --pine-dark: #173027;
  --terracotta: #bb6548;
  --gold: #d59f52;
  --sage: #92a38f;
  --line: rgba(40, 37, 31, .14);
  --shadow: 0 18px 60px rgba(54, 42, 24, .12);
  --radius: 26px;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pine); text-underline-offset: 3px; }
a:hover { color: var(--terracotta); }
button, input, textarea { font: inherit; }

.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;
}
.screen-reader-text:focus { width: auto; height: auto; clip: auto; padding: .8rem 1rem; margin: .5rem; background: #fff; z-index: 9999; }
.site-shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.narrow { width: min(760px, calc(100% - 40px)); margin-inline: auto; }
.section { padding: clamp(70px, 9vw, 120px) 0; }
.section-kicker, .eyebrow {
  margin: 0 0 14px; color: var(--terracotta); font-size: .76rem; font-weight: 800;
  letter-spacing: .18em; text-transform: uppercase;
}
h1, h2, h3 { font-family: var(--serif); line-height: 1.06; margin-top: 0; font-weight: 500; }
h1 { font-size: clamp(3.5rem, 8vw, 7.5rem); letter-spacing: -.055em; }
h2 { font-size: clamp(2.5rem, 5vw, 4.7rem); letter-spacing: -.04em; }
h3 { font-size: clamp(1.55rem, 2.5vw, 2.1rem); }
p { margin: 0 0 1.3rem; }
.lead { font-family: var(--serif); font-size: clamp(1.35rem, 2.3vw, 2rem); line-height: 1.45; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 52px; padding: .82rem 1.35rem; border: 1px solid transparent; border-radius: 999px;
  background: var(--pine); color: #fff; font-weight: 750; text-decoration: none; transition: .2s ease;
}
.button:hover { transform: translateY(-2px); background: var(--terracotta); color: #fff; }
.button--light { background: var(--paper); color: var(--pine); }
.button--outline { background: transparent; border-color: currentColor; color: var(--pine); }

.announcement { background: var(--pine); color: #fff; text-align: center; padding: .55rem 1rem; font-size: .85rem; letter-spacing: .05em; }
.announcement a { color: #fff; }
.site-header { position: relative; z-index: 50; background: rgba(247,240,227,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.header-inner { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: flex; align-items: center; gap: .85rem; color: var(--ink); text-decoration: none; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50% 50% 48% 52%; background: var(--terracotta); color: #fff; font: 700 1.2rem var(--serif); transform: rotate(-3deg); }
.brand-name { font: 600 clamp(1.35rem, 2vw, 1.75rem)/1 var(--serif); letter-spacing: -.03em; }
.brand-tag { display: block; margin-top: .28rem; color: #6c675d; font-size: .68rem; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.custom-logo { max-height: 62px; width: auto; }
.menu-toggle { display: none; border: 0; background: transparent; font-weight: 800; color: var(--pine); }
.main-nav ul { display: flex; align-items: center; gap: 1.6rem; margin: 0; padding: 0; list-style: none; }
.main-nav a { color: var(--ink); text-decoration: none; font-size: .92rem; font-weight: 750; }
.main-nav li:last-child a { padding: .65rem 1rem; border-radius: 999px; background: var(--terracotta); color: #fff; }

.hero { min-height: 780px; display: grid; align-items: stretch; position: relative; overflow: hidden; background: var(--pine-dark); color: #fff; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.hero-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18,36,29,.92) 0%, rgba(18,36,29,.68) 47%, rgba(18,36,29,.12) 85%), linear-gradient(0deg, rgba(18,36,29,.6), transparent 45%); }
.hero-content { position: relative; z-index: 2; width: min(1180px, calc(100% - 40px)); margin: auto; padding: 115px 0 120px; }
.hero h1 { max-width: 850px; margin-bottom: 1.2rem; }
.hero .eyebrow { color: #f2bf71; }
.hero-copy { max-width: 620px; font: 1.25rem/1.6 var(--serif); color: rgba(255,255,255,.88); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }
.hero .button--outline { border-color: rgba(255,255,255,.65); color: #fff; }
.hero-stamp { position: absolute; right: max(6vw, 35px); bottom: 55px; width: 150px; height: 150px; border: 1px solid rgba(255,255,255,.6); border-radius: 50%; display: grid; place-items: center; text-align: center; font: 700 .75rem/1.45 var(--sans); letter-spacing: .13em; text-transform: uppercase; transform: rotate(7deg); }

.today-bar { background: var(--gold); color: var(--pine-dark); }
.today-inner { min-height: 112px; display: grid; grid-template-columns: 1.2fr 1fr auto; align-items: center; gap: 2rem; }
.today-inner strong { font-family: var(--serif); font-size: 1.65rem; font-weight: 600; }
.today-meta { display: flex; gap: 2.2rem; }
.today-meta span { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.today-meta b { font-size: 1rem; }

.story-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(50px, 8vw, 110px); }
.story-photo { position: relative; padding: 0 36px 36px 0; }
.story-photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.story-photo::after { content: ''; position: absolute; right: 0; bottom: 0; width: 56%; height: 55%; border: 2px solid var(--terracotta); border-radius: var(--radius); z-index: -1; }
.hand-note { display: inline-block; margin-top: 1rem; color: var(--terracotta); font: italic 1.25rem var(--serif); transform: rotate(-2deg); }

.bakes { background: var(--paper); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 3rem; }
.section-head h2 { max-width: 720px; margin-bottom: 0; }
.bake-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.bake-card { position: relative; overflow: hidden; min-height: 470px; border-radius: var(--radius); background: var(--pine); color: #fff; box-shadow: var(--shadow); }
.bake-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.bake-card:hover img { transform: scale(1.035); }
.bake-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(18,25,21,.88), rgba(18,25,21,0) 65%); }
.bake-info { position: absolute; z-index: 2; inset: auto 25px 18px; }
.bake-info h3 { margin: 0 0 .35rem; }
.bake-info p { margin: 0; color: rgba(255,255,255,.8); font-size: .9rem; }
.bake-card:nth-child(2) { transform: translateY(26px); }

.kindness { background: var(--pine); color: #fff; overflow: hidden; }
.kindness-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 8vw, 100px); align-items: center; }
.kindness h2 { color: #fff; }
.kindness-copy p:not(.section-kicker) { color: rgba(255,255,255,.77); max-width: 680px; }
.kindness-quotes { display: grid; gap: 1rem; }
.quote { padding: 1.5rem; border: 1px solid rgba(255,255,255,.19); border-radius: 20px; background: rgba(255,255,255,.06); font-family: var(--serif); font-size: 1.22rem; }
.quote span { display: block; margin-top: .65rem; color: #f2bf71; font: 750 .72rem var(--sans); letter-spacing: .12em; text-transform: uppercase; }

.gallery { display: grid; grid-template-columns: 1.15fr .85fr .85fr; grid-template-rows: 260px 260px; gap: 12px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; }
.gallery img:first-child { grid-row: 1 / 3; }
.gallery img:nth-child(4) { grid-column: 2 / 4; }

.visit { padding-bottom: clamp(80px, 10vw, 140px); }
.visit-card { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border-radius: 32px; background: var(--terracotta); color: #fff; box-shadow: var(--shadow); }
.visit-copy { padding: clamp(40px, 7vw, 85px); }
.visit-copy h2 { color: #fff; }
.visit-copy dl { display: grid; grid-template-columns: auto 1fr; gap: .65rem 1.5rem; margin: 2rem 0; }
.visit-copy dt { color: #ffd9bd; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.visit-copy dd { margin: 0; font-weight: 700; }
.visit-card > img { width: 100%; height: 100%; min-height: 550px; object-fit: cover; }

.content-main { padding: 80px 0 110px; }
.content-main article { background: var(--paper); padding: clamp(28px, 5vw, 65px); border-radius: var(--radius); }
.entry-title { font-size: clamp(2.7rem, 6vw, 5.5rem); }
.post-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.post-card { background: var(--paper); border-radius: 20px; overflow: hidden; }
.post-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.post-card-content { padding: 1.4rem; }

.site-footer { background: #1b2d26; color: rgba(255,255,255,.76); padding: 70px 0 25px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 3rem; }
.site-footer .brand { color: #fff; }
.site-footer h3 { color: #fff; font-size: 1.2rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer a { color: rgba(255,255,255,.82); }
.footer-bottom { margin-top: 55px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: .78rem; display: flex; justify-content: space-between; gap: 1rem; }

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 1rem 20px 1.5rem; background: var(--cream); border-bottom: 1px solid var(--line); }
  .main-nav.is-open { display: block; }
  .main-nav ul { align-items: stretch; flex-direction: column; gap: .4rem; }
  .main-nav a { display: block; padding: .7rem; }
  .hero { min-height: 700px; }
  .hero-stamp { display: none; }
  .today-inner { grid-template-columns: 1fr; gap: .8rem; padding: 25px 0; }
  .story-grid, .kindness-grid, .visit-card { grid-template-columns: 1fr; }
  .story-copy { order: -1; }
  .bake-grid { grid-template-columns: 1fr 1fr; }
  .bake-card:nth-child(2) { transform: none; }
  .bake-card:last-child { grid-column: 1 / 3; }
  .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 220px 220px 220px; }
  .gallery img:first-child { grid-row: auto; }
  .gallery img:nth-child(4) { grid-column: 1 / 3; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .site-shell { width: min(100% - 28px, 1180px); }
  .brand-tag { display: none; }
  .hero-content { width: calc(100% - 28px); padding: 85px 0 100px; }
  .hero-media::after { background: linear-gradient(0deg, rgba(18,36,29,.91), rgba(18,36,29,.35)); }
  .hero h1 { font-size: clamp(3.3rem, 17vw, 5rem); }
  .today-meta { flex-direction: column; gap: .7rem; }
  .section-head { display: block; }
  .section-head .button { margin-top: 1rem; }
  .bake-grid, .post-grid { grid-template-columns: 1fr; }
  .bake-card, .bake-card:last-child { min-height: 400px; grid-column: auto; }
  .gallery { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 180px 180px; }
  .gallery img:nth-child(n+4) { display: none; }
  .gallery img:first-child { grid-row: 1/3; }
  .visit-card > img { min-height: 390px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
