/*
Theme Name: GHz Sounds
Theme URI: https://ghzsounds.com/
Author: GHz Sounds
Author URI: https://ghzsounds.com/
Description: Tema WordPress próprio da GHz Sounds — loja de plugins VST, samples e packs para Roland SPD. Construído do zero seguindo o brandbook (Ink + Paper, acento laranja, tudo reto), sem jQuery e sem frameworks. Compatível com WooCommerce, License Manager for WooCommerce e Mercado Pago.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ghz-sounds
Tags: e-commerce, custom-menu, featured-images, translation-ready
*/

/* Tokens são carregados antes deste arquivo (assets/css/tokens.css). */

/* =========================================================================
   1. Reset / Base
   ========================================================================= */
*,
*::before,
*::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-weight: var(--fw-body);
	font-size: var(--fs-body);
	line-height: var(--body-leading);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img, picture, video, svg {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--text);
	text-decoration: none;
	transition: color var(--transition);
}
a:hover, a:focus { color: var(--accent); }

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: var(--fw-display);
	letter-spacing: var(--display-tracking);
	line-height: var(--display-leading);
	text-transform: lowercase;
	margin: 0 0 var(--space-4);
	color: var(--text);
}

p { margin: 0 0 var(--space-4); }
ul, ol { padding-left: var(--space-6); }

code, pre, kbd { font-family: var(--font-mono); font-size: var(--fs-small); }

button { font-family: inherit; }

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

::selection { background: var(--accent); color: var(--on-accent); }

/* =========================================================================
   2. Layout / utilitários
   ========================================================================= */
.container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }

.section__head { margin-bottom: var(--space-12); }

.eyebrow {
	font-family: var(--font-mono);
	font-weight: var(--fw-mono-medium);
	font-size: var(--fs-eyebrow);
	letter-spacing: 0.02em;
	text-transform: lowercase;
	color: var(--accent);
	margin: 0 0 var(--space-4);
	display: block;
}

.display { font-family: var(--font-display); }

/* Uma palavra do título em laranja (marcar com <span class="hl">) */
.hl { color: var(--accent); }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0);
	white-space: nowrap; border: 0;
}

.skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 999;
	background: var(--accent); color: var(--on-accent);
	padding: var(--space-2) var(--space-4);
	font-family: var(--font-mono); font-size: var(--fs-small);
}
.skip-link:focus { left: 0; }

/* =========================================================================
   3. Botões
   ========================================================================= */
.btn {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	font-family: var(--font-mono);
	font-weight: var(--fw-mono-medium);
	font-size: var(--fs-small);
	letter-spacing: 0.01em;
	text-transform: lowercase;
	padding: var(--space-4) var(--space-6);
	border: var(--border-width) solid transparent;
	cursor: pointer;
	transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.btn--primary {
	background: var(--accent);
	color: var(--on-accent);
	border-color: var(--accent);
}
.btn--primary:hover, .btn--primary:focus {
	background: var(--accent-deep);
	border-color: var(--accent-deep);
	color: var(--paper);
}

.btn--outline {
	background: transparent;
	color: var(--text);
	border-color: var(--border);
}
.btn--outline:hover, .btn--outline:focus {
	border-color: var(--text);
	color: var(--text);
}

/* =========================================================================
   5. Cabeçalho / Navegação
   ========================================================================= */
.site-header {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: var(--z-header);
	background: transparent;
	border-bottom: var(--border-width) solid transparent;
	transition: background var(--transition), border-color var(--transition);
}
/* Ganha cor ao rolar (classe adicionada via JS). */
.site-header.is-scrolled {
	background: var(--ink);
	border-bottom-color: var(--border);
}

/* Offset para o header fixo — o conteúdo começa abaixo dele.
   Na home o hero passa POR TRÁS do header, então zeramos aqui. */
#content { padding-top: var(--header-h); }
.ghz-home #content { padding-top: 0; }
.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-6);
	min-height: 72px;
}
.brand { display: inline-flex; align-items: center; }
.brand__logo { height: 22px; width: auto; }

.nav ul {
	list-style: none;
	display: flex;
	gap: var(--space-8);
	margin: 0; padding: 0;
}
.nav a {
	font-family: var(--font-mono);
	font-size: var(--fs-small);
	text-transform: lowercase;
	color: var(--text);
}
.nav .current-menu-item > a { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: var(--space-4); }

.cart-link {
	font-family: var(--font-mono);
	font-size: var(--fs-small);
	color: var(--text);
}
.cart-link .count { color: var(--accent); }

