/*!
Theme Name: Niathi
Theme URI: https://underscores.me/
Author: Niathi
Description: Custom theme for Niathi Typewriting and Computer Institute, built on Underscores. Every page is a stack of ACF Free sections edited from wp-admin.
Version: 1.0.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: niathi

Niathi is based on Underscores https://underscores.me/, (C) 2012-2020 Automattic, Inc.
Underscores is distributed under the terms of the GNU GPL v2 or later.
*/

/* Brand colours are the only colours on the site. The key (a rounded square from the logo) is the one
   shape: the enquiry key, the course bullets and the typing-test keyboard. Everything else is square. */
:root {
	--primary-color: #1F2B47;
	--secondary-color: #C5845E;
	--tertiary-color: #EEF1EC;
	--white-color: #ffffff;

	--font: "Schibsted Grotesk", system-ui, sans-serif;

	--step-small: clamp(0.8125rem, 0.8rem + 0.05vw, 0.875rem);
	--step-body: clamp(1rem, 0.97rem + 0.12vw, 1.0625rem);
	--step-lead: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
	--step-head: clamp(1.875rem, 1.4rem + 1.4vw, 2.625rem);
	--step-display: clamp(2.25rem, 1.4rem + 2.6vw, 3.5rem);

	--margin: clamp(1.125rem, 4vw, 4.5rem);
	--gutter: clamp(1rem, 2vw, 2rem);
	--section: clamp(4.5rem, 8vw, 8rem);
	--key: 12px;

	--ease-out: cubic-bezier(0.22, 1, 0.36, 1);
	--ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
	--ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
	--t-press: 140ms;
	--t-hover: 180ms;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--white-color); color: var(--primary-color); font-family: var(--font); font-size: var(--step-body); line-height: 1.5; letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, figure, ul, ol, table, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:target { scroll-margin-top: 2rem; }
::selection { background: var(--secondary-color); color: var(--primary-color); }
:focus-visible { outline: 3px solid var(--secondary-color); outline-offset: 3px; }
.sr-only, .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed !important; top: 8px; left: 8px; width: auto; height: auto; clip-path: none; z-index: 10; padding: 12px 16px; background: var(--secondary-color); }

h1, h2, h3 { font-weight: 600; text-wrap: balance; }
.display { font-size: var(--step-display); line-height: 1.04; letter-spacing: -0.03em; }
.head { font-size: var(--step-head); line-height: 1.1; letter-spacing: -0.025em; }
.lead { font-size: var(--step-lead); line-height: 1.3; letter-spacing: -0.02em; }
p { max-width: 62ch; text-wrap: pretty; }

.wrap { padding-inline: var(--margin); }
.section { padding-block: calc(var(--section) / 2); }

.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em; text-decoration-thickness: 0.08em; transition: text-decoration-color var(--t-hover) ease; }
.link-plain { font-weight: 500; text-decoration: underline; text-underline-offset: 0.22em; text-decoration-thickness: 0.1em; text-decoration-color: var(--secondary-color); transition: text-decoration-color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) {
	.link:hover, .link-plain:hover { text-decoration-color: currentColor; }
}
.field, .wpcf7-form-control:not(.wpcf7-submit):not(.wpcf7-radio):not(.wpcf7-checkbox) { width: 100%; min-height: 3.5rem; padding: 0.8rem 1rem; background: var(--white-color); color: var(--primary-color); border: 0; border-radius: 0; font-size: max(1rem, var(--step-body)); }
.field::placeholder, .wpcf7-form-control::placeholder { color: var(--primary-color); opacity: 0.72; }

