/*
Theme Name: Diba Shipping
Theme URI: https://dibamarine.com
Author: Clara D
Description: Native WordPress theme for Diba Shipping — dependable shipping and cargo solutions from the UAE. Built with the Diba brand system: Cal Sans headings, Kodchasan body text, and the marine gradient / contour-line artwork.
Version: 1.12.0
Requires at least: 6.0
Tested up to: 6.6
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: diba
Tags: business, shipping, logistics, one-column, custom-menu, custom-logo, editor-style
*/

/* ==========================================================================
   1. Fonts
   ========================================================================== */

@font-face {
	font-family: "Cal Sans";
	src: url("assets/fonts/CalSans-Regular.ttf") format("truetype");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Kodchasan";
	src: url("assets/fonts/Kodchasan-Light.ttf") format("truetype");
	font-weight: 300;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Kodchasan";
	src: url("assets/fonts/Kodchasan-Regular.ttf") format("truetype");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Kodchasan";
	src: url("assets/fonts/Kodchasan-Medium.ttf") format("truetype");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Kodchasan";
	src: url("assets/fonts/Kodchasan-SemiBold.ttf") format("truetype");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

/* ==========================================================================
   2. Tokens
   ========================================================================== */

:root {
	/* Brand palette, sampled from the Diba colour bar */
	--diba-cream: #ffdec0;
	--diba-ochre: #c1781a;
	--diba-blue: #19577c;
	--diba-navy: #1b3353;

	/* Extended neutrals derived from the palette */
	--diba-ink: #12233a;
	--diba-shell: #fbf6f0;
	--diba-shell-deep: #f4ece2;
	--diba-line: rgba(27, 51, 83, 0.12);
	--diba-line-soft: rgba(27, 51, 83, 0.08);
	--diba-body: rgba(18, 35, 58, 0.84);
	--diba-body-invert: rgba(255, 255, 255, 0.84);
	--diba-white: #ffffff;

	/* Type */
	--font-display: "Cal Sans", "Trebuchet MS", sans-serif;
	--font-body: "Kodchasan", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--type-display: clamp(2.9rem, 6.6vw, 5.6rem);
	--type-section-heading: clamp(2.25rem, 4.6vw, 4.2rem);
	--type-feature-heading: clamp(1.6rem, 2.6vw, 2.3rem);
	--type-subheading: clamp(1.3rem, 2.2vw, 1.9rem);
	--type-card-heading: clamp(1.25rem, 1.8vw, 1.55rem);
	--type-compact-heading: clamp(1.1rem, 1.5vw, 1.35rem);
	--type-body-lg: 1.075rem;
	--type-body: 1rem;
	--type-body-sm: 0.95rem;
	--type-ui: 0.9rem;
	--type-label: 0.75rem;
	--type-meta: 0.85rem;
	--leading-heading: 1.04;
	--leading-heading-relaxed: 1.08;
	--leading-body: 1.7;
	--leading-compact: 1.6;

	/* Rhythm */
	--shell: 1440px;
	--gutter: clamp(1.25rem, 4vw, 3.5rem);
	--section-y: clamp(4.5rem, 9vw, 9rem);

	/* Shape */
	--r-lg: 40px;
	--r-md: 28px;
	--r-sm: 18px;
	--r-pill: 999px;

	--ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--header-h: 88px;
}

/* ==========================================================================
   3. Base
   ========================================================================== */

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

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

body {
	margin: 0;
	background: var(--diba-shell);
	color: var(--diba-ink);
	font-family: var(--font-body);
	font-weight: 400;
	font-size: var(--type-body);
	line-height: var(--leading-body);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-display);
	font-weight: 400;
	line-height: var(--leading-heading);
	letter-spacing: -0.02em;
	margin: 0;
	text-wrap: balance;
}

p {
	margin: 0;
}

a {
	color: inherit;
	text-decoration: none;
}

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

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

::selection {
	background: var(--diba-cream);
	color: var(--diba-navy);
}

:focus-visible {
	outline: 2px solid var(--diba-ochre);
	outline-offset: 3px;
	border-radius: 4px;
}

.screen-reader-text {
	position: absolute !important;
	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;
	top: -60px;
	left: 1rem;
	z-index: 999;
	padding: 0.75rem 1.25rem;
	background: var(--diba-navy);
	color: var(--diba-cream);
	border-radius: var(--r-pill);
	transition: top 0.2s var(--ease);
}

