/*
Theme Name: Sauna Unpacked
Theme URI: https://saunaunpacked.com
Description: Calm, editorial block theme for Sauna Unpacked. Self-hosted fonts, no jQuery, no front-end JavaScript. Built so editors can write and publish in the block editor without a developer.
Version: 2.0.2
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sauna-unpacked
*/

/* Only what theme.json cannot express. Keep this file small. */

:where(body) { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* Visible keyboard focus everywhere. */
:where(a, button, summary, input, select, textarea):focus-visible {
	outline: 2px solid var(--wp--preset--color--spruce);
	outline-offset: 3px;
}

/* Kicker: small uppercase label above titles. */
.su-kicker { text-transform: uppercase; letter-spacing: .14em; font-size: var(--wp--preset--font-size--xs); font-weight: 600; }

/* Article body rhythm. */
.su-article-body > h2 { margin-top: 2.75rem; }
.su-article-body > h3 { margin-top: 2rem; }
.su-article-body h2[id], .su-article-body h3[id] { scroll-margin-top: 1.5rem; }
.su-article-body .wp-block-image.alignwide img, .su-article-body .wp-block-image.alignfull img { width: 100%; }

/* Breadcrumbs */
.su-breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; font-size: var(--wp--preset--font-size--xs); color: var(--wp--preset--color--stone); }
.su-breadcrumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--wp--preset--color--mist); }
.su-breadcrumbs a { color: inherit; text-decoration: none; }
.su-breadcrumbs a:hover { text-decoration: underline; }
.su-breadcrumbs li:last-child { display: none; } /* the title is right below; don't repeat it */

/* Table of contents */
.su-toc { border-top: 1px solid var(--wp--preset--color--charcoal); border-bottom: 1px solid var(--wp--preset--color--mist); padding: .9rem 0; font-size: var(--wp--preset--font-size--small); }
.su-toc summary { list-style: none; font-weight: 600; cursor: pointer; text-transform: uppercase; letter-spacing: .12em; font-size: var(--wp--preset--font-size--xs); }
.su-toc ol { margin: .75rem 0 0; padding-left: 1.25rem; columns: 2 16rem; column-gap: 2rem; }
.su-toc li { margin-bottom: .35rem; break-inside: avoid; }
.su-toc a { color: var(--wp--preset--color--charcoal); text-decoration: none; }
.su-toc a:hover { color: var(--wp--preset--color--spruce); text-decoration: underline; }

/* Details/FAQ */
.wp-block-details summary { font-weight: 600; cursor: pointer; list-style: none; position: relative; padding-right: 2rem; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; position: absolute; right: .25rem; top: -.1rem; font-weight: 400; font-size: 1.4em; line-height: 1; color: var(--wp--preset--color--spruce); }
.wp-block-details[open] summary::after { content: "–"; }
.wp-block-details[open] summary { margin-bottom: .5rem; }

/* Tables: scroll sideways inside the table on phones, never the page. */
.wp-block-table { overflow-x: auto; }
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table.su-compare td:first-child { width: 28%; }
.wp-block-table th { text-align: left; font-weight: 600; background: var(--wp--preset--color--sand); }
.wp-block-table th, .wp-block-table td { border: 1px solid var(--wp--preset--color--mist); padding: .7rem .85rem; vertical-align: top; }
@media (max-width: 600px) { .wp-block-table th, .wp-block-table td { padding: .55rem .5rem; font-size: var(--wp--preset--font-size--xs); } }

/* Cards */
.su-card .wp-block-post-featured-image { margin-bottom: .35rem; overflow: hidden; }
.su-card .wp-block-post-featured-image img { transition: transform .5s ease; }
.su-card:hover .wp-block-post-featured-image img { transform: scale(1.025); }
.su-card .wp-block-post-title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
@media (prefers-reduced-motion: reduce) { .su-card .wp-block-post-featured-image img { transition: none; } }

/* Category row header: heading left, "All →" right */
.su-row-head { border-top: 1px solid var(--wp--preset--color--charcoal); padding-top: .9rem; }

/* Author bio avatar */
.su-author-bio .wp-block-avatar img { border-radius: 50%; }

/* Newsletter form-less CTA keeps a calm look on dark backgrounds */
.su-newsletter .wp-block-button__link { background: var(--wp--preset--color--warm-white); color: var(--wp--preset--color--charcoal); }
.su-newsletter .wp-block-button__link:hover { background: var(--wp--preset--color--sand); }

/* Header: keep logo + menu on one line on phones */
.su-header .wp-block-navigation__responsive-container-open { padding: .5rem; margin-right: -.5rem; }
.su-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--warm-white); padding: 1.5rem max(16px, 4vw); }
.su-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { font-family: var(--wp--preset--font-family--serif); font-size: var(--wp--preset--font-size--x-large); }

/* Never let long words or URLs push the page sideways on phones. */
.wp-block-post-title, .wp-block-heading, .wp-block-post-content p { overflow-wrap: break-word; }
/* Pull quote attribution */
.wp-block-pullquote cite { display: block; margin-top: 1rem; font-family: var(--wp--preset--font-family--sans); font-style: normal; font-size: var(--wp--preset--font-size--xs); text-transform: uppercase; letter-spacing: .12em; color: var(--wp--preset--color--stone); }
.wp-block-pullquote blockquote p { margin: 0; }

/* Lists inside boxes: less indent so text gets the width on phones */
.su-takeaways ul { padding-left: 1.1rem; margin: 0; }
.su-takeaways li + li { margin-top: .35rem; }

/* Header/footer logo: SVG wordmark, never wraps, scales down on phones. */
.su-logo { display: block; line-height: 0; flex-shrink: 0; text-decoration: none; color: inherit; }
.su-logo:hover, .su-logo:focus { text-decoration: none; color: inherit; }
.su-logo img { display: block; height: 2.25rem; width: auto; }
.su-header .wp-block-html,
.su-header .su-logo { flex-shrink: 0; }
.su-logo--footer img { height: 4.75rem; width: auto; max-width: 11.5rem; }
@media (max-width: 600px) {
	.su-header .su-logo img { height: 1.875rem; }
	.su-logo--footer img { height: 3.75rem; }
}

/* Header: between phone and desktop the menu tightens instead of breaking */
@media (max-width: 960px) {
	.su-header .wp-block-navigation { gap: 1.1rem !important; }
	.su-header .su-nav-search { display: none; }
}

@media (max-width: 600px) {
	.su-hide-mobile { display: none !important; }
}

/* Space between a pull quote and the next heading */
.wp-block-pullquote + .wp-block-heading { margin-top: 2.75rem; }

/* Open mobile menu: left-aligned, like a contents page */
.su-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.su-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { align-items: flex-start; }
