/*
Theme Name: Ploovia Creatives
Theme URI: https://ploovia.com
Author: Piero Salardi
Author URI: https://ploovia.com
Description: Portfolio theme for Ploovia Creatives. Black and white editorial layout, Inter type, smooth scroll, mask reveals and parallax, phone friendly.
Version: 3.5.0
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ploovia
*/

/* ---------- Font: Inter (SIL Open Font License, self-hosted) ---------- */
@font-face {
	font-family: "Inter";
	src: url("assets/fonts/inter-latin-wght-normal.woff2") format("woff2-variations"), url("assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Inter";
	src: url("assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations"), url("assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


/* ---------- Tokens ---------- */
:root {
	--ink: #1a1f25;          /* Piero's black: charcoal with a hint of the original metallic blue */
	--ink-2: #15191e;
	--logo-light: #80a0b8;   /* colours from the original Ploovia logo */
	--logo-deep: #084878;
	--title: #8eabc0;        /* titles on dark: the logo's light steel blue, a touch lighter */
	--paper: #e6e7e8;        /* grey white, never pure white: type on dark */
	--cream: #f2eee3;        /* light cream sections, like Strathmore Writing Natural White paper */
	--metal: 75, 102, 128;   /* the original metallic blue, only as a faint glow */
	--bg: var(--ink);
	--fg: var(--paper);
	--dim: color-mix(in srgb, var(--fg) 58%, transparent);
	--line: color-mix(in srgb, var(--fg) 16%, transparent);
	--m: clamp(20px, 3.2vw, 44px);              /* page margin */
	--ease: cubic-bezier(0.16, 1, 0.3, 1);
	--ease-io: cubic-bezier(0.77, 0, 0.18, 1);
	--font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--display: clamp(3.4rem, 11.5vw, 13rem);
	--h1: clamp(3rem, 8.4vw, 9.5rem);
	--h2: clamp(2.2rem, 5.2vw, 5.6rem);
}
/* Light sections: the whole page turns grey white while they pass */
html.theme-light { --bg: var(--cream); --fg: var(--ink); --title: #4f758b; }   /* titles on grey: Piero's steel blue */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
	margin: 0;
	min-height: 100vh;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--font);
	font-size: 18px;
	line-height: 1.6;
	font-feature-settings: "ss01", "cv11";
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
	transition: background-color 0.9s var(--ease), color 0.9s var(--ease);
}
body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background: radial-gradient(ellipse 1200px 800px at 0% 0%, rgba(var(--metal), 0.10), transparent 70%);
	transition: opacity 0.9s var(--ease);
}
html.theme-light body::before { opacity: 0; }
/* Grey sections: a soft spot gradient in the logo blues glows from the bottom right corner
   and drifts slowly to the left as you scroll (--spot goes from 0 at the top to 1 at the end of the page) */
body::after {
	content: "";
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	width: 200vw;   /* wider than the screen, so the glow keeps its full shape while it slides left */
	z-index: -1;
	pointer-events: none;
	opacity: 0;
	background:
		radial-gradient(42vmax 42vmax at 100vw 100%, rgba(122, 153, 172, 0.6), rgba(122, 153, 172, 0) 70%),   /* #7a99ac */
		radial-gradient(30vmax 30vmax at 88vw 88%, rgba(79, 117, 139, 0.22), rgba(79, 117, 139, 0) 70%),   /* #4f758b */
		radial-gradient(26vmax 22vmax at 100vw 68%, rgba(190, 210, 224, 0.5), rgba(190, 210, 224, 0) 70%);
	filter: blur(20px);
	transform: translate3d(calc(var(--spot, 0) * -70vw), 0, 0);
	transition: opacity 0.9s var(--ease);
	will-change: transform;
}
html.theme-light body::after { opacity: 1; }
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 300; letter-spacing: -0.04em; line-height: 0.95; }
/* Display titles: extra bold, in the title colour */
.hero h1, .entry-title, .entry-content h1, .entry-content h2, .project-index-head h2, .next-project .name { color: var(--title); font-weight: 800; letter-spacing: -0.055em; transition: color 0.9s var(--ease); }
p { margin: 0 0 1.2em; }
::selection { background: var(--fg); color: var(--bg); }
:focus-visible { outline: 1px solid var(--fg); outline-offset: 4px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 12px; left: 12px; z-index: 100; width: auto; height: auto; clip: auto; padding: 10px 16px; background: var(--fg); color: var(--bg); }
.label { display: block; font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }

