/*
Theme Name:       Dew Lab
Theme URI:        https://thedewlab.com
Author:           Kira
Author URI:       https://thedewlab.com/about/
Description:      Dark-first block theme for The Dew Lab. Built for lab-tested gaming guides, gear reviews, and esports analysis.
Version:          1.1.3
Requires at least: 6.5
Tested up to:     6.8
Requires PHP:     8.0
License:          GNU General Public License v2 or later
License URI:      https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:      dewlab
Tags:             blog, news, one-column, custom-colors, custom-logo, custom-menu, editor-style, featured-images, full-site-editing, block-patterns, dark
*/

/* Dark-only site: native scrollbars, form controls, and color-scheme */
:root {
    color-scheme: dark;
}

body {
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11', 'ss01', 'ss03';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings: balance wrap, tighten Space Grotesk at display sizes */
h1, h2 {
    text-wrap: balance;
    letter-spacing: -0.02em;
}

h3, h4 {
    text-wrap: balance;
    letter-spacing: -0.01em;
}

.entry-content p,
.wp-block-post-excerpt p {
    text-wrap: pretty;
}

/* Selection */
::selection {
    background: var(--wp--preset--color--accent);
    color: var(--wp--preset--color--base);
}

/* Focus visibility */
:where(a, button, input, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--wp--preset--color--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Content links: underline that doesn't shout */
.entry-content a:not(.wp-element-button) {
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

/* Post cards */
.dewlab-card {
    border: 1px solid var(--wp--preset--color--line);
    border-radius: 14px;
    overflow: hidden;
}

.dewlab-card:hover {
    border-color: color-mix(in srgb, var(--wp--preset--color--accent) 55%, var(--wp--preset--color--line));
}

.dewlab-card .wp-block-post-featured-image img {
    transition: transform 0.3s ease;
}

.dewlab-card:hover .wp-block-post-featured-image img {
    transform: scale(1.02);
}

.dewlab-card .wp-block-post-title a {
    text-decoration: none;
}

.dewlab-card .wp-block-post-title a:hover {
    color: var(--wp--preset--color--accent);
}

/* Category chip on cards and single posts */
.dewlab-chip a,
.dewlab-chip {
    font-family: var(--wp--preset--font-family--mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wp--preset--color--accent);
    text-decoration: none;
}

.dewlab-chip a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Proof block (house style: tested-on specifics near the top of guides/reviews) */
.dewlab-proof {
    border: 1px solid var(--wp--preset--color--line);
    border-left: 3px solid var(--wp--preset--color--accent);
    border-radius: 0 12px 12px 0;
    background: var(--wp--preset--color--surface);
}

.dewlab-proof p,
.dewlab-proof li {
    font-family: var(--wp--preset--font-family--mono);
    font-size: 0.875rem;
    line-height: 1.7;
}

/* Verdict box (answer-first summary) */
.dewlab-verdict {
    border: 1px solid var(--wp--preset--color--accent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--wp--preset--color--accent) 7%, var(--wp--preset--color--surface));
}

/* Hero: width constraints + a faint dew glow */
.dewlab-hero {
    position: relative;
}

.dewlab-hero::before {
    content: "";
    position: absolute;
    inset: -6rem -10% auto -10%;
    height: 24rem;
    background: radial-gradient(40rem 18rem at 18% 0%, rgb(163 230 53 / 0.06), transparent 70%);
    pointer-events: none;
}

.dewlab-hero h1 {
    max-width: 27ch;
}

.dewlab-hero p.dewlab-hero-sub {
    max-width: 52ch;
}

/* Header nav hover */
.wp-block-navigation a:hover {
    color: var(--wp--preset--color--accent);
}

/* ---------- Mobile menu ---------- */

/* Hamburger + close: proper icon buttons with 44px touch targets */
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
    color: var(--wp--preset--color--ink);
    padding: 0.55rem;
    border: 1px solid var(--wp--preset--color--line);
    border-radius: 10px;
    background: var(--wp--preset--color--surface);
}

.wp-block-navigation__responsive-container-open svg,
.wp-block-navigation__responsive-container-close svg {
    display: block;
    width: 22px;
    height: 22px;
}

/* Open overlay: translucent base + blur, generous padding */
.wp-block-navigation__responsive-container.is-menu-open {
    background: color-mix(in srgb, var(--wp--preset--color--base) 90%, transparent) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 1.25rem 1.5rem 2rem;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
    padding-top: 3.5rem;
}

/* Menu links: display type, full-width tap targets, hairline dividers */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
    width: 100%;
    border-bottom: 1px solid var(--wp--preset--color--line);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:last-child {
    border-bottom: none;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
    font-family: var(--wp--preset--font-family--heading);
    font-size: clamp(1.5rem, 6vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    width: 100%;
    padding: 1rem 0 !important;
    color: var(--wp--preset--color--ink);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:focus-visible {
    color: var(--wp--preset--color--accent);
}

/* Left-align the open menu regardless of the desktop nav justification */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
    align-items: flex-start;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
    gap: 0;
    justify-content: flex-start;
    align-items: stretch;
    width: 100%;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
    justify-content: flex-start;
}

/* Site title: the accent dot */
.dewlab-site-title a::after {
    content: "";
    display: inline-block;
    width: 0.35em;
    height: 0.35em;
    margin-left: 0.18em;
    border-radius: 50%;
    background: var(--wp--preset--color--accent);
}

.dewlab-site-title a {
    text-decoration: none;
}

/* When the logo mark is present (header), the droplet replaces the dot */
.wp-block-site-logo + .dewlab-site-title a::after {
    display: none;
}

.wp-block-site-logo img {
    display: block;
}

/* Tables (comparison tables are core content) */
.entry-content table,
.wp-block-table table {
    border-collapse: collapse;
    width: 100%;
}

.wp-block-table th {
    background: var(--wp--preset--color--surface);
    font-family: var(--wp--preset--font-family--heading);
    font-weight: 600;
    text-align: left;
}

.wp-block-table th,
.wp-block-table td {
    border: 1px solid var(--wp--preset--color--line);
    padding: 0.6rem 0.9rem;
}

/* Code + kbd */
.entry-content code {
    background: var(--wp--preset--color--surface);
    border: 1px solid var(--wp--preset--color--line);
    border-radius: 6px;
    padding: 0.1em 0.4em;
    font-size: 0.9em;
}

/* Images inside posts get soft corners */
.entry-content .wp-block-image img {
    border-radius: 10px;
}

/* Form fields: dark inputs everywhere (comments, search) */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="password"],
textarea {
    background: var(--wp--preset--color--surface);
    border: 1px solid var(--wp--preset--color--line);
    border-radius: 8px;
    color: var(--wp--preset--color--ink);
    padding: 0.55rem 0.8rem;
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--medium);
}