/* ---------- editor content: what the client types in "Heading and text" ---------- */
.content > * + * { margin-top: 1.1rem; }
.content > h2 { font-size: var(--step-head); line-height: 1.1; letter-spacing: -0.025em; }
.content > h2 + * { margin-top: 1.5rem; }
.content h3 { font-size: var(--step-lead); line-height: 1.2; letter-spacing: -0.02em; }
.content a { font-weight: 500; text-decoration-color: var(--secondary-color); text-decoration-thickness: 0.1em; text-underline-offset: 0.22em; }
.content ul { display: grid; gap: 0.6rem; }
.content ul li { position: relative; padding-left: 1.6rem; }
.content ul li::before { content: ""; position: absolute; left: 0; top: 0.42em; width: 0.7rem; height: 0.7rem; background: var(--secondary-color); border-radius: 3px; }
.content ol { padding-left: 1.4rem; }
.content--long > p { max-width: 66ch; }
.content--split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; }
.content--split > * { grid-column: 8 / span 5; margin-top: 0; }
.content--split > h2 { grid-column: 1 / span 6; grid-row: 1 / span 3; }
.content--split > h2 + * { margin-top: 0; }
.content--split > * + p { margin-top: 0.8rem; }

/* ---------- top bar and header ---------- */
.topbar { padding-block: 10px; background: var(--primary-color); color: var(--white-color); font-size: var(--step-small); font-weight: 500; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 20px; }
.brand { display: block; text-decoration: none; }
.brand img { width: auto; height: 46px; }
.brand-text { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.03em; }
.primary-nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 48px); }
.nav-list { display: flex; gap: clamp(18px, 2.2vw, 36px); font-weight: 500; }
.nav-list a, .nav-call { position: relative; display: inline-block; text-decoration: none; padding-block: 6px; }
.nav-list a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--secondary-color); transform: scaleX(0); transform-origin: left; transition: transform var(--t-hover) var(--ease-out); }
.nav-list a[aria-current="page"]::after, .nav-list a:hover::after { transform: none; }
.nav-call { font-weight: 600; color: var(--primary-color); }
.menu-toggle { display: none; font-weight: 500; min-height: 44px; padding: 0 4px; text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: var(--secondary-color); text-decoration-thickness: 3px; }