.skip-link:focus {
	top: 1rem;
}

/* ==========================================================================
   4. Layout primitives
   ========================================================================== */

.shell {
	width: 100%;
	max-width: var(--shell);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.section {
	padding-block: var(--section-y);
}

.section--tight {
	padding-block: clamp(3rem, 6vw, 5.5rem);
}

/* Eyebrow label used above section headings */
.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	font-size: var(--type-label);
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--diba-ochre);
	margin-bottom: 1.4rem;
}

.eyebrow::before {
	content: "";
	width: 26px;
	height: 1px;
	background: currentColor;
	opacity: 0.6;
}

.eyebrow--invert {
	color: var(--diba-cream);
}

/* Section heading + supporting copy, side by side (design reference pattern) */
.split {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	gap: clamp(2rem, 5vw, 5rem);
	align-items: start;
}

.split__lead {
	font-size: var(--type-section-heading);
}

.split__body {
	font-size: var(--type-body-lg);
	color: var(--diba-body);
	max-width: 46ch;
}

.split__body p + p {
	margin-top: 1rem;
}

/* ==========================================================================
   5. Buttons
   ========================================================================== */

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.7rem;
	padding: 0.95rem 1.7rem;
	border: 1px solid transparent;
	border-radius: var(--r-pill);
	font-size: var(--type-ui);
	font-weight: 500;
	letter-spacing: 0.01em;
	cursor: pointer;
	transition: background 0.35s var(--ease), color 0.35s var(--ease),
		border-color 0.35s var(--ease), transform 0.35s var(--ease);
}

.btn:hover {
	transform: translateY(-2px);
}

.btn--primary {
	background: var(--diba-cream);
	color: var(--diba-navy);
}

.btn--primary:hover {
	background: var(--diba-white);
}

.btn--ink {
	background: var(--diba-navy);
	color: var(--diba-cream);
}

.btn--ink:hover {
	background: var(--diba-blue);
}

.btn--ghost {
	border-color: rgba(255, 255, 255, 0.45);
	color: var(--diba-white);
}

.btn--ghost:hover {
	background: rgba(255, 255, 255, 0.12);
	border-color: rgba(255, 255, 255, 0.7);
}

.btn--outline {
	border-color: var(--diba-line);
	color: var(--diba-navy);
}

.btn--outline:hover {
	border-color: var(--diba-navy);
	background: var(--diba-navy);
	color: var(--diba-cream);
}

.btn__arrow {
	width: 14px;
	height: 14px;
	flex: none;
	transition: transform 0.35s var(--ease);
}

.btn:hover .btn__arrow {
	transform: translateX(3px);
}

/* Circular icon button — the round arrow in the reference cards */
.icon-btn {
	width: 44px;
	height: 44px;
	flex: none;
	display: grid;
	place-items: center;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.4);
	background: rgba(255, 255, 255, 0.14);
	backdrop-filter: blur(6px);
	color: var(--diba-white);
	cursor: pointer;
	transition: background 0.35s var(--ease), color 0.35s var(--ease),
		border-color 0.35s var(--ease);
}

.icon-btn:hover {
	background: var(--diba-cream);
	border-color: var(--diba-cream);
	color: var(--diba-navy);
}

.icon-btn svg {
	width: 15px;
	height: 15px;
}

.icon-btn--light {
	border-color: var(--diba-line);
	background: transparent;
	color: var(--diba-navy);
}

.icon-btn--light:hover {
	background: var(--diba-navy);
	border-color: var(--diba-navy);
	color: var(--diba-cream);
}

.icon-btn[disabled] {
	opacity: 0.35;
	pointer-events: none;
}

/* ==========================================================================
   6. Header
   ========================================================================== */

.site-header {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 100;
	padding-block: 1.1rem;
	transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease),
		padding 0.4s var(--ease);
}

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

.site-header.is-stuck {
	background: rgba(251, 246, 240, 0.88);
	backdrop-filter: blur(14px);
	box-shadow: 0 1px 0 var(--diba-line-soft);
	padding-block: 0.7rem;
}

.brand {
	display: block;
	flex: none;
}

.brand img {
	height: 34px;
	width: auto;
	transition: opacity 0.3s var(--ease);
}

.brand__cream {
	display: block;
}

.brand__blue {
	display: none;
}

.is-stuck .brand__cream {
	display: none;
}

