/* =========================================================
   KARDELL — interior architecture & design
   Design system + layout
   ========================================================= */

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/vazirmatn-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/vazirmatn-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/vazirmatn-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/vazirmatn-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant';
  src: url('../fonts/cormorant-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant';
  src: url('../fonts/cormorant-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bone: #f7f4ee;
  --cream: #fcfaf6;
  --sand: #ebe3d6;
  --stone: #c7bbaa;
  --ink: #1a1815;
  --ink-2: #3a362f;
  --muted: #756e63;
  --clay: #a0765a;
  --deep: #14120f;
  --line: rgba(26, 24, 21, 0.12);
  --line-soft: rgba(26, 24, 21, 0.07);
  --line-light: rgba(247, 244, 238, 0.16);
  --r-sm: 12px;
  --r: 20px;
  --r-lg: 30px;
  --container: 1320px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.85;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  font-weight: 300;
  margin: 0;
  letter-spacing: -0.005em;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

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

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

/* ---------------- primitives ---------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 4.4vw, 64px);
}

.section {
  padding-block: clamp(72px, 9vw, 140px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 clamp(16px, 2vw, 24px);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--clay);
}

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

.eyebrow--light {
  color: rgba(247, 244, 238, 0.7);
}

.h2 {
  font-size: clamp(1.65rem, 3vw, 2.85rem);
  line-height: 1.5;
  margin: 0 0 clamp(16px, 2vw, 24px);
  max-width: 22ch;
}

.h2--light {
  color: var(--cream);
  max-width: 28ch;
}

.lead {
  font-size: clamp(0.98rem, 1.1vw, 1.07rem);
  line-height: 2.05;
  color: var(--ink-2);
  max-width: 56ch;
}

.body-text {
  font-size: 0.94rem;
  line-height: 2.05;
  color: var(--muted);
  max-width: 56ch;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-block-start: clamp(24px, 3vw, 34px);
  padding: 13px 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 400;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.5s var(--ease), color 0.5s var(--ease),
    border-color 0.5s var(--ease);
}

.btn svg {
  transition: transform 0.5s var(--ease);
}

.btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.btn:hover svg {
  transform: translateX(-4px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
}

.brand__mark {
  width: 25px;
  height: 28px;
  flex: none;
}

.brand__word {
  font-family: 'Cormorant', 'Times New Roman', serif;
  font-size: 1.02rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  line-height: 1;
  color: #111;
}

/* ---------------- header ---------------- */

.site-head {
  position: fixed;
  inset-block-start: 18px;
  inset-inline: 0;
  z-index: 90;
  pointer-events: none;
}

.site-head__inner {
  pointer-events: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  width: calc(100% - 32px);
  max-width: 1260px;
  margin-inline: auto;
  padding: 9px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background-color: rgba(58, 55, 50, 0.64);
  background-image: linear-gradient(
    118deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.03) 46%,
    rgba(255, 255, 255, 0.1) 100%
  );
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 18px 44px -26px rgba(12, 11, 9, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
  transition: background-color 0.55s var(--ease), box-shadow 0.55s var(--ease),
    border-color 0.55s var(--ease), padding 0.55s var(--ease);
}

.site-head__inner > .brand {
  justify-self: start;
  color: #f8f5ee;
}

.site-head .brand__word {
  color: #f8f5ee;
}

.site-head.is-scrolled .site-head__inner {
  padding-block: 7px;
  background-color: rgba(44, 42, 38, 0.74);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 20px 46px -26px rgba(12, 11, 9, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.nav {
  justify-self: center;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__link {
  position: relative;
  display: inline-block;
  padding: 7px 15px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.885rem;
  text-decoration: none;
  transition: color 0.35s var(--ease), background 0.35s var(--ease);
}

.nav__link::after {
  content: '';
  position: absolute;
  inset-block-end: 2px;
  inset-inline: 15px;
  height: 1px;
  background: currentColor;
  opacity: 0.9;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease);
}

.nav__link:hover,
.nav__link.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nav__link.is-active::after {
  transform: scaleX(1);
}

.head-tools {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 4px;
}

.head-tools__sep {
  width: 1px;
  height: 18px;
  margin-inline: 6px;
  background: rgba(255, 255, 255, 0.26);
}

.head-social {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.head-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.4s var(--ease), background 0.4s var(--ease),
    border-color 0.4s var(--ease), transform 0.4s var(--ease);
}

.head-icon:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.26);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-inline-start: 2px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  padding: 0;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.nav-toggle span {
  display: block;
  width: 17px;
  height: 1.4px;
  margin: 4px auto;
  background: #f8f5ee;
  border-radius: 2px;
  transition: transform 0.45s var(--ease), opacity 0.3s var(--ease);
}

.nav-toggle[aria-expanded='true'] span:first-child {
  transform: translateY(2.7px) rotate(45deg);
}

.nav-toggle[aria-expanded='true'] span:last-child {
  transform: translateY(-2.7px) rotate(-45deg);
}

/* mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 89;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 96px clamp(24px, 8vw, 48px) 40px;
  background: rgba(247, 244, 238, 0.93);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  backdrop-filter: blur(24px) saturate(140%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0.5s var(--ease);
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu__list li {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.mobile-menu.is-open .mobile-menu__list li {
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--i, 0) * 70ms + 90ms);
}

.mobile-menu__list a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: clamp(1.4rem, 7vw, 1.9rem);
  font-weight: 300;
  color: var(--ink);
  text-decoration: none;
}

.mobile-menu__list span {
  font-family: 'Cormorant', serif;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--clay);
}

.mobile-menu__foot {
  margin-block-start: 34px;
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-menu__foot a {
  color: var(--ink);
  text-decoration: none;
}

.mobile-menu__social {
  display: flex;
  gap: 8px;
  margin-block-start: 14px;
}

.mobile-menu__social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-2);
  transition: background 0.4s var(--ease), color 0.4s var(--ease),
    border-color 0.4s var(--ease);
}

.mobile-menu__social a:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

/* ---------------- search ---------------- */

.search {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(84px, 13vh, 150px) clamp(16px, 4vw, 32px) 32px;
  background: rgba(18, 16, 13, 0.4);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  backdrop-filter: blur(16px) saturate(120%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0.45s var(--ease);
}

.search.is-open {
  opacity: 1;
  visibility: visible;
}

.search__panel {
  width: min(760px, 100%);
  padding: clamp(16px, 2.2vw, 26px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  background: rgba(252, 250, 246, 0.94);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  backdrop-filter: blur(28px) saturate(160%);
  box-shadow: 0 46px 90px -50px rgba(8, 7, 6, 0.85);
  opacity: 0;
  transform: translateY(-16px) scale(0.99);
  transition: opacity 0.45s var(--ease), transform 0.55s var(--ease-out);
}

.search.is-open .search__panel {
  opacity: 1;
  transform: none;
}

.search__form {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block-end: 12px;
  border-block-end: 1px solid var(--line);
}

.search__icon {
  display: grid;
  place-items: center;
  color: var(--clay);
}

.search__input {
  flex: 1;
  min-width: 0;
  padding: 6px 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: clamp(0.98rem, 1.4vw, 1.1rem);
  font-weight: 300;
  color: var(--ink);
  outline: none;
}

.search__input::placeholder {
  color: var(--muted);
}

.search__close {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.4s var(--ease), color 0.4s var(--ease),
    border-color 0.4s var(--ease);
}

.search__close:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.search__results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 14px;
  max-height: 46vh;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
}

.search__results li[hidden] {
  display: none;
}

.search__results a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--ink-2);
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
}

.search__results a:hover,
.search__results a:focus-visible {
  background: rgba(26, 24, 21, 0.06);
  color: var(--ink);
}

.search__results em {
  flex: none;
  font-family: inherit;
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--clay);
}

.search__empty {
  display: none;
  margin: 18px 4px 6px;
  font-size: 0.86rem;
  color: var(--muted);
}

.search.is-empty .search__empty {
  display: block;
}

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  background: #100e0c;
  perspective: 1400px;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: -3%;
  transform-origin: 50% 58%;
  will-change: transform;
  backface-visibility: hidden;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
      180deg,
      rgba(13, 12, 10, 0.66) 0%,
      rgba(13, 12, 10, 0.28) 32%,
      rgba(13, 12, 10, 0.16) 58%,
      rgba(13, 12, 10, 0.62) 100%
    );
}

