/*
Theme Name: SWS Theme
Author: SWS
Description: Neutral, reusable base theme for SWS sites. Site identity belongs in a child theme.
Version: 0.1.3
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: sws-theme
*/

:root {
	--sws-bg: #f6f7f8;
	--sws-surface: #fff;
	--sws-soft: #ebeff2;
	--sws-ink: #14202b;
	--sws-muted: #52616e;
	--sws-dark: #132331;
	--sws-dark-ink: #fff;
	--sws-accent: #17658a;
	--sws-accent-ink: #fff;
	--sws-border: #d5dde3;
	--sws-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--sws-width: 1180px;
	--sws-radius: 10px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--sws-bg); color: var(--sws-ink); font-family: var(--sws-font); line-height: 1.6; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--sws-accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--sws-accent); outline-offset: 3px; }
h1, h2, h3 { line-height: 1.16; letter-spacing: -.025em; margin: 0 0 .65em; }
h1 { font-size: clamp(2.5rem, 5vw, 4.9rem); }
h2 { font-size: clamp(2rem, 3.4vw, 3.25rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.55rem); }
p { margin: 0 0 1.2em; }
.sws-container { width: min(calc(100% - 40px), var(--sws-width)); margin-inline: auto; }
.sws-skip-link { position: absolute; left: 14px; top: -80px; z-index: 1000; padding: 10px 15px; background: var(--sws-dark); color: #fff; }
.sws-skip-link:focus { top: 12px; }

/* Shared header and navigation. */
.sws-site-header { position: relative; z-index: 20; background: var(--sws-surface); border-bottom: 1px solid var(--sws-border); }
.sws-header-inner { min-height: 84px; display: flex; align-items: center; gap: clamp(18px, 3vw, 44px); }
.sws-brand { flex: 0 0 auto; min-width: 0; }
.sws-brand a { display: inline-flex; align-items: center; color: var(--sws-ink); text-decoration: none; font-size: 1.35rem; line-height: 1.2; font-weight: 800; }
.sws-brand img { max-height: 62px; width: auto; }
.sws-primary-nav { margin-left: auto; }
.sws-primary-nav ul, .sws-footer-menu { display: flex; align-items: center; gap: 24px; margin: 0; padding: 0; list-style: none; }
.sws-primary-nav a { display: block; color: var(--sws-ink); font-weight: 650; text-decoration: none; }
.sws-primary-nav a:hover, .sws-primary-nav .current-menu-item > a { color: var(--sws-accent); }
.sws-header-phone { white-space: nowrap; font-weight: 700; text-decoration: none; }
.sws-menu-toggle { display: none; width: 44px; height: 44px; padding: 10px; border: 1px solid var(--sws-border); border-radius: 5px; background: transparent; }
.sws-menu-toggle span { display: block; height: 2px; margin: 4px 0; background: var(--sws-ink); }

/* Pages and reusable sections. */
.sws-page-hero { padding: clamp(70px, 9vw, 135px) 0; color: var(--sws-dark-ink); background: var(--sws-dark); }
.sws-page-hero-inner { display: grid; align-items: center; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.sws-page-hero--image .sws-page-hero-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sws-page-hero h1 { max-width: 15ch; }
.sws-lead { max-width: 66ch; font-size: clamp(1.1rem, 2vw, 1.35rem); color: #e4ebf0; }
.sws-page-hero figure, .sws-split figure, .sws-gallery-grid figure { margin: 0; }
.sws-page-hero-media img, .sws-split-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--sws-radius); }
figcaption { margin-top: 9px; font-size: .88rem; color: var(--sws-muted); }
.sws-page-hero figcaption, .sws-section--dark figcaption { color: #c4d2dc; }
.sws-eyebrow { margin-bottom: 14px; color: var(--sws-accent); font-size: .78rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.sws-page-hero .sws-eyebrow, .sws-section--dark .sws-eyebrow, .sws-site-cta .sws-eyebrow { color: #8bd3f2; }
.sws-section { padding: clamp(64px, 8vw, 112px) 0; background: var(--sws-surface); }
.sws-section--soft { background: var(--sws-soft); }
.sws-section--dark { background: var(--sws-dark); color: var(--sws-dark-ink); }
.sws-section--dark a { color: #9bdcff; }
.sws-section--content + .sws-section--default { padding-top: 0; }
.sws-split { display: grid; align-items: center; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(34px, 6vw, 92px); }
.sws-section--image-start .sws-split-media { order: -1; }
.sws-split-copy > h2 { max-width: 18ch; }
.sws-split-copy > .sws-prose { max-width: 66ch; }
.sws-prose { max-width: 74ch; }
.sws-prose > :last-child, .sws-split-copy > :last-child { margin-bottom: 0; }
.sws-prose ul, .sws-prose ol { padding-left: 1.4em; }
.sws-text-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-weight: 750; text-decoration: none; }
.sws-text-link:hover span { transform: translateX(4px); }
.sws-text-link span { transition: transform .2s ease; }
.sws-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 255px), 1fr)); gap: 20px; margin-top: 36px; }
.sws-card { padding: 26px; background: var(--sws-bg); border: 1px solid var(--sws-border); border-radius: var(--sws-radius); }
.sws-section--dark .sws-card { background: #213746; border-color: #3a5466; }
.sws-card p:last-child { margin-bottom: 0; }
.sws-card-media { margin: -26px -26px 22px; overflow: hidden; border-radius: var(--sws-radius) var(--sws-radius) 0 0; }
.sws-card-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.sws-gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 24px; margin-top: 36px; }
.sws-gallery-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--sws-radius); }

