/* ===========================================================
   Studio Dimension — design tokens
   =========================================================== */
:root {
  --bg: #efe9df;
  --bg-raise: #e6ddcc;
  --ink: #1f1b18;
  --ink-soft: #55504a;
  --rust: #a8452b;
  --rust-deep: #7e3220;
  --indigo: #5b56c8;
  --stone: #ddd3c1;
  --line: rgba(31, 27, 24, 0.16);
  --line-strong: rgba(31, 27, 24, 0.3);

  --display: 'Space Grotesk', 'Arial Narrow', sans-serif;
  --body: 'IBM Plex Sans', -apple-system, sans-serif;

  --max: 1320px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
}

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

html {
  scroll-behavior: smooth;
}

@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;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.01em;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* focus visibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
}

/* ===========================================================
   Nav
   =========================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--gutter);
  /* NOTE: no backdrop-filter / transform / filter on .nav itself.
     Any of those would make .nav the containing block for the
     position:fixed mobile menu and collapse it to the navbar's height. */
}

.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(239, 233, 223, 0.92), rgba(239, 233, 223, 0));
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: background .2s ease;
}

.nav.is-solid::before {
  background: rgba(239, 233, 223, 0.97);
  box-shadow: 0 1px 0 var(--line);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}

.nav__brand img {
  width: 26px;
  height: auto;
}

.nav__brand span {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.14em;
}

.nav__links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}

.nav__links a:hover {
  border-color: var(--ink);
}

.nav__toggle {
  display: none;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform .25s ease, opacity .2s ease;
}

.nav__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width:760px) {
  .nav__links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(78vw, 320px);
    height: 100vh;
    height: 100dvh;
    background: var(--bg);
    color: var(--ink);
    flex-direction: column;
    align-items: flex-start;
    gap: 1.6rem;
    padding: 6rem 2rem 2rem;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform .32s ease, visibility 0s linear .32s;
    z-index: 105;
  }

  .nav__links.is-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform .32s ease;
  }

  .nav__links a {
    font-family: var(--display);
    font-size: 1.5rem;
    border-bottom: none;
  }

  .nav__toggle {
    display: block;
    position: relative;
    z-index: 110;
  }
}

/* ===========================================================
   Hero (3D canvas)
   =========================================================== */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background: radial-gradient(120% 90% at 78% 15%, #f4efe4 0%, var(--bg) 55%);
}

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

.hero__canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 var(--gutter) clamp(2.5rem, 6vw, 5rem);
}

.hero__eyebrow {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0 0 0.9rem;
  max-width: 34ch;
}

.hero h1 {
  font-size: clamp(3.1rem, 9vw, 7.4rem);
  letter-spacing: -0.02em;
}

.hero__tag {
  max-width: 46ch;
  margin-top: 1.2rem;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.hero__scroll {
  position: absolute;
  left: var(--gutter);
  bottom: 2rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.hero__scroll svg {
  width: 14px;
  height: 20px;
  animation: bob 2.2s ease-in-out infinite;
}

@keyframes bob {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(6px);
  }
}

/* ===========================================================
   Section rhythm
   =========================================================== */
section {
  padding: clamp(4rem, 9vw, 7.5rem) 0;
}

#studio,
#services,
#work,
#team,
#contact {
  scroll-margin-top: 4.5rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: clamp(2.4rem, 5vw, 4rem);
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  max-width: 16ch;
}

.section-head p {
  max-width: 36ch;
  color: var(--ink-soft);
  margin: 0;
}

/* ===========================================================
   About strip
   =========================================================== */
.about__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.about__lede {
  font-size: 1.3rem;
  line-height: 1.55;
  max-width: 44ch;
}

.about__facts {
  list-style: none;
  margin: 0;
  padding: 0;
}

.about__facts li {
  display: flex;
  justify-content: space-between;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

.about__facts li:last-child {
  border-bottom: 1px solid var(--line);
}

.about__facts span:first-child {
  color: var(--ink-soft);
}

.about__facts strong {
  font-family: var(--display);
  font-weight: 600;
}

@media (max-width:820px) {
  .about__grid {
    grid-template-columns: 1fr;
  }
}

/* ===========================================================
   Values band
   =========================================================== */
.values {
  background: var(--ink);
  color: var(--bg);
}

.values__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(1.5rem, 4vw, 3.5rem);
}

.values__row span {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.6rem, 4.4vw, 3rem);
  color: rgba(239, 233, 223, 0.4);
  transition: color .25s ease;
}

.values__row span.is-active,
.values__row span:hover {
  color: var(--bg);
}

/* ===========================================================
   Services
   =========================================================== */
.services__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 4rem;
}

.services__cols ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: svc;
}

.services__cols li {
  counter-increment: svc;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  font-family: var(--display);
  font-size: 1.15rem;
}

.services__cols li::before {
  content: counter(svc, decimal-leading-zero);
  font-size: 0.8rem;
  color: var(--rust);
  font-family: var(--body);
  font-weight: 600;
}

@media (max-width:700px) {
  .services__cols {
    grid-template-columns: 1fr;
  }
}

/* ===========================================================
   Work grid + filters
   =========================================================== */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  margin-bottom: 2.6rem;
}

