/*
Theme Name: Graphica
Theme URI: https://graphica.co.uk
Author: Graphica
Description: A calm, dignified block theme for a UK funeral order-of-service design and print business. WooCommerce-ready.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.2.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: graphica
Tags: block-theme, full-site-editing, e-commerce, one-column, custom-colors
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
img { max-width: 100%; height: auto; }

/* ---------- Header ---------- */
.g-header { border-bottom: 1px solid var(--wp--preset--color--line); padding: 18px 32px; }
.g-brand { gap: 10px !important; }
.g-mark { margin: 0 !important; }
.g-mark img { width: 30px; height: 30px; display: block; }
.g-header .wp-block-site-title { font-family: var(--wp--preset--font-family--serif); font-size: 26px; font-weight: 500; margin: 0; }
.g-header .wp-block-site-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.g-nav { font-size: 15px; gap: 28px; }
.g-nav a { text-decoration: none; color: var(--wp--preset--color--ink); }
.g-nav a:hover { color: var(--wp--preset--color--accent); }

/* ---------- Sections ---------- */
.g-section { padding: 88px 32px; }
.g-band-white { background: var(--wp--preset--color--white); border-top: 1px solid var(--wp--preset--color--line); border-bottom: 1px solid var(--wp--preset--color--line); }
.g-band-accent { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--white); }
.g-band-accent h2, .g-band-accent h3 { color: var(--wp--preset--color--white); }

.g-eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--wp--preset--color--accent); margin: 0; }
.g-display { font-size: clamp(42px, 5.5vw, 64px); line-height: 1.05; letter-spacing: -0.01em; text-wrap: balance; }
.g-lead { font-size: 19px; line-height: 1.6; color: var(--wp--preset--color--muted); max-width: 540px; }
.g-intro { font-size: 18px; line-height: 1.6; color: var(--wp--preset--color--muted); max-width: 640px; }
.g-small { font-size: 15px; color: var(--wp--preset--color--muted); }

/* Hero */
.g-hero { padding-top: 88px; padding-bottom: 96px; }
.g-hero .wp-block-columns { align-items: center; gap: 64px; }
.g-hero-art { margin: 0; text-align: center; }
.g-hero-art img { width: 440px; }

.g-ticks { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 15px; color: var(--wp--preset--color--muted); }
.g-ticks li { padding-left: 26px; position: relative; }
.g-ticks li::before { content: ""; position: absolute; left: 0; top: 0.25em; width: 16px; height: 9px; border-left: 2px solid var(--wp--preset--color--accent); border-bottom: 2px solid var(--wp--preset--color--accent); transform: rotate(-45deg) scale(0.8); transform-origin: left top; top: 0.75em; }

