/* ============================================================
 * The Whimsical Studio — main.css
 * Single modern stylesheet. Mobile-first.
 * Brand palette preserved: gold #efce4a, orange #d8924c,
 * green #47d93c, black/white/grays.
 * ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}
body {
  font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  margin: 0;
}
img, picture, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--c-ink); }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; color: var(--c-ink); letter-spacing: -0.01em; }
p { line-height: 1.7; color: var(--c-ink-soft); }
::selection { background: var(--c-gold); color: #000; }
:focus-visible { outline: 2px solid var(--c-gold); outline-offset: 2px; border-radius: 2px; }

/* ---------- Design tokens ---------- */
:root {
  --c-bg: #ffffff;
  --c-surface: #fafaf7;
  --c-surface-2: #f4f4f1;
  --c-ink: #111111;
  --c-ink-soft: #4a4a4a;
  --c-muted: #7a7a7a;
  --c-line: #ececec;
  --c-line-soft: #f4f4f4;
  --c-gold: #efce4a;
  --c-orange: #d8924c;
  --c-green: #47d93c;
  --c-dark: #0d0d0d;

  --radius: 12px;
  --radius-sm: 6px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.06), 0 2px 6px rgba(0,0,0,.04);
  --shadow-md: 0 6px 18px rgba(0,0,0,.08), 0 12px 32px rgba(0,0,0,.06);
  --shadow-lg: 0 14px 40px rgba(0,0,0,.14), 0 28px 70px rgba(0,0,0,.08);

  --ease: cubic-bezier(.2,.7,.2,1);
  --dur: 260ms;

  --container: 1400px;
  --gutter: clamp(16px, 3vw, 48px);
  --nav-h: 72px;
}

/* ---------- Utilities ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); width: 100%; }
.section { padding: clamp(56px, 8vw, 112px) 0; }
.section-narrow { padding: clamp(40px, 5vw, 64px) 0; }
.text-center { text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(1.75rem, 2.2vw + 1rem, 3.25rem);
  margin-bottom: 10px;
  letter-spacing: -0.015em;
}
.section-title + .section-lead {
  font-size: clamp(0.95rem, 0.4vw + 0.9rem, 1.2rem);
  color: var(--c-muted);
  max-width: 720px;
  margin: 0 auto;
}
.section-heading { text-align: center; margin-bottom: clamp(32px, 5vw, 56px); }
.divider {
  width: 56px; height: 3px; border-radius: 2px;
  background: var(--c-gold); margin: 16px auto 0;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  min-height: 46px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1.5px solid transparent;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: #000; color: #fff; border-color: #000; }
.btn-primary:hover { background: var(--c-gold); color: #000; border-color: var(--c-gold); box-shadow: var(--shadow-sm); }
.btn-outline { background: transparent; color: #000; border-color: #000; }
.btn-outline:hover { background: #000; color: #fff; }
.btn-ghost-white { background: rgba(0,0,0,.28); color: #fff; border-color: #fff; backdrop-filter: blur(3px); }
.btn-ghost-white:hover { background: #fff; color: #000; }
.btn-sm { padding: 9px 18px; min-height: 36px; font-size: 12px; }

/* ---------- Top bar (logo + social) ---------- */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--c-line);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
}
.topbar__left, .topbar__right { flex: 1 1 0; display: flex; align-items: center; }
.topbar__right { justify-content: flex-end; }
.topbar__center { flex: 0 0 auto; display: flex; justify-content: center; }
.topbar__logo img {
  height: 52px;
  width: auto;
  object-fit: contain;
  transition: transform var(--dur) var(--ease);
}
.topbar__logo:hover img { transform: scale(1.04); }

.socials {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f2f2f2;
  color: #222;
  font-size: 14px;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.socials a:hover {
  background: #000;
  color: #fff;
  transform: translateY(-2px);
}

/* ---------- Main navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(1.1) blur(8px);
  -webkit-backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid var(--c-line);
  transition: box-shadow var(--dur) var(--ease);
}
.nav.is-stuck { box-shadow: var(--shadow-sm); }
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
  min-height: var(--nav-h);
}
.nav__brand {
  display: none;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #000;
}
.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border: 1px solid #111;
  border-radius: 8px;
  color: #111;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav__toggle:hover { background: #000; color: #fff; }
.nav__menu {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0 auto;
}
.nav__menu > li { position: relative; }
.nav__link, .nav__dropbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 16px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #111;
  position: relative;
  transition: color var(--dur) var(--ease);
}
.nav__link::after, .nav__dropbtn::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 9px;
  height: 2px;
  background: #000;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur) var(--ease);
}
.nav__menu > li:hover .nav__link::after,
.nav__menu > li:hover .nav__dropbtn::after,
.nav__menu > li.is-active > a::after,
.nav__link.is-active::after { transform: scaleX(1); }
.nav__dropbtn::before {
  content: "";
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px,-2px);
  margin-left: 4px;
  opacity: .7;
  order: 2;
}
.nav__drop {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 10px);
  min-width: 220px;
  padding: 6px 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--c-line);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
  z-index: 50;
}
.nav__menu > li:hover .nav__drop,
.nav__menu > li:focus-within .nav__drop,
.nav__menu > li.is-open .nav__drop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.nav__drop a {
  display: block;
  padding: 10px 18px;
  font-size: 13px;
  color: #333;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav__drop a:hover { background: #f6f6f6; color: #000; }
.nav__cta { display: inline-flex; align-items: center; gap: 8px; }

.nav__backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease), visibility var(--dur);
  z-index: 50;                    /* below menu (55) but below nav bar (60) so toggle stays clickable */
}
body.menu-open .nav__backdrop { opacity: 1; visibility: visible; pointer-events: auto; }
body.menu-open { overflow: hidden; }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  min-height: clamp(440px, 80vh, 760px);
  overflow: hidden;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.hero__slides { position: absolute; inset: 0; }
