/*
Theme Name: Fire & Flow
Description: A custom block theme scaffolded by Studio Code.
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fire-flow
Tags: full-site-editing, block-patterns, block-styles, wide-blocks, accessibility-ready, style-variations
*/

/* WordPress inserts a margin-block-start equal to the block gap (24px unless
   theme.json sets styles.spacing.blockGap) between the template's top-level
   sections (header part, main, footer part) — a gap that exists even when no
   markup asks for it. Zero it so sections butt edge-to-edge and own their
   vertical rhythm via padding; this does not affect block gaps inside nested
   layouts. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* With that gap gone, main carries its own vertical padding so templates this
   theme does not author (WooCommerce shop, product, cart…) still clear the
   header and footer. A descendant selector, not a child one: WooCommerce wraps
   the single-product main in an extra group. Templates built from full-bleed
   sections opt out with is-flush and let the sections own the rhythm. */
.wp-site-blocks main {
	padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--70);
}
.wp-site-blocks main.is-flush {
	padding-block: 0;
}
/* Masthead and shared type */
html { scroll-padding-top: 1rem; }
.ff-masthead { border-bottom: 1px solid var(--wp--preset--color--sand); }
.ff-masthead-row { min-height: 82px; padding-block: 12px; gap: 14px 28px; }
.ff-brand { gap: 10px; }
.ff-brand-mark { width: 58px; flex: 0 0 auto; }
.ff-brand-mark img { display: block; width: 100%; }
.ff-brand-name .wp-block-site-title {
	font: 600 0.98rem/1.15 var(--wp--preset--font-family--montserrat);
	text-transform: uppercase;
	letter-spacing: 0.18em;
}
.ff-brand-name .wp-block-site-title a, .ff-small-brand a { color: inherit; text-decoration: none; }
.ff-brand-name .ff-byline { margin-top: 3px; font-size: 0.78rem; }
.ff-nav { gap: clamp(12px, 3vw, 36px); }
.ff-nav p { font-size: 0.94rem; }
.ff-nav a { color: inherit; text-decoration: none; }
.ff-nav a:hover, .ff-small-brand a:hover { text-decoration: underline; text-underline-offset: 0.22em; }
.ff-nav p:last-child a { padding-bottom: 5px; border-bottom: 1px solid var(--wp--preset--color--earth); }
.ff-kicker, .ff-facts {
	font: 600 var(--wp--preset--font-size--label)/1.5 var(--wp--preset--font-family--montserrat);
	letter-spacing: 0.15em;
	color: var(--wp--preset--color--primary);
}
.ff-display { font-size: clamp(2.5rem, 5vw, 5rem); line-height: 1.03; letter-spacing: -0.065em; }
.ff-section-title { font-size: clamp(1.9rem, 3.6vw, 3.25rem); letter-spacing: -0.05em; text-wrap: balance; }
.ff-text-link a { text-underline-offset: 0.3em; }
.wp-site-blocks a:focus-visible, .wp-site-blocks input:focus-visible,
.wp-site-blocks button:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.wp-site-blocks .wp-element-button:hover { background: var(--wp--preset--color--text); }
.wp-site-blocks .wp-block-post-content > .wp-block-group { margin-block-start: 0; }

/* Opening spread */
.ff-hero { background: var(--wp--preset--color--sand); }
.ff-hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	align-items: stretch;
}
.ff-hero-grid > .ff-hero-photo { display: flex; margin: 0; }
.ff-hero-photo img { width: 100%; height: 100%; max-height: 690px; object-fit: cover; object-position: center 60%; }
.ff-hero-copy { align-self: center; padding: clamp(40px, 7vw, 105px) clamp(24px, 6vw, 88px); }
.ff-hero-copy .ff-kicker { margin-bottom: 18px; }
.ff-hero-copy .ff-display { margin-top: 0; }
.ff-hero-intro { max-width: 35ch; font-size: clamp(1.05rem, 1.5vw, 1.2rem); }
.ff-hero-copy .wp-block-buttons { margin-top: 30px; }
.ff-hero-copy .ff-facts { margin-top: 20px; letter-spacing: 0.11em; }

