/*
Theme Name: RMT Security
Theme URI: https://rmtsecurityhawaii.com
Author: Lone Star Technology Group
Author URI: https://lstg.io
Description: Custom theme for RMT Enterprises - Security Division, a family-owned security company serving all of Hawaiʻi Island since 1999. Trust-forward, place-rooted, fast.
Version: 1.2.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
Text Domain: rmt-security
Tags: security, custom, hawaii
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */

:root {
	--rmt-black: #0d1117;
	--rmt-navy: #1a2942;
	--rmt-navy-700: #243556;
	--rmt-navy-800: #15213a;
	--rmt-gold: #d4a017;
	--rmt-gold-700: #9a7210;
	--rmt-ivory: #f5f1e8;
	--rmt-ivory-700: #ebe5d6;
	--rmt-kapa: #fffdf8;
	--rmt-stone: #4a5366;
	--rmt-line: rgba(26, 41, 66, 0.14);
	--rmt-line-dark: rgba(245, 241, 232, 0.16);
	--rmt-on-dark: #f5f1e8;
	--rmt-on-dark-muted: rgba(245, 241, 232, 0.78);

	--rmt-font-display: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--rmt-font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

	--rmt-fs-xs: 0.8125rem;
	--rmt-fs-sm: 0.9375rem;
	--rmt-fs-md: 1.0625rem;
	--rmt-fs-lg: 1.25rem;
	--rmt-fs-xl: 1.5rem;
	--rmt-fs-2xl: clamp(1.75rem, 1.25rem + 1.8vw, 2.25rem);
	--rmt-fs-3xl: clamp(2rem, 1.4rem + 2.6vw, 2.75rem);
	--rmt-fs-4xl: clamp(2.5rem, 1.6rem + 3.6vw, 3.5rem);
	--rmt-fs-5xl: clamp(2.75rem, 1.5rem + 5vw, 4.5rem);

	--rmt-container: 1180px;
	--rmt-measure: 68ch;
	--rmt-gutter: 1.25rem;
	--rmt-section: clamp(4rem, 9vw, 7.5rem);
	--rmt-radius: 3px;
	--rmt-shadow: 0 10px 30px rgba(13, 17, 23, 0.08);
	--rmt-ease: 180ms ease-out;
	--rmt-header-h: 72px;
	--rmt-callbar-h: 68px;
}

@media (min-width: 720px) {
	:root {
		--rmt-gutter: 2rem;
	}
}

/* ==========================================================================
   2. Reset and base
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--rmt-header-h) + 1rem);
}

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

body {
	margin: 0;
	font-family: var(--rmt-font-body);
	font-size: var(--rmt-fs-md);
	line-height: 1.65;
	color: var(--rmt-navy);
	background: var(--rmt-ivory);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

@media (max-width: 719px) {
	body {
		padding-bottom: var(--rmt-callbar-h);
	}
}

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

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

/* ==========================================================================
   3. Typography
   ========================================================================== */

h1,
h2,
h3,
h4 {
	font-family: var(--rmt-font-display);
	font-weight: 800;
	line-height: 1.1;
	color: var(--rmt-navy);
	margin: 0 0 0.5em;
	letter-spacing: -0.015em;
	text-wrap: balance;
}

h1 {
	font-size: var(--rmt-fs-4xl);
	letter-spacing: -0.03em;
	font-stretch: 112%;
}

h2 {
	font-size: var(--rmt-fs-2xl);
	letter-spacing: -0.02em;
	font-stretch: 106%;
}

h3 {
	font-size: var(--rmt-fs-lg);
	font-weight: 700;
	line-height: 1.25;
}

h4 {
	font-size: var(--rmt-fs-md);
	font-weight: 700;
}

p {
	margin: 0 0 1em;
}

a {
	color: var(--rmt-navy);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
	transition: color var(--rmt-ease);
}

a:hover {
	color: var(--rmt-gold-700);
}

ul,
ol {
	padding-left: 1.25rem;
}