/* ---------- Header: blends with whatever is behind it ---------- */
.site-header {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 22px var(--m);
	pointer-events: none;
	mix-blend-mode: difference;   /* reads on black and on grey white */
	color: #e6e7e8;
}
.site-header > * { pointer-events: auto; }
.nav-open .site-header { mix-blend-mode: normal; }
.brand { display: flex; align-items: center; gap: 18px; }
.brand a { display: block; line-height: 0; }
.brand img { width: 112px; height: auto; }
.site-tagline { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.7; }
.main-nav ul { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; }
.main-nav a { position: relative; font-size: 14px; letter-spacing: 0.02em; }
.main-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.6s var(--ease); }
.main-nav a:hover::after, .main-nav .current-menu-item > a::after { transform: scaleX(1); transform-origin: left; }
.nav-toggle { display: none; }
.menu-curtain { display: none; }

/* ---------- Page transitions: the same three bands as the menu close the page, then open the next ---------- */
.page-curtain { position: fixed; inset: 0; z-index: 95; pointer-events: none; overflow: hidden; }
.page-curtain span { position: absolute; left: -10%; right: -10%; top: -10%; height: 120%; border-radius: 0 0 50% 50% / 0 0 11vh 11vh; transform: translateY(-101%); }
.page-curtain span:nth-child(1) { background: var(--cream); }
.page-curtain span:nth-child(2) { background: #2b3540; }
.page-curtain span:nth-child(3) { background: var(--ink); }
.pt-leave .page-curtain { pointer-events: auto; }
.pt-leave .page-curtain span { transform: translateY(0); transition: transform 0.8s cubic-bezier(0.7, 0, 0.2, 1); }
.pt-leave .page-curtain span:nth-child(2) { transition-delay: 0.08s; }
.pt-leave .page-curtain span:nth-child(3) { transition-delay: 0.16s; }
.pt-cover .page-curtain span { transform: translateY(0); border-radius: 50% 50% 0 0 / 11vh 11vh 0 0; transition: none; }
.pt-open .page-curtain span { transform: translateY(101%); border-radius: 50% 50% 0 0 / 11vh 11vh 0 0; transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1); }
.pt-open .page-curtain span:nth-child(2) { transition-delay: 0.08s; }
.pt-open .page-curtain span:nth-child(1) { transition-delay: 0.16s; }

/* ---------- Page ---------- */
.site-main { padding: 0 var(--m); }
.page-head { padding: clamp(150px, 22vh, 240px) 0 clamp(56px, 8vw, 110px); }
.page-head .label { margin-bottom: 26px; }
.entry-title { font-size: var(--h1); }

/* Word by word reveal for big type */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.04em 0.02em 0.24em; margin: -0.04em -0.02em -0.24em; }   /* room for g, j, p, y */
.split .w > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); transition-delay: calc(var(--i, 0) * 0.045s); }
.split.is-in .w > span { transform: none; }

