@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Manrope:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  --bg: #f6f3ee;
  --bg2: #efece6;
  --bg3: #e8e4dd;
  --bg-white: #faf8f5;
  --bg-dark: #2c2825;
  --bg-dark2: #3a3632;
  --tx: #2c2825;
  --txd: #6b6560;
  --txm: #9e9890;
  --txl: #c2bdb5;
  --ac: #a07d50;
  --ac2: #b8935e;
  --acs: rgba(160,125,80,0.07);
  --acb: rgba(160,125,80,0.2);
  --bd: rgba(44,40,37,0.08);
  --bd2: rgba(44,40,37,0.12);
  --white: #fff;
  --fs: 'Cormorant Garamond', Georgia, serif;
  --fb: 'Manrope', sans-serif;
  --fm: 'JetBrains Mono', monospace;
  --ez: cubic-bezier(.25,.46,.45,.94);
  --eo: cubic-bezier(.16,1,.3,1);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--fb);
  background: var(--bg);
  color: var(--tx);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--ac); color: var(--white); }

/* ═══ LOADER ═══ */
.loader {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 1.5rem;
  transition: opacity .8s var(--ez), visibility .8s;
}
.loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-name {
  font-family: var(--fs);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 600; letter-spacing: .12em;
}
.loader-name span {
  display: inline-block; opacity: 0;
  transform: translateY(100%);
  animation: lc .5s var(--eo) forwards;
}
@keyframes lc { to { opacity: 1; transform: translateY(0); } }
.loader-bar {
  width: 120px; height: 1px;
  background: var(--bd2); position: relative; overflow: hidden;
}
.loader-bar::after {
  content: ''; position: absolute; inset: 0;
  background: var(--ac);
  transform: scaleX(0); transform-origin: left;
  animation: lb 1.6s var(--ez) .4s forwards;
}
@keyframes lb { to { transform: scaleX(1); } }

/* ═══ NAV ═══ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 65px; padding: 0 3rem;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(246,243,238,0.85);
  backdrop-filter: blur(25px) saturate(1.3);
  border-bottom: 1px solid var(--bd);
  transition: transform .5s var(--ez);
}
nav.hide { transform: translateY(-100%); }
.nav-logo {
  font-family: var(--fs); font-size: 1.15rem;
  font-weight: 600; letter-spacing: .06em;
  color: var(--tx); text-decoration: none;
}
.nav-logo em { font-style: normal; color: var(--ac); }
.nav-links { display: flex; gap: .3rem; }
.nav-links a {
  font-family: var(--fm); font-size: .65rem;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--txm); text-decoration: none;
  padding: .45rem .9rem; border-radius: 3px;
  transition: color .3s, background .3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ac); background: var(--acs); }
.nav-back {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--fm); font-size: .65rem;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--txm); text-decoration: none;
  transition: color .3s;
}
.nav-back:hover { color: var(--ac); }
.ham { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
.ham span { width: 20px; height: 1.5px; background: var(--tx); }

/* ═══ HERO ═══ */
.hero {
  height: 100vh; display: flex; align-items: flex-end;
  padding: 0 3rem 5rem; position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, var(--bg2) 0%, var(--bg) 100%);
  background-size: cover; background-position: center;
}
.hero-ov {
  position: absolute; inset: 0;
  background: linear-gradient(to top,
    rgba(246,243,238,0.95) 0%,
    rgba(246,243,238,0.2) 50%,
    rgba(246,243,238,0.5) 100%);
}
.hero-c { position: relative; z-index: 2; max-width: 800px; }
.hero-tag {
  font-family: var(--fm); font-size: .6rem;
  letter-spacing: .35em; text-transform: uppercase;
  color: var(--ac); margin-bottom: 1.5rem;
  opacity: 0; animation: hr .8s var(--eo) 2s forwards;
}
.hero h1 {
  font-family: var(--fs);
  font-size: clamp(3.5rem, 9vw, 7.5rem);
  font-weight: 600; line-height: .9;
  letter-spacing: -.02em; margin-bottom: 1.8rem;
  opacity: 0; animation: hr .8s var(--eo) 2.2s forwards;
}
.hero h1 em { font-style: italic; color: var(--ac); }
.hero-desc {
  font-size: 1rem; font-weight: 300;
  color: var(--txd); line-height: 1.8; max-width: 480px;
  opacity: 0; animation: hr .8s var(--eo) 2.4s forwards;
}
@keyframes hr { from { opacity:0; transform:translateY(35px); } to { opacity:1; transform:translateY(0); } }
.hero-scroll {
  position: absolute; bottom: 2rem; right: 3rem;
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  opacity: 0; animation: hr .8s var(--eo) 2.8s forwards;
}
.hero-scroll span {
  font-family: var(--fm); font-size: .5rem;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--txl); writing-mode: vertical-rl;
}
.scroll-line {
  width: 1px; height: 45px;
  background: var(--bd2); position: relative; overflow: hidden;
}
.scroll-line::after {
  content: ''; position: absolute; top: -100%; left: 0;
  width: 100%; height: 40%; background: var(--ac);
  animation: sd 2.5s ease infinite;
}
@keyframes sd { 0%{top:-40%} 100%{top:140%} }