hr {
	border: 0;
	border-top: 1px solid var(--rmt-line);
	margin: 2rem 0;
}

strong {
	font-weight: 600;
}

small {
	font-size: var(--rmt-fs-sm);
}

/* ==========================================================================
   4. Accessibility
   ========================================================================== */

:focus-visible {
	outline: 3px solid var(--rmt-gold);
	outline-offset: 3px;
	box-shadow: 0 0 0 3px var(--rmt-navy);
	border-radius: 2px;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	word-wrap: normal !important;
}

.rmt-skip-link {
	position: absolute;
	top: -100px;
	left: 1rem;
	z-index: 10000;
	padding: 0.75rem 1.25rem;
	background: var(--rmt-navy);
	color: var(--rmt-ivory) !important;
	font-weight: 600;
	text-decoration: none;
	border-radius: 0 0 var(--rmt-radius) var(--rmt-radius);
}

.rmt-skip-link:focus {
	top: 0;
	clip: auto;
	clip-path: none;
	width: auto;
	height: auto;
	margin: 0;
	overflow: visible;
}

/* ==========================================================================
   5. Layout
   ========================================================================== */

.rmt-container {
	width: 100%;
	max-width: var(--rmt-container);
	margin: 0 auto;
	padding: 0 var(--rmt-gutter);
}

.rmt-section {
	padding: var(--rmt-section) 0;
}

.rmt-section--tight {
	padding: calc(var(--rmt-section) * 0.6) 0;
}

.rmt-section--dark {
	background: var(--rmt-navy);
	color: var(--rmt-on-dark);
}

.rmt-section--dark h2,
.rmt-section--dark h3,
.rmt-section--dark a:not(.rmt-btn) {
	color: var(--rmt-on-dark);
}

.rmt-section--dark a:not(.rmt-btn):hover {
	color: var(--rmt-gold);
}

.rmt-section--line {
	border-top: 1px solid var(--rmt-line);
}

.rmt-measure {
	max-width: var(--rmt-measure);
}

.rmt-muted {
	color: var(--rmt-stone);
}

/* Section heading: short gold rule above, flush left. */
.rmt-heading {
	margin-bottom: 2.5rem;
	max-width: 760px;
}

.rmt-heading::before {
	content: '';
	display: block;
	width: 48px;
	height: 4px;
	background: var(--rmt-gold);
	margin-bottom: 1.25rem;
}

.rmt-heading__title {
	margin-bottom: 0.5rem;
}

.rmt-heading__lede {
	font-size: var(--rmt-fs-lg);
	line-height: 1.5;
	color: var(--rmt-stone);
	margin: 0;
}

.rmt-section--dark .rmt-heading__lede {
	color: var(--rmt-on-dark-muted);
}

/* ==========================================================================
   6. Buttons
   ========================================================================== */

.rmt-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 48px;
	padding: 0.75rem 1.5rem;
	font-family: var(--rmt-font-display);
	font-weight: 700;
	font-size: var(--rmt-fs-sm);
	line-height: 1.2;
	text-decoration: none;
	border: 2px solid transparent;
	border-radius: var(--rmt-radius);
	cursor: pointer;
	transition: background-color var(--rmt-ease), color var(--rmt-ease), border-color var(--rmt-ease);
	white-space: nowrap;
}

.rmt-btn--primary {
	background: var(--rmt-gold);
	border-color: var(--rmt-gold);
	color: var(--rmt-black);
}

.rmt-btn--primary:hover {
	background: #e3b12a;
	border-color: #e3b12a;
	color: var(--rmt-black);
}

.rmt-btn--outline {
	background: transparent;
	border-color: var(--rmt-navy);
	color: var(--rmt-navy);
}

.rmt-btn--outline:hover {
	background: var(--rmt-navy);
	color: var(--rmt-ivory);
}

.rmt-btn--outline-light {
	background: transparent;
	border-color: rgba(245, 241, 232, 0.6);
	color: var(--rmt-ivory);
}

