/*
Theme Name: Riehl Law
Theme URI: https://riehllaw.com
Author: Ignitro
Description: Gutenberg theme for Riehl Law. Content is built from ACF-powered blocks in /blocks; shared components (buttons, section headers, tones) live here.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: riehl
*/

:root {
	--color-navy-900: #1b2c3a;
	--color-navy-700: #2c4a6e;
	--color-navy-500: #3d6491;
	--color-slate-400: #7e99b0;
	--color-slate-300: #a8bec9;
	--color-slate-200: #c8d8e2;
	--color-slate-100: #e8eff4;
	--color-mist: #eef2f5;
	--color-divider: #c8d0d7;
	--color-text: #4e6478;
	--color-white: #ffffff;

	--font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--font-serif: "Playfair Display", Georgia, "Times New Roman", serif;

	--container-max: 1280px;
	--container-pad: 32px;
	--section-y: 96px;
}

@media (max-width: 782px) {
	:root {
		--container-pad: 20px;
		--section-y: 64px;
	}
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: 16px;
	line-height: 1.6;
	color: var(--color-text);
	background: var(--color-mist);
	-webkit-font-smoothing: antialiased;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.riehl-main {
	flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0;
	font-family: var(--font-serif);
	font-weight: 700;
	color: var(--color-navy-900);
}

p {
	margin: 0;
}

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

a {
	color: var(--color-navy-700);
}

.riehl-icon {
	flex-shrink: 0;
	display: block;
}

.riehl-container {
	width: 100%;
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--container-pad);
}

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

.skip-link:focus {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 1000;
	width: auto;
	height: auto;
	clip: auto;
	padding: 8px 16px;
	background: var(--color-white);
	color: var(--color-navy-900);
}

:focus-visible {
	outline: 2px solid var(--color-slate-300);
	outline-offset: 2px;
}

/* ==========================================================================
   Section tones — set on each block section. Blocks read these variables
   instead of hard-coding colors, so any block can sit on any background.
   ========================================================================== */

.riehl-section {
	padding-block: var(--section-y);
	background: var(--tone-bg);
	color: var(--tone-text);
}

.riehl-section--light {
	--tone-bg: var(--color-mist);
	--tone-heading: var(--color-navy-900);
	--tone-eyebrow: var(--color-navy-500);
	--tone-text: var(--color-text);
	--tone-divider: var(--color-divider);
	--tone-link: var(--color-navy-700);
	--button-solid-bg: var(--color-navy-700);
	--button-outline-border: rgba(44, 74, 110, 0.35);
	--button-outline-text: var(--color-navy-700);
}

.riehl-section--white {
	--tone-bg: var(--color-white);
	--tone-heading: var(--color-navy-900);
	--tone-eyebrow: var(--color-navy-500);
	--tone-text: var(--color-text);
	--tone-divider: var(--color-divider);
	--tone-link: var(--color-navy-700);
	--button-solid-bg: var(--color-navy-700);
	--button-outline-border: rgba(44, 74, 110, 0.35);
	--button-outline-text: var(--color-navy-700);
}

.riehl-section--dark {
	--tone-bg: var(--color-navy-900);
	--tone-heading: var(--color-slate-100);
	--tone-eyebrow: var(--color-slate-400);
	--tone-text: #5b7a8d;
	--tone-divider: rgba(255, 255, 255, 0.12);
	--tone-link: var(--color-slate-200);
	--button-solid-bg: var(--color-navy-700);
	--button-outline-border: rgba(126, 153, 176, 0.33);
	--button-outline-text: var(--color-slate-200);
}

.riehl-section--primary {
	--tone-bg: var(--color-navy-700);
	--tone-heading: var(--color-white);
	--tone-eyebrow: var(--color-slate-300);
	--tone-text: var(--color-slate-300);
	--tone-divider: rgba(255, 255, 255, 0.12);
	--tone-link: var(--color-white);
	--button-solid-bg: var(--color-navy-900);
	--button-outline-border: rgba(255, 255, 255, 0.3);
	--button-outline-text: var(--color-white);
}

/* ==========================================================================
   Shared components
   ========================================================================== */