.hero__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    120% 90% at 50% 45%,
    rgba(0, 0, 0, 0) 42%,
    rgba(8, 7, 6, 0.55) 100%
  );
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.055;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero__content {
  position: absolute;
  inset-block-start: clamp(102px, 15vh, 186px);
  inset-inline: 0;
  z-index: 3;
  padding-inline: clamp(20px, 4.4vw, 64px);
  text-align: center;
  color: var(--cream);
  will-change: transform, opacity;
}

.hero__content::before {
  content: '';
  position: absolute;
  inset-block-start: -30%;
  inset-inline: 8%;
  height: 220%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    56% 48% at 50% 34%,
    rgba(10, 9, 7, 0.44) 0%,
    rgba(10, 9, 7, 0) 74%
  );
}

.hero__title {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 3.45rem);
  line-height: 1.35;
  font-weight: 300;
  color: #fdfbf6;
  white-space: nowrap;
  text-shadow: 0 3px 40px rgba(10, 9, 7, 0.45),
    0 1px 3px rgba(10, 9, 7, 0.35);
}

.hero__sub {
  margin: clamp(12px, 1.5vw, 20px) 0 0;
  font-family: 'Cormorant', 'Times New Roman', serif;
  font-size: clamp(0.82rem, 1.15vw, 1.05rem);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.26em;
  text-indent: 0.26em;
  text-transform: uppercase;
  color: rgba(252, 250, 246, 0.84);
  text-shadow: 0 2px 20px rgba(10, 9, 7, 0.5);
}