/* Shared CTA and footer. */
.sws-site-cta { padding: clamp(54px, 7vw, 88px) 0; background: var(--sws-dark); color: #fff; }
.sws-site-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 34px; }
.sws-site-cta h2 { margin-bottom: .3em; }
.sws-site-cta p:last-child { margin-bottom: 0; }
.sws-cta-phone { color: #fff; font-size: 1.2rem; font-weight: 750; text-decoration: none; }
.sws-button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-height: 48px; padding: 11px 22px; border-radius: 5px; background: var(--sws-accent); color: var(--sws-accent-ink); font-weight: 750; text-align: center; text-decoration: none; }
.sws-button:hover { filter: brightness(1.1); }
.sws-site-footer { background: #0c1721; color: #d7e1e8; }
.sws-footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 48px; padding-top: 64px; padding-bottom: 50px; }
.sws-site-footer h2 { margin-bottom: 20px; color: #fff; font-size: 1rem; }
.sws-footer-brand { display: block; margin-bottom: 18px; color: #fff; font-size: 1.25rem; }
.sws-site-footer a { color: #d7e1e8; }
.sws-footer-menu { display: block; }
.sws-footer-menu li { margin: 0 0 10px; }
.sws-hours { white-space: normal; }
.sws-footer-bottom { padding: 18px 0 24px; border-top: 1px solid #2b3a45; display: flex; justify-content: space-between; gap: .5rem 2rem; flex-wrap: wrap; font-size: .85rem; }

/* WordPress content. */
.sws-index, .sws-single, .sws-not-found { padding-top: 70px; padding-bottom: 100px; }
.sws-post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 24px; }
.sws-post-card { padding: 26px; background: #fff; border: 1px solid var(--sws-border); border-radius: var(--sws-radius); }
.sws-post-card h2 { font-size: 1.55rem; }
.sws-post-card h2 a { color: var(--sws-ink); text-decoration: none; }
.sws-post-card img { width: 100%; margin-bottom: 22px; border-radius: 5px; }
.sws-single article { max-width: 900px; margin-inline: auto; }
.sws-single-image { margin: 30px 0; }
.sws-single-image img { width: 100%; border-radius: var(--sws-radius); }
.alignwide { max-width: var(--sws-width); margin-inline: auto; }
.alignfull { max-width: none; }
.wp-block-image img { height: auto; }

@media (max-width: 920px) {
	.sws-header-inner { min-height: 70px; flex-wrap: wrap; }
	.sws-menu-toggle { display: block; margin-left: auto; }
	.sws-header-phone { display: none; }
	.sws-primary-nav { display: none; order: 10; width: 100%; margin: 0; padding: 0 0 16px; }
	.sws-primary-nav.is-open { display: block; }
	.sws-primary-nav ul { display: block; }
	.sws-primary-nav li { border-top: 1px solid var(--sws-border); }
	.sws-primary-nav a { padding: 12px 2px; }
	.sws-page-hero--image .sws-page-hero-inner, .sws-split { grid-template-columns: 1fr; }
	.sws-section--image-start .sws-split-media { order: 0; }
	.sws-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
	.sws-container { width: min(calc(100% - 32px), var(--sws-width)); }
	.sws-page-hero { padding: 64px 0; }
	.sws-site-cta-inner { display: block; }
	.sws-site-cta .sws-button { margin-top: 20px; }
	.sws-footer-grid { grid-template-columns: 1fr; gap: 24px; padding-top: 48px; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.sws-text-link span { transition: none; }
}