/* ---------- header over a page's top picture ---------- */
.logo-light { display: none; }
body:has(#primary > .hero:first-child) .site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 5; }
body:has(#primary > .hero--cover:first-child) .site-header,
.site-header:has(.primary-nav.is-open) { color: var(--white-color); }
body:has(#primary > .hero--cover:first-child) .nav-call,
.site-header:has(.primary-nav.is-open) .nav-call { color: var(--white-color); }
body:has(#primary > .hero--cover:first-child) .brand:has(.logo-light) .logo-dark,
.site-header:has(.primary-nav.is-open) .brand:has(.logo-light) .logo-dark { display: none; }
body:has(#primary > .hero--cover:first-child) .brand .logo-light,
.site-header:has(.primary-nav.is-open) .brand .logo-light { display: block; }
.site-header:has(.primary-nav.is-open) { background: var(--primary-color); }

/* ---------- buttons ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3.5rem; padding: 0 1.75rem; border: 2px solid transparent; border-radius: var(--key); font-weight: 600; text-decoration: none; white-space: nowrap; transition: background-color var(--t-hover) ease, color var(--t-hover) ease, border-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.button:active { transform: translateY(2px); }
.button--primary { background: var(--secondary-color); color: var(--primary-color); }
.button--ghost { border-color: var(--white-color); color: var(--white-color); }
@media (hover: hover) and (pointer: fine) {
	.button--primary:hover { background: var(--white-color); }
	.button--ghost:hover { background: var(--white-color); color: var(--primary-color); }
}

/* ---------- hero: a wide picture fills the screen under an even navy overlay ---------- */
.hero--cover { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 100svh; padding-top: 128px; overflow: hidden; background: var(--primary-color); color: var(--white-color); }
.hero--inner { min-height: clamp(440px, 62svh, 640px); }
.hero-media { position: absolute; inset: 0; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: rgb(31 43 71 / 0.6); }
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; opacity: 0; transition: opacity 1600ms ease; }
.hero-media img.is-on { opacity: 1; }
.hero-content { position: relative; padding-bottom: clamp(48px, 8vh, 96px); }
.hero-title { font-size: var(--step-display); line-height: 1.04; letter-spacing: -0.03em; max-width: 14em; }
.hero-sentence { margin-top: clamp(24px, 3vh, 36px); max-width: 42ch; font-size: var(--step-lead); line-height: 1.3; letter-spacing: -0.02em; }
.hero-sentence p { max-width: none; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; max-width: none; margin-top: clamp(28px, 4vh, 44px); }

/* ---------- home hero: text at the left, the Niathi logo built large from its keys at the right ---------- */
.hero--keys { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(32px, 5vw, 80px); padding-block: calc(86px + clamp(32px, 6vh, 72px)) clamp(56px, 9vh, 104px); background: var(--tertiary-color); color: var(--primary-color); }
.hero-label { max-width: none; font-size: var(--step-small); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; }
.hero--keys .hero-title { margin-top: 16px; font-size: var(--step-display); line-height: 1.04; letter-spacing: -0.03em; max-width: 13em; }
.hero-text { margin-top: 20px; }
.hero-text p:first-child { max-width: 34ch; font-size: var(--step-lead); font-weight: 500; line-height: 1.35; letter-spacing: -0.01em; }
.hero-text p + p { margin-top: 12px; max-width: 48ch; }
.hero--keys .hero-actions { margin-top: 32px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 28px; font-size: var(--step-small); font-weight: 500; }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.tick { flex: none; width: 20px; height: 20px; padding: 3px; color: var(--primary-color); background: var(--secondary-color); border-radius: 6px; }
.hero-keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 1vw, 14px); width: min(100%, 560px); justify-self: end; }
.hkey { position: relative; margin: 0; max-width: none; overflow: hidden; border-radius: 22%; transition: transform var(--t-press) var(--ease-out); }
.hkey img { width: 100%; height: 100%; object-fit: cover; }
.hkey--round { aspect-ratio: 1; border-radius: 50%; }
.hkey--big { grid-column: 1 / span 2; grid-row: 2 / span 2; border-radius: 11%; }
.hkey--big img { object-position: 70% 50%; }
.hkey--copper, .hkey--navy { display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; aspect-ratio: 1; padding: clamp(12px, 1.4vw, 20px); line-height: 1.2; }
.hkey--copper { grid-column: 3; grid-row: 2; background: var(--secondary-color); color: var(--primary-color); }
.hkey--navy { grid-column: 3; grid-row: 3; background: var(--primary-color); color: var(--white-color); }
.hkey strong { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.02em; }
.hkey--copper span, .hkey--navy span { font-size: var(--step-small); font-weight: 500; }
.hkey--space { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; min-height: clamp(44px, 4.4vw, 60px); padding: 0 16px; border-radius: 14px; background: var(--primary-color); color: var(--white-color); font-size: var(--step-small); font-weight: 500; text-align: center; }
@media (hover: hover) and (pointer: fine) { .hkey:hover { transform: translateY(3px); } }
.button--outline { border-color: var(--primary-color); color: var(--primary-color); }
@media (hover: hover) and (pointer: fine) { .button--outline:hover { background: var(--primary-color); color: var(--white-color); } }
.button-arrow { width: 20px; height: 20px; margin-left: 10px; transition: transform var(--t-hover) var(--ease-out); }
.button:hover .button-arrow { transform: translateX(3px); }

/* ---------- inner page title ---------- */
.banner { padding-top: clamp(32px, 6vh, 80px); padding-bottom: calc(var(--section) / 4); }
.banner-title { max-width: 11em; }
.banner-intro { margin-top: clamp(24px, 3vh, 40px); max-width: 44ch; }
.banner-intro p { max-width: none; }
.banner-intro p + p { margin-top: 0.8em; }

/* ---------- courses: a row of panels, one open ---------- */
.panels { display: flex; height: clamp(440px, 38vw, 580px); margin-top: clamp(40px, 5vw, 72px); overflow: hidden; border-radius: 4px; }
.panel { position: relative; flex: 1 1 0; flex-grow: 0.0001; flex-basis: clamp(76px, 8.4vw, 124px); overflow: hidden; transition: flex-grow 700ms var(--ease-in-out); }
.panel.is-open { flex-grow: 1; }
.panel--navy { background: var(--primary-color); color: var(--white-color); }
.panel--light { background: var(--tertiary-color); color: var(--primary-color); }
.panel--copper { background: var(--secondary-color); color: var(--primary-color); }
.panel-heading { position: absolute; inset: 0; z-index: 1; margin: 0; font-size: var(--step-lead); }
.panel-tab { display: flex; align-items: flex-end; width: 100%; height: 100%; padding: clamp(20px, 2vw, 32px) clamp(18px, 1.8vw, 28px); text-align: left; font-weight: 600; letter-spacing: -0.02em; cursor: pointer; }
.panel-tab span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; transition: opacity 300ms ease; }
.panel.is-open .panel-heading { pointer-events: none; }
.panel.is-open .panel-tab span { opacity: 0; }
@media (hover: hover) and (pointer: fine) { .panel:not(.is-open):hover { flex-grow: 0.06; } }
.panel-body { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: clamp(24px, 3vw, 48px); padding: clamp(28px, 3vw, 48px); opacity: 0; visibility: hidden; transition: opacity 300ms ease, visibility 0s 300ms; }
.panel.is-open .panel-body { opacity: 1; visibility: visible; transition: opacity 450ms ease 320ms, visibility 0s; }
.panel-text { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; min-width: 16rem; }
.panel-name { max-width: 10em; font-size: var(--step-head); font-weight: 600; line-height: 1.08; letter-spacing: -0.025em; }
.panel-details { max-width: 32ch; font-size: var(--step-lead); line-height: 1.3; letter-spacing: -0.02em; }
.panel-picture { min-width: 12rem; overflow: hidden; border-radius: 4px; }
.panel-picture img { width: 100%; height: 100%; object-fit: cover; }
html:not(.js) .panels { flex-direction: column; height: auto; }
html:not(.js) .panel { flex: none; }
html:not(.js) .panel-heading { display: none; }
html:not(.js) .panel-body { position: static; opacity: 1; visibility: visible; min-height: 360px; }

/* ---------- record: the number and the details ---------- */
.record-top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; }
.record-head { grid-column: 1 / span 6; }
.record-top--single .record-head { grid-column: 1 / span 9; }
.record-number { grid-column: 7 / span 6; max-width: none; display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 12px; }
.record-number .display { color: var(--secondary-color); font-weight: 600; font-variant-numeric: tabular-nums; }
.record-number span:last-child { max-width: 34ch; font-weight: 500; }
.facts { width: 100%; margin-top: clamp(56px, 8vw, 120px); border-collapse: collapse; }
.facts th, .facts td { padding: 18px 0; text-align: left; vertical-align: top; font-size: var(--step-lead); line-height: 1.25; letter-spacing: -0.02em; }
.facts th { width: 33.4%; padding-top: 22px; padding-right: var(--gutter); font-weight: 500; font-size: var(--step-body); letter-spacing: -0.01em; }
.facts td { font-weight: 600; }
.record-link { margin-top: 32px; margin-left: 33.4%; }