.hero__scroll {
  position: absolute;
  inset-block-end: clamp(22px, 4vh, 42px);
  inset-inline: 0;
  margin-inline: auto;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(252, 250, 246, 0.34);
  border-radius: 50%;
  background: rgba(252, 250, 246, 0.1);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: var(--cream);
  text-decoration: none;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}

.hero__scroll:hover {
  background: rgba(252, 250, 246, 0.22);
  border-color: rgba(252, 250, 246, 0.55);
}

.hero__scroll svg {
  animation: hero-bob 2.6s var(--ease) infinite;
}

@keyframes hero-bob {
  0%,
  100% {
    transform: translateY(-2px);
  }
  50% {
    transform: translateY(3px);
  }
}

.hero__meta {
  position: absolute;
  inset-block-end: clamp(26px, 4vh, 44px);
  inset-inline-start: clamp(20px, 4.4vw, 64px);
  z-index: 4;
  display: none;
  gap: 10px;
  align-items: center;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: rgba(252, 250, 246, 0.6);
}

/* ---------------- about ---------------- */

.about {
  position: relative;
  background: var(--bone);
}

.about__grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(36px, 6vw, 96px);
  align-items: start;
}

.about__text {
  padding-block-start: clamp(0px, 2vw, 24px);
}

.about__text .body-text + .body-text {
  margin-block-start: 14px;
}

.stats {
  display: flex;
  gap: clamp(16px, 3.2vw, 44px);
  margin: clamp(26px, 3.4vw, 38px) 0 clamp(6px, 1vw, 12px);
  padding-block: clamp(20px, 2.6vw, 28px);
  border-block: 1px solid var(--line);
  list-style: none;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat__value {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-size: clamp(1.7rem, 2.9vw, 2.5rem);
  font-weight: 300;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.stat__plus {
  color: var(--clay);
  font-size: 0.8em;
}

.stat__label {
  font-size: 0.78rem;
  color: var(--muted);
}

.about__media {
  position: relative;
  padding-block-end: clamp(40px, 6vw, 90px);
}

.about__img {
  margin: 0;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--sand);
}

.about__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 1.4s var(--ease-out);
}

