/* YK Interior Design — Yuliya Kazakevich */

@font-face {
  font-family: "Playfair Display";
  src: url("fonts/PlayfairDisplay.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f2eee7;
  --bg-2: #e9e3d8;
  --kraft: #dcd5c7;
  --ink: #24241c;
  --ink-2: #57564a;
  --olive: #474a24;
  --olive-2: #6d6e3d;
  --gold: #a8883c;
  --line: rgba(36, 36, 28, 0.14);
  --serif: "Playfair Display", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --noise: 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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .29 0 0 0 0 .2 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.38'/%3E%3C/svg%3E");
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 300 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

.wrap {
  width: min(1160px, 100% - 32px);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- top bar ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(242, 238, 231, 0.86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.top.is-scrolled {
  border-bottom-color: var(--line);
}
.top__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand img {
  width: 38px;
  height: 38px;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
}
.nav__link {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 6px 0;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.35s var(--ease);
}
.nav__link:hover,
.nav__link[aria-current="page"] {
  background-size: 100% 1px;
}

.lang {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.lang button {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: 500 10.5px/1 var(--sans);
  letter-spacing: 0.14em;
  color: var(--ink-2);
  padding: 7px 9px;
  border-radius: 999px;
  transition: background 0.25s, color 0.25s;
}
.lang button:hover {
  color: var(--ink);
}
.lang button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}

@media (max-width: 640px) {
  .nav__link,
  .brand span {
    display: none;
  }
}

/* ---------- hero: both sides of the business card ---------- */

.hero {
  padding: clamp(24px, 6vw, 72px) 0 clamp(48px, 8vw, 96px);
}

.cards {
  display: grid;
  gap: 20px;
  max-width: 540px;
  margin-inline: auto;
  perspective: 1400px;
}
@media (min-width: 960px) {
  .cards {
    grid-template-columns: 1fr 1fr;
    max-width: none;
    gap: 36px;
  }
}

.card {
  position: relative;
  aspect-ratio: 1.65;
  border-radius: 22px;
  padding: clamp(18px, 3.6vw, 38px);
  background-color: var(--kraft);
  background-image: var(--noise),
    radial-gradient(130% 120% at 15% 0%, rgba(255, 255, 255, 0.42), transparent 60%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 34px 60px -32px rgba(58, 50, 28, 0.5),
    0 12px 24px -14px rgba(58, 50, 28, 0.28);
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
  overflow: hidden;
}
.card::after {
  /* soft light that follows the pointer */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 0%),
    rgba(255, 255, 255, 0.32),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.4s;
}
.card.is-tilting::after {
  opacity: 1;
}

.card--front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(6px, 1.2vw, 12px);
}
.card__logo {
  width: clamp(104px, 34%, 168px);
  height: auto;
  margin-top: -4px;
}
.card__name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(20px, 2.7vw, 30px);
  line-height: 1.1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.rule-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0;
  font-size: clamp(9.5px, 1vw, 11px);
  font-weight: 400;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.rule-title::before,
.rule-title::after {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}
.rule-title > span {
  margin-right: -0.42em; /* balance trailing letter-spacing */
}

.card--back {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(14px, 2.2vw, 22px);
}
.card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.card__who-name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(15px, 1.7vw, 19px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
}
.card__who-role {
  margin: 6px 0 0;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.card__mini {
  width: clamp(48px, 13%, 64px);
  height: auto;
  flex: none;
  margin: -8px -6px 0 0;
}

.contacts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(2px, 0.7vw, 8px);
}
.contacts a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
  font-size: clamp(13.5px, 1.4vw, 15.5px);
  font-weight: 400;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}
.contacts a > span:first-of-type {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.35s var(--ease);
  overflow-wrap: anywhere;
}
.contacts a:hover > span:first-of-type {
  background-size: 100% 1px;
}
.contacts svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--olive-2);
}
.tag {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--ink-2);
  padding: 2px 6px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(28px, 4vw, 44px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.btn svg {
  width: 16px;
  height: 16px;
}
.btn:hover {
  background: var(--olive);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.btn--ghost:hover {
  background: var(--ink);
  color: var(--bg);
}

/* ---------- sections ---------- */

.section {
  padding: clamp(56px, 9vw, 120px) 0;
  border-top: 1px solid var(--line);
}
.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 32px;
  margin-bottom: clamp(28px, 4.5vw, 52px);
}
.eyebrow {
  display: block;
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.h1,
.h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.h1 {
  font-size: clamp(40px, 7vw, 84px);
}
.h2 {
  font-size: clamp(34px, 5.2vw, 60px);
}
.lead {
  max-width: 46ch;
  margin: 18px 0 0;
  color: var(--ink-2);
  font-size: clamp(15px, 1.5vw, 17px);
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 5px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-bottom: 1px solid currentColor;
  transition: gap 0.3s var(--ease), color 0.25s;
}
.link-arrow:hover {
  gap: 16px;
  color: var(--olive);
}

/* ---------- portfolio ---------- */

.works {
  display: grid;
  gap: clamp(24px, 3vw, 36px);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}
.works--single {
  grid-template-columns: 1fr;
}
.works__empty {
  color: var(--ink-2);
}

.work {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.work__media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow: hidden;
  background-color: var(--kraft);
  background-image: var(--noise),
    radial-gradient(120% 120% at 20% 0%, rgba(255, 255, 255, 0.4), transparent 60%);
}
.work__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (min-width: 760px) {
  /* a lone project is shown as a featured row: picture left, text right */
  .works--single .work {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
    align-items: end;
    gap: clamp(24px, 4vw, 56px);
  }
  .works--single .work__media {
    aspect-ratio: 16 / 10;
  }
  .works--single .work__body {
    padding-bottom: 8px;
  }
  .works--single .work__title {
    font-size: clamp(28px, 3.2vw, 40px);
  }
}
.work__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease);
}
a.work:hover .work__media img {
  transform: scale(1.035);
}
.work__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.work__ph img {
  width: clamp(110px, 22%, 200px);
  height: auto;
  opacity: 0.32;
  filter: grayscale(0.2);
}
.pill {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(242, 238, 231, 0.88);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.work__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.work__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.15;
}
.work__note {
  margin: 0;
  max-width: 34ch;
  color: var(--ink-2);
  font-size: 14.5px;
}
.work__go {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: gap 0.3s var(--ease);
}
a.work:hover .work__go {
  gap: 16px;
}

/* ---------- contact & footer ---------- */

.contact {
  text-align: center;
}
.contact .h2 {
  max-width: 16ch;
  margin-inline: auto;
}
.contact .lead {
  margin: 18px auto 34px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  transition: box-shadow 0.25s, background 0.25s;
}
.chip svg {
  width: 17px;
  height: 17px;
  color: var(--olive-2);
}
.chip:hover {
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.contact .hero__actions {
  margin-top: 28px;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 28px 0 36px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-2);
}

/* ---------- simple pages (portfolio list, placeholders, 404) ---------- */

.page-head {
  padding: clamp(40px, 8vw, 100px) 0 clamp(32px, 5vw, 56px);
}
.center-page {
  min-height: calc(100vh - 64px - 90px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 48px 0;
}
.center-page img {
  width: 132px;
  height: auto;
  margin: 0 auto 28px;
}
.center-page .lead {
  margin: 18px auto 32px;
}

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

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .card {
    transition: none;
  }
}