.filters button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--body);
  font-size: 0.92rem;
  color: var(--ink-soft);
  padding: 0.3rem 0;
  border-bottom: 1px solid transparent;
}

.filters button.is-active {
  color: var(--ink);
  border-color: var(--rust);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: transparent;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.card {
  perspective: 900px;
  background: var(--bg);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.card[hidden] {
  display: none;
}

.card__inner {
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform .25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card__media {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--stone);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateZ(0) scale(1.02);
  transition: transform .5s ease;
}

.card__inner:hover .card__media img {
  transform: scale(1.08);
}

.card__num {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  font-family: var(--display);
  font-size: 0.8rem;
  color: #fff;
  background: rgba(31, 27, 24, 0.55);
  padding: 0.15rem 0.5rem;
}

.card__body {
  padding: 1.2rem 1.3rem 1.6rem;
  flex: 1;
}

.card__cat {
  font-size: 0.78rem;
  color: var(--rust);
  letter-spacing: 0.06em;
}

.card__title {
  font-size: 1.3rem;
  margin-top: 0.4rem;
}

.card__loc {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-top: 0.35rem;
}

.card a {
  text-decoration: none;
  display: block;
  height: 100%;
}

@media (max-width:980px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width:620px) {
  .work-grid {
    grid-template-columns: 1fr;
  }
}

/* ===========================================================
   Team
   =========================================================== */
.team__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.team__grid li {
  list-style: none;
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
}

.team__grid strong {
  font-family: var(--display);
  font-size: 1.15rem;
  display: block;
}

.team__grid span {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

@media (max-width:700px) {
  .team__grid {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
}

/* ===========================================================
   Footer
   =========================================================== */
footer {
  background: var(--ink);
  color: var(--bg);
  padding: clamp(3rem, 7vw, 5rem) 0 2rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(239, 233, 223, 0.18);
}

.footer__grid h3 {
  font-size: 1.6rem;
  max-width: 14ch;
  color: var(--bg);
}

.footer__col p,
.footer__col a {
  display: block;
  color: rgba(239, 233, 223, 0.75);
  text-decoration: none;
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}

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

.footer__col h4 {
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: rgba(239, 233, 223, 0.5);
  margin-bottom: 0.9rem;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 1.6rem;
  font-size: 0.82rem;
  color: rgba(239, 233, 223, 0.55);
  flex-wrap: wrap;
  gap: 0.6rem;
}

@media (max-width:760px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

/* ===========================================================
   Project detail page
   =========================================================== */
.phero {
  position: relative;
  height: 82svh;
  min-height: 460px;
  overflow: hidden;
}

.phero__img {
  position: absolute;
  inset: -8% -2%;
  width: 104%;
  height: 116%;
  object-fit: cover;
  will-change: transform;
}

.phero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(31, 27, 24, 0.75) 0%, rgba(31, 27, 24, 0.05) 45%);
}

.phero__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 0 var(--gutter) 2.6rem;
  color: #fff;
}

.phero__num {
  font-family: var(--display);
  font-size: 0.9rem;
  opacity: 0.85;
}

.phero__content h1 {
  font-size: clamp(2.4rem, 6.5vw, 5rem);
  margin-top: 0.5rem;
  color: #fff;
}

.phero__content .ploc {
  margin-top: 0.6rem;
  font-size: 1.05rem;
  opacity: 0.9;
}

.pbody {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
  align-items: start;
}

.pbody__text {
  max-width: 62ch;
  font-size: 1.08rem;
}

.pbody__text p+p {
  margin-top: 1.1rem;
}

.titleblock {
  border: 1px solid var(--line-strong);
  font-family: var(--display);
}

.titleblock__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.titleblock__row:first-child {
  border-top: none;
}

.titleblock__row span:first-child {
  color: var(--ink-soft);
  font-family: var(--body);
  font-size: 0.85rem;
}

.titleblock__head {
  background: var(--ink);
  color: var(--bg);
  padding: 0.7rem 1.1rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.gallery {
  display: grid;
  gap: 1rem;
  padding: 1rem 0 0;
}

.gallery img {
  width: 100%;
  height: auto;
}

.gallery.g2 {
  grid-template-columns: 1fr 1fr;
}

@media (max-width:700px) {
  .gallery.g2 {
    grid-template-columns: 1fr;
  }
}

.pnav {
  display: flex;
  justify-content: space-between;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  gap: 1rem;
}

.pnav a {
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.05rem;
}

.pnav a span {
  display: block;
  font-family: var(--body);
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-bottom: 0.3rem;
}

.pnav .next {
  text-align: right;
}

@media (max-width:820px) {
  .pbody {
    grid-template-columns: 1fr;
  }
}

/* ===========================================================
   Product grid (Living by Lama)
   =========================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  padding-top: 1rem;
}

.product {
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}

.product img {
  aspect-ratio: 1/1;
  object-fit: cover;
  margin-bottom: 1rem;
}

.product h3 {
  font-size: 1.3rem;
}

.product__price {
  color: var(--rust);
  font-size: 0.9rem;
  margin: 0.2rem 0 0.8rem;
}

.product p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 48ch;
}

@media (max-width:700px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* reveal-on-scroll (single subtle utility, used sparingly) */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}