/* Sessions, hosts, and locations */
.ff-sessions, .ff-story, .ff-locations, .ff-booking-intro, .ff-booking-list {
	padding-block: clamp(50px, 7vw, 100px);
}
.ff-content, .ff-story-grid, .ff-location-grid { box-sizing: border-box; padding-inline: clamp(0px, 4.4vw, 64px); }
.ff-content .ff-section-title, .ff-location-copy .ff-section-title,
.ff-story-grid .ff-section-title, .ff-booking-intro .ff-display { margin-top: 12px; }
.ff-two-col, .ff-story-grid, .ff-location-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(32px, 6vw, 90px);
}
.ff-two-col { margin-top: 41px; }
.ff-two-col > *, .ff-story-grid > *, .ff-location-grid > * { margin-block: 0; }
.is-style-ff-session { border-top: 1px solid var(--wp--preset--color--stone); padding-top: 22px; }
.is-style-ff-session h3 { font-size: clamp(1.45rem, 3vw, 2.25rem); margin-top: 10px; }
.is-style-ff-session p:last-child { max-width: 41ch; margin-top: 12px; }
.ff-sessions .ff-text-link { margin-top: 33px; }
.ff-story { background: #f0e8dd; }
.ff-story-grid p { max-width: 50ch; }
.ff-locations { color: var(--wp--preset--color--background); background: var(--wp--preset--color--text); }
.ff-locations .ff-kicker { color: var(--wp--preset--color--sand); }
.ff-location-grid { align-items: center; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.ff-location-copy .ff-section-title { text-wrap: initial; }
.ff-location-action .wp-block-buttons { justify-content: flex-end; }
.ff-locations .wp-element-button { background: var(--wp--preset--color--sand); color: var(--wp--preset--color--text); }
.ff-locations .wp-element-button:hover { background: var(--wp--preset--color--background); }
.ff-footer { border-top: 1px solid var(--wp--preset--color--sand); }
.ff-footer-row { padding-block: 26px; gap: 8px 24px; }
.ff-footer-row p { font-size: 0.88rem; }

/* Calendar and individual reservations */
.ff-booking-intro { background: var(--wp--preset--color--sand); }
.ff-booking-facts { font-size: 1.2rem; }
.ff-booking-list .ff-section-title { margin-top: 0; }
.ff-calendar { margin-top: 33px; border-bottom: 1px solid var(--wp--preset--color--stone); }
.ff-calendar-row {
	display: grid;
	grid-template-columns: minmax(150px, 0.8fr) minmax(0, 1.7fr) auto;
	align-items: center;
	gap: 16px 26px;
	padding-block: 20px;
	border-top: 1px solid var(--wp--preset--color--stone);
}
.ff-calendar-date { color: var(--wp--preset--color--primary); font-weight: 700; }
.ff-calendar-date span { display: block; font-weight: 400; }
.ff-calendar-row h3 { font-size: clamp(1.12rem, 2.1vw, 1.5rem); margin: 0; }
.ff-calendar-row p { margin: 5px 0 0; }

@media (max-width: 720px) {
	.ff-masthead-row { min-height: 0; }
	.ff-brand-mark { width: 46px; }
	.ff-nav { gap: 15px; }
	.ff-nav p { font-size: 0.86rem; }
	.ff-hero-grid, .ff-story-grid, .ff-location-grid { grid-template-columns: minmax(0, 1fr); }
	.ff-hero-copy { padding: 41px 0 36px; }
	.ff-hero-photo img { aspect-ratio: 4 / 3; max-height: 470px; }
	.ff-hero-photo { margin-bottom: 20px !important; }
	.ff-content, .ff-story-grid, .ff-location-grid { padding-inline: 0; }
	.ff-location-action .wp-block-buttons { justify-content: flex-start; }
	.ff-calendar-row { grid-template-columns: minmax(0, 1fr) auto; }
	.ff-calendar-date { grid-column: 1 / -1; }
	.ff-calendar-date span { display: inline; margin-left: 8px; }
}
@media (max-width: 460px) {
	.ff-masthead-row { justify-content: flex-start; }
	.ff-nav { flex-basis: 100%; }
	.ff-two-col, .ff-calendar-row { grid-template-columns: minmax(0, 1fr); }
	.ff-calendar-row { gap: 8px; }
}

.ff-calendar-book { margin: 0; }
.ff-calendar-book .wp-element-button { cursor: pointer; white-space: nowrap; }
.ff-calendar-book .wp-element-button span { margin-left: 0.25em; }
.ff-cancel-session { margin-block: 2rem; padding: 1.5rem; background: var(--wp--preset--color--sand); }
.ff-cancel-session p:first-child { margin-top: 0; }
.ff-cancel-session p:last-child { margin-bottom: 0; }
.woocommerce-account .wp-block-post-content, .woocommerce-checkout .wp-block-post-content { box-sizing: border-box; }
.woocommerce-account .woocommerce-MyAccount-navigation ul { margin-top: 0; padding-left: 1.2rem; }
.woocommerce-checkout .woocommerce form .form-row input.input-text,
.woocommerce-account .woocommerce form .form-row input.input-text {
	min-height: 44px;
	padding: 8px 10px;
	border: 1px solid var(--wp--preset--color--stone);
	border-radius: 2px;
}
.woocommerce form .woocommerce-button.button,
.woocommerce #payment #place_order {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--background);
	border-radius: 2px;
}
.woocommerce form .woocommerce-button.button:hover,
.woocommerce #payment #place_order:hover { background: var(--wp--preset--color--text); }
@media (max-width: 460px) {
	.ff-nav { gap: 9px 15px; }
	.ff-calendar-book { margin-top: 4px; }
}

.ff-checkout-policy { margin: 1.25rem 0; }

@media (max-width: 460px) {
	.ff-calendar-row { grid-template-columns: minmax(0, 1fr) auto; }
	.ff-calendar-book { align-self: center; }
	.ff-calendar-book .wp-element-button { padding-inline: 13px; }
}

.ff-pass-callout {
	background: var(--wp--preset--color--sand);
	padding: clamp(18px, 3vw, 30px);
	margin-bottom: clamp(28px, 5vw, 60px);
	gap: 14px 26px;
}
.ff-pass-callout p { margin: 0; }
.ff-pass-options { padding-block: clamp(38px, 6vw, 80px); }
.ff-pass-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 3vw, 32px); }
.ff-pass-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	padding: clamp(20px, 2.5vw, 35px);
	border: 1px solid var(--wp--preset--color--stone);
}
.ff-pass-card p, .ff-pass-card h2 { margin: 0; }
.ff-pass-card h2 { font-size: clamp(1.15rem, 2.3vw, 1.6rem); }
.ff-pass-card .ff-pass-price { font: 500 clamp(1.65rem, 3vw, 2.25rem)/1.3 var(--wp--preset--font-family--montserrat); }
.ff-pass-card form { margin-top: auto; padding-top: 12px; }
.ff-pass-card button { cursor: pointer; }
.ff-pass-options .ff-section-title { margin-top: clamp(40px, 6vw, 70px); }
.ff-credit-balance { margin-block: 28px; padding: 22px; background: var(--wp--preset--color--sand); }
.ff-credit-balance h2 { margin-top: 0; }
.ff-credit-balance p:last-child { margin-bottom: 0; }
.woocommerce-checkout-review-order .ff-credit-total[hidden],
.woocommerce-checkout-review-order .ff-money-total-hidden { display: none !important; }
@media (max-width: 870px) {
	.ff-pass-grid { grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); }
}
