/*
Theme Name:   Impact Base
Theme URI:    https://www.azimpact.com/
Author:       Impact Web Solutions
Author URI:   https://www.azimpact.com/
Description:  Impact Web Solutions' in-house theme. No page builder: layout lives in templates, owners edit words and photos in the Customizer. This build is styled for Sonoran Star 2-G102 and pairs with the Sonoran Star Booking plugin.
Version:      0.1.0
Requires at least: 6.4
Requires PHP: 8.0
License:      GPL-2.0-or-later
Text Domain:  impact-base
*/

/* ==========================================================================
   Tokens — "salt and tide": cool Sea of Cortez blues on salt white, desert sage
   for quiet detail, marigold for the one thing to press.
   ========================================================================== */
:root {
	--c-night: #0f2233;   /* deepest ink, footer */
	--c-ink: #14303f;     /* body text */
	--c-tide: #0e4a57;    /* primary sea color */
	--c-sea: #1d6b74;     /* links, selected dates */
	--c-glass: #d3e8e3;   /* sea glass tint */
	--c-salt: #f4f7f6;    /* page background */
	--c-surface: #ffffff;
	--c-sage: #7e9a86;    /* quiet detail */
	--c-muted: #56676e;
	--c-line: #dbe4e2;
	--c-sun: #f1b13b;     /* marigold: the button color */
	--c-sun-ink: #2a1d05;
	--c-sand: #eef4f2;    /* widget range fill */

	--f-body: 'Bricolage', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
	--f-display: var(--f-body);

	/* Type scale: 1.25 ratio from 17px body. */
	--t-sm: .875rem;
	--t-base: 1.0625rem;
	--t-lg: 1.25rem;
	--t-h3: 1.4rem;
	--t-h2: clamp(1.9rem, 1.3rem + 2.2vw, 2.9rem);
	--t-hero: clamp(3.3rem, 1.6rem + 6.6vw, 6.4rem);

	--wrap: 1200px;
	--gutter: clamp(16px, 4vw, 40px);
	--sec: clamp(64px, 6vw + 32px, 128px);
	--radius: 14px;
	--radius-lg: 22px;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
	margin: 0;
	background: var(--c-salt);
	color: var(--c-ink);
	font-family: var(--f-body);
	font-size: var(--t-base);
	line-height: 1.6;
	font-variation-settings: 'opsz' 14;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-sea); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--c-tide); }
:focus-visible { outline: 3px solid var(--c-sun); outline-offset: 2px; border-radius: 4px; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-family: var(--f-display); }
.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;
}
.ib-skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--c-sun); color: var(--c-sun-ink); padding: 10px 16px; border-radius: 8px; font-weight: 700; }
.ib-skip:focus { left: 8px; }

.ib-wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.ib-narrow { max-width: 760px; }

/* Headings: condensed, heavy, tight — the one loud voice on the page. */
.ib-h2 {
	font-size: var(--t-h2);
	line-height: 1.04;
	font-weight: 700;
	font-stretch: 82%;
	font-variation-settings: 'opsz' 96;
	letter-spacing: -.015em;
	color: var(--c-tide);
	text-wrap: balance;
}
.ib-h3 { font-size: var(--t-h3); line-height: 1.2; font-weight: 650; font-stretch: 90%; color: var(--c-tide); margin-bottom: .6em; }
.ib-lead { font-size: var(--t-lg); line-height: 1.5; color: var(--c-muted); max-width: 52ch; margin: .6em 0 0; }
.ib-prose { max-width: 62ch; }
.ib-prose p:last-child { margin-bottom: 0; }
.ib-link { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; }
.ib-link .ib-i { width: 20px; height: 20px; }