/* ---------- typing test: the one centred moment ---------- */
.speed { background: var(--primary-color); color: var(--white-color); padding-block: calc(var(--section) / 2); }
.speed-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.speed-head p { margin-inline: auto; }
.speed-line { margin-top: clamp(40px, 5vw, 72px); max-width: 30ch; font-size: var(--step-head); font-weight: 600; line-height: 1.05; letter-spacing: -0.04em; }
.speed-line .ok { color: var(--secondary-color); }
.speed-line .bad { background: var(--secondary-color); color: var(--primary-color); }
.speed-line .cur { text-decoration: underline 5px var(--secondary-color); text-underline-offset: 8px; }
.speed-input { margin-top: clamp(32px, 4vw, 56px); width: min(100%, 880px); min-height: 4.5rem; resize: none; text-align: left; }
.keyboard { width: min(100%, 880px); display: flex; flex-direction: column; gap: 8px; margin-top: 24px; }
.kb-row { display: flex; gap: 8px; justify-content: center; }
.kb-row .key { flex: 0 1 80px; aspect-ratio: 1; display: flex; padding: 10px 12px; background: var(--white-color); color: var(--primary-color); font-size: var(--step-small); font-weight: 500; border-radius: var(--key); transition: background-color 120ms ease, transform 120ms var(--ease-out); }
.kb-row .key.home { font-weight: 600; }
.kb-row .key.is-lit { background: var(--secondary-color); transform: translateY(4px); }
.kb-row .key-space { flex: 0 1 520px; aspect-ratio: auto; height: 52px; }
.speed-results { display: flex; align-items: flex-end; justify-content: center; flex-wrap: wrap; gap: 16px 56px; margin-top: clamp(32px, 4vw, 56px); }
.speed-results p { margin: 0; font-weight: 500; }
.speed-results strong { display: block; font-size: var(--step-head); font-weight: 600; line-height: 1; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; margin-bottom: 6px; color: var(--secondary-color); }
.text-button { min-height: 44px; font-weight: 500; text-decoration: underline; text-underline-offset: 0.22em; text-decoration-thickness: 0.1em; text-decoration-color: var(--secondary-color); }