/* ═══ SECTIONS ═══ */
.sec { padding: 6rem 3rem; }
.sec-dark { background: var(--bg-dark); color: var(--bg); }
.sh {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 3rem;
}
.sh .sn {
  font-family: var(--fm); font-size: .55rem;
  letter-spacing: .2em; color: var(--ac);
  padding: .25rem .6rem;
  border: 1px solid var(--acb);
}
.sh h2 {
  font-family: var(--fs);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 600;
}
.sh .sl { flex: 1; height: 1px; background: var(--bd); }

/* ═══ ABOUT ═══ */
.ab-grid {
  display: grid; grid-template-columns: 1.3fr .7fr;
  gap: 4rem; align-items: start;
}
.ab-intro {
  font-family: var(--fs);
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  font-weight: 400; line-height: 1.6; margin-bottom: 1.8rem;
}
.ab-intro em { font-style: italic; color: var(--ac); }
.ab-p {
  font-size: .92rem; font-weight: 300;
  line-height: 1.85; color: var(--txd); margin-bottom: 1.2rem;
}
.ab-p strong { color: var(--tx); font-weight: 500; }

.stat-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--bd2);
  border: 1px solid var(--bd); margin-bottom: 2rem;
}
.stat {
  background: var(--bg-white); padding: 1.5rem;
  transition: background .3s;
}
.stat:hover { background: var(--bg); }
.stat-v {
  font-family: var(--fs); font-size: 2.5rem;
  font-weight: 600; color: var(--ac); line-height: 1; margin-bottom: .3rem;
}
.stat-d {
  font-family: var(--fm); font-size: .55rem;
  letter-spacing: .15em; text-transform: uppercase; color: var(--txm);
}
.tools-label {
  font-family: var(--fm); font-size: .55rem;
  letter-spacing: .25em; text-transform: uppercase;
  color: var(--ac); margin-bottom: .8rem;
}
.tools {
  display: flex; flex-wrap: wrap; gap: .4rem;
}
.tools span {
  font-family: var(--fm); font-size: .65rem;
  color: var(--txd); padding: .4rem .85rem;
  border: 1px solid var(--bd);
  transition: .3s; cursor: default;
}
.tools span:hover {
  color: var(--ac); border-color: var(--acb); background: var(--acs);
}

.svc-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--bd2);
  border: 1px solid var(--bd); margin-top: 3.5rem;
}
.svc {
  background: var(--bg-white); padding: 1.8rem 1.3rem;
  transition: background .3s;
}
.svc:hover { background: var(--bg); }
.svc-icon { font-size: 1.3rem; margin-bottom: .8rem; color: var(--ac); }
.svc-t { font-size: .82rem; font-weight: 600; margin-bottom: .4rem; }
.svc-d { font-size: .75rem; font-weight: 300; color: var(--txm); line-height: 1.6; }

/* ═══ PROJECT CARDS (HOME) ═══ */
.proj-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.proj-card {
  position: relative; overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--bg3);
  cursor: pointer; text-decoration: none; color: var(--tx);
  display: block;
}
.proj-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s var(--ez), filter .5s;
}
.proj-card:hover img { transform: scale(1.05); filter: brightness(.55); }
.proj-card-ov {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(44,40,37,.7) 0%, transparent 60%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 2rem;
  transition: background .5s;
}
.proj-card:hover .proj-card-ov { background: linear-gradient(to top, rgba(44,40,37,.85) 0%, rgba(44,40,37,.2) 100%); }
.proj-card-name {
  font-family: var(--fs); font-size: clamp(1.3rem, 2.5vw, 2rem);
  font-weight: 600; color: var(--white); margin-bottom: .3rem;
}
.proj-card-meta {
  font-family: var(--fm); font-size: .6rem;
  letter-spacing: .15em; text-transform: uppercase;
  color: rgba(255,255,255,.6);
}
.proj-card-arrow {
  position: absolute; top: 1.5rem; right: 1.5rem;
  font-family: var(--fm); font-size: .6rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--white);
  padding: .4rem .8rem;
  border: 1px solid rgba(255,255,255,.2);
  opacity: 0; transform: translateY(-5px);
  transition: .4s var(--ez);
}
.proj-card:hover .proj-card-arrow { opacity: 1; transform: translateY(0); }