/* Buttons */
.ib-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	padding: .8em 1.4em; border-radius: 999px; border: 2px solid transparent;
	font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.1;
	text-decoration: none; cursor: pointer; white-space: nowrap;
	transition: background-color .15s ease, transform .15s ease;
}
.ib-btn-gold { background: var(--c-sun); color: var(--c-sun-ink); }
.ib-btn-gold:hover { background: #f5c25f; color: var(--c-sun-ink); }
.ib-btn-line { background: transparent; color: var(--c-tide); border-color: currentColor; }
.ib-btn-line:hover { background: var(--c-tide); color: #fff; border-color: var(--c-tide); }
.ib-btn-lg { font-size: 1.1rem; padding: .95em 1.8em; }
.ib-btn:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) { .ib-btn { transition: none; } }

.ib-i { width: 22px; height: 22px; flex: none; }

/* ==========================================================================
   Header
   ========================================================================== */
.ib-header {
	position: sticky; top: 0; z-index: 40;
	background: rgba(244, 247, 246, .94);
	backdrop-filter: saturate(1.4) blur(10px);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--c-line);
	transition: background-color .25s ease, border-color .25s ease;
}
.ib-header-in { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.ib-brand { display: flex; align-items: center; text-decoration: none; color: var(--c-tide); margin-right: auto; }
.ib-brand-name { font-weight: 750; font-stretch: 80%; font-size: 1.35rem; letter-spacing: -.01em; font-variation-settings: 'opsz' 48; }
.ib-logo { height: 46px; width: auto; }
.ib-nav .ib-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.ib-nav .ib-menu a { display: block; padding: 8px 12px; border-radius: 8px; color: inherit; text-decoration: none; font-weight: 550; }
.ib-nav .ib-menu a:hover { background: rgba(14, 74, 87, .08); }
.ib-header { color: var(--c-ink); }
.ib-header-cta { padding: .65em 1.2em; }
.ib-burger { display: none; appearance: none; border: 0; background: none; color: inherit; padding: 8px; margin-right: -8px; cursor: pointer; border-radius: 8px; }

/* Over the hero: transparent with white type until the page scrolls. */
.has-hero .ib-header { position: fixed; left: 0; right: 0; background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; color: #fff; }
.has-hero .ib-header .ib-brand { color: #fff; }
.has-hero .ib-header .ib-nav .ib-menu a:hover { background: rgba(255, 255, 255, .14); }
.has-hero .ib-header.is-solid {
	background: rgba(244, 247, 246, .94); border-color: var(--c-line); color: var(--c-ink);
	backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
}
.has-hero .ib-header.is-solid .ib-brand { color: var(--c-tide); }
.has-hero .ib-header.is-solid .ib-nav .ib-menu a:hover { background: rgba(14, 74, 87, .08); }
.admin-bar .ib-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .ib-header { top: 46px; } }

@media (max-width: 960px) {
	.ib-nav, .ib-header-cta { display: none; }
	.ib-burger { display: inline-flex; }
}

/* Slide-in menu (from ct-mainmenu) */
.ib-overlay { position: fixed; inset: 0; background: rgba(15, 34, 51, .5); z-index: 60; opacity: 0; transition: opacity .25s ease; }
.ib-overlay.is-on { opacity: 1; }
.ib-panel {
	position: fixed; top: 0; bottom: 0; left: 0; z-index: 61; width: min(86vw, 360px);
	background: var(--c-salt); padding: 72px 24px 24px; display: flex; flex-direction: column; gap: 24px;
	transform: translateX(-102%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); overflow-y: auto;
}
.ib-panel.is-on { transform: none; }
.ib-panel .ib-menu { list-style: none; margin: 0; padding: 0; }
.ib-panel .ib-menu a { display: block; padding: 14px 0; border-bottom: 1px solid var(--c-line); color: var(--c-tide); text-decoration: none; font-size: 1.35rem; font-weight: 650; font-stretch: 85%; }
.ib-panel-close { position: absolute; top: 16px; right: 16px; appearance: none; border: 0; background: none; color: var(--c-tide); padding: 8px; cursor: pointer; border-radius: 8px; }
html.ib-lock { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .ib-panel, .ib-overlay { transition: none; } }

/* ==========================================================================
   Hero — the loud moment. Huge condensed headline over the photo.
   ========================================================================== */
.ib-hero {
	position: relative; isolation: isolate;
	min-height: min(92svh, 920px); display: flex; align-items: flex-end;
	color: #fff; background: var(--c-tide);
	padding: 120px 0 clamp(40px, 7vh, 88px);
	overflow: hidden;
}
.ib-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.ib-hero::after {
	content: ''; position: absolute; inset: 0; z-index: -1;
	background:
		linear-gradient(180deg, rgba(15, 34, 51, .55) 0%, rgba(15, 34, 51, 0) 22%),
		linear-gradient(0deg, rgba(15, 34, 51, .78) 0%, rgba(15, 34, 51, .35) 45%, rgba(15, 34, 51, 0) 70%);
}
/* No photo yet: a tide-line field rather than an empty box. */
.ib-hero-plain { background:
	radial-gradient(120% 80% at 80% 0%, #2a7f86 0%, transparent 60%),
	linear-gradient(180deg, #13596a 0%, var(--c-tide) 55%, var(--c-night) 100%); }
.ib-hero-h {
	font-size: var(--t-hero);
	line-height: .92;
	font-weight: 760;
	font-stretch: 78%;
	font-variation-settings: 'opsz' 96;
	letter-spacing: -.025em;
	max-width: 100%;
	text-wrap: balance;
	text-shadow: 0 2px 30px rgba(15, 34, 51, .25);
}
.ib-hero-p { font-size: clamp(1.05rem, .95rem + .45vw, 1.3rem); line-height: 1.5; max-width: 46ch; margin: 1.1em 0 0; color: rgba(255, 255, 255, .92); }
.ib-hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; margin-top: 28px; }
.ib-hero-price { margin: 0; color: rgba(255, 255, 255, .88); }
.ib-hero-price strong { color: #fff; font-size: 1.2rem; }

/* Page-load moment: the headline settles in once. Nothing else animates. */
@media (prefers-reduced-motion: no-preference) {
	.ib-hero-h { animation: ib-rise .9s cubic-bezier(.2, .8, .2, 1) both; }
	.ib-hero-p, .ib-hero-actions { animation: ib-fade .9s .25s ease both; }
}
@keyframes ib-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes ib-fade { from { opacity: 0; } to { opacity: 1; } }

/* Facts strip */
.ib-facts { background: var(--c-tide); color: #fff; }
.ib-facts-list { list-style: none; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 0; padding-block: 18px; }
.ib-facts-list li { padding: 6px 28px 6px 0; margin-right: 28px; border-right: 1px solid rgba(255, 255, 255, .25); font-weight: 600; font-size: 1.02rem; }
.ib-facts-list li:last-child { border-right: 0; margin-right: 0; }
@media (max-width: 640px) {
	.ib-facts-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
	.ib-facts-list li { border: 0; padding: 0; margin: 0; font-size: .95rem; }
}

/* ==========================================================================
   Sections
   ========================================================================== */
.ib-sec { padding-block: var(--sec); }
.ib-sec + .ib-sec { padding-top: 0; }
.ib-sec-head { margin-bottom: clamp(24px, 3vw, 40px); }
.ib-split { display: grid; gap: 24px 64px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) {
	.ib-split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}
.ib-intro .ib-prose { font-size: var(--t-lg); line-height: 1.55; }
.ib-h2 + .ib-prose, .ib-h2 + p { margin-top: .7em; }
.ib-split-single { grid-template-columns: 1fr !important; }
.ib-split-single .ib-prose { font-size: var(--t-lg); }

/* Photos: one big, four small. */
.ib-mosaic { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; border-radius: var(--radius-lg); overflow: hidden; }
.ib-tile { position: relative; display: block; overflow: hidden; background: var(--c-glass); }
.ib-tile img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; transition: transform .5s ease; }
.ib-tile:hover img { transform: scale(1.03); }
.ib-tile-0 { grid-column: 1 / -1; }
.ib-tile-0 img { aspect-ratio: 16 / 10; }
@media (min-width: 900px) {
	.ib-mosaic { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; height: min(620px, 52vw); }
	.ib-tile-0 { grid-column: 1; grid-row: 1 / 3; }
	.ib-tile img, .ib-tile-0 img { aspect-ratio: auto; }
}
@media (max-width: 899px) { .ib-tile-3, .ib-tile-4 { display: none; } }
@media (prefers-reduced-motion: reduce) { .ib-tile img { transition: none; } }
.ib-photos-all { margin-top: 16px; }

/* Booking: sea-glass band so it reads as the place to act. */
.ib-book { background: var(--c-glass); padding-block: var(--sec); }
.ib-sec + .ib-book, .ib-book + .ib-sec { padding-top: var(--sec); }

/* Amenities: a plain list, not a card grid. "Coming soon" in marigold. */
.ib-amen-list { list-style: none; margin: 0; padding: 0; columns: 1; }
@media (min-width: 640px) { .ib-amen-list { columns: 2; column-gap: 40px; } }
.ib-amen-item { break-inside: avoid; display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--c-line); }
.ib-amen-item .ib-i { color: var(--c-sage); margin-top: 2px; }
.ib-amen-item.is-coming_soon .ib-i { color: #c98a12; }
.ib-amen-text { display: flex; flex-direction: column; }
.ib-amen-name { font-weight: 600; }
.ib-amen-soon { font-size: var(--t-sm); color: #8a5d00; font-weight: 600; }
.ib-amen-note { font-size: var(--t-sm); color: var(--c-muted); }

/* Reviews: a sideways scroll of quotes. */
.ib-quotes {
	display: grid; grid-auto-flow: column; grid-auto-columns: min(86vw, 420px); gap: 16px;
	overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px var(--gutter) 20px;
	scroll-padding-inline: var(--gutter);
}
@media (min-width: 1200px) {
	.ib-quotes {
		padding-inline: calc((100% - var(--wrap)) / 2 + var(--gutter));
		scroll-padding-inline: calc((100% - var(--wrap)) / 2 + var(--gutter));
	}
}
.ib-quote { scroll-snap-align: start; margin: 0; background: var(--c-surface); border-radius: var(--radius); padding: 24px 26px; display: flex; flex-direction: column; gap: 14px; border: 1px solid var(--c-line); }
.ib-quote blockquote { margin: 0; font-size: 1.05rem; line-height: 1.55; }
.ib-quote figcaption { margin-top: auto; color: var(--c-muted); font-size: var(--t-sm); }
.ib-quote figcaption strong { color: var(--c-ink); }
.ib-stars { margin: 0; display: flex; gap: 2px; color: #d99a1e; }
.ib-stars .ib-i { width: 18px; height: 18px; fill: currentColor; stroke: none; }

/* Hosts */
.ib-split-media { align-items: center; }
.ib-hosts-img img { border-radius: var(--radius-lg); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* Location + guide */
.ib-guide { margin: 0; display: grid; gap: 0; }
.ib-guide > div { padding: 12px 0; border-bottom: 1px solid var(--c-line); }
.ib-guide dt { font-weight: 650; }
.ib-guide dd { margin: 2px 0 0; color: var(--c-muted); font-size: var(--t-sm); }

/* FAQ */
.ib-faq-item { border-bottom: 1px solid var(--c-line); }
.ib-faq-item summary {
	list-style: none; cursor: pointer; padding: 18px 0; font-weight: 650; font-size: 1.08rem;
	display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.ib-faq-item summary::-webkit-details-marker { display: none; }
.ib-faq-item summary .ib-i { color: var(--c-sea); transition: transform .2s ease; }
.ib-faq-item[open] summary .ib-i { transform: rotate(90deg); }
.ib-faq-a { padding: 0 0 18px; color: var(--c-muted); max-width: 62ch; }
.ib-faq-a p:last-child { margin: 0; }

/* Plain pages */
.ib-page { padding: clamp(48px, 8vw, 96px) 0 var(--sec); }
.ib-page-h { font-size: var(--t-h2); line-height: 1.05; font-weight: 700; font-stretch: 82%; color: var(--c-tide); margin-bottom: .5em; letter-spacing: -.015em; }
.ib-content { font-size: var(--t-lg); }
.ib-404-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.ib-footer { background: var(--c-night); color: rgba(255, 255, 255, .82); padding: clamp(48px, 6vw, 80px) 0 100px; margin-top: 0; }
.ib-footer a { color: #fff; text-decoration: none; }
.ib-footer a:hover { text-decoration: underline; }
.ib-footer-in { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .ib-footer-in { grid-template-columns: 5fr 5fr 2fr; } }
.ib-footer-name { font-size: 1.6rem; font-weight: 750; font-stretch: 80%; color: #fff; margin-bottom: .3em; }
.ib-footer-text { max-width: 40ch; font-size: var(--t-sm); }
.ib-footer-h { color: #fff; font-weight: 650; margin-bottom: .6em; }
.ib-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ib-contact a { display: inline-flex; gap: 10px; align-items: center; }
.ib-contact .ib-i { color: var(--c-sun); }
.ib-footer-social { display: flex; gap: 8px; align-items: flex-start; }
.ib-footer-social a { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); }
.ib-footer-social a:hover { background: rgba(255, 255, 255, .1); text-decoration: none; }
.ib-footer-small { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: var(--t-sm); }
.ib-footer-small p { margin: 0; }
.ib-footer-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; }
@media (min-width: 961px) { .ib-footer { padding-bottom: clamp(48px, 6vw, 80px); } }

/* Phones: sticky booking bar (hidden while the booking section is on screen). */
.ib-mbar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
	background: var(--c-surface); border-top: 1px solid var(--c-line);
	box-shadow: 0 -8px 24px -16px rgba(15, 34, 51, .4);
	transition: transform .25s ease;
}
.ib-mbar.is-hidden { transform: translateY(110%); }
.ib-mbar-price { margin: 0; font-size: var(--t-sm); color: var(--c-muted); }
.ib-mbar-price strong { color: var(--c-ink); font-size: 1.1rem; }
@media (min-width: 961px) { .ib-mbar { display: none; } }

/* Lightbox */
.ib-lb { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: rgba(10, 22, 33, .96); color: #fff; }
.ib-lb::backdrop { background: rgba(10, 22, 33, .96); }
.ib-lb-stage { position: absolute; inset: 56px 64px 56px; display: grid; place-items: center; }
.ib-lb-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 6px; }
.ib-lb button { position: absolute; appearance: none; border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.ib-lb button:hover { background: rgba(255, 255, 255, .22); }
.ib-lb-close { top: 12px; right: 12px; }
.ib-lb-prev { left: 12px; top: 50%; transform: translateY(-50%) scaleX(-1); }
.ib-lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.ib-lb-count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; margin: 0; font-size: var(--t-sm); color: rgba(255, 255, 255, .7); }
@media (max-width: 640px) { .ib-lb-stage { inset: 56px 8px 64px; } .ib-lb-prev, .ib-lb-next { top: auto; bottom: 8px; transform: none; } .ib-lb-prev { transform: scaleX(-1); } }