/* Soft reveal for text blocks */
.js-motion .fade { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.js-motion .fade.is-in { opacity: 1; transform: none; }

/* ---------- Home hero ---------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 140px 0 clamp(28px, 4vw, 48px); }
.hero h1 { font-size: var(--display); line-height: 0.88; letter-spacing: -0.055em; }
.hero-meta { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; margin-top: clamp(32px, 5vw, 64px); padding-top: 22px; border-top: 1px solid var(--line); font-size: 14px; color: var(--dim); }
.hero-meta > :nth-child(1) { grid-column: 1 / span 5; }
.hero-meta > :nth-child(2) { grid-column: 7 / span 3; }
.hero-meta > :nth-child(3) { grid-column: 11 / span 2; text-align: right; }

/* ---------- Home reel: full width, each image wipes in from the top right corner ---------- */
.reel { position: relative; margin: 0 calc(var(--m) * -1); height: 92svh; min-height: 420px; overflow: hidden; background: var(--ink-2); outline: none; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.reel-slide { position: absolute; inset: 0; overflow: hidden; clip-path: polygon(100% 0, 100% 0, 100% 0); }
.reel-slide.is-back { clip-path: polygon(0 0, 0 0, 0 0); }
.reel-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.18) rotate(-2deg); transform-origin: 100% 0; }
.reel-slide.is-back img { transform-origin: 0 0; transform: scale(1.18) rotate(2deg); }
.reel-slide.is-under { clip-path: polygon(-100% 0, 100% 0, 100% 200%); z-index: 1; }
.reel-slide.is-under.is-back { clip-path: polygon(200% 0, 0 0, 0 200%); }
.reel-slide.is-active { z-index: 2; clip-path: polygon(-100% 0, 100% 0, 100% 200%); transition: clip-path 1.1s var(--ease-io); }
.reel-slide.is-active.is-back { clip-path: polygon(200% 0, 0 0, 0 200%); }
.reel-slide.is-active img, .reel-slide.is-under img { transform: none; transition: transform 1.5s var(--ease); }
.reel-ui { position: absolute; left: var(--m); right: var(--m); bottom: 26px; z-index: 3; display: flex; align-items: center; gap: 20px; mix-blend-mode: difference; color: #e6e7e8; font-size: 12px; letter-spacing: 0.16em; font-variant-numeric: tabular-nums; }
.reel-count b { font-weight: 500; }
.reel-progress { flex: 1; max-width: 280px; height: 1px; background: rgba(230, 231, 232, 0.35); overflow: hidden; }
.reel-progress i { display: block; height: 100%; background: currentColor; transform: scaleX(0); transform-origin: left; }
.reel-hint { margin-left: auto; text-transform: uppercase; }
.reel-rail { position: absolute; right: var(--m); top: 50%; transform: translateY(-50%); z-index: 3; display: flex; flex-direction: column; gap: 6px; }
.reel-rail button { width: 40px; aspect-ratio: 2000 / 1410; padding: 0; border: 0; background: var(--ink) center / cover no-repeat; opacity: 0.45; cursor: pointer; transition: opacity 0.4s var(--ease), transform 0.6s var(--ease); }
.reel-rail button:hover { opacity: 0.85; }
.reel-rail button.is-active { opacity: 1; transform: translateX(-8px); }

/* ---------- Content ---------- */
.entry-content { padding-bottom: clamp(80px, 12vw, 180px); }
.entry-content > * { max-width: 62ch; margin-left: auto; margin-right: auto; }
.entry-content > figure, .entry-content > .wp-block-image, .entry-content > .wp-block-video, .entry-content > .wp-block-gallery, .entry-content > .wp-block-columns, .entry-content > .wp-block-list.is-style-clients { max-width: 1240px; }
.entry-content h1 { font-size: var(--h2); margin: 0 auto 0.5em; }
.entry-content h2 { font-size: var(--h2); margin: clamp(90px, 13vw, 190px) auto 0.45em; }
.entry-content .is-style-eyebrow + h2 { margin-top: 0; }
.entry-content > :first-child { margin-top: 0; }
.entry-content h3 { font-size: clamp(1.3rem, 2.1vw, 1.8rem); font-weight: 300; letter-spacing: -0.02em; line-height: 1.25; color: var(--dim); margin: 0 auto 1em; }
.entry-content .is-style-eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); margin-top: clamp(90px, 13vw, 190px); margin-bottom: 22px; }
.entry-content .is-style-lead { font-size: clamp(1.4rem, 2.6vw, 2.3rem); line-height: 1.22; font-weight: 300; letter-spacing: -0.02em; }
.entry-content a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.entry-content .has-light-color { color: var(--dim); }

/* Home: smaller images, side by side when they belong together */
.home .entry-content > figure.wp-block-image { max-width: 720px; }
.entry-content > .spread { max-width: 1120px; display: grid; gap: clamp(16px, 2vw, 28px); align-items: start; margin: clamp(40px, 6vw, 90px) auto; }
.spread-2, .spread-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.spread-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.spread figure { margin: 0 !important; }
@media (max-width: 640px) { .spread-3 { grid-template-columns: 1fr 1fr; } .spread-3 figure:first-child { grid-column: 1 / -1; } }