.about__img--lg {
  aspect-ratio: 5 / 4;
}

.about__img--lg img {
  transform-origin: 60% 40%;
}

.about__img--sm {
  position: relative;
  width: 58%;
  aspect-ratio: 3 / 4;
  margin-block-start: -13%;
  margin-inline-start: auto;
  border: 8px solid var(--bone);
  border-radius: calc(var(--r-lg) - 2px);
  box-shadow: 0 30px 60px -40px rgba(26, 24, 21, 0.6);
}

.about__badge {
  position: absolute;
  inset-block-start: 18px;
  inset-inline-start: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  background: var(--clay);
  color: #fbf7f0;
  font-size: 0.83rem;
  letter-spacing: 0.02em;
  box-shadow: 0 22px 40px -24px rgba(90, 55, 33, 0.85);
}

.about__badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(251, 247, 240, 0.8);
}

/* ---------------- projects ---------------- */

.projects {
  background: var(--cream);
  padding-block: clamp(72px, 9vw, 130px);
}

.projects__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px clamp(24px, 5vw, 80px);
}

.projects__head .h2 {
  margin-block-end: 0;
}

.projects__head .lead {
  max-width: 40ch;
  padding-block-end: 6px;
}

.gallery {
  display: flex;
  width: 100%;
  height: clamp(360px, 56vh, 560px);
  margin-block-start: clamp(32px, 5vw, 60px);
  overflow: hidden;
}

.gallery__item {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-decoration: none;
  color: var(--cream);
  transition: flex-grow 0.85s var(--ease-out);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 1.3s var(--ease-out);
}

.gallery__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(14, 12, 10, 0.78) 0%,
    rgba(14, 12, 10, 0.18) 48%,
    rgba(14, 12, 10, 0.05) 100%
  );
  transition: opacity 0.6s var(--ease);
}

.gallery__item:hover,
.gallery__item:focus-visible {
  flex-grow: 2.5;
}

.gallery__item:hover img,
.gallery__item:focus-visible img {
  transform: scale(1.09);
}

.gallery__overlay {
  position: absolute;
  inset-block-end: 0;
  inset-inline: 0;
  z-index: 2;
  padding: clamp(20px, 2.4vw, 34px);
}

.gallery__index {
  display: block;
  margin-block-end: 8px;
  font-family: 'Cormorant', serif;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: rgba(252, 250, 246, 0.7);
}

.gallery__title {
  font-size: clamp(0.98rem, 1.35vw, 1.15rem);
  font-weight: 400;
  margin: 0;
  white-space: nowrap;
}

.gallery__desc {
  margin: 8px 0 0;
  max-width: 30ch;
  font-size: 0.82rem;
  line-height: 1.95;
  color: rgba(252, 250, 246, 0.78);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.gallery__item:hover .gallery__desc,
.gallery__item:focus-visible .gallery__desc {
  opacity: 1;
  transform: none;
}

/* ---------------- testimonials ---------------- */

/* The backdrop is declared once on the section itself and is never animated,
   re-painted or swapped: only the quote cards transition between slides. */
.quotes {
  position: relative;
  isolation: isolate;
  padding-block: clamp(84px, 10vw, 148px);
  color: var(--cream);
  background-color: var(--deep);
  background-image: url('../images/quotes-bg.jpg');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

@media (min-width: 981px) {
  .quotes {
    background-attachment: fixed;
  }
}

.quotes::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(11, 10, 8, 0.86) 0%,
    rgba(11, 10, 8, 0.7) 45%,
    rgba(11, 10, 8, 0.9) 100%
  );
}

.quotes__stage {
  position: relative;
  z-index: 1;
}

.quotes__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(30px, 5vw, 84px);
}

.quotes__head {
  color: var(--cream);
}

.quotes__head .eyebrow {
  margin-block-end: 16px;
}

