/*
Theme Name: Teleagenten
Theme URI: https://teleagenten.se
Author: Teleagenten i Örebro AB
Author URI: https://teleagenten.se
Description: Premium custom theme for Teleagenten.se — modern kommunikation och säkerhet för svenska arbetsplatser. Scandinavian minimalism, high contrast, fast performance.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
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: teleagenten
Tags: custom-colors, custom-menu, custom-logo, featured-images, full-width-template, sticky-post, thread-comments, translation-ready
*/

/* ============================================================
   Teleagenten — Main Stylesheet
   Premium Scandinavian minimalism
   ============================================================ */

/* ------------------------------------------------------------
   1. Design Tokens (CSS Custom Properties)
   ------------------------------------------------------------ */
:root {
	/* Colors */
	--color-charcoal: #1A1A1A;
	--color-offwhite: #FAFAF7;
	--color-white: #FFFFFF;
	--color-ocean: #1E5B8C;
	--color-navy: #0F2A3D;
	--color-orange: #E8542D;
	--color-sky: #3D8BBF;
	--color-sand: #F0EEEB;
	--color-border: rgba(26, 26, 26, 0.08);
	--color-border-strong: rgba(26, 26, 26, 0.15);
	--color-muted: rgba(26, 26, 26, 0.65);
	--color-light-muted: rgba(255, 255, 255, 0.7);

	/* Typography */
	--font-display: "Clash Display", "Space Grotesk", -apple-system, sans-serif;
	--font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-mono: "JetBrains Mono", monospace;

	/* Layout */
	--container: 1280px;
	--gutter: 1.5rem;
	--section-pad: clamp(4rem, 10vw, 8rem);
	--radius: 16px;
	--radius-sm: 10px;
	--radius-pill: 999px;

	/* Motion */
	--ease: cubic-bezier(0.16, 1, 0.3, 1);
	--speed: 250ms;

	/* Shadows */
	--shadow-sm: 0 2px 8px rgba(15, 42, 61, 0.06);
	--shadow-md: 0 12px 24px rgba(15, 42, 61, 0.08);
	--shadow-lg: 0 24px 48px rgba(15, 42, 61, 0.10);
}

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

* {
	margin: 0;
}

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

body {
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.6;
	letter-spacing: 0.01em;
	color: var(--color-charcoal);
	background-color: var(--color-offwhite);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

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

input, button, textarea, select {
	font: inherit;
	color: inherit;
}

a {
	color: var(--color-ocean);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

ul[class], ol[class] {
	list-style: none;
	padding: 0;
}

/* ------------------------------------------------------------
   3. Typography
   ------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	font-weight: 500;
	letter-spacing: -0.02em;
	line-height: 1.1;
	text-wrap: balance;
}

.eyebrow {
	font-family: var(--font-body);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-ocean);
	margin-bottom: 1rem;
}

.eyebrow--light {
	color: var(--color-sky);
}

.section-title {
	font-size: clamp(2rem, 4vw, 3rem);
	margin-bottom: 1rem;
	max-width: 22ch;
}

.section-lead {
	font-size: 1.125rem;
	color: var(--color-muted);
	max-width: 60ch;
}

.section-head {
	max-width: 720px;
	margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head--center {
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

.section-head--center .section-lead {
	margin-left: auto;
	margin-right: auto;
}

/* ------------------------------------------------------------
   4. Layout
   ------------------------------------------------------------ */
.container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.section {
	padding-block: var(--section-pad);
	position: relative;
}

.section--white { background-color: var(--color-white); }
.section--sand  { background-color: var(--color-sand); }
.section--navy  { background-color: var(--color-navy); color: var(--color-white); }

.section--navy .section-lead,
.section--navy p:not(.eyebrow) { color: var(--color-light-muted); }
.section--navy .section-title { color: var(--color-white); }

.section-more {
	margin-top: clamp(2.5rem, 5vw, 4rem);
	text-align: center;
}

.screen-reader-text {
	position: absolute;
	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;
	z-index: 1000;
}

.skip-link:focus {
	left: 1rem;
	top: 1rem;
	background: var(--color-white);
	padding: 0.75rem 1.25rem;
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-lg);
}

/* ------------------------------------------------------------
   5. Buttons
   ------------------------------------------------------------ */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.875rem 1.75rem;
	border-radius: var(--radius-pill);
	font-weight: 500;
	font-family: var(--font-body);
	font-size: 1rem;
	cursor: pointer;
	border: 1px solid transparent;
	transition:
		background-color var(--speed) var(--ease),
		color var(--speed) var(--ease),
		transform var(--speed) var(--ease),
		box-shadow var(--speed) var(--ease),
		border-color var(--speed) var(--ease);
	text-decoration: none;
	white-space: nowrap;
}