.is-stuck .brand__blue {
	display: block;
}

.site-nav {
	display: flex;
	align-items: center;
	gap: clamp(1rem, 2.4vw, 2.4rem);
	margin-left: auto;
}

.site-nav ul {
	display: flex;
	align-items: center;
	gap: clamp(1rem, 2.4vw, 2.4rem);
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-nav a {
	position: relative;
	font-size: var(--type-ui);
	font-weight: 400;
	color: rgba(255, 255, 255, 0.86);
	padding-block: 0.35rem;
	transition: color 0.3s var(--ease);
}

.site-nav a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.4s var(--ease);
}

.site-nav a:hover::after,
.site-nav .current-menu-item > a::after {
	transform: scaleX(1);
}

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

.is-stuck .site-nav a {
	color: var(--diba-body);
}

.is-stuck .site-nav a:hover {
	color: var(--diba-navy);
}

.site-header .btn {
	padding: 0.7rem 1.35rem;
	font-size: var(--type-meta);
}

/* The in-drawer CTA only appears once the nav collapses */
.site-nav > .btn {
	display: none;
}

.is-stuck .header-cta {
	background: var(--diba-navy);
	color: var(--diba-cream);
}

.nav-toggle {
	display: none;
	width: 44px;
	height: 44px;
	place-items: center;
	border: 1px solid rgba(255, 255, 255, 0.4);
	border-radius: 50%;
	background: transparent;
	color: var(--diba-white);
	cursor: pointer;
}

.is-stuck .nav-toggle {
	border-color: var(--diba-line);
	color: var(--diba-navy);
}

.nav-toggle span {
	display: block;
	width: 16px;
	height: 1px;
	background: currentColor;
	position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
	content: "";
	position: absolute;
	left: 0;
	width: 16px;
	height: 1px;
	background: currentColor;
	transition: transform 0.3s var(--ease);
}

.nav-toggle span::before {
	top: -5px;
}

.nav-toggle span::after {
	top: 5px;
}

/* ==========================================================================
   7. Hero
   ========================================================================== */

.hero {
	position: relative;
	min-height: min(100svh, 900px);
	display: flex;
	align-items: flex-end;
	padding-block: calc(var(--header-h) + 3rem) clamp(2.5rem, 5vw, 4.5rem);
	border-radius: 0 0 var(--r-lg) var(--r-lg);
	overflow: hidden;
	color: var(--diba-white);
	isolation: isolate;
}

/* Layer order: gradient fallback → video → scrim → contour artwork → content */
.hero__bg {
	position: absolute;
	inset: 0;
	z-index: -4;
	/* Plain brand gradient — the contour lines come from .hero__pattern only */
	background: radial-gradient(
			120% 90% at 12% 18%,
			rgba(255, 222, 192, 0.32) 0%,
			rgba(255, 222, 192, 0) 55%
		),
		linear-gradient(125deg, var(--diba-blue) 0%, var(--diba-navy) 78%);
}

.hero__video {
	position: absolute;
	inset: 0;
	z-index: -3;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
}

/* The Diba contour artwork, sitting over the footage */
.hero__pattern {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: url("assets/images/texture-contour.png") center / cover no-repeat;
	opacity: 0.55;
	mix-blend-mode: screen;
	pointer-events: none;
}

.hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -2;
	background: linear-gradient(
			110deg,
			rgba(18, 35, 58, 0.82) 0%,
			rgba(25, 87, 124, 0.45) 55%,
			rgba(25, 87, 124, 0.15) 100%
		),
		linear-gradient(to top, rgba(18, 35, 58, 0.7), transparent 45%);
}

.hero__inner {
	width: 100%;
}

.hero h1 {
	font-size: var(--type-display);
	max-width: 15ch;
}

.hero__copy {
	margin-top: 1.8rem;
	max-width: 44ch;
	font-size: var(--type-body-lg);
	color: rgba(255, 255, 255, 0.9);
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
	margin-top: 2.4rem;
}

/* ==========================================================================
   8. Statement + band
   ========================================================================== */

.statement__body {
	padding-bottom: 0.4rem;
}

/* Layer order mirrors the hero: video → contour artwork */
.band {
	position: relative;
	margin-top: clamp(2.5rem, 5vw, 4rem);
	height: clamp(240px, 34vw, 420px);
	border-radius: var(--r-md);
	overflow: hidden;
	background: var(--diba-blue) url("assets/images/texture-gradient.jpg") center /
		cover no-repeat;
}