.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1000ms var(--ease);
}
.hero__slide.is-active { opacity: 1; }
.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 8s var(--ease);
}
.hero__slide.is-active img { transform: scale(1.05); }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.6) 100%);
  z-index: 1;
}
.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 80px var(--gutter);
  max-width: 900px;
}
.hero__title {
  color: #fff;
  font-size: clamp(2rem, 4vw + .5rem, 4rem);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(0,0,0,.3);
}
.hero__sub {
  color: rgba(255,255,255,.88);
  font-size: clamp(1rem, 0.5vw + .9rem, 1.25rem);
  margin: 0 auto 28px;
  max-width: 620px;
  line-height: 1.55;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.hero__dots {
  position: absolute;
  bottom: 28px;
  left: 0; right: 0;
  z-index: 3;
  display: flex;
  gap: 8px;
  justify-content: center;
}
.hero__dots button {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
  padding: 0;
}
.hero__dots button.is-active { background: #fff; transform: scale(1.2); }

/* ---------- Page header (non-home) ---------- */
.page-header {
  padding: clamp(56px, 8vw, 96px) 0 clamp(32px, 5vw, 48px);
  text-align: center;
  border-bottom: 1px solid var(--c-line);
  background: var(--c-surface);
}
.page-header h1 {
  font-size: clamp(2rem, 3vw + 1rem, 3.75rem);
  margin-bottom: 10px;
}
.page-header p {
  max-width: 720px;
  margin: 0 auto;
  color: var(--c-muted);
  font-size: clamp(0.95rem, 0.4vw + 0.9rem, 1.15rem);
}

/* ---------- Card grid ---------- */
.grid {
  display: grid;
  gap: clamp(20px, 2.8vw, 40px);
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.card {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--c-surface-2);
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease);
}
.card:hover .card__media img { transform: scale(1.06); }
.card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.35) 100%);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.card:hover .card__media::after { opacity: 1; }
.card__tag {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 2;
  padding: 5px 12px;
  background: rgba(255,255,255,.95);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #111;
}
.card__body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}
.card__title {
  font-size: clamp(1rem, 0.4vw + .9rem, 1.2rem);
  line-height: 1.35;
}
.card__title a { color: #111; }
.card__title a:hover { color: var(--c-orange); }
.card__meta {
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.card__body p {
  font-size: 14px;
  color: var(--c-ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__more {
  margin-top: auto;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #111;
  border-bottom: 1.5px solid #111;
  padding-bottom: 2px;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.card__more:hover { color: var(--c-orange); border-color: var(--c-orange); transform: translateX(3px); }

/* ---------- Feature / about blocks ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
}
.split--reverse { direction: rtl; }
.split--reverse > * { direction: ltr; }
.split__media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.split__body > * + * { margin-top: 14px; }
.split__body h2 {
  font-size: clamp(1.5rem, 1.6vw + 1rem, 2.25rem);
}
.split__body p { max-width: 58ch; }

/* ---------- Promo band ---------- */
.promo {
  position: relative;
  padding: clamp(56px, 8vw, 96px) var(--gutter);
  color: #fff;
  background: #0d0d0d;
  overflow: hidden;
  text-align: center;
}
.promo__bg {
  position: absolute; inset: 0;
  z-index: 0;
  opacity: .35;
  object-fit: cover;
  width: 100%; height: 100%;
}
.promo__bg + .promo__inner { position: relative; z-index: 1; }
.promo h2 { color: #fff; font-size: clamp(1.75rem, 2.5vw + 1rem, 2.75rem); }
.promo p { color: rgba(255,255,255,.82); margin: 14px auto 22px; max-width: 560px; }

/* ---------- Newsletter ---------- */
.newsletter {
  background: var(--c-surface);
  padding: clamp(48px, 7vw, 88px) var(--gutter);
  text-align: center;
}
.newsletter h2 {
  font-size: clamp(1.5rem, 1.4vw + 1rem, 2.25rem);
  margin-bottom: 8px;
}
.newsletter p { max-width: 540px; margin: 0 auto 24px; color: var(--c-muted); }
.newsletter__form {
  display: flex;
  gap: 8px;
  max-width: 520px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  padding: 4px;
  box-shadow: var(--shadow-sm);
}
.newsletter__form input {
  flex: 1;
  border: 0;
  padding: 12px 18px;
  background: transparent;
  font-size: 14px;
  min-width: 0;
  border-radius: 999px;
}
.newsletter__form button { border-radius: 999px; padding: 10px 24px; min-height: 42px; }

/* ---------- Footer ---------- */
.footer {
  background: var(--c-dark);
  color: #cfcfcf;
  padding: clamp(56px, 7vw, 88px) var(--gutter) 28px;
}
.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  gap: clamp(28px, 4vw, 48px);
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  align-items: start;
}
.footer h4 {
  color: #fff;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer a { color: #cfcfcf; display: inline-block; padding: 4px 0; font-size: 14px; }
.footer a:hover { color: var(--c-gold); }
.footer__brand img { height: 48px; width: auto; margin-bottom: 14px; }
.footer__brand p { color: #a7a7a7; font-size: 14px; max-width: 280px; }
.footer__socials { display: flex; gap: 8px; margin-top: 16px; }
.footer__socials a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  padding: 0;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.footer__socials a:hover { background: var(--c-gold); color: #000; transform: translateY(-2px); }
.footer__bottom {
  max-width: var(--container);
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: #888;
}
.footer__bottom a { color: #cfcfcf; }
.footer__bottom a:hover { color: var(--c-gold); }
.footer__list { display: flex; flex-direction: column; gap: 4px; }

/* ---------- Scroll to top ---------- */
.scroll-top {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 60;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.scroll-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.scroll-top:hover { background: var(--c-gold); color: #000; }

/* ---------- Modal / subscribe popup ---------- */
.modal {
  position: fixed; inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10,10,10,.65);
  backdrop-filter: blur(4px);
  z-index: 100;
  animation: fadeIn .3s var(--ease);
}
.modal.is-open { display: flex; }
.modal__dialog {
  width: 100%;
  max-width: 460px;
  background: #fff;
  padding: 36px 30px 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: popIn .32s var(--ease);
}
.modal__close {
  position: absolute;
  top: 12px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 20px;
  line-height: 1;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.modal__close:hover { background: #f2f2f2; color: #000; }
.modal__title { font-size: 1.4rem; margin-bottom: 6px; }
.modal__sub { font-size: 14px; color: var(--c-muted); margin-bottom: 18px; }
.form-row { display: flex; flex-direction: column; gap: 12px; }
.form-row input, .form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--c-line);
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.form-row input:focus, .form-row textarea:focus {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(239,206,74,.35);
  outline: 0;
}
.form-row textarea { min-height: 90px; resize: vertical; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn  { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* ---------- Loading screen ---------- */
.loader {
  position: fixed; inset: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity .45s var(--ease);
}
.loader.is-hidden { opacity: 0; pointer-events: none; }
.loader img {
  width: clamp(90px, 12vw, 140px);
  animation: pulse 1.4s var(--ease) infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.08); opacity: 1; } }

/* ---------- Product page specific ---------- */
.project-hero {
  position: relative;
  height: clamp(380px, 70vh, 680px);
  overflow: hidden;
  background: #111;
}
.project-hero img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.project-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.5) 100%);
}

.project-intro {
  padding: clamp(40px, 6vw, 72px) 0 clamp(32px, 4vw, 48px);
  text-align: center;
}
.project-intro h1 {
  font-size: clamp(1.75rem, 3vw + 1rem, 3.25rem);
  max-width: 20ch;
  margin: 0 auto 14px;
  letter-spacing: -0.01em;
}
.project-intro .location {
  font-size: 14px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 20px;
}
.credits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  max-width: 760px;
  margin: 0 auto 22px;
}
.credits li {
  font-size: 13px;
  color: var(--c-ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.credits li + li::before {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #c0c0c0;
  display: inline-block;
}
.credits strong { font-weight: 600; color: #222; }
.project-intro .lead {
  max-width: 68ch;
  margin: 0 auto;
  font-size: clamp(1rem, 0.3vw + .95rem, 1.15rem);
  color: #2a2a2a;
  line-height: 1.7;
}

.gallery {
  display: grid;
  gap: clamp(12px, 1.5vw, 20px);
  grid-template-columns: repeat(12, 1fr);
}
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.gallery figure img {
  width: 100%; height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  transition: transform 900ms var(--ease);
}
.gallery figure:hover img { transform: scale(1.03); }
.gallery .g-6  { grid-column: span 6; }
.gallery .g-4  { grid-column: span 4; }
.gallery .g-3  { grid-column: span 3; }
.gallery .g-12 { grid-column: span 12; }
.gallery .g-tall img { aspect-ratio: 3 / 4; }
.gallery .g-wide img { aspect-ratio: 16 / 9; }

.prose {
  max-width: 72ch;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.prose p { margin-bottom: 1em; font-size: clamp(1rem, 0.2vw + .95rem, 1.05rem); color: #2a2a2a; }

.related {
  padding: clamp(48px, 7vw, 80px) 0;
  background: var(--c-surface);
}

/* ---------- Video block ---------- */
.video-block {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  background: #000;
  border-radius: var(--radius);
}
.video-block video, .video-block iframe, .video-block img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border: 0;
}
.video-overlay {
  position: absolute; inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.55) 100%);
  z-index: 2;
}

/* ---------- Warranty cards (if used) ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.feature {
  padding: 28px 24px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  text-align: center;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.feature:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: var(--shadow-md);
}
.feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(239,206,74,.18);
  color: var(--c-dark);
  font-size: 20px;
  margin-bottom: 14px;
}
.feature h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature p { font-size: 14px; color: var(--c-muted); }

/* ---------- Responsive breakpoints ---------- */

/* Small tweaks: grid min widths so tablet shows 2-up nicely */
.grid    { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-3  { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.grid-4  { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid-2  { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }

/* ≤1024px — nav tighten, container reduce */
@media (max-width: 1024px) {
  .nav__menu { gap: 0; }
  .nav__link, .nav__dropbtn { padding: 12px 10px; font-size: 11.5px; letter-spacing: .06em; }
  .section { padding: clamp(44px, 6vw, 80px) 0; }
}

/* ≤960px — splits stack, footer 2-col, gallery halves, credits stack */
@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split--reverse { direction: ltr; }
  .split__media img { max-width: 560px; margin: 0 auto; }
  .footer__inner { grid-template-columns: 1fr 1fr; text-align: left; }
  .footer__brand { grid-column: 1 / -1; }
  .gallery .g-6, .gallery .g-4, .gallery .g-3 { grid-column: span 6; }
  .credits { flex-direction: column; align-items: center; gap: 8px; }
  .credits li + li::before { display: none; }
  .market-preview { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .project-hero { height: clamp(340px, 55vh, 520px); }
  .hero { min-height: clamp(380px, 65vh, 600px); }
}

/* ≤768px — mobile nav panel, stack everything */
@media (max-width: 768px) {
  :root { --nav-h: 60px; --gutter: 18px; }

  .topbar__inner { padding: 10px var(--gutter); gap: 10px; }
  .topbar__left  { display: none; }
  .topbar__logo img { height: 40px; }
  .topbar__right .socials { gap: 6px; }
  .topbar__right .socials a { width: 32px; height: 32px; font-size: 12px; }

  .nav__inner { padding: 0 14px; min-height: 60px; flex-wrap: nowrap; }
  .nav__brand { display: inline-flex; font-size: 14px; }
  .nav__toggle { display: inline-flex; width: 40px; height: 40px; }
  /* Mobile menu: hidden by default, display:flex only when .is-open */
  .nav__menu {
    display: none !important;
    position: fixed;
    top: 0; right: 0;
    width: min(300px, 82vw);
    height: 100vh;
    height: 100dvh;
    background: #fff;
    padding: 64px 22px 40px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    box-shadow: var(--shadow-lg);
    z-index: 55;
    overflow-y: auto;
    margin: 0;
    -webkit-overflow-scrolling: touch;
  }
  .nav__menu.is-open {
    display: flex !important;
    animation: slideInRight .25s var(--ease);
  }
  /* Toggle icon flips to × when menu is open (purely visual; JS wires click) */
  body.menu-open .nav__toggle i::before { content: "\f00d"; } /* fa-xmark */
  .nav__toggle {
    position: relative;
    z-index: 65;         /* always clickable, even above the slide-in menu */
    background: #fff;
  }
  body.menu-open .nav__toggle {
    background: #000;
    color: #fff;
    border-color: #000;
  }
  body.menu-open .nav__toggle i { color: #fff; }
  .nav__menu > li { width: 100%; border-bottom: 1px solid var(--c-line); }
  .nav__link, .nav__dropbtn {
    width: 100%;
    padding: 14px 4px;
    font-size: 14px;
    letter-spacing: .08em;
  }
  .nav__link::after, .nav__dropbtn::after { display: none; }
  .nav__drop {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    box-shadow: none;
    border: 0;
    background: transparent;
    padding: 0 0 10px 12px;
    min-width: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--dur) var(--ease);
  }
  .nav__menu > li.is-open .nav__drop { max-height: 500px; padding: 0 0 10px 12px; }
  .nav__cta { display: none; }

  /* Footer */
  .footer { padding: 48px var(--gutter) 24px; }
  .footer__inner { grid-template-columns: 1fr; text-align: center; gap: 28px; }
  .footer__brand { grid-column: auto; }
  .footer__brand img { margin-inline: auto; }
  .footer__brand p { margin-inline: auto; }
  .footer__socials { justify-content: center; }
  .footer__list { align-items: center; }
  .footer__bottom { flex-direction: column; text-align: center; gap: 6px; font-size: 12px; }

  /* Newsletter */
  .newsletter__form { flex-direction: column; padding: 14px; border-radius: var(--radius); gap: 10px; }
  .newsletter__form input { border: 1px solid var(--c-line); border-radius: 10px; padding: 12px 16px; }
  .newsletter__form button { width: 100%; border-radius: 10px; }

  /* Grids */
  .grid, .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr 1fr; gap: 14px; }
  .feature-grid { grid-template-columns: 1fr 1fr; gap: 14px; }

  /* Gallery */
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gallery .g-6, .gallery .g-4, .gallery .g-3, .gallery .g-12 { grid-column: span 2; }

  /* Hero */
  .hero { min-height: clamp(360px, 60vh, 560px); }
  .hero__content { padding: 48px var(--gutter); }
  .hero__title { font-size: clamp(1.6rem, 7vw, 2.2rem); }
  .hero__sub { font-size: clamp(.95rem, 3.5vw, 1.05rem); }

  /* Project hero */
  .project-hero { height: clamp(300px, 50vh, 460px); }
  .project-hero__overlay { padding: 30px var(--gutter); }
  .project-hero__overlay h1 { font-size: clamp(1.4rem, 6vw, 2rem); }
  .project-hero__overlay p { font-size: 12px; letter-spacing: .1em; }

  /* Section & page header */
  .section { padding: 40px 0; }
  .section-narrow { padding: 32px 0; }
  .page-header { padding: 40px 0 24px; }
  .page-header h1 { font-size: clamp(1.5rem, 6vw, 2rem); }
  .section-heading { margin-bottom: 28px; }
  .section-title { font-size: clamp(1.25rem, 5vw, 1.9rem); }

  /* Cards */
  .card__body { padding: 14px 16px 18px; gap: 6px; }
  .card__title { font-size: 15px; line-height: 1.3; }
  .card__body p { font-size: 13px; -webkit-line-clamp: 3; }
  .card__media { aspect-ratio: 4/3; }

  /* Promo */
  .promo { padding: 48px var(--gutter); }
  .promo h2 { font-size: clamp(1.4rem, 6vw, 1.9rem); }
  .promo p { font-size: 14px; }

  /* Timeline */
  .timeline { padding-left: 22px; gap: 16px; }
  .timeline-item::before { left: -31px; width: 12px; height: 12px; }
  .timeline-year { font-size: 11px; }
  .timeline-body h3 { font-size: 1rem; }
  .timeline-body p { font-size: 14px; }

  /* Video block */
  .video-block { border-radius: 8px; }
  .video-overlay { padding: 14px; }

  /* Modal */
  .modal__dialog { padding: 28px 20px; }

  /* Split media cap */
  .split__media img { max-width: 100%; }

  /* Section padding inside container for featured projects grid */
  .container { padding: 0 var(--gutter); }
}

/* ≤560px — single-column grids, tighter typography */
@media (max-width: 560px) {
  .grid, .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; gap: 10px; }
  .gallery .g-6, .gallery .g-4, .gallery .g-3, .gallery .g-12 { grid-column: span 1; }

  .topbar__right .socials a:nth-child(n+5) { display: none; } /* keep top 4 socials on tiny screens */
  .topbar__inner { padding: 8px 14px; }
  .topbar__logo img { height: 36px; }

  .hero__content { padding: 40px 14px; }
  .hero__title { font-size: clamp(1.5rem, 8vw, 2rem); line-height: 1.2; }
  .hero__sub { font-size: 14px; line-height: 1.5; }

  .project-hero { height: clamp(280px, 45vh, 400px); }
  .project-hero__overlay { padding: 22px 14px; }
  .project-hero__overlay h1 { font-size: clamp(1.3rem, 7vw, 1.75rem); line-height: 1.2; }

  .btn { padding: 11px 18px; font-size: 11.5px; min-height: 42px; }
  .btn-sm { padding: 8px 14px; font-size: 11px; min-height: 34px; }

  .modal__dialog { padding: 24px 18px; }
  .modal__title { font-size: 1.2rem; }

  .card__body { padding: 14px; }
  .newsletter h2 { font-size: clamp(1.3rem, 6vw, 1.75rem); }

  .promo h2 { font-size: clamp(1.25rem, 7vw, 1.7rem); }

  .scroll-top { right: 12px; bottom: 12px; width: 42px; height: 42px; }

  .socials a { width: 34px; height: 34px; font-size: 13px; }
  .footer__socials { flex-wrap: wrap; }

  /* Prose tighter */
  .prose { padding: 0 14px; }
  .prose p { font-size: .95rem; line-height: 1.7; }

  /* Credits wrap cleanly */
  .credits li { font-size: 12px; }
  .credits strong { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--c-muted); }
}

/* ≤380px — very narrow phones */
@media (max-width: 380px) {
  :root { --gutter: 12px; }
  .topbar__right .socials a { width: 30px; height: 30px; font-size: 12px; }
  .nav__brand { font-size: 13px; }
  .btn { padding: 10px 16px; font-size: 11px; }
  .hero__title { font-size: clamp(1.35rem, 9vw, 1.8rem); }
}

/* Tablet-only refinement: force 2-col on grid-3 and feature-grid */
@media (min-width: 561px) and (max-width: 960px) {
  .grid-3, .grid { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Scroll reveal (JS-gated so content is visible without JS) ---------- */
.js-ready .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
  will-change: opacity, transform;
}
.js-ready .reveal-left  { transform: translateX(-28px); }
.js-ready .reveal-right { transform: translateX(28px); }
.js-ready .reveal-zoom  { transform: scale(.96); }
.js-ready .reveal.is-in { opacity: 1; transform: none; }

/* Staggered children — also JS-gated. Specificity must match the baseline rule
   so the is-in state actually wins. */
.js-ready .stagger > .reveal,
.js-ready .stagger > .card,
.js-ready .stagger > .feature,
.js-ready .stagger > article,
.js-ready .stagger > figure {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.js-ready .stagger.is-in > *:nth-child(1)  { transition-delay: .00s; }
.js-ready .stagger.is-in > *:nth-child(2)  { transition-delay: .06s; }
.js-ready .stagger.is-in > *:nth-child(3)  { transition-delay: .12s; }
.js-ready .stagger.is-in > *:nth-child(4)  { transition-delay: .18s; }
.js-ready .stagger.is-in > *:nth-child(5)  { transition-delay: .24s; }
.js-ready .stagger.is-in > *:nth-child(6)  { transition-delay: .30s; }
.js-ready .stagger.is-in > *:nth-child(7)  { transition-delay: .36s; }
.js-ready .stagger.is-in > *:nth-child(8)  { transition-delay: .42s; }
.js-ready .stagger.is-in > *:nth-child(9)  { transition-delay: .48s; }
.js-ready .stagger.is-in > *:nth-child(10) { transition-delay: .54s; }
.js-ready .stagger.is-in > *:nth-child(n+11) { transition-delay: .60s; }
.js-ready .stagger.is-in > *,
.js-ready .stagger.is-in > .reveal,
.js-ready .stagger.is-in > .card,
.js-ready .stagger.is-in > .feature,
.js-ready .stagger.is-in > article,
.js-ready .stagger.is-in > figure { opacity: 1; transform: none; }

/* ---------- Enhanced card interactions ---------- */
.card {
  transform-style: preserve-3d;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, .12),
    0 32px 70px rgba(0, 0, 0, .08),
    0 0 0 1px rgba(0, 0, 0, .04);
}
.card__media img { transition: transform 1.1s var(--ease), filter .45s var(--ease); }
.card:hover .card__media img { transform: scale(1.08); filter: saturate(1.08); }
.card__tag {
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.card:hover .card__tag {
  background: var(--c-gold);
  transform: translateY(-2px);
}

/* Arrow that slides on button hover */
.btn .fa-arrow-right { transition: transform var(--dur) var(--ease); }
.btn:hover .fa-arrow-right { transform: translateX(4px); }

/* Card__more with animated underline */
.card__more {
  position: relative;
  overflow: hidden;
}
.card__more::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1.5px;
  width: 100%;
  height: 1.5px;
  background: var(--c-orange);
  transform: translateX(-101%);
  transition: transform .5s var(--ease);
}
.card:hover .card__more::after { transform: translateX(0); }

/* ---------- Hero polish ---------- */
.hero__slide img { will-change: transform, opacity; }
@keyframes heroPanKenBurns { from { transform: scale(1.02); } to { transform: scale(1.12); } }
.hero__slide.is-active img { animation: heroPanKenBurns 7s var(--ease) forwards; }
.hero__title, .hero__sub, .hero__dots { opacity: 0; transform: translateY(18px); animation: heroFadeUp .9s var(--ease) .3s forwards; }
.hero__sub { animation-delay: .5s; }
.hero__dots { animation-delay: .7s; }
@keyframes heroFadeUp { to { opacity: 1; transform: none; } }

/* ---------- Project hero overlay (product pages) ---------- */
.project-hero {
  position: relative;
  height: clamp(440px, 80vh, 780px);
}
.project-hero img {
  animation: heroPanKenBurns 12s var(--ease) forwards;
}
.project-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  padding: clamp(40px, 8vw, 90px) var(--gutter);
  color: #fff;
  background: linear-gradient(180deg, rgba(0,0,0,.1) 0%, rgba(0,0,0,.2) 40%, rgba(0,0,0,.7) 100%);
}
.project-hero__overlay h1 {
  color: #fff;
  font-size: clamp(1.75rem, 3vw + 1rem, 3.25rem);
  margin: 10px 0 8px;
  max-width: 20ch;
  text-shadow: 0 2px 22px rgba(0,0,0,.4);
}
.project-hero__overlay p {
  color: rgba(255,255,255,.88);
  font-size: 14px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* ---------- Market preview layout (index) ---------- */
.market-preview {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: clamp(16px, 2vw, 28px);
  align-items: stretch;
}
@media (max-width: 900px) {
  .market-preview { grid-template-columns: 1fr; }
}

/* ---------- Feature ad cards (index) ---------- */
.feature-ad .card__media {
  aspect-ratio: 3 / 4;
}
.feature-ad .card__media img { transition: transform 1.1s var(--ease); }
.feature-ad:hover { transform: translateY(-6px) rotate(-.5deg); }

/* ---------- Profiles dark carousel ---------- */
.profile-slider {
  position: relative;
  text-align: center;
  min-height: 200px;
}
.profile-slide {
  opacity: 0;
  visibility: hidden;
  position: absolute;
  inset: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--ease), transform .7s var(--ease), visibility .7s;
}
.profile-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  position: relative;
}

/* ---------- Timeline (about) ---------- */
.timeline {
  display: grid;
  gap: 20px;
  max-width: 820px;
  margin: 0 auto;
  padding-left: 30px;
  border-left: 2px solid var(--c-line);
  position: relative;
}
.timeline-item {
  position: relative;
  padding-left: 18px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -39px;
  top: 8px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--c-gold);
  box-shadow: 0 0 0 4px #fff, 0 0 0 6px rgba(239,206,74,.3);
}
.timeline-year {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-orange);
  margin-bottom: 6px;
}
.timeline-body h3 { font-size: 1.15rem; margin-bottom: 4px; }
.timeline-body p  { color: var(--c-ink-soft); }
@media (max-width: 600px) {
  .timeline { padding-left: 22px; }
  .timeline-item::before { left: -31px; }
}

/* ---------- Feature cards with stronger hover ---------- */
.feature { position: relative; overflow: hidden; }
.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), rgba(239,206,74,.14), transparent 45%);
  opacity: 0;
  transition: opacity .5s var(--ease);
  pointer-events: none;
}
.feature:hover::before { opacity: 1; }
.feature__icon { transition: transform .5s var(--ease), background .5s var(--ease); }
.feature:hover .feature__icon {
  transform: translateY(-4px) rotate(-6deg);
  background: var(--c-gold);
}

/* ---------- Price hint on product cards ---------- */
.card__price {
  font-size: 13px;
  color: var(--c-muted);
  letter-spacing: .04em;
}

/* ---------- Smooth nav brand reveal ---------- */
.nav.is-stuck .nav__brand { transform: translateX(0); opacity: 1; }
.nav__brand {
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

/* ---------- Section heading underline animation ---------- */
.section-heading .divider {
  transform-origin: center;
  animation: dividerGrow .7s var(--ease) .2s both;
}
@keyframes dividerGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Richer focus + button press ---------- */
.btn:active { transform: translateY(0) scale(.98); }
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--x,50%) var(--y,50%), rgba(255,255,255,.4), transparent 60%);
  opacity: 0;
  transition: opacity .4s var(--ease);
  pointer-events: none;
}
.btn:hover::after { opacity: 1; }

/* ---------- Topbar subscribe pulse ---------- */
@keyframes subtlePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(17,17,17,0); }
  50%      { box-shadow: 0 0 0 4px rgba(17,17,17,.12); }
}
.topbar .btn-outline:hover { animation: subtlePulse 1.6s var(--ease) infinite; }

