/*
Theme Name: RIM Climate
Author: RIM Climate
Description: Lightweight brand and product showcase theme for RIM Climate, supplier of split AC installation parts. No page builder, no required plugins.
Version: 1.1.0
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rim-climate
*/

/* Fonts: Barlow + Barlow Semi Condensed, SIL Open Font License (assets/fonts/OFL.txt) */
@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url(assets/fonts/barlow-400.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url(assets/fonts/barlow-500.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url(assets/fonts/barlow-600.woff2) format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url(assets/fonts/barlow-semi-condensed-600.woff2) format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url(assets/fonts/barlow-semi-condensed-700.woff2) format("woff2"); }

:root {
	--ink: #1e2a2f;
	--steel: #56676e;
	--grey: #9aa9af;
	--line: #d3dadc;
	--chalk: #f3f5f4;
	--white: #ffffff;
	--copper: #a0522d;
	--copper-dark: #85431f;
	--copper-light: #e6a47a;

	--font-body: "Barlow", "Segoe UI", Roboto, Arial, sans-serif;
	--font-head: "Barlow Semi Condensed", "Arial Narrow", "Segoe UI", Arial, sans-serif;

	--wrap: 1180px;
	--gutter: clamp(20px, 4vw, 40px);
	--space: clamp(64px, 9vw, 112px);
	--radius: 6px;
}

/* Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--ink);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--copper); text-underline-offset: 3px; }
a:hover { color: var(--copper); }
:focus-visible { outline: 3px solid var(--copper); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.005em; }
h1 { font-size: clamp(2.25rem, 5vw, 4rem); line-height: 1.02; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: var(--radius); }
.skip-link:focus { top: 12px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* Buttons --------------------------------------------------------------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 50px; padding: 12px 24px;
	font-family: var(--font-body); font-weight: 600; font-size: 1.0625rem; line-height: 1.2;
	border-radius: var(--radius); border: 2px solid transparent;
	text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--copper); color: var(--white); }
.btn-primary:hover { background: var(--copper-dark); color: var(--white); }
.btn-quiet { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-quiet:hover { background: var(--ink); color: var(--white); }
.btn-light { background: var(--white); color: var(--ink); }
.btn-light:hover { background: var(--copper-light); color: var(--ink); }
.btn-small { min-height: 40px; padding: 8px 16px; font-size: 1rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-stack { display: grid; gap: 12px; max-width: 360px; margin-bottom: 32px; }
.text-link { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; }

/* Header ---------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand img { max-height: 48px; width: auto; }
.brand-mark { width: 30px; height: 30px; fill: none; stroke: var(--copper); stroke-width: 3; stroke-linecap: round; }
.wordmark { font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; letter-spacing: .01em; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.site-nav ul a { font-weight: 500; text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav ul a:hover, .site-nav .current-menu-item > a { color: var(--ink); border-bottom-color: var(--copper); }
.menu-toggle { display: none; align-items: center; gap: 10px; background: none; border: 2px solid var(--ink); border-radius: var(--radius); padding: 8px 14px; font: 600 1rem var(--font-body); color: var(--ink); cursor: pointer; }
.menu-toggle-bars, .menu-toggle-bars::before, .menu-toggle-bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
.menu-toggle-bars::before, .menu-toggle-bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle-bars::before { top: -6px; }
.menu-toggle-bars::after { top: 6px; }

/* Hero + installation drawing ------------------------------------------- */
.hero { padding: clamp(48px, 7vw, 88px) 0 0; }
.hero-copy { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px 56px; align-items: end; }
.hero h1 { max-width: 17ch; margin: 0; }
.hero-lead { font-size: clamp(1.125rem, 1.6vw, 1.3rem); color: var(--steel); max-width: 44ch; margin-bottom: 24px; }
.install { margin: clamp(32px, 5vw, 56px) 0 0; padding-bottom: 28px; overflow: hidden; }
.install-svg { width: 100%; overflow: visible; }
.install figcaption { font-size: .95rem; color: var(--steel); margin-top: 6px; }
.install-legend { display: none; }

.hatch-line { stroke: #b8c2c6; stroke-width: 2; }
.d-ground { stroke: var(--steel); stroke-width: 2; }
.d-wall { fill: url(#hatch); stroke: var(--steel); stroke-width: 1.5; }
.d-unit { fill: var(--white); stroke: var(--ink); stroke-width: 3; }
.d-detail { fill: none; stroke: var(--grey); stroke-width: 2; }
.d-anchor { fill: var(--grey); }
.d-steel-fill { fill: var(--steel); }
.d-arm { stroke: var(--ink); stroke-width: 10; stroke-linecap: round; }
.d-brace { stroke: var(--ink); stroke-width: 7; stroke-linecap: round; }
.d-pad { fill: var(--ink); }
.d-drain { fill: none; stroke: var(--steel); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.d-drop { fill: var(--steel); }
.d-copper { fill: none; stroke: var(--copper); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.d-copper-fill { fill: var(--copper); }
.d-wrap { fill: none; stroke: var(--line); stroke-width: 20; stroke-linecap: round; stroke-linejoin: round; }
.d-wrap-turns { fill: none; stroke: var(--grey); stroke-width: 20; stroke-dasharray: 2 8; }
.callout-line { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.callout-dot { fill: var(--white); stroke: var(--copper); stroke-width: 3; }
.callout-label { font-family: var(--font-body); font-weight: 600; font-size: 19px; fill: var(--ink); }
.callout a { cursor: pointer; }
.callout a:hover .callout-label, .callout a:focus-visible .callout-label { fill: var(--copper); text-decoration: underline; }

/* The one moment of motion: the copper line set is laid in, then the labels arrive. */
@media (prefers-reduced-motion: no-preference) {
	.js .d-copper, .js .d-wrap { stroke-dasharray: 1; stroke-dashoffset: 1; animation: rim-lay 1.1s ease-out .25s forwards; }
	.js .d-wrap-turns, .js .callout { opacity: 0; animation: rim-show .4s ease-out 1.25s forwards; }
	.js .callout:nth-of-type(2) { animation-delay: 1.35s; }
	.js .callout:nth-of-type(3) { animation-delay: 1.45s; }
	.js .callout:nth-of-type(4) { animation-delay: 1.55s; }
	.js .callout:nth-of-type(5) { animation-delay: 1.65s; }
}
@keyframes rim-lay { to { stroke-dashoffset: 0; } }
@keyframes rim-show { to { opacity: 1; } }

/* Sections -------------------------------------------------------------- */
.section { padding: var(--space) 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { color: var(--steel); font-size: 1.125rem; margin: 0; }
.section-foot { margin: 40px 0 0; }

.range { background: var(--chalk); }
.range-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 32px; }
.range-group { border-top: 3px solid var(--ink); padding-top: 18px; }
.range-group h3 { margin-bottom: 6px; }
.range-group h3 a { text-decoration: none; }
.range-group > p { color: var(--steel); font-size: 1rem; margin-bottom: 14px; }
.range-group ul { list-style: none; margin: 0; padding: 0; }
.range-group li { border-top: 1px solid var(--line); }
.range-group li a { display: block; padding: 10px 0; font-weight: 500; text-decoration: none; }

.cta-band { background: var(--ink); color: var(--white); padding: clamp(48px, 7vw, 80px) 0; }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; }
.cta-band h2 { margin-bottom: 6px; }
.cta-band p { margin: 0; color: var(--line); font-size: 1.125rem; }

/* Pages ----------------------------------------------------------------- */
.page-head { padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 40px); border-bottom: 1px solid var(--line); }
.page-head h1 { margin-bottom: 12px; }
.page-intro { max-width: 60ch; color: var(--steel); font-size: 1.125rem; }
.page-intro p:last-child { margin-bottom: 0; }
.page-body { padding-top: 48px; padding-bottom: var(--space); }
.prose { max-width: 68ch; }
.prose .lead { font-size: 1.3rem; line-height: 1.5; color: var(--ink); }
.prose h2 { font-size: 1.75rem; margin-top: 1.6em; }
.prose img { border-radius: var(--radius); }
.range-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; }
.range-nav a { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; }
.product-range + .product-range { padding-top: 0; }

/* Products -------------------------------------------------------------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 40px 28px; }
.product { position: relative; }
.product-media { background: var(--chalk); border-radius: var(--radius); aspect-ratio: 4 / 3; overflow: hidden; margin-bottom: 14px; display: flex; align-items: center; justify-content: center; transition: box-shadow .15s; }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-media img[src$=".svg"] { object-fit: contain; }
.product:hover .product-media { box-shadow: inset 0 0 0 2px var(--copper); }
.product-title { font-size: 1.2rem; margin-bottom: 6px; }
.product-title a { text-decoration: none; }
.product-title a::after { content: ""; position: absolute; inset: 0; }
.product p { color: var(--steel); font-size: 1rem; margin: 0; }
.product-single { padding-top: 32px; padding-bottom: var(--space); }
.crumbs { font-size: .95rem; color: var(--steel); display: flex; gap: 8px; margin-bottom: 28px; }
.product-single-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.product-media.is-large { margin: 0; }
.product-single h1 { font-size: clamp(2rem, 4vw, 3rem); }
.product-single .btn-row { margin-top: 28px; }
.related { background: var(--chalk); }

/* Contact --------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(32px, 6vw, 80px); padding-top: 48px; padding-bottom: var(--space); }
.contact-grid.is-form-only { grid-template-columns: minmax(0, 720px); }
.contact-grid h2 { font-size: 1.5rem; }
.details { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; }
.details dt { font-weight: 600; }
.details dd { margin: 0; color: var(--steel); }
.enquiry-form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { font-weight: 600; }
.field input, .field textarea { width: 100%; font: inherit; color: var(--ink); padding: 12px 14px; border: 1.5px solid #b8c2c6; border-radius: var(--radius); background: var(--white); }
.field input:focus, .field textarea:focus { border-color: var(--copper); outline: 2px solid var(--copper); outline-offset: 0; }
.field textarea { resize: vertical; min-height: 150px; }
.field-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.enquiry-form .btn { justify-self: start; }
.form-note { font-size: .95rem; color: var(--steel); margin: 0; }
.notice { padding: 14px 16px; border-left: 4px solid #2f7a4a; background: #e9f2ec; color: #1d5b34; border-radius: 0 var(--radius) var(--radius) 0; }
.notice.is-error { border-left-color: var(--copper); background: #fbece8; color: #7a2c16; }

/* Footer ---------------------------------------------------------------- */
.site-footer { padding: 48px 0 40px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 24px 48px; align-items: start; }
.footer-name { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; margin-bottom: 4px; }
.footer-brand p:not(.footer-name) { color: var(--steel); max-width: 40ch; }
.footer-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; color: var(--steel); }
.footer-contact a { color: var(--ink); }
.footer-legal { color: var(--steel); font-size: .95rem; margin: 0; }
.action-bar { display: none; }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 980px) {
	.range-grid { grid-template-columns: repeat(2, 1fr); }
	.product-single-grid { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.footer-legal { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
	.menu-toggle { display: inline-flex; }
	.site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 24px; flex-direction: column; align-items: stretch; gap: 16px; }
	.site-nav.is-open { display: flex; }
	.site-nav ul { flex-direction: column; gap: 0; }
	.site-nav ul a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
	.header-cta { align-self: start; }

	.hero-copy { grid-template-columns: 1fr; }
	.callout { display: none; }
	.install-svg { width: 152%; max-width: none; margin-left: -8%; }
	.install-legend { display: flex; flex-wrap: wrap; gap: 10px 20px; list-style: none; margin: 16px 0 0; padding: 0; }
	.install-legend li { display: flex; align-items: center; gap: 8px; font-weight: 600; }
	.install-legend li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 3px solid var(--copper); }
	.contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
	.action-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--white); border-top: 1px solid var(--line); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); gap: 10px; }
	.action-bar a { flex: 1; min-height: 48px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); font-weight: 600; text-decoration: none; border: 2px solid var(--ink); color: var(--ink); }
	.action-bar a.is-wa { background: var(--copper); border-color: var(--copper); color: var(--white); }
	body:has(.action-bar) { padding-bottom: 72px; }
	.header-cta { display: none; }
}
@media (max-width: 560px) {
	.range-grid, .field-pair, .footer-grid { grid-template-columns: 1fr; }
	.btn-row .btn { flex: 1 1 100%; }
}
