/*
Theme Name:   Sheds R Us
Theme URI:    https://shedsrus.co.nz/
Description:  GeneratePress child theme for Sheds R Us, shed builders in Mangawhai. Photo-led layout, block section styles, quote form styling, GTM and the mobile call bar.
Author:       ServiceGecko
Template:     generatepress
Version:      2.0.2
Requires at least: 6.5
Requires PHP: 7.4
Text Domain:  sheds-r-us
License:      GPL-2.0-or-later
*/

/* ---------- Fonts (self-hosted, latin subset, OFL) ---------- */
@font-face { font-family: "Libre Franklin"; font-style: normal; font-weight: 500 700; font-display: swap; src: url("assets/fonts/libre-franklin-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("assets/fonts/source-serif-4-normal.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  --ink: #1d2420;
  --muted: #58605b;
  --paper: #ffffff;
  --mist: #f3f5f3;
  --line: #dde2de;
  --field: #b9c2bc;
  --green: #0b7e40;      /* logo green: buttons and links only */
  --green-deep: #0c3b25;
  --focus: #f0c24b;
  --sans: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --wrap: 1160px;
  --gut: 20px;
  --sec: 72px;
  --radius: 4px;
}
@media (min-width: 900px) { :root { --gut: 40px; --sec: 120px; } }

/* ---------- Base ---------- */
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.65 var(--serif);
}
.sru-page { padding-bottom: 72px; } /* room for the mobile call bar */
@media (min-width: 900px) { .sru-page { padding-bottom: 0; } }
a { color: var(--green); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover, a:focus { color: var(--green-deep); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

h1, h2, h3, h4 { font-family: var(--sans); color: var(--ink); margin: 0 0 0.5em; letter-spacing: -0.015em; text-transform: none; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); line-height: 1.04; font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.1; font-weight: 700; }
h3 { font-size: 1.2rem; line-height: 1.25; font-weight: 600; letter-spacing: -0.005em; }
p { margin: 0 0 1.1em; }
.sru-main p, .sru-main li { max-width: 36em; }
.lead { font-size: 1.25rem; line-height: 1.6; }
.muted { color: var(--muted); }

/* ---------- GeneratePress integration: full-width pages ---------- */
.sru-page #page.grid-container,
.sru-page .site.grid-container { max-width: none; padding: 0; }
.sru-page .site-content { display: block; padding: 0; }
.sru-page .site-main.sru-main { margin: 0; }
.sru-main :where(.is-layout-flow) > *,
.sru-main :where(.is-layout-constrained) > * { margin-block-start: 0; }
.sru-main .wp-block-group__inner-container { display: contents; } /* fallback; see inc/layout.php */

.sru-page .sru-main > .sru-section { margin-bottom: 0; }
/* Plain content pages (terms, the consent guide) */
.sru-main > :not(.sru-section) { max-width: 760px; margin-left: auto; margin-right: auto; padding-left: var(--gut); padding-right: var(--gut); }
.sru-page .sru-main > :not(.sru-section) { margin-bottom: 1.1em; }
.sru-main > :not(.sru-section):first-child { padding-top: 56px; }
.sru-main > :not(.sru-section):last-child { padding-bottom: var(--sec); }
.sru-page .sru-main > h2:not(.sru-section) { margin-top: 1.6em; }
.sru-main > ul:not(.sru-section) { padding-left: calc(var(--gut) + 1.2em); }

/* ---------- Header ---------- */
.site-header { background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.site-header .inside-header { max-width: var(--wrap); margin: 0 auto; padding: 14px var(--gut); }
.site-header .site-logo img, .site-header .header-image { height: 44px; width: auto; }
.site-header .site-branding { display: none; } /* the logo already says Sheds R Us */
.main-navigation, .main-navigation ul ul { background: transparent; }
.main-navigation .main-nav ul li a { color: var(--ink); font: 500 0.98rem/46px var(--sans); padding-left: 13px; padding-right: 13px; letter-spacing: 0; text-transform: none; }
.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li[class*="current-menu-"] > a { color: var(--green); background: transparent; }
.main-navigation .main-nav ul ul { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(29,36,32,.08); }
.main-navigation .main-nav ul ul li a { line-height: 1.3; padding-top: 11px; padding-bottom: 11px; }
.main-navigation .menu-toggle { color: var(--ink); font: 600 0.95rem/1 var(--sans); }
.main-navigation.toggled .main-nav ul li a { line-height: 50px; border-top: 1px solid var(--line); }
.main-navigation .menu-bar-items { align-items: center; gap: 20px; }
/* Phone + "Get a price" sit beside the menu on desktop; on mobile the call bar does that job. */
.site-header .menu-bar-items .header-phone,
.site-header .menu-bar-items .header-quote { display: none; }
@media (min-width: 1000px) {
  .site-header .menu-bar-items .header-phone { display: inline; padding: 0; margin-left: 10px; font: 600 1rem/1 var(--sans); color: var(--ink); text-decoration: none; white-space: nowrap; }
  .site-header .menu-bar-items .header-phone:hover { color: var(--green); }
  .site-header .menu-bar-items .header-quote { display: inline-flex; min-height: 44px; padding: 0 18px; margin-left: 4px; line-height: 1; color: #fff; }
  .site-header .menu-bar-items .header-quote:hover { color: #fff; background: var(--green-deep); }
}

/* ---------- Buttons ---------- */
.btn,
.sru-main .wp-block-button a.wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  font: 600 1rem/1 var(--sans); letter-spacing: 0; text-transform: none; text-decoration: none;
  border: 1px solid var(--green); border-radius: var(--radius);
  background: var(--green); color: #fff;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover, .sru-main .wp-block-button a.wp-block-button__link:hover { background: var(--green-deep); border-color: var(--green-deep); color: #fff; }
.btn-small { min-height: 44px; padding: 0 18px; font-size: .95rem; }
.sru-main .is-outline > a.wp-block-button__link { background: transparent; color: var(--ink); border-color: var(--ink); }
.sru-main .is-outline > a.wp-block-button__link:hover { background: var(--ink); color: #fff; }
.sru-main .wp-block-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.sru-main .actions { margin-top: 30px; }
.phone-line { font: 600 1rem/1.4 var(--sans); margin: 14px 0 0; }
.phone-line a { color: var(--ink); text-decoration: none; }
.phone-line a:hover { color: var(--green); }
.more { font: 600 1rem/1.4 var(--sans); margin: 0; }
.more a { text-decoration: none; }
.more a::after { content: " \2192"; }

/* ---------- Sections ---------- */
.sru-section { padding: var(--sec) 0; }
.sru-section.is-mist { background: var(--mist); }
.sru-section.is-tight { padding: calc(var(--sec) * .6) 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.sec-head { display: grid; gap: 10px; margin-bottom: 44px; }
.sec-head h2, .sec-head p { margin: 0; }
.sec-head p { color: var(--muted); }
@media (min-width: 900px) { .sec-head { grid-template-columns: 1fr 1fr; align-items: end; gap: 64px; } }

/* Photo frames: neutral stand-ins until real photos replace them (swap for an Image block) */
.photo { position: relative; background: #d9dfda linear-gradient(160deg, #e4e9e5 0%, #cdd5cf 100%); overflow: hidden; border-radius: 3px; }
.photo::after { content: attr(data-note); position: absolute; left: 14px; right: 14px; bottom: 12px; font: 500 .78rem/1.35 var(--sans); color: #4c5a51; }
.r-43 { aspect-ratio: 4 / 3; }
.r-45 { aspect-ratio: 4 / 5; }
.r-32 { aspect-ratio: 3 / 2; }
.sru-main .wp-block-image img { border-radius: 3px; }

/* Hero */
.is-hero { padding-top: 48px; }
.hero-grid { display: grid; gap: 40px; }
.hero-grid > * { min-width: 0; }
.is-hero h1 { max-width: 12em; }
.is-hero .lead { margin-top: 22px; max-width: 30em; }
.crumbs { font: 500 .88rem/1.4 var(--sans); color: var(--muted); margin-bottom: 26px; }
.crumbs a { color: var(--muted); }
@media (min-width: 900px) {
  .is-hero { padding-top: 72px; }
  .hero-grid { grid-template-columns: 5fr 6fr; gap: 64px; align-items: center; }
}
@media (min-width: 1240px) {
  .hero-photo { margin-right: calc((100vw - var(--wrap)) / -2); border-radius: 3px 0 0 3px; }
}

/* Tiles (shed types) */
.tiles { display: grid; gap: 36px 28px; }
@media (min-width: 640px) { .tiles { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile > * { margin: 0; }
.tile .photo, .tile .wp-block-image { margin-bottom: 16px; }
.tile h3 { margin-bottom: 4px; }
.tile h3 a { color: var(--ink); text-decoration: none; }
.tile h3 a:hover { color: var(--green); }
.tile p { color: var(--muted); font-size: 1rem; }

/* Two columns with a rule on top (two ways, prices) */
.ways { display: grid; gap: 48px; }
.way { border-top: 1px solid var(--ink); padding-top: 26px; }
.way h3 { font-size: 1.45rem; }
.way p:not(.more) { color: var(--muted); }
@media (min-width: 900px) { .ways { grid-template-columns: 1fr 1fr; gap: 64px; } }
.price-line { font: 700 clamp(1.4rem, 2.6vw, 1.9rem)/1.15 var(--sans); color: var(--ink) !important; margin-bottom: .4em; }

/* Split: photo + text, or heading + text */
.split { display: grid; gap: 40px; align-items: center; }
.split > * { min-width: 0; }
.split.is-top { align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 5fr 6fr; gap: 72px; } }

/* Steps (kitset page): a plain ordered list */
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 28px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.2rem 1fr; gap: 4px 14px; max-width: none; }
.steps li::before { content: counter(step); grid-row: span 2; width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 1px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; font: 600 .95rem/1 var(--sans); }
.steps strong { font: 600 1.15rem/1.3 var(--sans); }
.steps li span { color: var(--muted); }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; } }

/* Spec table (sizes) */
.sru-main .spec table { border-collapse: collapse; width: 100%; font: 400 1rem/1.5 var(--sans); }
.sru-main .spec th, .sru-main .spec td { text-align: left; padding: 14px 12px 14px 0; border: 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.sru-main .spec thead th { font-weight: 600; color: var(--muted); font-size: .9rem; border-bottom: 1px solid var(--ink); }
.sru-main .spec td:first-child { font-weight: 600; }
.sru-main .spec figcaption { font: 400 .9rem/1.5 var(--sans); color: var(--muted); text-align: left; margin-top: 12px; }

/* FAQ */
.faq { border-top: 1px solid var(--ink); }
.faq .wp-block-details { border-bottom: 1px solid var(--line); margin: 0; padding: 0; }
.faq summary { list-style: none; cursor: pointer; padding: 20px 2.4rem 20px 0; position: relative; font: 600 1.1rem/1.35 var(--sans); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font: 400 1.6rem/1 var(--sans); color: var(--green); }
.faq details[open] summary::after { content: "\2013"; }
.faq details > p { padding-bottom: 20px; margin: 0; color: var(--muted); }

/* Placeholder text for client input. Remove the span once the real words are in. */
.ph { background: #fdf3d4; color: #6b5413; font: 500 .85em/1.4 var(--sans); padding: .1em .35em; border-radius: 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* Notices (consent guide, habitable sheds) */
.notice { border-left: 3px solid var(--focus); background: #fdf6e3; padding: 16px 18px; font: 500 1rem/1.5 var(--sans); color: #5a4710; }
.notice.council { border-color: var(--green); background: var(--mist); color: var(--ink); }

/* Towns */
.towns { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; font: 400 1rem/1.9 var(--sans); }
@media (min-width: 640px) { .towns { columns: 3; } }

/* Projects filter */
.project-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.project-filter button { min-height: 42px; padding: 0 16px; border: 1px solid var(--field); border-radius: 999px; background: #fff; color: var(--ink); font: 500 .95rem/1 var(--sans); cursor: pointer; }
.project-filter button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.project-grid { display: grid; gap: 36px 28px; }
@media (min-width: 640px) { .project-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .project-grid { grid-template-columns: repeat(3, 1fr); } }
.project-grid figure { margin: 0; }
.project-grid figure[hidden] { display: none; }
.project-grid figcaption { font: 500 .95rem/1.4 var(--sans); padding-top: 12px; }

/* ---------- Quote section ---------- */
.sru-section.is-deep { background: var(--green-deep); color: #e9efeb; }
.is-deep h2, .is-deep h3 { color: #fff; }
.is-deep a { color: #fff; }
.is-deep p { color: #d7e2da; }
.quote-grid { display: grid; gap: 40px; }
.quote-grid > * { min-width: 0; }
@media (min-width: 900px) { .quote-grid { grid-template-columns: 4fr 6fr; gap: 72px; } }
.contact-list { margin: 28px 0 0; padding: 0; list-style: none; font-family: var(--sans); }
.contact-list li { padding: 14px 0; border-top: 1px solid rgba(255,255,255,.18); }
.contact-list small { display: block; font-size: .8rem; color: #a9bdb0; margin-bottom: 2px; }
.contact-list a { font-weight: 600; font-size: 1.2rem; text-decoration: none; word-break: break-word; }
.form-card { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 28px; }
.form-card p { color: var(--muted); }
@media (min-width: 700px) { .form-card { padding: 40px; } }

/* Fluent Forms */
.sru-main .fluentform .ff-el-group { margin-bottom: 18px; }
.sru-main .fluentform .ff-el-input--label label { font: 600 .92rem/1.3 var(--sans); color: var(--ink); }
.sru-main .fluentform .ff-el-form-control {
  width: 100%; min-height: 50px; padding: 13px 14px;
  font: 400 1rem/1.4 var(--sans); color: var(--ink);
  border: 1px solid var(--field); border-radius: var(--radius); background: #fff; box-shadow: none;
}
.sru-main .fluentform textarea.ff-el-form-control { min-height: 120px; }
.sru-main .fluentform .ff-el-form-control:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--green); }
.sru-main .fluentform .ff-el-form-check { display: inline-block; margin: 0 8px 8px 0; }
.sru-main .fluentform .ff-el-form-check-label { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--field); border-radius: var(--radius); background: #fff; font: 500 .95rem/1 var(--sans); cursor: pointer; }
.sru-main .fluentform .ff-el-form-check-input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.sru-main .fluentform .ff-el-form-check-label:has(input:checked) { background: var(--green); border-color: var(--green); color: #fff; }
.sru-main .fluentform .ff-el-form-check-label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 1px; }
.sru-main .fluentform .ff-btn.ff-btn-submit:not(.ff_btn_no_style) {
  width: 100%; min-height: 54px; border: 0; border-radius: var(--radius);
  background: var(--green); color: #fff; font: 600 1.05rem/1 var(--sans); letter-spacing: 0; text-transform: none;
}
.sru-main .fluentform .ff-btn.ff-btn-submit:not(.ff_btn_no_style):hover { background: var(--green-deep); }

/* ---------- Footer ---------- */
.sru-footer { padding: 56px 0; font: 400 .95rem/1.6 var(--sans); color: var(--muted); border-top: 1px solid var(--line); background: #fff; }
.sru-footer .footer-grid { display: grid; gap: 32px; }
.sru-footer .footer-logo img { height: 48px; width: auto; }
.sru-footer p { margin: 14px 0 0; max-width: 22em; }
.sru-footer .footer-h { font: 600 .9rem/1.3 var(--sans); color: var(--ink); margin: 0 0 10px; letter-spacing: 0; }
.sru-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sru-footer a { color: var(--muted); text-decoration: none; }
.sru-footer a:hover { color: var(--green); }
.sru-footer .footer-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .85rem; }
@media (min-width: 900px) { .sru-footer .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.site-footer { background: #fff; }

/* ---------- Mobile call bar ---------- */
.call-bar { position: fixed; inset: auto 0 0 0; z-index: 60; display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
.call-bar a { min-height: 50px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); font: 600 1rem/1 var(--sans); text-decoration: none; }
.call-bar .call { background: var(--green); color: #fff; }
.call-bar .price { border: 1px solid var(--ink); color: var(--ink); }
@media (min-width: 900px) { .call-bar { display: none; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