.btn:hover { text-decoration: none; }

.btn--primary {
	background-color: var(--color-orange);
	color: var(--color-white);
}

.btn--primary:hover {
	background-color: #D3421F;
	transform: translateY(-2px);
	box-shadow: 0 12px 24px rgba(232, 84, 45, 0.30);
}

.btn--secondary {
	background-color: transparent;
	border-color: var(--color-charcoal);
	color: var(--color-charcoal);
}

.btn--secondary:hover {
	background-color: var(--color-charcoal);
	color: var(--color-white);
	transform: translateY(-2px);
}

.btn--sm {
	padding: 0.625rem 1.25rem;
	font-size: 0.875rem;
}

.btn--lg {
	padding: 1rem 2rem;
	font-size: 1.0625rem;
}

.btn--block {
	width: 100%;
}

/* Text link */
.text-link {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	font-weight: 500;
	color: var(--color-ocean);
	position: relative;
	text-decoration: none;
	padding-bottom: 2px;
	transition: gap var(--speed) var(--ease);
}

.text-link::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 2px;
	background-color: var(--color-orange);
	transition: width var(--speed) var(--ease);
}

.text-link:hover {
	gap: 0.625rem;
	text-decoration: none;
}

.text-link:hover::after {
	width: 100%;
}

/* ------------------------------------------------------------
   6. Icon chip
   ------------------------------------------------------------ */
.icon-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background-color: rgba(30, 91, 140, 0.10);
	color: var(--color-ocean);
	flex-shrink: 0;
	transition: background-color var(--speed) var(--ease), color var(--speed) var(--ease), transform var(--speed) var(--ease);
}

.icon {
	transition: transform var(--speed) var(--ease);
}

/* ------------------------------------------------------------
   7. Header
   ------------------------------------------------------------ */