.quotes__head .h2 {
  margin: 0 0 16px;
  max-width: 20ch;
}

.quotes__sub {
  margin: 0;
  max-width: 34ch;
  font-size: 0.95rem;
  line-height: 2;
  color: rgba(252, 250, 246, 0.66);
}

.quotes__panel {
  position: relative;
  width: 100%;
  max-width: 660px;
}

/* all cards share one grid cell, so the panel keeps a constant height and
   never shifts while slides change */
.quotes__cards {
  display: grid;
}

.quote-card {
  grid-area: 1 / 1;
  margin: 0;
  padding: clamp(26px, 3.2vw, 44px);
  border: 1px solid rgba(247, 244, 238, 0.16);
  border-radius: 20px;
  background: rgba(24, 22, 19, 0.42);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 40px 80px -60px rgba(0, 0, 0, 0.9);
  color: var(--cream);
  opacity: 0;
  transform: translate3d(0, 38px, 0);
  filter: blur(8px);
  pointer-events: none;
  will-change: opacity, transform, filter;
  transition: opacity 0.72s var(--ease), transform 0.72s var(--ease),
    filter 0.72s var(--ease);
}

.quote-card.is-active {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
  pointer-events: auto;
}

.quote-card.is-leaving {
  opacity: 0;
  transform: translate3d(0, -38px, 0);
  filter: blur(8px);
}

.quote-card__mark {
  display: block;
  font-family: 'Cormorant', serif;
  font-size: 3rem;
  line-height: 0.55;
  color: #c8a98b;
  margin-block-end: 18px;
}

.quote-card blockquote {
  margin: 0;
  font-size: clamp(1rem, 1.25vw, 1.16rem);
  line-height: 2.05;
  font-weight: 300;
  color: rgba(252, 250, 246, 0.94);
}

.quote-card figcaption {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-block-start: 24px;
  font-size: 0.84rem;
}

.quote-card__name {
  font-weight: 500;
  color: #fdfbf6;
}

.quote-card__role {
  color: rgba(247, 244, 238, 0.56);
}

.quotes__progress {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  margin-block-start: 24px;
}

.quotes__dot {
  width: 22px;
  height: 2px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: rgba(247, 244, 238, 0.24);
  cursor: pointer;
  transition: background 0.4s var(--ease), width 0.4s var(--ease);
}

.quotes__dot:hover {
  background: rgba(247, 244, 238, 0.5);
}

.quotes__dot.is-active {
  width: 40px;
  background: rgba(252, 250, 246, 0.85);
}

/* ---------------- why / features + gallery ---------------- */

.why {
  position: relative;
  background: linear-gradient(180deg, var(--bone) 0%, var(--cream) 100%);
  padding-block: clamp(72px, 9vw, 130px);
}

.why__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 40px;
  flex-wrap: wrap;
  margin-block-end: clamp(32px, 4.2vw, 58px);
}

.why__head .h2 {
  margin: 0;
  max-width: 30ch;
}

.why__head .eyebrow {
  margin-block-end: 10px;
}

.why__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: clamp(28px, 4vw, 62px);
}

.fboxes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fbox {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 16px;
  padding: clamp(15px, 1.6vw, 21px) clamp(16px, 1.8vw, 24px);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.4);
  will-change: transform, opacity;
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease),
    box-shadow 0.5s var(--ease), transform 0.5s var(--ease);
}

.fbox:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(160, 118, 90, 0.24);
  box-shadow: 0 24px 44px -36px rgba(26, 24, 21, 0.55);
  transform: translateX(-5px);
}

.fbox__icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(160, 118, 90, 0.22);
  border-radius: 14px;
  background: linear-gradient(
    150deg,
    rgba(255, 255, 255, 0.92),
    rgba(235, 227, 214, 0.62)
  );
  color: var(--clay);
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease),
    color 0.5s var(--ease), transform 0.5s var(--ease);
}