/* ═══ ARCHIVE ═══ */
.ar-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem;
}
.ar-i {
  position: relative; aspect-ratio: 4/3;
  overflow: hidden; background: var(--bg3); cursor: pointer;
}
.ar-i img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ez), filter .5s;
}
.ar-i:hover img { transform: scale(1.08); filter: brightness(.4); }
.ar-o {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1rem; opacity: 0; transform: translateY(6px);
  transition: .4s var(--ez);
}
.ar-i:hover .ar-o { opacity: 1; transform: translateY(0); }
.ar-n { font-family: var(--fs); font-size: 1.1rem; font-weight: 600; color: var(--white); margin-bottom: .2rem; }
.ar-ty { font-family: var(--fm); font-size: .55rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ac2); }

/* ═══ CONTACT ═══ */
.contact {
  padding: 8rem 3rem; text-align: center; position: relative;
  background: var(--bg-white);
}
.contact::before {
  content: ''; position: absolute; top: 0; left: 50%;
  width: 1px; height: 80px;
  background: linear-gradient(to bottom, transparent, var(--ac));
}
.ct-h {
  font-family: var(--fs);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 600; line-height: 1.05;
  margin-bottom: 1.2rem;
}
.ct-h em { font-style: italic; color: var(--ac); }
.ct-d {
  font-size: .95rem; font-weight: 300;
  color: var(--txd); max-width: 420px;
  margin: 0 auto 2.5rem; line-height: 1.8;
}
.ct-g { display: flex; justify-content: center; gap: .8rem; flex-wrap: wrap; }
.ct-c {
  display: flex; flex-direction: column;
  align-items: center; gap: .4rem;
  padding: 1.3rem 2rem;
  border: 1px solid var(--bd); text-decoration: none;
  color: var(--tx); transition: .4s; min-width: 190px;
  background: var(--white);
}
.ct-c:hover { border-color: var(--acb); background: var(--acs); transform: translateY(-2px); }
.ct-cl { font-family: var(--fm); font-size: .5rem; letter-spacing: .2em; text-transform: uppercase; color: var(--txm); }
.ct-cv { font-size: .82rem; font-weight: 500; color: var(--txd); }

/* ═══ FOOTER ═══ */
footer {
  padding: 1.5rem 3rem;
  border-top: 1px solid var(--bd);
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg-white);
}
footer span {
  font-family: var(--fm); font-size: .55rem;
  letter-spacing: .1em; color: var(--txm);
}

/* ═══ PROJECT DETAIL PAGE ═══ */
.pd-hero {
  width: 100%; aspect-ratio: 21/9;
  overflow: hidden; background: var(--bg3);
  margin-top: 65px;
}
.pd-hero img { width: 100%; height: 100%; object-fit: cover; }
.pd-header {
  padding: 3rem 3rem 0;
  display: flex; justify-content: space-between; align-items: flex-start;
  border-bottom: 1px solid var(--bd); padding-bottom: 2rem; margin-bottom: 3rem;
}
.pd-title {
  font-family: var(--fs);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 600; margin-bottom: .5rem;
}
.pd-subtitle {
  font-family: var(--fm); font-size: .65rem;
  letter-spacing: .15em; text-transform: uppercase; color: var(--ac);
}
.pd-metas { display: flex; gap: 2.5rem; }
.pd-meta-l {
  font-family: var(--fm); font-size: .5rem;
  letter-spacing: .2em; text-transform: uppercase; color: var(--txm);
  margin-bottom: .2rem;
}
.pd-meta-v { font-size: .85rem; color: var(--txd); }

.pd-body { padding: 0 3rem; }
.pd-info-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; margin-bottom: 3rem;
}
.pd-info-title {
  font-family: var(--fm); font-size: .6rem;
  letter-spacing: .25em; text-transform: uppercase;
  color: var(--ac); margin-bottom: .8rem;
  padding-bottom: .4rem; border-bottom: 1px solid var(--acb);
}
.pd-info-text {
  font-size: .92rem; font-weight: 300;
  line-height: 1.8; color: var(--txd);
}