.site-header {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	padding-block: 1.5rem;
	transition: padding var(--speed) var(--ease), background-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

.site-header.is-scrolled {
	padding-block: 0.75rem;
	background-color: rgba(250, 250, 247, 0.92);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	box-shadow: 0 1px 0 var(--color-border);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}

.site-branding img {
	max-height: 48px;
	width: auto;
}

.site-branding__link {
	text-decoration: none;
}

/* Navigation */
.menu-toggle {
	display: none;
	background: none;
	border: 0;
	cursor: pointer;
	flex-direction: column;
	gap: 5px;
	align-items: center;
}

.primary-menu {
	display: flex;
	align-items: center;
	gap: 2rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.primary-menu a {
	color: var(--color-charcoal);
	font-weight: 500;
	text-decoration: none;
	position: relative;
	padding-block: 0.5rem;
}

.primary-menu a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 0;
	height: 2px;
	background-color: var(--color-orange);
	transition: width var(--speed) var(--ease);
}

.primary-menu a:hover {
	text-decoration: none;
}

.primary-menu a:hover::after,
.primary-menu .current-menu-item > a::after {
	width: 100%;
}

.site-header__cta .btn {
	display: none;
}

@media (min-width: 1024px) {
	.site-header__cta .btn {
		display: inline-flex;
	}
}

/* ------------------------------------------------------------
   8. Hero
   ------------------------------------------------------------ */
.hero {
	position: relative;
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	align-items: center;
	overflow: hidden;
	background-color: var(--color-offwhite);
	padding-top: 6rem;
	padding-bottom: 4rem;
}

.hero__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

.hero__canvas {
	width: 100%;
	height: 100%;
}

.hero__content {
	position: relative;
	z-index: 1;
	max-width: 920px;
}

.hero__title {
	font-size: clamp(3rem, 8vw, 6rem);
	line-height: 1.02;
	letter-spacing: -0.03em;
	margin-bottom: 1.5rem;
	max-width: 18ch;
}

.hero__subtitle {
	font-size: clamp(1.125rem, 2.5vw, 1.5rem);
	line-height: 1.5;
	color: var(--color-muted);
	max-width: 52ch;
	margin-bottom: 2.5rem;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.hero__scroll {
	position: absolute;
	bottom: 2rem;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	z-index: 1;
}

.hero__scroll-label {
	font-size: 0.7rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--color-muted);
}

.hero__scroll-line {
	width: 1px;
	height: 48px;
	background: linear-gradient(to bottom, var(--color-ocean), transparent);
	animation: scrollPulse 2s var(--ease) infinite;
}

@keyframes scrollPulse {
	0% { transform: scaleY(0); transform-origin: top; }
	50% { transform: scaleY(1); transform-origin: top; }
	51% { transform-origin: bottom; }
	100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ------------------------------------------------------------
   9. Value Proposition
   ------------------------------------------------------------ */
.value-prop__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1.5rem;
}

.value-card {
	background-color: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 2rem;
	transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.value-card:hover {
	transform: translateY(-6px);
	box-shadow: var(--shadow-lg);
	border-color: rgba(30, 91, 140, 0.25);
}

.value-card:hover .icon-chip {
	background-color: var(--color-ocean);
	color: var(--color-white);
	transform: scale(1.05);
}

.value-card__icon {
	margin-bottom: 1.5rem;
}

.value-card__title {
	font-size: 1.25rem;
	margin-bottom: 0.75rem;
}

.value-card__text {
	color: var(--color-muted);
	font-size: 0.95rem;
}

/* ------------------------------------------------------------
   10. About
   ------------------------------------------------------------ */
.about__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 3rem;
	align-items: center;
}

@media (min-width: 960px) {
	.about__grid {
		grid-template-columns: 1fr 1fr;
		gap: 5rem;
	}
}

.about__media {
	position: relative;
}

.about__image {
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-lg);
	aspect-ratio: 4 / 3;
	background: linear-gradient(135deg, var(--color-navy), var(--color-ocean));
}

.about__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.about__placeholder--network {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem;
}

.node-network {
	width: 100%;
	max-width: 520px;
	height: auto;
}

.nn-nodes circle {
	animation: nodePulse 4s var(--ease) infinite;
}

.nn-nodes circle:nth-child(2) { animation-delay: 0.5s; }
.nn-nodes circle:nth-child(3) { animation-delay: 1s; }
.nn-nodes circle:nth-child(4) { animation-delay: 1.5s; }
.nn-nodes circle:nth-child(5) { animation-delay: 2s; }

@keyframes nodePulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.4; }
}

.about__list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin: 1.5rem 0 2.5rem;
}

.about__item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 1.0625rem;
}

.about__item-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background-color: rgba(46, 125, 91, 0.12);
	color: var(--color-success, #2E7D5B);
	flex-shrink: 0;
}

/* ------------------------------------------------------------
   11. Services
   ------------------------------------------------------------ */
.services__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1.5rem;
}

.service-card {
	background-color: var(--color-sand);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	overflow: hidden;
	transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

.service-card:hover {
	transform: translateY(-6px);
	box-shadow: var(--shadow-lg);
}

.service-card__thumb img {
	width: 100%;
	height: 200px;
	object-fit: cover;
}

.service-card__body {
	padding: 2rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	align-items: flex-start;
}

.service-card__icon {
	margin-bottom: 0.25rem;
}

.service-card:hover .icon-chip {
	background-color: var(--color-ocean);
	color: var(--color-white);
}

.service-card__title {
	font-size: 1.375rem;
}

.service-card__text {
	color: var(--color-muted);
	font-size: 0.95rem;
	margin-bottom: 0.5rem;
}

.service-card .text-link {
	margin-top: auto;
}

/* ------------------------------------------------------------
   12. Cases
   ------------------------------------------------------------ */
.cases__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1.5rem;
}