.fbox:hover .fbox__icon {
  background: var(--clay);
  border-color: var(--clay);
  color: #fbf7f0;
  transform: rotate(-4deg);
}

.fbox__title {
  align-self: end;
  margin: 0;
  font-size: clamp(0.95rem, 1.15vw, 1.02rem);
  font-weight: 500;
  line-height: 1.6;
  color: var(--ink);
}

.fbox__text {
  margin: 2px 0 0;
  font-size: 0.83rem;
  line-height: 1.85;
  color: var(--muted);
}

/* five-image gallery */

.fcar {
  position: relative;
}

.fcar__stage {
  position: relative;
  height: clamp(320px, 46vh, 480px);
  isolation: isolate;
}

.fcar__item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--sand);
  box-shadow: 0 34px 62px -46px rgba(26, 24, 21, 0.6);
  opacity: 0;
  will-change: left, width, opacity;
  contain: layout paint;
}

.fcar__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 1.1s var(--ease-out);
}

.fcar__item.is-rail {
  box-shadow: 0 22px 46px -40px rgba(26, 24, 21, 0.5);
}

.fcar__item.is-rail img {
  transform: scale(1.1);
}

.fcar__next {
  position: absolute;
  top: 50%;
  right: 9%;
  z-index: 6;
  transform: translate(50%, -50%);
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #1a1815;
  cursor: pointer;
  box-shadow: 0 18px 34px -16px rgba(10, 9, 7, 0.55);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.fcar__next:hover {
  transform: translate(50%, -50%) scale(1.06);
  box-shadow: 0 24px 44px -16px rgba(10, 9, 7, 0.6);
}

.fcar__next svg {
  transition: transform 0.45s var(--ease);
}

.fcar__next:hover svg {
  transform: translateX(-4px);
}

.fcar__nav {
  position: absolute;
  left: clamp(12px, 1.6vw, 22px);
  bottom: clamp(12px, 1.6vw, 22px);
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 16px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(16, 14, 12, 0.34);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

.fcar__arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: transparent;
  color: #fcfaf6;
  cursor: pointer;
  transition: background 0.4s var(--ease), color 0.4s var(--ease),
    transform 0.4s var(--ease);
}

.fcar__arrow:hover {
  background: #fcfaf6;
  color: #1a1815;
  transform: translateX(2px);
}

.fcar__count {
  font-family: 'Cormorant', serif;
  font-size: 0.79rem;
  letter-spacing: 0.16em;
  color: rgba(252, 250, 246, 0.9);
}

/* ---------------- blog ---------------- */

.blog {
  background: var(--bone);
}

.blog__head {
  max-width: 48rem;
  margin-inline: auto;
  margin-block-end: clamp(38px, 5vw, 64px);
  text-align: center;
}

.blog__head .eyebrow {
  justify-content: center;
  margin-block-end: 16px;
}

.blog__head .eyebrow::before {
  display: none;
}

.blog__head .h2 {
  margin: 0 auto 14px;
  max-width: none;
  font-weight: 500;
}

.blog__sub {
  margin: 0 auto;
  max-width: 46ch;
  font-size: 0.94rem;
  line-height: 2;
  color: var(--muted);
}

.blog__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 2.4vw, 34px);
}

.post {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(26, 24, 21, 0.08);
  border-radius: 18px;
  background: #fff;
  transition: box-shadow 0.55s var(--ease), border-color 0.55s var(--ease);
}

.post:hover {
  border-color: rgba(26, 24, 21, 0.14);
  box-shadow: 0 26px 48px -36px rgba(20, 18, 15, 0.6);
}

.post__media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--sand);
}

.post__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}

.post:hover .post__media img {
  transform: scale(1.05);
}

.post__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: clamp(20px, 2vw, 28px) clamp(20px, 2vw, 28px) clamp(22px, 2.2vw, 30px);
}

.post__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.76rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.post h3 {
  margin: 14px 0 10px;
  font-size: 1.06rem;
  font-weight: 500;
  line-height: 1.75;
  color: var(--ink);
  transition: color 0.4s var(--ease);
}