/* ---------- Video block hover zoom ---------- */
.video-block video { transition: transform 1.2s var(--ease); }
.video-block:hover video { transform: scale(1.02); }

/* ---------- Social icon float ---------- */
.socials a { transform-origin: center; }
.socials a:hover { transform: translateY(-3px) scale(1.06); }
.footer__socials a:hover { transform: translateY(-3px) scale(1.06); }

/* ---------- Page entry fade ---------- */
body { animation: pageFadeIn .8s var(--ease); }
@keyframes pageFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Promo parallax background ---------- */
.promo__bg {
  transform: scale(1.05);
  transition: transform 2s var(--ease);
}
.promo:hover .promo__bg { transform: scale(1.1); }

/* ---------- Gallery figure entrance (JS-gated) ---------- */
.js-ready .gallery figure {
  opacity: 0;
  transform: translateY(20px) scale(.98);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.js-ready .gallery.is-in figure { opacity: 1; transform: none; }
.gallery.is-in figure:nth-child(1)  { transition-delay: 0s; }
.gallery.is-in figure:nth-child(2)  { transition-delay: .08s; }
.gallery.is-in figure:nth-child(3)  { transition-delay: .16s; }
.gallery.is-in figure:nth-child(4)  { transition-delay: .24s; }
.gallery.is-in figure:nth-child(5)  { transition-delay: .32s; }
.gallery.is-in figure:nth-child(6)  { transition-delay: .40s; }

/* ---------- Split image zoom/tilt on hover ---------- */
.split__media img { transition: transform .9s var(--ease), box-shadow .6s var(--ease); }
.split__media:hover img {
  transform: scale(1.02) rotate(-.4deg);
  box-shadow: var(--shadow-lg);
}

/* ---------- Nav link rise + highlight ---------- */
.nav__link, .nav__dropbtn {
  overflow: hidden;
  isolation: isolate;
  background-image: linear-gradient(180deg, rgba(0,0,0,0), rgba(17,17,17,.06));
  background-size: 100% 0%;
  background-repeat: no-repeat;
  background-position: bottom;
  transition: color var(--dur) var(--ease), background-size var(--dur) var(--ease);
}
.nav__link:hover, .nav__dropbtn:hover,
.nav__link.is-active { background-size: 100% 100%; }

/* ---------- Layered shadows on interactive sections ---------- */
.newsletter__form:focus-within {
  box-shadow:
    0 0 0 3px rgba(239,206,74,.35),
    var(--shadow-md);
}

/* ---------- Smoother loader fade ---------- */
.loader img { filter: drop-shadow(0 8px 16px rgba(0,0,0,.1)); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
 * Project page layout templates (admin "Page layout" field)
 * ============================================================ */

/* ---- Template 2: Editorial — split hero, magazine style ---- */
.phero-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  min-height: clamp(420px, 72vh, 720px);
  align-items: stretch;
  background: var(--c-surface);
}
.phero-split__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(40px, 6vw, 88px) clamp(24px, 4vw, 64px);
}
.phero-split__text h1 {
  font-size: clamp(1.75rem, 2.6vw + 1rem, 3rem);
  margin: 12px 0 10px;
  max-width: 16ch;
}
.phero-split__loc {
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 18px;
}
.phero-split__lead {
  font-size: clamp(1rem, .3vw + .95rem, 1.1rem);
  line-height: 1.7;
  color: #2a2a2a;
  max-width: 46ch;
  margin-bottom: 22px;
}
.phero-split__text .credits { justify-content: flex-start; margin: 0; max-width: none; }
.phero-split__media { overflow: hidden; }
.phero-split__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  animation: heroPanKenBurns 12s var(--ease) forwards;
}