/* Images: uncovered by a sliding mask, the picture drifting slower than the page */
.entry-content figure { margin-top: clamp(40px, 6vw, 90px); margin-bottom: clamp(40px, 6vw, 90px); }
.entry-content figure.wp-block-image { position: relative; }
.media-mask { display: block; overflow: hidden; clip-path: inset(0 0 0 0); }
.js-motion .media-mask { clip-path: inset(100% 0 0 0); transition: clip-path 1.5s var(--ease-io); }
.js-motion .is-in > .media-mask, .js-motion .media-mask.is-in { clip-path: inset(0 0 0 0); }
.media-mask img { width: 100%; cursor: zoom-in; background: #fff; will-change: transform; transform: translate3d(0, var(--py, 0px), 0) scale(1.12); }
.entry-content figcaption { margin-top: 14px; font-size: 13px; color: var(--dim); }
.entry-content .wp-block-video video { width: 100%; }

.wp-block-buttons { margin-top: 36px !important; }

.wp-block-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.wp-block-list.is-style-links { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.wp-block-list.is-style-links li a { display: flex; justify-content: space-between; padding: 18px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight: 300; transition: padding 0.6s var(--ease); }
.wp-block-list.is-style-links li a::after { content: "\2197"; color: var(--dim); }
.wp-block-list.is-style-links li a:hover { padding-left: 14px; }

/* Client grid */
.wp-block-list.is-style-clients { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 40px; border-top: 1px solid var(--line); }
.wp-block-list.is-style-clients li { display: flex; flex-direction: column; gap: 6px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.wp-block-list.is-style-clients strong { font-weight: 400; font-size: 17px; line-height: 1.35; }
.wp-block-list.is-style-clients small { font-size: 13px; line-height: 1.5; color: var(--dim); }
.wp-block-list.is-style-clients span { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }

/* ---------- Project index: big names, the image follows the mouse ---------- */
.project-index { padding: clamp(90px, 13vw, 180px) 0; }
.project-index-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 30px; }
.project-index-head h2 { font-size: var(--h2); }
.project-index ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.project-index li a { display: grid; grid-template-columns: 70px minmax(0, 1fr) 260px 110px; align-items: baseline; gap: 20px; padding: clamp(14px, 1.6vw, 22px) 0; border-bottom: 1px solid var(--line); transition: opacity 0.5s var(--ease); }
.project-index .num, .project-index .what, .project-index .year { font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }
.project-index .year { text-align: right; }
.project-index .name { font-size: clamp(1.9rem, 4.6vw, 4.6rem); font-weight: 300; letter-spacing: -0.04em; line-height: 1.02; transition: transform 0.7s var(--ease); }
.project-index .thumb { display: none; }
.project-index ol:hover a { opacity: 0.35; }
.project-index ol:hover a:hover { opacity: 1; }
.project-index li a:hover .name { transform: translateX(18px); }
.index-preview { position: fixed; left: 0; top: 0; z-index: 30; width: clamp(260px, 26vw, 420px); aspect-ratio: 4 / 3; pointer-events: none; overflow: hidden; clip-path: inset(50% 50% 50% 50%); transition: clip-path 0.7s var(--ease-io); }
.index-preview.is-on { clip-path: inset(0 0 0 0); }
.index-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.08); transition: opacity 0.45s var(--ease), transform 0.9s var(--ease); }
.index-preview img.is-on { opacity: 1; transform: none; }

/* ---------- One project ---------- */
.project-facts { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; margin-top: clamp(48px, 7vw, 90px); padding-top: 24px; border-top: 1px solid var(--line); }
.project-facts .about { grid-column: 1 / span 6; font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.45; }
.project-facts .services { grid-column: 8 / span 3; }
.project-facts .year { grid-column: 11 / span 2; text-align: right; }
.project-facts h4 { font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); margin-bottom: 14px; }
.project-facts ul { list-style: none; margin: 0; padding: 0; font-size: 15px; line-height: 1.8; }
.single-project .entry-content > * { max-width: none; }
.single-project .entry-content > p, .single-project .entry-content > h2, .single-project .entry-content > h3 { max-width: 62ch; margin-left: 0; }
.next-project { display: block; padding: clamp(90px, 14vw, 200px) 0 clamp(60px, 9vw, 120px); border-top: 1px solid var(--line); }
.next-project .label { margin-bottom: 20px; }
.next-project .name { display: block; font-size: var(--h1); line-height: 0.92; transition: transform 0.8s var(--ease); }
.next-project:hover .name { transform: translateX(24px); }
.next-project .arrow { display: inline-block; font-size: 0.5em; vertical-align: middle; margin-left: 0.2em; }