.rmt-btn--outline-light:hover {
	background: var(--rmt-ivory);
	border-color: var(--rmt-ivory);
	color: var(--rmt-navy);
}

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

.rmt-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
}

/* Text link with no underline until hover, for cards and lists. */
.rmt-link {
	font-weight: 600;
	text-decoration: none;
	color: var(--rmt-navy);
	border-bottom: 2px solid var(--rmt-gold);
	padding-bottom: 1px;
}

.rmt-link:hover {
	color: var(--rmt-gold-700);
}

/* ==========================================================================
   7. Header
   ========================================================================== */

.rmt-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--rmt-ivory);
	border-bottom: 1px solid var(--rmt-line);
}

.rmt-header__inner {
	max-width: var(--rmt-container);
	margin: 0 auto;
	padding: 0 var(--rmt-gutter);
	min-height: var(--rmt-header-h);
	display: flex;
	align-items: center;
	gap: 1.5rem;
	position: relative;
}

.rmt-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.7rem;
	text-decoration: none;
	color: var(--rmt-navy);
	line-height: 1;
	flex-shrink: 0;
}

.rmt-brand__text {
	display: inline-flex;
	flex-direction: column;
}

.rmt-mark {
	flex-shrink: 0;
	display: block;
}

.rmt-mark--tile {
	border-radius: 18%;
}

.rmt-brand:hover {
	color: var(--rmt-navy);
}

.rmt-brand__name {
	font-family: var(--rmt-font-display);
	font-weight: 800;
	font-size: 1.375rem;
	letter-spacing: -0.03em;
}

.rmt-brand__division {
	margin-top: 0.3rem;
	font-family: var(--rmt-font-display);
	font-weight: 700;
	font-size: 0.8125rem;
	color: var(--rmt-stone); /* 6.6:1 on ivory; gold-700 was 3.9:1 */
	letter-spacing: 0.04em;
}

.rmt-brand .custom-logo {
	max-height: 48px;
	width: auto;
}

/* Desktop navigation */
.rmt-nav {
	margin-left: auto;
}

.rmt-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.rmt-nav__list,
.rmt-nav > ul {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.rmt-nav__list > li,
.rmt-nav > ul > li {
	position: relative;
}

.rmt-nav a:not(.rmt-btn) {
	display: inline-block;
	padding: 0.625rem 0.75rem;
	font-size: var(--rmt-fs-sm);
	font-weight: 500;
	color: var(--rmt-navy);
	text-decoration: none;
	border-radius: var(--rmt-radius);
	transition: background-color var(--rmt-ease), color var(--rmt-ease);
}

.rmt-nav a:not(.rmt-btn):hover,
.rmt-nav a:not(.rmt-btn):focus-visible {
	background: var(--rmt-ivory-700);
	color: var(--rmt-navy);
}

.rmt-nav .current-menu-item > a,
.rmt-nav .current-menu-ancestor > a,
.rmt-nav .current_page_parent > a {
	box-shadow: inset 0 -2px 0 var(--rmt-gold);
	border-radius: var(--rmt-radius) var(--rmt-radius) 0 0;
}

/* Dropdown (desktop) */
.rmt-nav .sub-menu {
	position: absolute;
	top: calc(100% + 0.25rem);
	left: 0;
	min-width: 260px;
	padding: 0.5rem;
	background: var(--rmt-kapa);
	border: 1px solid var(--rmt-line);
	border-radius: var(--rmt-radius);
	box-shadow: var(--rmt-shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity var(--rmt-ease), transform var(--rmt-ease), visibility 0s linear 180ms;
}

.rmt-nav li:hover > .sub-menu,
.rmt-nav li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	transition-delay: 0s;
}

.rmt-nav .sub-menu a {
	display: block;
	padding: 0.625rem 0.75rem;
	font-weight: 500;
}

.rmt-nav .menu-item-has-children > a::after {
	content: '';
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-left: 0.5rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-3px) rotate(45deg);
	opacity: 0.7;
}