.riehl-eyebrow {
	font-size: 11.2px;
	line-height: 16.8px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--tone-eyebrow);
}

.riehl-rule {
	display: block;
	width: 48px;
	height: 1px;
	background: var(--color-slate-400);
}

/* Section header: eyebrow + H2 (+ rule, + optional link when left-aligned) */
.riehl-section-header {
	display: flex;
}

.riehl-section-header__heading {
	margin-top: 12px;
	font-size: clamp(28px, 3.5vw, 35px);
	line-height: 1.2;
	color: var(--tone-heading);
}

.riehl-section-header--center {
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.riehl-section-header--center .riehl-section-header__heading {
	line-height: 1.5;
}

.riehl-section-header--center .riehl-section-header__rule {
	width: 48px;
	height: 1px;
	margin-top: 20px;
	background: var(--color-slate-400);
}

.riehl-section-header--left {
	align-items: flex-end;
	justify-content: space-between;
	gap: 32px;
}

.riehl-section-header--left .riehl-section-header__rule {
	flex: 0 1 200px;
	height: 1px;
	margin-bottom: 12px;
	background: var(--tone-divider);
}

.riehl-section-header--left .riehl-text-link {
	padding-bottom: 12px;
}

@media (max-width: 782px) {
	.riehl-section-header--left {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}

	.riehl-section-header--left .riehl-section-header__rule {
		display: none;
	}

	.riehl-section-header--left .riehl-text-link {
		padding-bottom: 0;
	}
}

.riehl-text-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 500;
	line-height: 21px;
	color: var(--tone-link);
	text-decoration: none;
	white-space: nowrap;
}

.riehl-text-link:hover {
	text-decoration: underline;
}

/* Buttons */
.riehl-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.riehl-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 15px 32px;
	border: 1px solid transparent;
	font-size: 16px;
	font-weight: 600;
	line-height: 24px;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.riehl-button--solid {
	background: var(--button-solid-bg);
	color: var(--color-white);
}

.riehl-button--solid:hover {
	background: color-mix(in srgb, var(--button-solid-bg) 85%, #ffffff);
}

.riehl-button--outline {
	border-color: var(--button-outline-border);
	color: var(--button-outline-text);
}

.riehl-button--outline:hover {
	border-color: currentColor;
}

/* Icon tile used by cards and highlights */
.riehl-icon-tile {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	background: rgba(44, 74, 110, 0.06);
	border: 1px solid rgba(44, 74, 110, 0.14);
	color: var(--color-navy-700);
}

.riehl-block-placeholder {
	padding: 24px;
	font-style: italic;
	color: #757575;
	background: #f0f0f0;
	text-align: center;
}

/* ==========================================================================
   Header
   ========================================================================== */

.riehl-header {
	position: relative;
	z-index: 50;
}

.riehl-topbar {
	background: var(--color-navy-900);
	font-size: 13px;
	line-height: 19.5px;
}

.riehl-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-block: 8px;
	padding-inline: 24px;
}

.riehl-topbar__text {
	color: rgba(255, 255, 255, 0.45);
}

.riehl-topbar__phone {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 500;
	line-height: 21px;
	color: var(--color-white);
	text-decoration: none;
	white-space: nowrap;
}

.riehl-nav {
	background: var(--color-navy-700);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.riehl-nav__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-block: 16px;
	padding-inline: 24px;
}

.riehl-brand {
	display: flex;
	flex-direction: column;
	color: var(--color-white);
	text-decoration: none;
}

.riehl-brand__name {
	font-family: var(--font-serif);
	font-size: 24px;
	font-weight: 700;
	line-height: 26.4px;
	white-space: nowrap;
}

.riehl-brand__tagline {
	margin-top: 2px;
	font-size: 9.6px;
	line-height: 14.4px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	opacity: 0.7;
}

.riehl-nav__menu {
	display: flex;
	align-items: center;
	flex: 1;
	justify-content: space-between;
	gap: 28px;
}