.post:hover h3 {
  color: var(--clay);
}

.post p {
  font-size: 0.85rem;
  line-height: 1.95;
  color: var(--muted);
  margin-block-end: 22px;
}

.post__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin-block-start: auto;
  padding-block: 2px 3px;
  border-bottom: 1px solid transparent;
  font-size: 0.82rem;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
}

.post__link svg {
  transition: transform 0.4s var(--ease);
}

.post__link:hover {
  color: var(--clay);
  border-color: var(--clay);
}

.post__link:hover svg {
  transform: translateX(-3px);
}

/* ---------------- showcase ---------------- */

.show {
  position: relative;
  height: 300vh;
  background: #efe7da;
}

.show__stage {
  position: sticky;
  inset-block-start: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(16px, 3vh, 36px);
  padding-block: 92px 36px;
  overflow: hidden;
}

.show__head {
  text-align: center;
}

.show__head .eyebrow {
  justify-content: center;
}

.show__head .h2 {
  margin: 0 auto;
  max-width: 26ch;
}

.show__frame {
  position: relative;
  height: min(64vh, 600px);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #e0d6c6;
  box-shadow: 0 70px 100px -70px rgba(26, 24, 21, 0.6);
}

.show__bgs {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.show__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  will-change: transform;
}

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

.show__frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20, 18, 15, 0.16) 0%,
    rgba(20, 18, 15, 0.26) 100%
  );
  pointer-events: none;
  z-index: 2;
}

.show__card {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: min(512px, 70%);
  aspect-ratio: 1 / 1;
  height: auto;
  margin: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 50px 90px -40px rgba(18, 16, 13, 0.7);
  will-change: transform;
}

.show__card-slides {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.show__card-slides img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: opacity, transform;
}

.show__card-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  background: #fff;
}

.show__card-bar strong {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
}

.show__count {
  font-family: 'Cormorant', serif;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  direction: ltr;
}

/* ---------------- footer ---------------- */

.foot {
  position: relative;
  overflow: hidden;
  background: var(--deep);
  color: rgba(247, 244, 238, 0.78);
}

.foot__bg {
  position: absolute;
  inset: 0;
}

.foot__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
}

.foot::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(13, 12, 10, 0.92) 0%,
    rgba(13, 12, 10, 0.86) 60%,
    rgba(10, 9, 7, 0.96) 100%
  );
}

.foot__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.5fr 1fr 0.85fr;
  gap: clamp(28px, 5vw, 80px);
  padding-block: clamp(56px, 7vw, 100px) clamp(28px, 4vw, 48px);
}

.brand--light .brand__word {
  color: #f7f4ee;
}

.brand--light .brand__mark {
  color: #f7f4ee;
}

.foot__intro {
  margin: 18px 0 22px;
  max-width: 34ch;
  font-size: 0.85rem;
  line-height: 2;
  color: rgba(247, 244, 238, 0.58);
}

.socials {
  display: flex;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.socials a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(247, 244, 238, 0.2);
  border-radius: 50%;
  color: rgba(247, 244, 238, 0.75);
  transition: background 0.4s var(--ease), color 0.4s var(--ease),
    border-color 0.4s var(--ease), transform 0.4s var(--ease);
}

.socials a:hover {
  background: #f7f4ee;
  border-color: #f7f4ee;
  color: var(--deep);
  transform: translateY(-2px);
}

.foot h4 {
  margin: 0 0 20px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(247, 244, 238, 0.5);
}

.foot ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
  font-size: 0.87rem;
}

.foot a {
  text-decoration: none;
  transition: color 0.35s var(--ease);
}

.foot a:hover {
  color: #fff;
}

.foot__contact li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: rgba(247, 244, 238, 0.7);
}

.foot__contact svg {
  flex: none;
  margin-block-start: 4px;
  color: rgba(247, 244, 238, 0.42);
}

.foot__bottom {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-block: 20px 22px;
  border-block-start: 1px solid rgba(247, 244, 238, 0.1);
  font-size: 0.76rem;
  color: rgba(247, 244, 238, 0.45);
}