/* ---------- About: section list on the left ---------- */
.with-sections { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); }
.section-nav { position: sticky; top: 120px; align-self: start; }
.section-nav ul { list-style: none; margin: 0; padding: 0; }
.section-nav a { display: block; padding: 8px 0; font-size: 14px; color: var(--dim); transition: color 0.4s var(--ease), padding 0.5s var(--ease); }
.section-nav li.is-current a { color: var(--fg); padding-left: 14px; }
.with-sections .entry-content > * { margin-left: 0; }
.entry-content [id] { scroll-margin-top: 110px; }

/* ---------- Contact form ---------- */
.contact-form { max-width: 62ch; margin: 40px auto 0; }
.contact-form p { margin: 0 0 22px; }
.contact-form label { display: block; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--fg); font: inherit; transition: border-color 0.4s var(--ease); }
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--fg); }
.contact-form .hp { position: absolute; left: -9999px; }
.form-notice { max-width: 62ch; margin: 0 auto 30px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Buttons: a curtain of colour drops in, the arrow leaves right and comes back from the left ---------- */
.btn, .wp-block-button__link, .contact-form button {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: inline-flex;
	align-items: center;
	gap: 14px;
	padding: 20px 34px;
	border: 1px solid var(--fg);
	border-radius: 999px;
	background: transparent;
	color: var(--fg);
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0.01em;
	text-decoration: none !important;
	cursor: pointer;
	transition: color 0.5s var(--ease), transform 0.4s var(--ease);
}
.btn::before, .wp-block-button__link::before, .contact-form button::before {
	content: "";
	position: absolute;
	z-index: -1;
	left: -10%;
	right: -10%;
	top: 0;
	height: 130%;
	background: var(--fg);
	border-radius: 0 0 50% 50% / 0 0 40% 40%;
	transform: translateY(-101%);
	transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), border-radius 0.7s var(--ease);
}
.btn:hover, .wp-block-button__link:hover, .contact-form button:hover { color: var(--bg); }
.btn:hover::before, .wp-block-button__link:hover::before, .contact-form button:hover::before { transform: translateY(-8%); border-radius: 0; }
.btn:active, .wp-block-button__link:active, .contact-form button:active { transform: scale(0.97); }
.btn-arrow { display: inline-block; }
.btn-arrow i, .wp-block-button__link .arrow, .contact-form button .arrow { display: inline-block; font-style: normal; }
.btn:hover .btn-arrow i, .wp-block-button__link:hover .arrow, .contact-form button:hover .arrow { animation: arrow-loop 0.75s cubic-bezier(0.7, 0, 0.3, 1) both; }
@keyframes arrow-loop {
	0% { transform: translateX(0); opacity: 1; }
	45% { transform: translateX(1.6em); opacity: 0; }
	46% { transform: translateX(-1.6em); opacity: 0; }
	100% { transform: translateX(0); opacity: 1; }
}