.pd-gallery {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: .8rem; margin-bottom: 3rem;
}
.pd-gallery.triple { grid-template-columns: repeat(3, 1fr); }
.pd-gal-item {
  overflow: hidden; background: var(--bg3);
  cursor: zoom-in;
}
.pd-gal-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ez);
}
.pd-gal-item:hover img { transform: scale(1.04); }
.pd-gal-full {
  width: 100%; overflow: hidden;
  background: var(--bg3); margin-bottom: 3rem;
  cursor: zoom-in;
}
.pd-gal-full img { width: 100%; object-fit: cover; transition: transform .8s var(--ez); }
.pd-gal-full:hover img { transform: scale(1.02); }

.pd-section-title {
  font-family: var(--fm); font-size: .6rem;
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--ac); margin-bottom: 1.5rem;
  padding-bottom: .5rem; border-bottom: 1px solid var(--acb);
}

.pd-materials {
  display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 3rem;
}
.pd-mat {
  font-family: var(--fm); font-size: .68rem;
  color: var(--txd); padding: .5rem 1rem;
  border: 1px solid var(--bd); background: var(--bg-white);
}

.pd-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 2rem 3rem;
  border-top: 1px solid var(--bd);
  margin-top: 4rem;
}
.pd-nav a {
  font-family: var(--fm); font-size: .7rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--txm); text-decoration: none;
  padding: .6rem 1.2rem; border: 1px solid var(--bd);
  transition: .3s;
}
.pd-nav a:hover { color: var(--ac); border-color: var(--acb); }

/* ═══ LIGHTBOX ═══ */
.lb {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 10001;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: .4s var(--ez); cursor: zoom-out;
}
.lb.on { opacity: 1; visibility: visible; }
.lb img {
  max-width: 92vw; max-height: 92vh; object-fit: contain;
  transform: scale(.95); transition: transform .5s var(--eo);
}
.lb.on img { transform: scale(1); }
.lb-x {
  position: absolute; top: 1.5rem; right: 1.5rem;
  font-family: var(--fm); font-size: .65rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.5); background: none;
  border: 1px solid rgba(255,255,255,.15);
  padding: .4rem .9rem; cursor: pointer; transition: .3s;
}
.lb-x:hover { color: #fff; border-color: rgba(255,255,255,.4); }

/* ═══ PLACEHOLDER ═══ */
.ph {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--bg3) 0%, var(--bg2) 50%, var(--bg3) 100%);
  background-size: 200% 200%;
  animation: shm 3s ease infinite;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--fm); font-size: .55rem;
  color: var(--txl); letter-spacing: .1em; text-align: center; padding: .8rem;
}
@keyframes shm { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ═══ REVEAL ═══ */
.r {
  opacity: 0; transform: translateY(40px);
  transition: opacity .7s var(--ez), transform .7s var(--eo);
}
.r.v { opacity: 1; transform: translateY(0); }
.rd1 { transition-delay: .1s; }
.rd2 { transition-delay: .2s; }

/* ═══ RESPONSIVE ═══ */
@media(max-width:900px){
  nav{padding:0 1.5rem}.nav-links{display:none}.ham{display:flex}
  .hero{padding:0 1.5rem 3rem}.hero-scroll{display:none}
  .sec{padding:4rem 1.5rem}
  .ab-grid{grid-template-columns:1fr;gap:2.5rem}
  .svc-row{grid-template-columns:1fr 1fr}
  .proj-grid{grid-template-columns:1fr}
  .ar-grid{grid-template-columns:1fr 1fr}
  .pd-hero{aspect-ratio:16/9}
  .pd-header{flex-direction:column;gap:1.5rem;padding:2rem 1.5rem 1.5rem}
  .pd-body{padding:0 1.5rem}
  .pd-info-grid{grid-template-columns:1fr;gap:2rem}
  .pd-gallery{grid-template-columns:1fr}
  .pd-gallery.triple{grid-template-columns:1fr 1fr}
  .pd-nav{padding:1.5rem}
  .contact{padding:5rem 1.5rem}
  .ct-g{flex-direction:column;align-items:center}
  footer{flex-direction:column;gap:.6rem;text-align:center;padding:1.5rem}
}
@media(max-width:500px){
  .stat-grid{grid-template-columns:1fr}
  .svc-row{grid-template-columns:1fr}
  .ar-grid{grid-template-columns:1fr}
  .pd-gallery.triple{grid-template-columns:1fr}
}