.nav-toggle {
	display: none;
	background: transparent;
	border: var(--border-width) solid var(--border);
	color: var(--text);
	width: 44px; height: 44px;
	cursor: pointer;
	font-size: 1.2rem;
	line-height: 1;
}

/* =========================================================================
   6. Hero (centralizado, fundo com overlay opaco)
   ========================================================================= */
.hero {
	position: relative;
	min-height: 92vh;               /* fallback */
	min-height: var(--hero-min-h);  /* dvh: evita corte com a barra do mobile */
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	/* espaço p/ o header fixo que fica sobreposto */
	padding-top: calc(var(--header-h) + clamp(2rem, 6vw, 5rem));
	padding-bottom: clamp(2rem, 6vw, 5rem);
	overflow: hidden;
}
/* Camada de imagem + overlay opaco. Imagem definida via Customizer
   (variável --hero-image aplicada inline). */
.hero__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	background-image: var(--hero-image, none);
	background-size: cover;
	background-position: center;
	background-color: var(--surface-dark);
}
.hero__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--hero-overlay);
}
.hero__inner {
	position: relative;
	z-index: 1;
	max-width: 780px;
}
.hero__content { text-align: center; }
.hero__title {
	font-size: var(--fs-h1);
	margin-inline: auto;
	margin-bottom: var(--space-6);
	max-width: 20ch;
	text-wrap: balance;
}
.hero__sub {
	font-size: var(--fs-lead);
	color: var(--text-muted);
	max-width: 40ch;
	margin-inline: auto;
	margin-bottom: var(--space-8);
}
.hero__actions {
	display: flex;
	gap: var(--space-4);
	flex-wrap: wrap;
	justify-content: center;
}

/* Pré-oculta os elementos animados do hero até o GSAP revelar (anti-flash).
   Só age quando .ghz-anim está no <html> (adicionada via inline script na home). */
.ghz-anim .hero .eyebrow,
.ghz-anim .hero__title,
.ghz-anim .hero__sub,
.ghz-anim .hero__actions .btn { visibility: hidden; }

/* Palavra que se alterna (destaque laranja) — troca suave via GSAP.
   inline-block + min-width (definido no JS = palavra mais larga) evita
   reflow: "de verdade" nunca se move e a frase fica estável e centralizada. */
.ghz-type {
	display: inline-block;
	color: var(--accent);
	white-space: nowrap;
	text-align: center;
	vertical-align: baseline;
}

/* =========================================================================
   7. Prova social
   ========================================================================= */
.social-proof {
	border-block: var(--border-width) solid var(--border);
	padding-block: var(--space-6);
}
.social-proof p {
	margin: 0;
	font-family: var(--font-mono);
	font-size: var(--fs-small);
	color: var(--text-muted);
	text-transform: lowercase;
	text-align: center;
}

/* =========================================================================
   8. Lançamentos (cards de produto)
   ========================================================================= */
.product-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-6);
}
.product-card {
	position: relative;
	background: var(--surface-dark);
	border: var(--border-width) solid var(--border);
	display: flex;
	flex-direction: column;
}
.product-card::before {
	content: "";
	position: absolute;
	left: 0; top: 0;
	width: 100%; height: 3px;
	background: var(--accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform var(--transition);
}
.product-card:hover::before { transform: scaleX(1); }
.product-card__media {
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: var(--ink);
}
.product-card__media img { width: 100%; height: 100%; object-fit: cover; }
.product-card__body {
	padding: var(--space-5);
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	flex: 1;
}
.product-card__title {
	font-size: var(--fs-h3);
	margin: 0;
}
.product-card__title a { color: var(--text); }
.product-card__spec {
	font-family: var(--font-mono);
	font-size: var(--fs-eyebrow);
	color: var(--text-muted);
	text-transform: lowercase;
	margin: 0;
}
.product-card__price {
	font-family: var(--font-mono);
	font-weight: var(--fw-mono-medium);
	font-size: var(--fs-body);
	color: var(--accent);
	margin-top: auto;
}

/* =========================================================================
   9. Categorias
   ========================================================================= */
.cats-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-6);
}
.cat-block {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 260px;
	padding: var(--space-6);
	border: var(--border-width) solid var(--border);
	background: var(--surface-dark);
	color: var(--text);
	transition: background var(--transition);
	overflow: hidden;
}
.cat-block:hover { background: var(--accent); color: var(--on-accent); }
.cat-block__index {
	font-family: var(--font-mono);
	font-size: var(--fs-small);
	color: var(--text-muted);
}
.cat-block:hover .cat-block__index { color: var(--on-accent); }
.cat-block__title {
	font-size: var(--fs-h2);
	margin: var(--space-2) 0 0;
	color: inherit;
}