/* ---------- Footer ---------- */
.site-footer { padding: clamp(90px, 14vw, 200px) var(--m) 32px; border-top: 1px solid var(--line); }
.footer-cta .label { margin-bottom: 22px; }
.footer-cta h2 { font-size: var(--h2); color: var(--title); font-weight: 800; letter-spacing: -0.055em; margin-bottom: 40px; }
.page-contact .site-footer, .page-template-default.page-contact .site-footer { padding-top: 40px; }
.site-footer:not(:has(.footer-cta)) { padding-top: 40px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; margin-top: clamp(70px, 10vw, 140px); font-size: 13px; color: var(--dim); }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; margin: 0; padding: 0; }
.footer-bottom a:hover { color: var(--fg); }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 4vw; background: rgba(26, 31, 37, 0.96); opacity: 0; visibility: hidden; transition: opacity 0.5s var(--ease), visibility 0.5s; cursor: zoom-out; }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 100%; max-height: 92vh; width: auto; height: auto; transform: scale(0.96); transition: transform 0.7s var(--ease); background: #fff; }
.lightbox.is-open img { transform: none; }
.lightbox-close { position: absolute; top: 20px; right: 24px; width: 48px; height: 48px; border: 1px solid rgba(230, 231, 232, 0.4); border-radius: 50%; background: transparent; color: #e6e7e8; font-size: 22px; cursor: pointer; }

/* ---------- Tablet and phone ---------- */
@media (max-width: 960px) {
	body { font-size: 17px; }
	.site-header { padding: 18px var(--m); }
	.brand img { width: 92px; }
	.site-tagline { display: none; }
	.nav-toggle { display: inline-flex; align-items: center; gap: 10px; position: relative; z-index: 3; padding: 10px 0; border: 0; background: none; color: #e6e7e8; font: inherit; font-size: 14px; cursor: pointer; }
	.nav-toggle span { display: block; width: 22px; height: 1px; background: currentColor; transition: transform 0.6s var(--ease); }
	.nav-toggle span + span { margin-left: -32px; transform: translateY(5px); }
	.nav-toggle span:first-child { transform: translateY(-2px); }
	.nav-toggle b { position: static; width: auto; height: auto; clip: auto; overflow: visible; font-weight: 400; margin-left: 4px; }
	.nav-open .nav-toggle span:first-child { transform: translateY(2px) rotate(45deg); }
	.nav-open .nav-toggle span + span { transform: translateY(2px) rotate(-45deg); }
	.main-nav { position: fixed; inset: 0; z-index: 1; display: flex; align-items: flex-end; padding: 0 var(--m) 14vh; visibility: hidden; pointer-events: none; transition: visibility 0s 1.3s; }
	.nav-open .main-nav { visibility: visible; pointer-events: auto; transition: none; }
	.main-nav ul { position: relative; z-index: 1; flex-direction: column; gap: 4px; color: var(--paper); }
	.main-nav a { display: inline-block; font-size: clamp(3rem, 15vw, 5.5rem); font-weight: 800; letter-spacing: -0.055em; line-height: 1.05; opacity: 0; transform: translateY(40px); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); }
	.main-nav a::after { display: none; }
	.nav-open .main-nav a { opacity: 1; transform: none; transition: opacity 0.5s var(--ease) 0.45s, transform 0.8s var(--ease) 0.45s; }
	.nav-open .main-nav li:nth-child(2) a { transition-delay: 0.51s; }
	.nav-open .main-nav li:nth-child(3) a { transition-delay: 0.57s; }
	.nav-open .main-nav li:nth-child(4) a { transition-delay: 0.63s; }
	/* Drop-down curtain: three bands fall from the top, fast start and slow end */
	.menu-curtain { display: block; position: absolute; inset: 0; overflow: hidden; }
	.menu-curtain span { position: absolute; left: -10%; right: -10%; top: 0; height: 120%; border-radius: 0 0 50% 50% / 0 0 11vh 11vh; transform: translateY(-101%); }
	.menu-curtain span:nth-child(1) { background: var(--cream); }
	.menu-curtain span:nth-child(2) { background: #2b3540; }
	.menu-curtain span:nth-child(3) { background: var(--ink); }
	.nav-open .menu-curtain span { transform: translateY(0); transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1); }
	.nav-open .menu-curtain span:nth-child(2) { transition-delay: 0.12s; }
	.nav-open .menu-curtain span:nth-child(3) { transition-delay: 0.24s; }
	.nav-open .brand { position: relative; z-index: 3; }

	.hero-meta { grid-template-columns: 1fr; gap: 10px; }
	.hero-meta > * { grid-column: auto !important; text-align: left !important; }
	.reel { height: 64svh; }
	.reel-rail { gap: 4px; }
	.reel-rail button { width: 24px; }
	.reel-hint { display: none; }
	.project-index li a { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
	.project-index .num, .project-index .what { display: none; }
	.project-index .thumb { display: block; width: 64px; aspect-ratio: 4 / 3; overflow: hidden; }
	.project-index .thumb img { width: 100%; height: 100%; object-fit: cover; }
	.index-preview { display: none; }
	.project-facts { grid-template-columns: 1fr 1fr; }
	.project-facts .about { grid-column: 1 / -1; }
	.project-facts .services, .project-facts .year { grid-column: auto; text-align: left; }
	.with-sections { grid-template-columns: 1fr; }
	.section-nav { display: none; }
	.wp-block-list.is-style-clients { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
	.wp-block-columns { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
	.media-mask img { transform: none !important; }
}
