/*
Theme Name: Violet Recording
Theme URI: https://violetrecording.com
Author: Violet Recording
Author URI: https://violetrecording.com
Description: Minimalist, SEO-first block theme for Violet Recording — a music production, recording and audio-gear content site with a WooCommerce shop. Black + purple brand, self-hosted variable fonts, and Core Web Vitals baked in (no jQuery, no page builder, minimal CSS/JS).
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 8.1
Version: 1.3.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: violet-recording
Tags: blog, news, block-styles, full-site-editing, custom-colors, custom-menu, featured-images, threaded-comments, e-commerce, wide-blocks
*/

/*
 * The design system lives in theme.json. This file holds only a handful of rules
 * that theme.json cannot express. Keep it tiny — every byte here is render-blocking.
 */

/* Smooth in-page anchor jumps (TOC links) without harming reduced-motion users */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html { scroll-padding-top: 5rem; } /* offset sticky header for anchor links */

/* Skip link (a11y) — visually hidden until focused */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 0.6rem 1rem;
  background: var(--wp--preset--color--ink);
  color: #fff;
  text-decoration: none;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* Reserve ad slot height to prevent CLS (monetised pages) */
.ad-slot { display: block; min-height: 280px; }
.ad-slot[data-size="leaderboard"] { min-height: 90px; }

/* Brand mark in the header inherits text colour (white on the black header) */
.vr-brand-mark { display: inline-flex; flex: 0 0 auto; width: 1.9rem; height: 1.9rem; }
.vr-brand-mark svg { display: block; width: 100%; height: 100%; }

/* Compact header: tighten the WooCommerce mini-cart + keep nav on one row */
.vr-header .wc-block-mini-cart__button { color: #fff; padding: 0; }
.vr-header .wp-block-navigation { row-gap: 0; }

/* Newsletter signup form (replaces the misused Search block) */
.vr-newsletter { display: flex; flex-wrap: wrap; gap: 0.5rem; width: 100%; max-width: 480px; }
.vr-newsletter--center { margin-left: auto; margin-right: auto; }
.vr-newsletter input[type="email"] {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 0.85rem 1rem;
  font: inherit;
  color: var(--wp--preset--color--ink);
  background: #fff;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 8px;
}
.vr-newsletter input[type="email"]:focus {
  outline: 2px solid var(--wp--preset--color--brand);
  outline-offset: 1px;
}
.vr-newsletter button {
  flex: 0 0 auto;
  padding: 0.85rem 1.5rem;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--wp--preset--color--brand);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.vr-newsletter button:hover { background: var(--wp--preset--color--brand-strong); }
/* Footer column is narrow → stack input over a full-width button */
.vr-footer .vr-newsletter { flex-direction: column; max-width: 320px; }
.vr-footer .vr-newsletter input[type="email"] { flex: 0 0 auto; width: 100%; }
.vr-footer .vr-newsletter button { width: 100%; }
@media (max-width: 480px) {
  .vr-newsletter button { width: 100%; }
}

/* Topic image tiles — subtle premium hover lift */
.vr-tile { overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; }
.vr-tile:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(14, 14, 18, 0.28); }
.vr-tile .wp-block-cover__image-background { transition: transform .4s ease; }
.vr-tile:hover .wp-block-cover__image-background { transform: scale(1.06); }
.vr-tile a { text-decoration: none; }
.vr-tile a:hover { text-decoration: underline; }

/* --- Flush full-bleed sections ---
 * theme.json's global blockGap otherwise inserts vertical space between the
 * header, main and footer at the page root — which showed as a white band
 * between the black header and the hero. Zero it so sections sit flush;
 * each section manages its own padding. */
.wp-site-blocks > header,
.wp-site-blocks > main,
.wp-site-blocks > footer { margin-block: 0 !important; }
.wp-site-blocks > main > :first-child { margin-top: 0 !important; }

/* --- Sticky, premium header --- */
.wp-site-blocks > header { position: sticky; top: 0; z-index: 50; }

/* --- Cinematic hero polish --- */
.vr-hero { isolation: isolate; }
.vr-hero .wp-block-cover__inner-container { width: 100%; }
.vr-hero h1 { letter-spacing: -0.02em; }
@media (max-width: 781px) {
  .vr-hero { min-height: 78vh !important; }
}

/* Outline buttons: subtle, refined hover */
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background-color: rgba(255, 255, 255, 0.12);
}