.band__video {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
}

.band::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	background: url("assets/images/texture-contour.png") center / cover no-repeat;
	opacity: 0.35;
	mix-blend-mode: screen;
	pointer-events: none;
}

/* Small credential row under the statement */
.facts {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(1.5rem, 3vw, 3rem);
	margin-top: clamp(2.5rem, 5vw, 4rem);
	padding-top: clamp(2rem, 4vw, 3rem);
	border-top: 1px solid var(--diba-line);
}

.facts__item h3 {
	font-size: var(--type-feature-heading);
	color: var(--diba-navy);
}

.facts__item p {
	margin-top: 0.5rem;
	font-size: var(--type-body);
	color: var(--diba-body);
}

/* ==========================================================================
   9. Services grid
   ========================================================================== */

.services {
	background: var(--diba-shell-deep);
	border-radius: var(--r-lg);
}

.service-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(0.9rem, 1.6vw, 1.4rem);
	width: 100%;
	max-width: var(--shell);
	margin-inline: auto;
	margin-top: clamp(2.2rem, 4vw, 3.2rem);
	padding-inline: var(--gutter);
}

.service-card {
	position: relative;
	min-height: clamp(300px, 26vw, 430px);
	border-radius: var(--r-md);
	overflow: hidden;
	background: var(--diba-navy) url("assets/images/texture-gradient.jpg") center /
		cover no-repeat;
	color: var(--diba-white);
	display: flex;
	flex-direction: column;
	/* Single child now the number is gone — keep the copy anchored to the bottom */
	justify-content: flex-end;
	padding: clamp(1.1rem, 1.5vw, 1.5rem);
	isolation: isolate;
}

.service-card__bg {
	position: absolute;
	inset: 0;
	z-index: -2;
	background: url("assets/images/texture-gradient.jpg") center / cover no-repeat;
	transition: transform 0.9s var(--ease);
}

.service-card:hover .service-card__bg {
	transform: scale(1.06);
}

.service-card::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(
		to top,
		rgba(18, 35, 58, 0.94) 10%,
		rgba(18, 35, 58, 0.55) 55%,
		rgba(18, 35, 58, 0.42) 100%
	);
}

.service-card h3 {
	font-size: var(--type-compact-heading);
	max-width: 16ch;
	/* Reserve the same three-line title area in every card. */
	min-block-size: 3.12em;
}

.service-card p {
	margin-top: 0.7rem;
	font-size: var(--type-body-sm);
	line-height: var(--leading-compact);
	color: rgba(255, 255, 255, 0.9);
	max-width: 34ch;
	/* A shared copy area keeps both the headings and paragraphs aligned. */
	min-block-size: 9.3em;
}

/* ==========================================================================
   10. Why us — image-led vertical tabs
   ========================================================================== */

.why {
	overflow: hidden;
}

.why__intro {
	padding: clamp(2rem, 4vw, 3.75rem);
	padding-bottom: clamp(4rem, 7vw, 6rem);
}

.why__lead {
	max-width: 15ch;
	font-size: var(--type-section-heading);
}

.why__summary {
	max-width: 52ch;
	margin-top: clamp(1.25rem, 2.5vw, 2rem);
	font-size: var(--type-body-lg);
	color: var(--diba-body);
}

.why__showcase {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 1px;
	min-height: clamp(720px, 62vw, 860px);
	border: 1px solid var(--diba-line);
	border-radius: var(--r-md);
	background: var(--diba-line);
	overflow: hidden;
}

.why__content {
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: var(--diba-shell);
}

.reasons {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 1px;
	min-width: 0;
	border-top: 1px solid var(--diba-line);
	background: var(--diba-line);
}

.reason {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	flex: 0 0 auto;
	min-width: 0;
	background: var(--diba-shell-deep);
	transition: flex 0.6s var(--ease), background 0.45s var(--ease),
		box-shadow 0.45s var(--ease);
}

.reason[open] {
	flex: 1 1 auto;
	background: var(--diba-white);
	box-shadow: inset 4px 0 0 var(--diba-blue);
}

.reason__trigger {
	width: 100%;
	min-height: clamp(92px, 9vw, 112px);
	list-style: none;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: start;
	padding: clamp(1.35rem, 2.4vw, 2rem);
	background: none;
	border: 0;
	text-align: left;
	cursor: pointer;
}