/* ---------- gallery: one frame, contents change ---------- */
.gallery { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; }
.gallery-text { grid-column: 1 / span 4; display: flex; flex-direction: column; gap: 24px; padding-bottom: 40px; }
.frame { grid-column: 5 / span 8; }
.frame-stage { position: relative; display: block; width: 100%; aspect-ratio: 3 / 2; overflow: hidden; background: var(--primary-color); cursor: pointer; }
.frame-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 600ms ease; }
.frame-stage img.is-on { opacity: 1; }
.frame figcaption { margin-top: 14px; font-size: var(--step-small); font-weight: 500; }

/* ---------- text beside a picture ---------- */
.intro { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; }
.intro-text { grid-column: 1 / span 6; display: flex; flex-direction: column; gap: 28px; }
.intro--text .intro-text { grid-column: 1 / span 9; }
.intro-photo { grid-column: 8 / span 5; }
.intro-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.intro-photo figcaption { margin-top: 14px; font-size: var(--step-small); font-weight: 500; }

/* ---------- link rows ---------- */
.links { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; }
.links-head { grid-column: 1 / span 5; }
.link-rows { grid-column: 7 / span 6; }
.link-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 22px; font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.02em; text-decoration: none; transition: color var(--t-hover) ease; }
.link-arrow { flex: none; width: 28px; height: 28px; color: var(--secondary-color); transition: transform var(--t-hover) var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
	.link-row:hover { color: var(--secondary-color); }
	.link-row:hover .link-arrow { transform: translate(3px, -3px); }
}

/* ---------- picture grid ---------- */
.mosaic { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: clamp(150px, 17vw, 270px); grid-auto-flow: dense; gap: 8px; margin-top: clamp(48px, 6vw, 88px); }
.tile.is-big { grid-column: span 2; grid-row: span 2; }
.tile.is-tall { grid-row: span 2; }
.tile.is-wide { grid-column: span 2; }
.tile figure { position: relative; height: 100%; overflow: hidden; background: var(--primary-color); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-soft); }
.tile figcaption { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: clamp(14px, 1.6vw, 24px); background: rgb(31 43 71 / 0.62); color: var(--white-color); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; opacity: 0; transition: opacity 320ms ease; }
.tile:hover figcaption { opacity: 1; }
.tile:hover img { transform: scale(1.05); }
@media (hover: none) {
	.tile figcaption { inset: auto 0 0 0; padding: 10px 12px; opacity: 1; font-size: var(--step-small); }
}

