/*
Theme Name: Honest Supps
Theme URI: https://waterefficiency.net/
Author: Honest Supps
Description: Clean, modern block theme for label-first supplement guides. Fully editable in the Site Editor.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: honest-supps
*/

html { scroll-behavior: smooth; }
:where(h2, h3)[id] { scroll-margin-top: 6rem; }
img { height: auto; }
::selection { background: var(--wp--preset--color--secondary); color: var(--wp--preset--color--dark); }
h1 a, h2 a, h3 a, h4 a { text-decoration: none; color: inherit; }
:where(h1, h2, h3, h4) a:hover { color: var(--wp--preset--color--primary); }
a { text-underline-offset: .18em; }

/* Header (sticky, dark) */
header.wp-block-template-part { position: sticky; top: 0; z-index: 50; }
body.admin-bar header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { body.admin-bar header.wp-block-template-part { top: 0; position: relative; } }
.hsp-header { backdrop-filter: saturate(140%) blur(8px); }
.hsp-header .wp-block-site-title a::before { content: ""; display: inline-block; width: .7em; height: .7em; margin-right: .5em; border-radius: 3px; background: var(--wp--preset--color--secondary); box-shadow: .22em .22em 0 var(--wp--preset--color--primary); vertical-align: -.02em; }
.hsp-header .wp-block-navigation a { opacity: .85; transition: opacity .2s ease; }
.hsp-header .wp-block-navigation a:hover { opacity: 1; }
.hsp-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--dark); color: #fff; }

/* Block styles */
.is-style-card { background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--border); border-radius: var(--wp--custom--radius); box-shadow: var(--wp--custom--shadow); overflow: hidden; transition: transform .2s ease, border-color .2s ease; }
.is-style-card:hover { transform: translateY(-3px); border-color: var(--wp--preset--color--primary); }
.is-style-note { background: var(--wp--preset--color--soft); border: 1px solid #cfdcff; border-radius: var(--wp--custom--radius); padding: 1.3rem 1.5rem; }
.is-style-note > :first-child { margin-top: 0; }
.is-style-note > :last-child { margin-bottom: 0; }
ul.is-style-checklist { list-style: none; padding-left: 0; }
ul.is-style-checklist li { position: relative; padding-left: 2rem; margin-bottom: .55rem; }
ul.is-style-checklist li::before { content: ""; position: absolute; left: 0; top: .3em; width: 1.15rem; height: 1.15rem; border-radius: 4px; background: var(--wp--preset--color--dark) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C6F432' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7'/%3E%3C/svg%3E") center / 72% no-repeat; }
p.is-style-kicker { display: inline-block; font-family: var(--wp--preset--font-family--heading); font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--wp--preset--color--primary); }
.has-dark-background-color p.is-style-kicker, .has-dark-2-background-color p.is-style-kicker { color: var(--wp--preset--color--secondary); }
.wp-block-button.is-style-ghost .wp-block-button__link { background: transparent; color: currentColor; box-shadow: inset 0 0 0 1.5px currentColor; }
.wp-block-button__link { transition: transform .15s ease, background-color .2s ease; }
.wp-block-button__link:hover { transform: translateY(-1px); }

/* Hero frame */
.hsp-frame { position: relative; }
.hsp-frame img { border-radius: 16px; position: relative; z-index: 1; }
.hsp-frame::after { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 2px solid var(--wp--preset--color--secondary); border-radius: 16px; z-index: 0; }
@media (max-width: 781px) { .hsp-frame::after { display: none; } }

/* Steps */
.hsp-step-num { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: .85rem; letter-spacing: .1em; display: inline-block; padding: .2rem .55rem; border-radius: 6px; background: var(--wp--preset--color--dark); color: var(--wp--preset--color--secondary); }

/* Cards in loops */
.wp-block-post-template .is-style-card { height: 100%; display: flex; flex-direction: column; }
.wp-block-post-template .is-style-card .wp-block-post-featured-image { margin: 0; }

/* Content */
.entry-content h2 { padding-top: .25rem; }
.wp-block-image img { border-radius: var(--wp--custom--radius); }
.wp-block-table table { border-collapse: separate; border-spacing: 0; width: 100%; background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--border); border-radius: 12px; overflow: hidden; font-size: .97rem; }
.wp-block-table th { background: var(--wp--preset--color--dark); color: #fff; text-align: left; font-family: var(--wp--preset--font-family--heading); font-weight: 600; }
.wp-block-table th, .wp-block-table td { padding: .75rem .9rem; border-bottom: 1px solid var(--wp--preset--color--border); }
.wp-block-table tr:last-child td { border-bottom: 0; }
.wp-block-table td:first-child { font-weight: 600; }
.hsp-toc ul { margin: 0; padding-left: 0; list-style: none; counter-reset: toc; }
.hsp-toc li { counter-increment: toc; margin: .3rem 0; }
.hsp-toc li::before { content: counter(toc, decimal-leading-zero); font-family: var(--wp--preset--font-family--heading); font-weight: 700; color: var(--wp--preset--color--primary); margin-right: .6rem; font-size: .85rem; }
.hsp-toc a { text-decoration: none; color: var(--wp--preset--color--contrast); }
.hsp-toc a:hover { color: var(--wp--preset--color--primary); }

/* Footer */
.hsp-footer a { color: inherit; text-decoration: none; }
.hsp-footer a:hover { color: var(--wp--preset--color--secondary); }

.wp-block-query-pagination a, .wp-block-query-pagination .page-numbers { text-decoration: none; padding: .35rem .7rem; border-radius: 8px; }
.wp-block-query-pagination .page-numbers.current { background: var(--wp--preset--color--dark); color: var(--wp--preset--color--secondary); }
.fluentform .ff-btn-submit { background: var(--wp--preset--color--primary) !important; border-radius: 10px !important; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* FAQ accordion (core/details) */
.wp-block-details { border-bottom: 1px solid var(--wp--preset--color--border); padding: 1rem 0; }
.wp-block-details summary { cursor: pointer; font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1.08rem; 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: .2rem; top: -.15rem; font-size: 1.5rem; color: var(--wp--preset--color--primary); transition: transform .2s ease; }
.wp-block-details[open] summary::after { transform: rotate(45deg); }
.wp-block-details > :not(summary) { margin-top: .75rem; }

/* Cap tall portrait photos inside articles */
.entry-content .wp-block-image img { max-height: 560px; width: 100%; object-fit: cover; }