.case-card {
	background-color: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	overflow: hidden;
	transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

.case-card:hover {
	transform: translateY(-6px);
	box-shadow: var(--shadow-lg);
}

.case-card__link {
	text-decoration: none;
	color: inherit;
	display: block;
}

.case-card__link:hover {
	text-decoration: none;
}

.case-card__media {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: linear-gradient(135deg, var(--color-navy), var(--color-sky));
}

.case-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 600ms var(--ease);
}

.case-card:hover .case-card__media img {
	transform: scale(1.05);
}

.case-card__placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255, 255, 255, 0.7);
}

.case-card__body {
	padding: 2rem;
}

.case-card__tag {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-ocean);
	background: rgba(30, 91, 140, 0.10);
	padding: 0.25rem 0.75rem;
	border-radius: var(--radius-pill);
	margin-bottom: 0.75rem;
}

.case-card__title {
	font-size: 1.375rem;
	margin-bottom: 0.5rem;
}

.case-card__text {
	color: var(--color-muted);
	font-size: 0.95rem;
	margin-bottom: 1rem;
}

.cases__fallback {
	max-width: 420px;
}

/* ------------------------------------------------------------
   13. Contact
   ------------------------------------------------------------ */
.contact__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 3rem;
}

@media (min-width: 960px) {
	.contact__grid {
		grid-template-columns: 1fr 1.2fr;
		gap: 5rem;
	}
}

.contact__methods {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	margin-top: 2rem;
}

.contact__method {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.contact__method a {
	color: var(--color-white);
	font-size: 1.125rem;
	position: relative;
	padding-bottom: 2px;
}

.contact__method a::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 1px;
	background-color: var(--color-orange);
	transition: width var(--speed) var(--ease);
}

.contact__method a:hover {
	text-decoration: none;
}

.contact__method a:hover::after {
	width: 100%;
}

.contact__method-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background-color: rgba(61, 139, 191, 0.15);
	color: var(--color-sky);
	flex-shrink: 0;
}

/* Contact form */
.contact__form {
	background-color: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.10);
	border-radius: var(--radius);
	padding: 2rem;
}

.contact-form {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.contact-form__field {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.contact-form__label {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--color-light-muted);
}

.contact-form__input {
	padding: 0.875rem 1rem;
	border-radius: var(--radius-sm);
	border: 1px solid rgba(255, 255, 255, 0.15);
	background-color: rgba(255, 255, 255, 0.06);
	color: var(--color-white);
	transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease), background-color var(--speed) var(--ease);
}

.contact-form__input::placeholder {
	color: rgba(255, 255, 255, 0.4);
}

.contact-form__input:focus {
	outline: none;
	border-color: var(--color-sky);
	box-shadow: 0 0 0 3px rgba(61, 139, 191, 0.2);
	background-color: rgba(255, 255, 255, 0.10);
}

.contact-form__input--textarea {
	resize: vertical;
	min-height: 120px;
}

.contact-form__status {
	display: none;
	font-size: 0.875rem;
	padding: 0.75rem 1rem;
	border-radius: var(--radius-sm);
}

.contact-form__status.is-visible {
	display: block;
}

.contact-form__status.is-error {
	background-color: rgba(192, 57, 43, 0.15);
	color: #FF8A7A;
	border: 1px solid rgba(192, 57, 43, 0.4);
}

.contact-form__status.is-success {
	background-color: rgba(46, 125, 91, 0.15);
	color: #7DD3A8;
	border: 1px solid rgba(46, 125, 91, 0.4);
}

/* ------------------------------------------------------------
   14. Map
   ------------------------------------------------------------ */
.map__frame {
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-lg);
	aspect-ratio: 21 / 9;
	max-height: 480px;
	background-color: var(--color-navy);
}

.map__frame iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