/* =========================================================================
   10. Sobre (feito por quem toca)
   ========================================================================= */
.about__grid {
	display: grid;
	grid-template-columns: 0.85fr 1.15fr;
	gap: clamp(2rem, 5vw, 5rem);
	align-items: center;
}
.about__media {
	border: var(--border-width) solid var(--border);
	background: var(--surface-dark);
	aspect-ratio: 3 / 4;
	overflow: hidden;
}
.about__media img { width: 100%; height: 100%; object-fit: cover; }
.about__title { font-size: var(--fs-h2); }
.about__text { color: var(--text-muted); font-size: var(--fs-lead); }

/* =========================================================================
   11. Faixa de garantia
   ========================================================================= */
.guarantee {
	border-block: var(--border-width) solid var(--border);
}
.guarantee__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
}
.guarantee__item {
	font-family: var(--font-mono);
	font-size: var(--fs-small);
	text-transform: lowercase;
	color: var(--text);
	padding: var(--space-6);
	border-left: var(--border-width) solid var(--border);
	display: flex;
	align-items: center;
	gap: var(--space-3);
}
.guarantee__item:first-child { border-left: 0; }
.guarantee__item::before {
	content: "";
	width: 8px; height: 8px;
	background: var(--accent);
	flex: none;
}

/* =========================================================================
   12. Depoimentos (base pronta — ativada no template)
   ========================================================================= */
.testimonials__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-6);
}
.testimonial {
	border: var(--border-width) solid var(--border);
	padding: var(--space-6);
	background: var(--surface-dark);
}
.testimonial__quote { font-size: var(--fs-lead); }
.testimonial__author {
	font-family: var(--font-mono);
	font-size: var(--fs-eyebrow);
	color: var(--text-muted);
	text-transform: lowercase;
}

/* =========================================================================
   13. Rodapé
   ========================================================================= */
.site-footer {
	border-top: var(--border-width) solid var(--border);
	padding-top: var(--section-y);
	overflow: hidden;
}
.footer-top {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: var(--space-8);
	margin-bottom: var(--space-16);
}
.footer-nav ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-6);
	margin: 0; padding: 0;
}
.footer-nav a, .footer-meta {
	font-family: var(--font-mono);
	font-size: var(--fs-small);
	color: var(--text-muted);
	text-transform: lowercase;
}
.footer-meta { line-height: 1.9; }
.footer-meta a { color: var(--text-muted); }

.footer-wordmark {
	font-family: var(--font-display);
	font-weight: var(--fw-display);
	letter-spacing: var(--display-tracking);
	line-height: 0.8;
	text-transform: lowercase;
	font-size: var(--fs-wordmark);
	color: var(--paper);
	margin: 0;
	white-space: nowrap;
	transform: translateY(0.12em);
}

/* =========================================================================
   14. Conteúdo padrão (posts / páginas)
   ========================================================================= */
.entry { padding-block: var(--section-y); }
.entry__title { font-size: var(--fs-h1); }
.entry__meta {
	font-family: var(--font-mono);
	font-size: var(--fs-small);
	color: var(--text-muted);
	margin-bottom: var(--space-8);
}
.entry__thumb {
	border: var(--border-width) solid var(--border);
	margin-bottom: var(--space-8);
}
.entry__content { max-width: 68ch; }
.entry__content a { color: var(--accent); text-decoration: underline; }
.entry__content img { border: var(--border-width) solid var(--border); }

/* Grade de listagem (blog / arquivo) */
.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: var(--space-6);
}
.card {
	background: var(--surface-dark);
	border: var(--border-width) solid var(--border);
}
.card__body { padding: var(--space-5); }
.card__title { font-size: var(--fs-h3); margin: 0 0 var(--space-2); }
.card__excerpt { color: var(--text-muted); font-size: var(--fs-small); margin: 0; }

/* =========================================================================
   15. Responsivo
   ========================================================================= */
@media (max-width: 900px) {
	.about__grid { grid-template-columns: 1fr; }
	.product-grid,
	.cats-grid,
	.guarantee__grid,
	.testimonials__grid { grid-template-columns: 1fr; }
	.guarantee__item { border-left: 0; border-top: var(--border-width) solid var(--border); }
	.guarantee__item:first-child { border-top: 0; }
}

@media (max-width: 782px) {
	.nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
	.nav {
		position: absolute;
		inset: var(--header-h) 0 auto 0;
		background: var(--ink);
		border-bottom: var(--border-width) solid var(--border);
		display: none;
	}
	.nav.is-open { display: block; }
	.nav ul { flex-direction: column; gap: 0; padding: var(--space-2); }
	.nav li a { display: block; padding: var(--space-4); }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
