/*
Theme Name: em-oil
Theme URI: https://em-oil.ch
Author: dominic
Description: Block theme for EM-OIL — Praxis für Energetische Medizin und Aromatherapie (Marianne Fuhrer). The drop-and-wave design system: Blue/Blue-Deep over Paper, Gold accents, Exo headings with Ubuntu body text and Cormorant Garamond italic quotes. Foundations only (tokens, masthead, footer); the page sections come from the companion plugin emoil-blocks.
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 7.4
Version: 0.1.0
License: Proprietary. All rights reserved.
Text Domain: em-oil
Tags: block-theme, full-site-editing, accessibility-ready
*/

/**
 * Base resets — ported verbatim from designs/index.html lines 14–42. Color,
 * background, font-family/weight and line-height for `body`, plus the
 * heading family/color/line-height, already come from theme.json; only the
 * rules theme.json can't express are repeated here.
 */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
}

body {
	overflow-x: clip;
}

img {
	max-width: 100%;
	display: block;
}

strong {
	font-weight: 500;
}

/* h1–h4 family/color/line-height — the mockup only styles these four levels
   (h5/h6 are left to component-specific rules, e.g. the footer's h4). */
h1,
h2,
h3,
h4 {
	font-family: var(--wp--preset--font-family--heading);
	line-height: 1.15;
	color: var(--wp--preset--color--blue-deep);
}

/* =========================================================
   Masthead — sticky, blurred glass over the page, ported from
   designs/index.html's `header{...}` rule (lines 73–104). The mockup's raw
   nav-links/nav-burger markup is replaced by core's navigation block, so the
   burger + overlay rules below re-target its generated class names instead.
   ========================================================= */
.em-masthead {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid rgba(0, 79, 124, 0.08);
}

/* The blur lives on a ::before layer rather than on `.em-masthead` itself:
   `backdrop-filter` on an element establishes a new containing block for any
   `position: fixed` descendant — which is exactly how core's mobile nav
   overlay is positioned. Put it there and the overlay gets trapped inside
   the masthead's own (short) box instead of covering the viewport. */
.em-masthead::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(253, 254, 254, 0.9);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.em-masthead .wp-block-group {
	min-height: 76px;
}

/* Logo — mirrors the mockup's `.brand img{height:46px}`. */
.em-masthead .wp-block-site-logo img.custom-logo {
	height: 46px;
	width: auto;
}

/* No logo uploaded yet: show the site title in the same spot instead. */
.em-masthead .wp-block-site-title a {
	color: var(--wp--preset--color--blue-deep);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: 1.3rem;
	text-decoration: none;
}

/* Nav links — mirrors `.nav-links a{...}`. */
.em-masthead .wp-block-navigation__container {
	gap: 26px;
}

.em-masthead .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.86rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	color: var(--wp--preset--color--ink);
	padding: 6px 0;
	border-bottom: 2px solid transparent;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.em-masthead .wp-block-navigation-item__content:hover,
.em-masthead .wp-block-navigation-item__content:focus-visible {
	color: var(--wp--preset--color--blue);
}

.em-masthead .wp-block-navigation-item__content[aria-current="page"] {
	color: var(--wp--preset--color--blue);
	border-bottom-color: var(--wp--preset--color--gold);
}

/* Kontakt pill — reuses the plugin's .btn primitive, just sized down to the
   mockup's `.nav-cta .btn{padding:.7em 1.5em;font-size:.86rem}`. */
.em-masthead .nav-cta-btn.wp-block-button {
	margin: 0;
}

.em-masthead .nav-cta-btn .btn {
	padding: 0.7em 1.5em;
	font-size: 0.86rem;
}

/* Burger + overlay — core's toggle/overlay classes standing in for the
   mockup's `.nav-burger`/`.nav-links.open`. The breakpoint (960px) matches
   the mockup's `@media (max-width:960px)` exactly. */
@media (max-width: 960px) {
	.em-masthead .wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: none !important;
	}
	.em-masthead .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex !important;
	}
}

.em-masthead .wp-block-navigation__responsive-container-open {
	background: none;
	border: 0;
	width: 44px;
	height: 40px;
	padding: 8px 10px;
}

.em-masthead .wp-block-navigation__responsive-container-open svg {
	display: none;
}

.em-masthead .wp-block-navigation__responsive-container-open::before {
	content: "";
	display: block;
	width: 24px;
	height: 2px;
	border-radius: 2px;
	background: var(--wp--preset--color--blue-deep);
	box-shadow: 0 7px 0 var(--wp--preset--color--blue-deep), 0 -7px 0 var(--wp--preset--color--blue-deep);
}

.wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--ink);
}

.wp-block-navigation__responsive-container.is-menu-open {
	padding: 8px 24px 16px;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 0;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	width: 100%;
	padding: 13px 0;
	border-bottom: 1px solid rgba(0, 79, 124, 0.08);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content[aria-current="page"] {
	border-bottom-color: var(--wp--preset--color--gold);
}

/* =========================================================
   Footer colophon — ported verbatim from designs/index.html's `footer{...}`
   rules (lines 284–304), scoped under `.em-colophon`.
   ========================================================= */
.em-colophon {
	background: var(--wp--preset--color--ink);
	color: rgba(255, 255, 255, 0.78);
	font-size: 0.95rem;
}

.em-colophon .foot-grid {
	display: grid;
	grid-template-columns: 1.3fr 1fr 1fr 1fr;
	gap: 40px;
	padding: 64px 0 48px;
}

@media (max-width: 900px) {
	.em-colophon .foot-grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 560px) {
	.em-colophon .foot-grid {
		grid-template-columns: 1fr;
	}
}

.em-colophon .foot-brand img {
	height: 56px;
	margin-bottom: 14px;
}

.em-colophon .foot-brand b {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.3rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: #fff;
	display: block;
}

.em-colophon .foot-brand span {
	color: var(--wp--preset--color--gold-soft);
	font-size: 0.9rem;
}

.em-colophon .foot-brand p {
	margin-top: 14px;
	font-size: 0.88rem;
	color: rgba(255, 255, 255, 0.55);
	max-width: 24em;
}

.em-colophon h4 {
	color: #fff;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin-bottom: 16px;
}

.em-colophon ul {
	list-style: none;
	padding: 0;
	margin: 0; /* the h4's 16px margin-bottom sets the gap, not the blockGap */
}

.em-colophon li {
	margin-bottom: 10px;
}

.em-colophon a {
	color: rgba(255, 255, 255, 0.78);
	text-decoration: none;
}

.em-colophon a:hover,
.em-colophon a:focus-visible {
	color: var(--wp--preset--color--gold-soft);
}

.em-colophon .foot-bottom {
	margin-block-start: 0; /* mockup: .foot-grid and .foot-bottom touch */
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	padding: 22px 0;
	display: flex;
	flex-wrap: wrap;
	gap: 12px 28px;
	align-items: center;
	justify-content: space-between;
	font-size: 0.84rem;
	color: rgba(255, 255, 255, 0.55);
}

.em-colophon .foot-bottom a {
	color: var(--wp--preset--color--gold-soft);
}

/* The italic claim reuses the plugin's `.quote-script` primitive; only the
   footer-specific color/size (from the mockup's `.foot-claim`) live here. */
.em-colophon .quote-script {
	font-size: 1rem;
	color: rgba(255, 255, 255, 0.6);
}