/* Header phone */
.rmt-header__call {
	display: none;
	flex-direction: column;
	align-items: flex-start;
	padding: 0.4rem 0 0.4rem 1rem;
	border-left: 3px solid var(--rmt-gold);
	text-decoration: none;
	color: var(--rmt-navy);
	line-height: 1.15;
	flex-shrink: 0;
}

.rmt-header__call:hover {
	color: var(--rmt-gold-700);
}

.rmt-header__call-label {
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--rmt-stone);
}

.rmt-header__call-number {
	font-family: var(--rmt-font-display);
	font-weight: 800;
	font-size: 1.125rem;
	letter-spacing: -0.01em;
	margin-top: 0.15rem;
}

@media (min-width: 1040px) {
	.rmt-header__call {
		display: inline-flex;
	}
}

/* Mobile menu toggle */
.rmt-menu-toggle {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 48px;
	height: 48px;
	margin-left: auto;
	padding: 0;
	background: transparent;
	border: 1px solid var(--rmt-line);
	border-radius: var(--rmt-radius);
	cursor: pointer;
}

.rmt-menu-toggle__bar {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--rmt-navy);
	transition: transform var(--rmt-ease), opacity var(--rmt-ease);
}

.rmt-menu-toggle[aria-expanded="true"] .rmt-menu-toggle__bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.rmt-menu-toggle[aria-expanded="true"] .rmt-menu-toggle__bar:nth-child(2) {
	opacity: 0;
}

.rmt-menu-toggle[aria-expanded="true"] .rmt-menu-toggle__bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.rmt-nav__mobile-call {
	display: none;
}