.reason__trigger::-webkit-details-marker,
.reason__trigger::marker {
	display: none;
	content: "";
}

.reason__title {
	max-width: 24ch;
	font-family: var(--font-display);
	font-size: var(--type-subheading);
	line-height: var(--leading-heading-relaxed);
	letter-spacing: -0.02em;
	transition: color 0.3s var(--ease);
}

.reason:hover .reason__title,
.reason[open] .reason__title {
	color: var(--diba-blue);
}

.reason__panel {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.55s var(--ease);
}

.reason[open] .reason__panel {
	grid-template-rows: 1fr;
}

.reason__panel > div {
	overflow: hidden;
}

.reason__panel p {
	max-width: 54ch;
	padding: 0 clamp(1.35rem, 2.4vw, 2rem) clamp(1.75rem, 3vw, 2.75rem);
	font-size: var(--type-body);
	color: var(--diba-body);
}

.why__visual {
	position: relative;
	min-width: 0;
	min-height: 100%;
	background: var(--diba-navy) url("assets/images/texture-gradient.jpg") center / cover no-repeat;
	overflow: hidden;
}

.reason-visual {
	position: absolute;
	inset: 0;
	margin: 0;
	opacity: 0;
	transform: scale(1.045);
	transition: opacity 0.65s var(--ease), transform 1.1s var(--ease);
}

.reason-visual.is-active {
	opacity: 1;
	transform: scale(1);
}

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

.why__visual > video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ==========================================================================
   11. Process strip
   ========================================================================== */

.process {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(2rem, 4vw, 4.5rem);
	margin-top: clamp(3.5rem, 7vw, 6rem);
}

.process__step {
	min-width: 0;
}

.process__icon {
	width: clamp(88px, 8vw, 116px);
	aspect-ratio: 1;
	color: var(--diba-navy);
}

.process__icon svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.process__svg-line,
.process__svg-accent {
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	vector-effect: non-scaling-stroke;
}

.process__svg-accent {
	color: var(--diba-ochre);
	stroke-width: 2.4;
}

.process__draw {
	stroke-dasharray: 1;
	stroke-dashoffset: 1;
	animation: process-draw 4.8s var(--ease) infinite;
}

.process__draw--delay {
	animation-delay: 0.35s;
}

.process__float {
	transform-origin: center;
	animation: process-float 3.6s ease-in-out infinite;
}

.process__wave {
	animation: process-wave 3.2s ease-in-out infinite;
}

.process__check {
	stroke-dasharray: 1;
	stroke-dashoffset: 1;
	animation: process-check 4.2s var(--ease) infinite;
}

.process__pulse {
	fill: var(--diba-ochre);
	stroke: none;
	transform-origin: center;
	transform-box: fill-box;
	animation: process-pulse 2.4s ease-in-out infinite;
}

.process__tracker {
	fill: var(--diba-ochre);
	stroke: var(--diba-shell);
	stroke-width: 2;
	animation: process-track 4.5s var(--ease) infinite;
}

.process__step h3 {
	margin-top: clamp(1.25rem, 2.5vw, 2rem);
	font-size: var(--type-card-heading);
}

.process__step p {
	max-width: 34ch;
	margin-top: 0.75rem;
	font-size: var(--type-body);
	color: var(--diba-body);
}

@keyframes process-draw {
	0%,
	12% {
		stroke-dashoffset: 1;
	}
	42%,
	100% {
		stroke-dashoffset: 0;
	}
}

@keyframes process-float {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-4px);
	}
}

@keyframes process-wave {
	0%,
	100% {
		transform: translateX(-2px);
	}
	50% {
		transform: translateX(2px);
	}
}

@keyframes process-check {
	0%,
	22% {
		stroke-dashoffset: 1;
	}
	48%,
	82% {
		stroke-dashoffset: 0;
	}
	100% {
		stroke-dashoffset: -1;
	}
}

@keyframes process-pulse {
	0%,
	100% {
		opacity: 1;
		transform: scale(1);
	}
	50% {
		opacity: 0.35;
		transform: scale(1.8);
	}
}

@keyframes process-track {
	0%,
	8% {
		transform: translate(0, 0);
	}
	38% {
		transform: translate(20px, -22px);
	}
	68% {
		transform: translate(43px, -25px);
	}
	92%,
	100% {
		transform: translate(65px, -43px);
	}
}