/* ---- Template 3: Showcase — gallery-first, minimal header ---- */
.phero-min {
  padding: clamp(48px, 7vw, 96px) 0 clamp(28px, 4vw, 48px);
  text-align: center;
}
.phero-min h1 {
  font-size: clamp(1.9rem, 3.2vw + 1rem, 3.4rem);
  max-width: 22ch;
  margin: 12px auto 10px;
}
.phero-min__loc {
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 20px;
}
.phero-min .lead {
  max-width: 62ch;
  margin: 18px auto 0;
  font-size: clamp(1rem, .3vw + .95rem, 1.12rem);
  line-height: 1.7;
  color: #2a2a2a;
}

/* ---- Category filter pills (All Projects page) ---- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 clamp(24px, 3vw, 40px);
}
.filter-pill {
  padding: 9px 20px;
  border: 1px solid #d9d9d4;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-ink-soft);
  background: #fff;
  transition: all .25s var(--ease);
}
.filter-pill:hover { border-color: var(--c-ink); color: var(--c-ink); }
.filter-pill.is-active {
  background: var(--c-ink);
  border-color: var(--c-ink);
  color: #fff;
}

@media (max-width: 860px) {
  .phero-split { grid-template-columns: 1fr; min-height: 0; }
  .phero-split__media { order: -1; }
  .phero-split__media img { aspect-ratio: 4 / 3; height: auto; }
  .phero-split__text { text-align: center; align-items: center; padding: 32px var(--gutter) 40px; }
  .phero-split__text .credits { justify-content: center; }
  .phero-split__lead { max-width: none; }
}