input:focus,
textarea:focus {
    border-color: var(--wp--preset--color--accent);
    outline: none;
}

.wp-block-search__inside-wrapper {
    background: var(--wp--preset--color--surface);
    border: 1px solid var(--wp--preset--color--line) !important;
    border-radius: 8px;
    overflow: hidden;
}

.wp-block-search__inside-wrapper input[type="search"] {
    border: none;
    background: transparent;
}

.wp-block-post-comments-form input[type="checkbox"] {
    accent-color: var(--wp--preset--color--accent);
}

.comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.comment-form-cookies-consent input[type="checkbox"] {
    margin-top: 0.35rem;
    flex-shrink: 0;
}

/* Core Forms: themed to match (bundled stylesheets disabled on embeds) */
.cf-form {
    display: block;
    max-width: 40rem;
}

.cf-form p {
    margin-block: 0 1.1rem;
}

.cf-form label {
    display: block;
    font-family: var(--wp--preset--font-family--heading);
    font-size: var(--wp--preset--font-size--small);
    font-weight: 500;
    color: var(--wp--preset--color--ink);
    margin-block-end: 0.4rem;
}

.cf-form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.cf-form textarea {
    width: 100%;
}

.cf-form textarea {
    min-height: 9rem;
}

.cf-form button[type="submit"] {
    background: var(--wp--preset--color--accent);
    color: var(--wp--preset--color--base);
    font-family: var(--wp--preset--font-family--heading);
    font-weight: 600;
    font-size: var(--wp--preset--font-size--medium);
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.4rem;
    cursor: pointer;
}

.cf-form button[type="submit"]:hover {
    background: var(--wp--preset--color--accent-bright);
}

.cf-form .cf-messages:not(:empty) {
    border: 1px solid var(--wp--preset--color--line);
    border-left: 3px solid var(--wp--preset--color--accent);
    border-radius: 0 10px 10px 0;
    background: var(--wp--preset--color--surface);
    padding: 0.8rem 1rem;
    margin-block-end: 1.1rem;
}

/* Footer links stay quiet */
footer .wp-block-navigation .wp-block-navigation-item__content {
    font-weight: 400;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    .dewlab-card,
    .dewlab-card .wp-block-post-featured-image img {
        transition: none;
    }
}