/* ==========================================================================
   12. Shared contact + footer video
   ========================================================================== */

.site-end {
	position: relative;
	margin-top: var(--section-y);
	border-radius: var(--r-lg) var(--r-lg) 0 0;
	overflow: hidden;
	color: var(--diba-white);
	isolation: isolate;
	background: var(--diba-navy) url("assets/images/texture-gradient.jpg") center / cover no-repeat;
}

.site-end__video {
	position: absolute;
	inset: 0;
	z-index: -3;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.site-end::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -2;
	pointer-events: none;
	background: linear-gradient(
		to bottom,
		rgba(18, 35, 58, 0.66) 0%,
		rgba(18, 35, 58, 0.78) 48%,
		rgba(18, 35, 58, 0.94) 100%
	);
}

.cta {
	position: relative;
	padding-block: clamp(4rem, 8vw, 7rem);
}

.cta__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	gap: clamp(2rem, 5vw, 5rem);
	align-items: end;
}

.cta h2 {
	font-size: var(--type-section-heading);
	max-width: 14ch;
}

.cta__body {
	font-size: var(--type-body-lg);
	color: rgba(255, 255, 255, 0.9);
	max-width: 46ch;
}

.cta-form {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 1.6rem;
	padding: 0.45rem 0.45rem 0.45rem 1.4rem;
	border: 1px solid rgba(255, 255, 255, 0.32);
	border-radius: var(--r-pill);
	background: rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(8px);
	transition: border-color 0.3s var(--ease);
}

.cta-form:focus-within {
	border-color: var(--diba-cream);
}

.cta-form input {
	flex: 1 1 auto;
	min-width: 0;
	background: none;
	border: 0;
	color: var(--diba-white);
	font-size: var(--type-body-sm);
	font-weight: 400;
}

.cta-form input::placeholder {
	color: rgba(255, 255, 255, 0.72);
}

.cta-form input:focus {
	outline: none;
}

.cta-form .btn {
	flex: none;
}

.cta__note {
	margin-top: 1rem;
	font-size: var(--type-meta);
	color: rgba(255, 255, 255, 0.72);
}

/* ==========================================================================
   13. Footer
   ========================================================================== */

.site-footer {
	position: relative;
	padding-block: clamp(3rem, 6vw, 5rem) 2rem;
	background: transparent;
	color: var(--diba-body-invert);
}

.footer__top {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
	gap: clamp(2rem, 4vw, 4rem);
	padding-bottom: clamp(2.5rem, 5vw, 4rem);
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer__brand img {
	height: 38px;
	width: auto;
}

.footer__brand p {
	margin-top: 1.4rem;
	max-width: 34ch;
	font-size: var(--type-body-sm);
}

.footer__col h4 {
	font-size: var(--type-body);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--diba-cream);
	margin-bottom: 1.2rem;
}

.footer__col ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.7rem;
	font-size: var(--type-body-sm);
}

.footer__col a {
	transition: color 0.3s var(--ease);
}

.footer__col a:hover {
	color: var(--diba-cream);
}

.footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 1.6rem;
	font-size: var(--type-meta);
	color: rgba(255, 255, 255, 0.65);
}

.footer__bottom ul {
	display: flex;
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* ==========================================================================
   14. Interior pages (page.php / index.php)
   ========================================================================== */

.page-hero {
	position: relative;
	padding-block: calc(var(--header-h) + 5rem) clamp(3rem, 6vw, 5rem);
	border-radius: 0 0 var(--r-lg) var(--r-lg);
	overflow: hidden;
	color: var(--diba-white);
	isolation: isolate;
}

.page-hero__bg {
	position: absolute;
	inset: 0;
	z-index: -2;
	background: var(--diba-navy) url("assets/images/texture-gradient.jpg") center /
		cover no-repeat;
}

.page-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(
		100deg,
		rgba(18, 35, 58, 0.85),
		rgba(25, 87, 124, 0.45)
	);
}

.page-hero h1 {
	font-size: var(--type-section-heading);
	max-width: 18ch;
}

.entry {
	max-width: 74ch;
	margin-inline: auto;
	font-size: var(--type-body-lg);
}

.entry > * + * {
	margin-top: 1.4rem;
}

.entry h2 {
	font-size: var(--type-feature-heading);
	margin-top: 2.6rem;
}