/* ---------- visit: address, phone, hours and the map ---------- */
.visit { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: stretch; }
.visit-text { grid-column: 1 / span 5; display: flex; flex-direction: column; gap: 40px; }
.visit-facts { display: grid; gap: 28px; }
.visit-fact { font-weight: 500; }
.visit-fact--big { font-size: var(--step-head); font-weight: 600; line-height: 1.1; letter-spacing: -0.025em; }
.visit-fact--big a { text-decoration: none; color: var(--primary-color); }
.visit-map { grid-column: 7 / span 6; min-height: 480px; background: var(--primary-color); }
.visit-map iframe { width: 100%; height: 100%; min-height: 480px; border: 0; }
/* ---------- enquiry coupon and the Contact Form 7 form ---------- */
.coupon { --notch: 36px; --cut: 46%; position: relative; display: grid; grid-template-columns: var(--cut) 1fr; background: var(--tertiary-color); color: var(--primary-color); min-height: 440px; overflow: hidden; }
.coupon::before, .coupon::after { content: ""; position: absolute; left: var(--cut); width: var(--notch); height: var(--notch); margin-left: calc(var(--notch) / -2 + 3px); background: var(--white-color); border-radius: 50%; }
.coupon::before { top: calc(var(--notch) / -2); }
.coupon::after { bottom: calc(var(--notch) / -2); }
.coupon-left { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: clamp(28px, 4vw, 56px); }
.coupon-left > h2 { max-width: 7em; }
.coupon-left > p { max-width: 36ch; font-weight: 500; }
.coupon-left > * + * { margin-top: 0; }
.coupon-form { padding: clamp(28px, 4vw, 56px); border-left: 6px dotted var(--white-color); }
.wpcf7 fieldset { margin: 0; padding: 0; border: 0; }
.wpcf7-form { display: flex; flex-direction: column; gap: 10px; }
.wpcf7-form p { max-width: none; margin: 0; }
.wpcf7-form label { display: block; }
.wpcf7-form .wpcf7-form-control-wrap { display: block; }
.wpcf7-form select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%231E293B' stroke-width='2.4'/%3E%3C/svg%3E"); background-position: calc(100% - 18px) 50%; background-repeat: no-repeat; padding-right: 48px; }
.wpcf7-form textarea { min-height: 7rem; resize: vertical; }
.submit, .wpcf7-submit { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 3.75rem; margin-top: 6px; background: var(--primary-color); color: var(--white-color); border: 0; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.submit:active, .wpcf7-submit:active { transform: translateY(2px); }
@media (hover: hover) and (pointer: fine) { .submit:hover, .wpcf7-submit:hover { background: var(--secondary-color); color: var(--primary-color); } }
.wpcf7-not-valid { outline: 3px solid var(--primary-color); outline-offset: -3px; }
.wpcf7-not-valid-tip { display: block; margin-top: 6px; font-weight: 500; font-size: var(--step-small); }
.wpcf7-response-output { margin: 8px 0 0; padding: 14px 16px; background: var(--white-color); color: var(--primary-color); font-weight: 500; }
.wpcf7 form.init .wpcf7-response-output,
.wpcf7 form.resetting .wpcf7-response-output,
.wpcf7 form.submitting .wpcf7-response-output { display: none; }
.wpcf7-spinner { display: none; }
.wpcf7 .screen-reader-response { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* ---------- footer: the number to call, set as the headline ---------- */
.site-footer { position: relative; overflow: hidden; background: var(--primary-color); color: var(--white-color); padding-block: 40px 32px; margin-top: calc(var(--section) / 2); }
.footer-keys { position: absolute; top: 38px; right: var(--margin); width: min(520px, 40vw); height: auto; color: var(--white-color); pointer-events: none; }
.fp { opacity: 0.09; }
.fp-text { opacity: 0.2; }
[data-feed] { transition: transform 320ms var(--ease-out); }
[data-feed].is-reset { transition: none; }
.fk { opacity: 0.09; transform-box: fill-box; transform-origin: center; transition: opacity 420ms ease, color 420ms ease, transform 160ms var(--ease-out); }
.fk.is-hit { opacity: 0.6; color: var(--secondary-color); transform: scale(0.9); transition-duration: 60ms; }
.site-footer > .wrap { position: relative; }
.footer-brand { display: inline-block; margin-bottom: clamp(32px, 5vh, 48px); text-decoration: none; }
.footer-brand img { width: auto; height: 56px; }
.footer-top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); font-weight: 500; }
.footer-top p:nth-child(1) { grid-column: 1 / span 4; }
.footer-top p:nth-child(2) { grid-column: 5 / span 3; }
.footer-call { margin-top: clamp(48px, 8vh, 88px); font-size: var(--step-display); line-height: 1; letter-spacing: -0.035em; }
.footer-call a { text-decoration: none; transition: color var(--t-hover) ease; }
.footer-call a:hover { color: var(--secondary-color); }
.footer-email { margin-top: 20px; font-size: var(--step-lead); font-weight: 500; }
.footer-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 32px; margin-top: clamp(56px, 8vh, 96px); }
.footer-col { grid-column: span 3; }
.footer-links li + li, .footer-social li + li { margin-top: 6px; }
.footer-links a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em; transition: text-decoration-color var(--t-hover) ease; }
.footer-links a:hover { text-decoration-color: currentColor; }
.footer-head { font-size: var(--step-body); font-weight: 600; margin-bottom: 12px; letter-spacing: -0.01em; }
.footer-legal { grid-column: 8 / span 5; align-self: end; text-align: right; justify-self: end; max-width: 46ch; }
.footer-legal p { max-width: none; }
.footer-credits { margin-top: 6px; }