/* Cards */
.g-cards { gap: 24px; }
.g-card { background: var(--wp--preset--color--stone); border: 1px solid var(--wp--preset--color--line); border-radius: 10px; padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.g-card > * { margin: 0 !important; }
.g-card .g-icon img { width: 32px; height: 32px; }
.g-card h3 { font-family: var(--wp--preset--font-family--sans); font-size: 21px; font-weight: 600; }
.g-card p { line-height: 1.6; color: var(--wp--preset--color--muted); }
.g-card .g-more { margin-top: auto !important; font-weight: 600; color: var(--wp--preset--color--ink); }

/* Templates */
.g-templates { gap: 24px; }
.g-thumb { margin: 0 0 12px; }
.g-thumb img { width: 100%; border: 1px solid var(--wp--preset--color--line); border-radius: 6px; display: block; }
.g-thumb-name { font-weight: 600; font-size: 17px; margin: 0; }
.g-thumb-style { font-size: 14px; color: var(--wp--preset--color--muted); margin: 2px 0 0; }

/* Steps */
.g-steps { gap: 32px; }
.g-steps .wp-block-column { border-top: 1px solid rgba(255,255,255,0.4); padding-top: 20px; }
.g-step-num { font-family: var(--wp--preset--font-family--serif); font-size: 32px; margin: 0 0 8px; }
.g-steps h3 { font-family: var(--wp--preset--font-family--sans); font-size: 19px; font-weight: 600; margin: 0 0 8px; }
.g-steps p:not(.g-step-num) { color: var(--wp--preset--color--accent-light); line-height: 1.6; margin: 0; }

/* Pricing */
.g-pricing { background: var(--wp--preset--color--white); border: 1px solid var(--wp--preset--color--line); border-radius: 10px; overflow-x: auto; margin: 0; }
.g-pricing table { border-collapse: collapse; min-width: 560px; font-size: 16px; }
.g-pricing th, .g-pricing td { border: 0; border-bottom: 1px solid var(--wp--preset--color--line); padding: 16px 24px; text-align: right; }
.g-pricing th:first-child, .g-pricing td:first-child { text-align: left; }
.g-pricing thead th { background: var(--wp--preset--color--stone); font-weight: 600; }
.g-pricing tbody tr:last-child td { border-bottom: 0; }

/* Directors */
.g-directors .wp-block-columns { align-items: center; gap: 32px; }
.g-btn-dark .wp-block-button__link { background: var(--wp--preset--color--ink) !important; color: var(--wp--preset--color--white) !important; }

/* FAQ */
.g-faq .wp-block-details { border-top: 1px solid var(--wp--preset--color--line); padding: 22px 0; margin: 0; }
.g-faq .wp-block-details:last-child { border-bottom: 1px solid var(--wp--preset--color--line); }
.g-faq summary { font-size: 18px; font-weight: 600; cursor: pointer; min-height: 28px; }
.g-faq .wp-block-details p { color: var(--wp--preset--color--muted); line-height: 1.6; margin: 10px 0 0; }

/* Footer */
.g-footer { background: var(--wp--preset--color--ink); color: #D9DCE2; padding: 56px 32px; font-size: 15px; }
.g-footer p { margin: 0 0 8px; }
.g-footer a { color: #D9DCE2; }
.g-footer a:hover { color: var(--wp--preset--color--white); }
.g-footer .g-foot-brand { font-family: var(--wp--preset--font-family--serif); font-size: 24px; color: var(--wp--preset--color--white); }
.g-footer .g-foot-head { color: var(--wp--preset--color--white); font-weight: 600; }

/* Buttons: keep 44px touch targets */
.wp-block-button__link { min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; }

@media (max-width: 781px) {
  .g-section { padding: 64px 20px; }
  .g-header { padding: 16px 20px; }
  .g-hero-art img { width: 320px; }
}

/* ---------- v1.1: template pages and inner pages ---------- */
.g-page-head { padding-top: 72px; padding-bottom: 56px; }
.g-crumbs { font-size: 14px; color: var(--wp--preset--color--muted); margin: 0 0 24px; }
.g-crumbs a { color: var(--wp--preset--color--muted); }
.g-mock { margin: 0; }
.g-mock img { width: 100%; border-radius: 10px; display: block; }
.g-tpl-hero .wp-block-columns, .g-page-head .wp-block-columns { gap: 56px; }
.g-ticks-stack { flex-direction: column; gap: 10px; font-size: 16px; }
.g-thumb a { display: block; transition: transform .2s ease; }
.g-thumb a:hover { transform: translateY(-4px); }
.g-thumb img { border: 0; border-radius: 8px; }
.g-thumb-name a, .g-templates h3 a { color: var(--wp--preset--color--ink); text-decoration: none; }
.g-thumb-name a:hover, .g-templates h3 a:hover { color: var(--wp--preset--color--accent); text-decoration: underline; }
.g-templates-lg { gap: 40px; margin-bottom: 40px; }
.g-templates-lg h3 { font-size: 28px; margin: 4px 0 6px; }
.g-pages { gap: 24px; margin-bottom: 24px; }
.g-page { margin: 0 0 8px; }
.g-page img { width: 100%; border-radius: 6px; display: block; }
.g-page-label { font-size: 14px; color: var(--wp--preset--color--muted); text-align: center; margin: 0; }
.g-numbered { font-size: 17px; line-height: 1.6; display: grid; gap: 10px; padding-left: 22px; max-width: 760px; }
.g-specs table { min-width: 0; }
.g-specs td:last-child { text-align: right; }
.g-specs td { padding: 12px 18px; }
@media (max-width: 781px) {
  .g-pages .wp-block-column { flex-basis: calc(50% - 12px) !important; }
  .g-pages { flex-wrap: wrap !important; }
}

/* v1.2: room for the designer on its page */
.page-template-page-wide #graphica-designer { margin: 32px auto 64px; max-width: 1400px; }