.entry h3 {
	font-size: var(--type-card-heading);
	margin-top: 2rem;
}

.entry a {
	color: var(--diba-blue);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.entry ul,
.entry ol {
	padding-left: 1.2rem;
}

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

.entry blockquote {
	margin: 2rem 0;
	padding-left: 1.6rem;
	border-left: 2px solid var(--diba-ochre);
	font-size: var(--type-body-lg);
}

.legal-hero__eyebrow {
	margin-bottom: 0.75rem;
	font-size: var(--type-meta);
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--diba-cream);
}

.legal-section {
	background: var(--diba-shell);
}

.legal-entry {
	max-width: 78ch;
	color: var(--diba-navy);
}

.legal-entry__lead {
	font-size: var(--type-body-lg);
	color: var(--diba-blue);
}

.legal-entry h2 {
	padding-top: 0.75rem;
	border-top: 1px solid var(--diba-line);
}

.legal-entry li + li {
	margin-top: 0.55rem;
}

.legal-entry li::marker {
	color: var(--diba-ochre);
}

.post-card {
	display: block;
	padding: clamp(1.5rem, 3vw, 2.2rem);
	border: 1px solid var(--diba-line);
	border-radius: var(--r-sm);
	background: var(--diba-white);
	transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}

.post-card:hover {
	transform: translateY(-4px);
	border-color: var(--diba-navy);
}

.post-card h2 {
	font-size: var(--type-card-heading);
}

.post-card p {
	margin-top: 0.7rem;
	font-size: var(--type-body-sm);
	color: var(--diba-body);
}

.post-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1.4rem;
}

/* ==========================================================================
   15. Reveal animation
   ========================================================================== */

.reveal {
	opacity: 0;
	transform: translateY(26px);
	transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

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

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}

	.process__icon * {
		animation: none !important;
		transform: none;
	}

	.process__draw,
	.process__check {
		stroke-dashoffset: 0;
	}
}

/* ==========================================================================
   16. Responsive
   ========================================================================== */

@media (max-width: 1180px) {
	.facts,
	.process,
	.service-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.footer__top {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 900px) {
	:root {
		--r-lg: 28px;
		--r-md: 22px;
	}

	.split,
	.cta__inner {
		grid-template-columns: minmax(0, 1fr);
		align-items: start;
	}

	.hero {
		min-height: auto;
		padding-top: calc(var(--header-h) + 4.5rem);
	}

	.nav-toggle {
		display: grid;
	}

	.site-nav {
		position: fixed;
		inset: 0 0 auto 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: calc(var(--header-h) + 1.5rem) var(--gutter) 2rem;
		background: var(--diba-ink);
		clip-path: inset(0 0 100% 0);
		transition: clip-path 0.5s var(--ease);
	}

	.site-nav.is-open {
		clip-path: inset(0 0 0 0);
	}

	.site-nav ul {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.site-nav li {
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	}

	.site-nav a,
	.is-stuck .site-nav a {
		display: block;
		padding-block: 1.1rem;
		font-size: var(--type-body-lg);
		font-family: var(--font-body);
		font-weight: 500;
		color: var(--diba-white);
	}

	.site-nav > .btn {
		display: inline-flex;
		margin-top: 1.5rem;
		justify-content: center;
	}

	.header-cta--desktop {
		display: none;
	}

	.why__showcase {
		grid-template-columns: minmax(0, 1fr);
		min-height: 0;
	}

	.reasons {
		min-height: 480px;
	}

	.why__visual {
		aspect-ratio: 16 / 10;
		min-height: 0;
	}
}

@media (max-width: 640px) {
	:root {
		--header-h: 76px;
	}

	.facts,
	.process,
	.footer__top {
		grid-template-columns: minmax(0, 1fr);
	}

	.hero__actions .btn {
		flex: 1 1 auto;
		justify-content: center;
	}

	.service-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.service-card {
		min-height: 260px;
	}

	.service-card h3,
	.service-card p {
		min-block-size: 0;
	}

	.why__intro {
		padding-bottom: 3.5rem;
	}

	.why__showcase {
		border-radius: var(--r-sm);
	}

	.reasons {
		min-height: 500px;
	}

	.reason__trigger {
		min-height: 84px;
		padding: 1.25rem;
	}

	.reason__panel p {
		padding: 0 1.25rem 1.75rem;
	}

	.why__visual {
		aspect-ratio: 4 / 3;
	}
}