/* ---------- back-to-top arrow, fixed at the lower right ---------- */
.to-top { position: fixed; right: clamp(16px, 2.4vw, 32px); bottom: clamp(16px, 2.4vw, 32px); z-index: 20; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: var(--secondary-color); color: var(--primary-color); opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity var(--t-hover) ease, visibility var(--t-hover) ease, transform 320ms var(--ease-out), background-color var(--t-hover) ease; }
.to-top svg { width: 24px; height: 24px; }
.to-top.is-shown, html:not(.js) .to-top { opacity: 1; visibility: visible; transform: none; }
.to-top:active { transform: translateY(2px); }
@media (hover: hover) and (pointer: fine) { .to-top:hover { background: var(--primary-color); color: var(--white-color); } }

/* ---------- WordPress core ---------- */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption-text { font-size: var(--step-small); font-weight: 500; }

/* ---------- motion: content is visible without script ---------- */
@media (prefers-reduced-motion: no-preference) {
	.js [data-rise] { opacity: 0; transform: translateY(22px); animation: rise 900ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 100ms + 150ms); }
	.js [data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
	.js [data-reveal].is-in { opacity: 1; transform: none; }
	.js [data-press] { opacity: 0; transform: translateY(-14px) scale(0.96); animation: key-press 620ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 90ms + 200ms); }
	.js .shutter[data-reveal] { opacity: 1; transform: none; clip-path: inset(0 0 100% 0); transition: clip-path 1100ms var(--ease-in-out); }
	.js .shutter[data-reveal] img { transform: scale(1.1); transition: transform 1500ms var(--ease-soft); }
	.js .shutter[data-reveal].is-in { clip-path: inset(0); }
	.js .shutter[data-reveal].is-in img { transform: none; }
	.hero-media img.is-on { animation: drift 9s var(--ease-soft) both; }
	.frame-stage img.is-on { animation: drift 6s var(--ease-soft) both; }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes key-press { 70% { opacity: 1; transform: translateY(3px) scale(1); } 100% { opacity: 1; transform: none; } }
@keyframes drift { from { transform: scale(1.06); } to { transform: scale(1); } }