.foot__bottom span:last-child {
  font-family: 'Cormorant', serif;
  letter-spacing: 0.18em;
  direction: ltr;
}

/* ---------------- back to top ---------------- */

.to-top {
  position: fixed;
  inset-block-end: 22px;
  inset-inline-end: 22px;
  z-index: 80;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 1px solid rgba(26, 24, 21, 0.14);
  border-radius: 50%;
  background: rgba(252, 250, 246, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: var(--ink);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease),
    background 0.45s var(--ease), color 0.45s var(--ease),
    visibility 0.45s var(--ease);
  box-shadow: 0 18px 36px -24px rgba(20, 18, 15, 0.7);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  background: var(--ink);
  color: var(--cream);
  transform: translateY(-3px);
}

/* ---------------- responsive ---------------- */

@media (max-width: 1180px) {
  .nav__link {
    padding-inline: 11px;
    font-size: 0.85rem;
  }
  .head-social,
  .head-tools__sep {
    display: none;
  }
}

@media (max-width: 980px) {
  .why__grid {
    grid-template-columns: 1fr;
    gap: clamp(26px, 4vw, 40px);
  }
  .fcar__stage {
    height: clamp(280px, 46vh, 430px);
  }
  .show {
    height: 240vh;
  }
  .show__stage {
    padding-block: 84px 26px;
    gap: 14px;
  }
  .show__frame {
    height: min(56vh, 440px);
  }
  .quotes__grid {
    grid-template-columns: 1fr;
    gap: clamp(28px, 5vw, 40px);
  }
  .quotes__head .h2 {
    max-width: none;
  }
  .quotes__panel {
    max-width: none;
  }
}

@media (max-width: 860px) {
  .nav {
    display: none;
  }
  .site-head__inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .nav-toggle {
    display: grid;
  }
  .about__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about__media {
    order: -1;
    padding-block-end: 30px;
  }
  .about__img--sm {
    width: 52%;
    margin-block-start: -11%;
  }
  .about__badge {
    inset-block-end: 6px;
  }
  .blog__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .foot__inner {
    grid-template-columns: 1fr 1fr;
    gap: 36px 24px;
  }
  .foot__col--brand {
    grid-column: 1 / -1;
  }
  .show__card {
    width: min(420px, 78%);
  }
  .gallery {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .gallery::-webkit-scrollbar {
    display: none;
  }
  .gallery__item {
    flex: 0 0 76vw;
    scroll-snap-align: center;
  }
  .gallery__item:hover,
  .gallery__item:focus-visible {
    flex-grow: 0;
  }
  .gallery__desc {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 640px) {
  .hero__content {
    inset-block-start: clamp(92px, 13vh, 130px);
  }
  .hero__title {
    font-size: clamp(1.25rem, 5.6vw, 1.9rem);
    line-height: 1.6;
    white-space: normal;
    max-width: 22ch;
    margin-inline: auto;
  }
  .hero__sub {
    letter-spacing: 0.18em;
    text-indent: 0.18em;
  }
  .stats {
    flex-wrap: wrap;
    gap: 22px 30px;
  }
  .stat {
    flex: 1 1 30%;
  }
  .search__results {
    grid-template-columns: 1fr;
  }
  .fcar__stage {
    height: clamp(230px, 42vh, 300px);
  }
  .fcar__next {
    width: 46px;
    height: 46px;
  }
  .fcar__nav {
    gap: 8px;
    padding: 5px 5px 5px 12px;
  }
  .fcar__arrow {
    width: 30px;
    height: 30px;
  }
  .show__frame {
    height: min(62vh, 460px);
  }
  .show__card {
    width: min(320px, 80%);
  }
  .foot__inner {
    grid-template-columns: 1fr;
  }
  .to-top {
    inset-block-end: 16px;
    inset-inline-end: 16px;
    width: 44px;
    height: 44px;
  }
}

/* ---------------- motion preferences ---------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