.riehl-header__menu-list {
	display: flex;
	align-items: center;
	gap: 28px;
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.riehl-header__menu-list a {
	display: block;
	padding-bottom: 2px;
	border-bottom: 1px solid transparent;
	font-size: 14px;
	line-height: 21px;
	letter-spacing: 0.02em;
	color: rgba(255, 255, 255, 0.6);
	text-decoration: none;
	transition: color 0.2s ease;
}

.riehl-header__menu-list a:hover {
	color: var(--color-white);
}

.riehl-header__menu-list .current-menu-item > a,
.riehl-header__menu-list .current_page_item > a,
.riehl-header__menu-list .current-menu-ancestor > a {
	font-weight: 600;
	color: var(--color-white);
	border-bottom-color: rgba(255, 255, 255, 0.5);
}

.riehl-nav__cta {
	padding: 10px 20px;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.2);
	font-size: 14px;
	font-weight: 600;
	line-height: 21px;
	color: var(--color-white);
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s ease;
}

.riehl-nav__cta:hover {
	background: rgba(255, 255, 255, 0.2);
}

.riehl-nav__toggle {
	display: none;
	padding: 4px;
	background: none;
	border: 0;
	color: var(--color-white);
	cursor: pointer;
}

.riehl-nav__toggle-close {
	display: none;
}

.riehl-nav__toggle[aria-expanded="true"] .riehl-nav__toggle-open {
	display: none;
}

.riehl-nav__toggle[aria-expanded="true"] .riehl-nav__toggle-close {
	display: block;
}

@media (max-width: 960px) {
	.riehl-nav__toggle {
		display: block;
	}

	.riehl-nav__menu {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 24px;
		padding: 24px;
		background: var(--color-navy-700);
		border-top: 1px solid rgba(255, 255, 255, 0.08);
	}

	.riehl-nav__menu.is-open {
		display: flex;
	}

	.riehl-header__menu-list {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
		margin: 0;
	}

	.riehl-header__menu-list a {
		font-size: 16px;
	}

	.riehl-nav__cta {
		text-align: center;
	}
}

@media (max-width: 600px) {
	.riehl-topbar__text {
		display: none;
	}

	.riehl-topbar__inner {
		justify-content: flex-end;
	}
}

/* ==========================================================================
   Footer
   ========================================================================== */

.riehl-footer {
	padding-block: 64px;
	background: var(--color-navy-900);
	font-size: 14px;
	line-height: 21px;
	color: rgba(255, 255, 255, 0.35);
}

.riehl-footer .riehl-container {
	padding-inline: 24px;
}

.riehl-footer a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.riehl-footer a:hover {
	color: var(--color-white);
}

.riehl-footer__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 48px;
}

.riehl-footer__name {
	font-family: var(--font-serif);
	font-size: 22px;
	font-weight: 700;
	line-height: 33px;
	color: var(--color-white);
}

.riehl-footer__description {
	margin-top: 12px;
	line-height: 23.8px;
}

.riehl-footer__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
}

.riehl-footer__meta .riehl-icon {
	color: var(--color-slate-400);
}

.riehl-footer__meta--address {
	margin-top: 16px;
}

.riehl-footer__heading {
	font-family: var(--font-sans);
	font-size: 10.4px;
	font-weight: 500;
	line-height: 15.6px;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--color-slate-400);
}

.riehl-footer__links {
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
}

.riehl-footer__links li {
	padding-top: 8px;
}

.riehl-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 24px;
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid rgba(255, 255, 255, 0.07);
	font-size: 13px;
	line-height: 19.5px;
	color: rgba(255, 255, 255, 0.25);
}

@media (max-width: 782px) {
	.riehl-footer__grid {
		grid-template-columns: 1fr;
		gap: 40px;
	}
}

@media (min-width: 783px) and (max-width: 1024px) {
	.riehl-footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.riehl-footer__about {
		grid-column: 1 / -1;
	}
}

/* ==========================================================================
   Content (core blocks on posts / fallback templates)
   ========================================================================== */

.riehl-main > :where(:not(.riehl-block):not(.alignfull):not(.alignwide)) {
	max-width: 800px;
	margin-inline: auto;
	padding-inline: var(--container-pad);
}

.riehl-archive,
.riehl-404 {
	padding-block: var(--section-y);
}

/* Block editor: sections butt up against each other like on the frontend. */
.wp-block[data-type^="riehl/"] {
	margin-block: 0;
}