/* ---------- tablet ---------- */
@media (max-width: 1080px) {
	.nav-list { gap: 18px; }
	.nav-call { display: none; }
	.hero--keys { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
	.visit-text { grid-column: 1 / span 6; }
	.visit-map { grid-column: 7 / span 6; }
}

/* ---------- phone and small tablet ---------- */
@media (max-width: 820px) {
	.site-header { flex-wrap: wrap; padding-block: 14px; }
	.brand img { height: 38px; }
	.menu-toggle { display: inline-flex; align-items: center; }
	.primary-nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 16px; padding: 16px 0 8px; }
	.primary-nav.is-open { display: flex; }
	html:not(.js) .primary-nav { display: flex; }
	html:not(.js) .menu-toggle { display: none; }
	.nav-list { flex-direction: column; gap: 2px; font-size: var(--step-lead); }
	.nav-call { display: inline-block; }

	.hero--cover { padding-top: 104px; }
	.hero--inner { min-height: 64svh; }
	.hero-title { font-size: clamp(2rem, 8.6vw, 2.5rem); }
	.hero-actions .button { flex: 1 1 100%; }
	.hero--keys { grid-template-columns: 1fr; gap: 40px; padding-top: calc(66px + 28px); }
	.hero-keys { justify-self: stretch; width: 100%; }
	.hero--keys .hero-title { font-size: clamp(2rem, 8.6vw, 2.5rem); }
	.hero-actions .button { flex: 1 1 100%; }

	.panels { flex-direction: column; height: auto; }
	.panel { flex: none; transition: none; }
	.panel-heading { position: static; }
	.panel-tab { align-items: center; min-height: 68px; padding: 18px 20px; }
	.panel-tab span { writing-mode: horizontal-tb; transform: none; }
	.panel.is-open .panel-tab span { opacity: 1; }
	.panel.is-open .panel-heading { pointer-events: auto; }
	.panel-body { position: static; display: none; grid-template-columns: 1fr; gap: 20px; padding: 0 20px 24px; opacity: 1; visibility: visible; }
	.panel.is-open .panel-body { display: grid; }
	.panel-name { display: none; }
	.panel-text, .panel-picture { min-width: 0; }
	.panel-picture img { aspect-ratio: 4 / 3; height: auto; }
	.mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(140px, 38vw, 240px); gap: 6px; }

	.content--split { display: block; }
	.content--split > * + * { margin-top: 20px; }
	.record-top { display: block; }
	.record-number { align-items: flex-start; text-align: left; margin-top: 48px; }
	.facts th, .facts td { display: block; width: auto; padding: 0; }
	.facts tr { display: block; padding-block: 14px; }
	.facts th { padding-bottom: 4px; }
	.record-link { margin-left: 0; }

	.keyboard { display: none; }
	.speed-line { font-size: var(--step-lead); }
	.speed-inner { align-items: stretch; text-align: left; }
	.speed-head p { margin-inline: 0; }
	.speed-results { justify-content: flex-start; }

	.gallery, .intro, .visit { display: flex; flex-direction: column; align-items: stretch; gap: 32px; }
	.gallery-text { padding-bottom: 0; }
	.visit-map, .visit-map iframe { min-height: 360px; }
	.links { display: block; }
	.link-rows { margin-top: 32px; }

	.coupon { grid-template-columns: 1fr; }
	.coupon::before, .coupon::after { display: none; }
	.coupon-form { border-left: 0; border-top: 6px dotted var(--white-color); }

	.footer-top { display: flex; flex-direction: column; gap: 16px; }
	.footer-top-end { text-align: left; justify-self: start; }
	.footer-call { font-size: clamp(1.75rem, 7.6vw, 2.25rem); }
	.footer-keys { display: none; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.footer-col { grid-column: span 1; }
	.footer-legal { grid-column: 1 / -1; text-align: left; justify-self: start; }
}

@media (max-width: 600px) {
	.frame-stage { aspect-ratio: 4 / 5; }
}