/* ------------------------------------------------------------
   15. Footer
   ------------------------------------------------------------ */
.site-footer {
	background-color: var(--color-charcoal);
	color: rgba(255, 255, 255, 0.7);
	padding-block: 4rem 2rem;
}

.site-footer__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2.5rem;
	margin-bottom: 3rem;
}

@media (min-width: 768px) {
	.site-footer__grid {
		grid-template-columns: 2fr 1fr 1fr;
	}
}

.site-footer__logo {
	color: var(--color-white);
	font-size: 1.5rem;
	margin-bottom: 0.75rem;
}

.site-footer__brand img {
	max-height: 44px;
	width: auto;
	margin-bottom: 1rem;
	filter: brightness(0) invert(1);
}

.site-footer__tagline {
	max-width: 36ch;
	font-size: 0.95rem;
}

.site-footer__heading {
	color: var(--color-white);
	font-size: 1rem;
	margin-bottom: 1.25rem;
}

.site-footer__menu {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.site-footer__menu a {
	color: rgba(255, 255, 255, 0.7);
	transition: color var(--speed) var(--ease), padding-left var(--speed) var(--ease);
}

.site-footer__menu a:hover {
	color: var(--color-white);
	padding-left: 0.25rem;
	text-decoration: none;
}

.site-footer__contact {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.site-footer__contact li {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.site-footer__contact a {
	color: rgba(255, 255, 255, 0.7);
}

.site-footer__contact a:hover {
	color: var(--color-white);
}

.site-footer__icon {
	color: var(--color-orange);
	flex-shrink: 0;
}

.site-footer__bottom {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	justify-content: space-between;
	align-items: flex-start;
	padding-top: 2rem;
	border-top: 1px solid rgba(255, 255, 255, 0.10);
	font-size: 0.875rem;
}

@media (min-width: 768px) {
	.site-footer__bottom {
		flex-direction: row;
		align-items: center;
	}
}

.site-footer__legal {
	display: flex;
	gap: 1.5rem;
}

.site-footer__legal a {
	color: rgba(255, 255, 255, 0.7);
}

.site-footer__legal a:hover {
	color: var(--color-white);
}

/* ------------------------------------------------------------
   16. Reveal animations
   ------------------------------------------------------------ */
.reveal {
	opacity: 0;
	transform: translateY(20px);
	transition:
		opacity 700ms var(--ease),
		transform 700ms var(--ease);
	transition-delay: calc(var(--reveal-delay, 0) * 100ms);
}

.reveal.is-visible {
	opacity: 1;
	transform: none;
}

.reveal-group > * {
	opacity: 0;
	transform: translateY(20px);
	transition:
		opacity 600ms var(--ease),
		transform 600ms var(--ease);
}

.reveal-group.is-visible > * {
	opacity: 1;
	transform: none;
}

.reveal-group > *:nth-child(2) { transition-delay: 80ms; }
.reveal-group > *:nth-child(3) { transition-delay: 160ms; }
.reveal-group > *:nth-child(4) { transition-delay: 240ms; }
.reveal-group > *:nth-child(5) { transition-delay: 320ms; }
.reveal-group > *:nth-child(6) { transition-delay: 400ms; }

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

	html {
		scroll-behavior: auto;
	}

	.reveal, .reveal-group > * {
		opacity: 1;
		transform: none;
	}
}

/* ------------------------------------------------------------
   17. Page / Archive templates
   ------------------------------------------------------------ */
.page-main,
.archive-main {
	padding-top: 8rem;
	padding-bottom: var(--section-pad);
}

.page-head {
	background-color: var(--color-offwhite);
	padding-top: 8rem;
	padding-bottom: 4rem;
	border-bottom: 1px solid var(--color-border);
}

.page-head__title {
	font-size: clamp(2.5rem, 5vw, 4rem);
}

.page-head__lead {
	font-size: 1.125rem;
	color: var(--color-muted);
	max-width: 60ch;
	margin-top: 1rem;
}

/* Content blocks */
.entry-content {
	display: grid;
	gap: 1.5rem;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: var(--gutter);
	padding-block: var(--section-pad);
}

.entry-content > * {
	max-width: 720px;
	margin-inline: auto;
}

.entry-content h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); margin-top: 2rem; }
.entry-content h3 { font-size: 1.375rem; margin-top: 1.5rem; }
.entry-content p { color: var(--color-muted); }