@media (max-width: 1039px) {
	.rmt-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		margin: 0;
		padding: 0.5rem 0 1rem;
		background: var(--rmt-ivory);
		border-top: 1px solid var(--rmt-line);
		border-bottom: 1px solid var(--rmt-line);
		box-shadow: var(--rmt-shadow);
		max-height: calc(100vh - var(--rmt-header-h));
		overflow-y: auto;
	}

	.rmt-nav.is-open {
		display: block;
	}

	.rmt-nav__list,
	.rmt-nav > ul {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.rmt-nav a:not(.rmt-btn) {
		display: block;
		padding: 0.875rem var(--rmt-gutter);
		border-radius: 0;
		font-size: var(--rmt-fs-md);
	}

	.rmt-nav .current-menu-item > a {
		box-shadow: inset 4px 0 0 var(--rmt-gold);
		border-radius: 0;
	}

	.rmt-nav .sub-menu {
		position: static;
		min-width: 0;
		padding: 0 0 0.5rem;
		background: transparent;
		border: 0;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.rmt-nav .sub-menu a {
		padding-left: calc(var(--rmt-gutter) + 1.25rem);
		font-size: var(--rmt-fs-sm);
		color: var(--rmt-stone);
	}

	.rmt-nav .menu-item-has-children > a::after {
		display: none;
	}

	.rmt-nav__mobile-call {
		display: block;
		padding: 1rem var(--rmt-gutter) 0;
	}

	.rmt-nav__mobile-call .rmt-btn {
		white-space: normal;
	}
}

@media (min-width: 1040px) {
	.rmt-menu-toggle {
		display: none;
	}

	.rmt-nav {
		display: block;
	}
}

/* ==========================================================================
   8. Footer
   ========================================================================== */

.rmt-footer {
	background: var(--rmt-navy);
	color: var(--rmt-on-dark);
	border-top: 4px solid var(--rmt-gold);
}

.rmt-footer a:not(.rmt-btn) {
	color: var(--rmt-on-dark);
	text-decoration: none;
}

.rmt-footer a:not(.rmt-btn):hover {
	color: var(--rmt-gold);
}

.rmt-footer__inner {
	max-width: var(--rmt-container);
	margin: 0 auto;
	padding: 3.5rem var(--rmt-gutter) 3rem;
	display: grid;
	grid-template-columns: 1fr;
	gap: 2.5rem;
}

@media (min-width: 720px) {
	.rmt-footer__inner {
		grid-template-columns: 1fr 1fr;
	}
}

@media (min-width: 1040px) {
	.rmt-footer__inner {
		grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
		gap: 2rem;
	}
}

.rmt-footer__brand {
	display: inline-flex;
	flex-direction: column;
	line-height: 1;
	margin-bottom: 1.25rem;
}

.rmt-footer__brand .rmt-mark {
	margin-bottom: 0.75rem;
}

.rmt-footer__brand-name {
	font-family: var(--rmt-font-display);
	font-weight: 800;
	font-size: 1.5rem;
	letter-spacing: -0.03em;
}

.rmt-footer__brand-division {
	margin-top: 0.35rem;
	font-family: var(--rmt-font-display);
	font-weight: 700;
	font-size: 0.9375rem;
	color: var(--rmt-gold);
	letter-spacing: 0.04em;
}

.rmt-footer__brand-tag {
	margin-top: 0.6rem;
	font-size: 0.8125rem;
	color: var(--rmt-on-dark-muted);
}

.rmt-footer__heading {
	font-family: var(--rmt-font-body);
	font-size: var(--rmt-fs-sm);
	font-weight: 600;
	color: var(--rmt-gold);
	margin: 0 0 1rem;
}

.rmt-footer__address {
	font-style: normal;
	line-height: 1.7;
	font-size: var(--rmt-fs-sm);
	color: var(--rmt-on-dark-muted);
}

.rmt-footer__phone {
	display: block;
	font-family: var(--rmt-font-display);
	font-weight: 800;
	font-size: 1.5rem;
	letter-spacing: -0.01em;
	color: var(--rmt-on-dark);
	margin: 0.25rem 0 0.5rem;
}

.rmt-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.rmt-footer__list li {
	margin-bottom: 0.5rem;
	font-size: var(--rmt-fs-sm);
}

.rmt-footer__facts {
	margin: 0;
	font-size: var(--rmt-fs-sm);
	color: var(--rmt-on-dark-muted);
}

.rmt-footer__facts div {
	margin-bottom: 0.75rem;
}

.rmt-footer__facts dt {
	font-size: var(--rmt-fs-xs);
	color: var(--rmt-gold);
	margin-bottom: 0.1rem;
}

.rmt-footer__facts dd {
	margin: 0;
	color: var(--rmt-on-dark);
}

.rmt-footer__bar {
	background: var(--rmt-black);
	border-top: 1px solid var(--rmt-line-dark);
}

.rmt-footer__bar-inner {
	max-width: var(--rmt-container);
	margin: 0 auto;
	padding: 1.25rem var(--rmt-gutter);
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	font-size: var(--rmt-fs-xs);
	color: rgba(245, 241, 232, 0.65);
}

@media (min-width: 720px) {
	.rmt-footer__bar-inner {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}
}

.rmt-footer__bar p {
	margin: 0;
}

.rmt-footer__social {
	display: flex;
	gap: 1rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* ==========================================================================
   9. Mobile call bar
   ========================================================================== */

.rmt-callbar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 90;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5rem;
	padding: 0.625rem var(--rmt-gutter);
	padding-bottom: calc(0.625rem + env(safe-area-inset-bottom, 0px));
	background: var(--rmt-navy);
	border-top: 1px solid var(--rmt-line-dark);
}

.rmt-callbar .rmt-btn {
	min-height: 44px;
	padding: 0.5rem 0.5rem;
	font-size: 0.875rem;
	white-space: normal;
	min-width: 0;
}

@media (min-width: 720px) {
	.rmt-callbar {
		display: none;
	}
}

/* ==========================================================================
   10. Icons and small utilities
   ========================================================================== */

.rmt-icon {
	width: 1.25em;
	height: 1.25em;
	flex-shrink: 0;
}

.rmt-inline-icon {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.alignwide {
	max-width: var(--rmt-container);
	margin-left: auto;
	margin-right: auto;
}

.alignfull {
	width: 100%;
}