.entry-content .alignwide,
.entry-content .alignfull {
	max-width: none;
}

.entry-content .alignfull {
	margin-inline: calc(-1 * var(--gutter));
}

.entry-content img {
	border-radius: var(--radius);
}

/* ------------------------------------------------------------
   18. WordPress core alignment & utilities
   ------------------------------------------------------------ */
.wp-caption { max-width: 100%; }
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { margin-inline: auto; }

.gallery { display: flex; flex-wrap: wrap; gap: 1rem; }
.gallery-item { flex: 0 0 calc(33.333% - 0.667rem); }

/* Sticky */
.sticky { position: relative; }

/* Blog grid/cards (index/blog archives) */
.blog-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1.5rem;
}

.blog-card {
	background-color: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	overflow: hidden;
	transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

.blog-card:hover {
	transform: translateY(-6px);
	box-shadow: var(--shadow-lg);
}

.blog-card__link {
	color: inherit;
	display: block;
}

.blog-card__link:hover { text-decoration: none; }

.blog-card__media {
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.blog-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 600ms var(--ease);
}

.blog-card:hover .blog-card__media img {
	transform: scale(1.05);
}

.blog-card__body {
	padding: 2rem;
}

.blog-card .posted-on {
	display: block;
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-ocean);
	margin-bottom: 0.75rem;
}

.blog-card__title {
	font-size: 1.375rem;
	margin-bottom: 0.5rem;
}

.blog-card__text {
	color: var(--color-muted);
	font-size: 0.95rem;
	margin-bottom: 1rem;
}

.archive-empty {
	padding: 3rem;
	text-align: center;
	color: var(--color-muted);
	background: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
}

/* Pagination */
.pagination {
	margin-top: 3rem;
	display: flex;
	justify-content: center;
}

.pagination .nav-links {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	flex-wrap: wrap;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 0.75rem;
	border-radius: var(--radius-sm);
	border: 1px solid var(--color-border-strong);
	color: var(--color-charcoal);
	font-weight: 500;
	transition: background-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
	background-color: var(--color-charcoal);
	color: var(--color-white);
	text-decoration: none;
}

/* Featured image on single/entry */
.entry-featured {
	grid-column: 1 / -1;
	max-width: 1280px;
	margin-inline: auto;
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-lg);
}

.entry-featured img {
	width: 100%;
	height: auto;
}

/* ------------------------------------------------------------
   19. Mobile responsive
   ------------------------------------------------------------ */
@media (max-width: 1023px) {
	.menu-toggle {
		display: inline-flex;
	}

	.site-navigation {
		order: 3;
	}

	.menu-toggle {
		display: flex;
	}

	.menu-toggle__icon {
		display: block;
		width: 22px;
		height: 2px;
		background: var(--color-charcoal);
		position: relative;
		transition: background 0s 0.3s;
	}

	.menu-toggle__icon::before,
	.menu-toggle__icon::after {
		content: "";
		position: absolute;
		left: 0;
		width: 22px;
		height: 2px;
		background: var(--color-charcoal);
		transition: transform var(--speed) var(--ease);
	}

	.menu-toggle__icon::before { top: -7px; }
	.menu-toggle__icon::after { top: 7px; }

	.site-navigation {
		position: fixed;
		inset: 0;
		background-color: var(--color-offwhite);
		z-index: 200;
		display: flex;
		align-items: center;
		justify-content: center;
		transform: translateX(100%);
		transition: transform 400ms var(--ease);
	}

	.site-navigation.is-open {
		transform: none;
	}

	.primary-menu {
		flex-direction: column;
		gap: 2rem;
		text-align: center;
	}

	.primary-menu a {
		font-size: 1.75rem;
		font-family: var(--font-display);
	}

	.site-header__cta {
		order: 2;
	}
}
