:root {
  --sand: #f5f1ea;
  --sand-deep: #ece5d8;
  --ink: #2a2724;
  --ink-soft: #514c45;
  --clay: #b5723a;
  --clay-dark: #9a5e2c;
  --olive: #5a5d4a;
  --concrete: #9a938a;
  --line: #ddd4c5;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Manrope", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--sand);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; letter-spacing: -0.01em; }

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

img { display: block; width: 100%; height: 100%; object-fit: cover; }

.wrap { width: min(1200px, 90vw); margin-inline: auto; }

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--clay);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--clay);
  display: inline-block;
}

/* ---------- Header ---------- */
header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 1.5rem 0;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
header.scrolled {
  background: rgba(245, 241, 234, 0.88);
  backdrop-filter: blur(12px);
  padding: 0.85rem 0;
  box-shadow: 0 1px 0 var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; }
.logo { font-family: var(--serif); font-size: 1.5rem; letter-spacing: 0.04em; color: var(--ink); }
.logo b { font-weight: 600; }
.logo span { font-family: var(--sans); font-weight: 300; font-size: 0.7rem; letter-spacing: 0.42em; text-transform: uppercase; display: block; margin-top: -2px; color: var(--ink-soft); }
header:not(.scrolled) .logo, header:not(.scrolled) .nav-links a { color: var(--sand); }
header:not(.scrolled) .logo span { color: rgba(245,241,234,0.75); }

.nav-links { display: flex; gap: 2.4rem; list-style: none; align-items: center; }
.nav-links a {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  padding-bottom: 3px;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 1px;
  background: currentColor; transition: width 0.3s var(--ease);
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--clay); }
.nav-cta {
  border: 1px solid currentColor;
  padding: 0.5rem 1.1rem !important;
  border-radius: 100px;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--clay); border-color: var(--clay); color: var(--sand) !important; }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; z-index: 110; }
.burger span { width: 24px; height: 2px; background: currentColor; transition: 0.3s var(--ease); display: block; }
header:not(.scrolled) .burger { color: var(--sand); }
header.scrolled .burger { color: var(--ink); }
body.menu-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero (home) ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { transform: scale(1.12); will-change: transform; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(20,17,14,0.78) 0%, rgba(20,17,14,0.25) 45%, rgba(20,17,14,0.35) 100%);
}
.hero-inner { padding-bottom: clamp(3rem, 8vh, 6rem); padding-top: 9rem; color: var(--sand); }
.hero h1 { font-size: clamp(2.6rem, 7vw, 5.6rem); max-width: 16ch; margin: 1.4rem 0 1.6rem; color: var(--sand); }
.hero h1 em { font-style: italic; color: #e8c39c; }
.hero p { max-width: 44ch; font-size: 1.05rem; color: rgba(245,241,234,0.85); font-weight: 300; }
.hero-actions { margin-top: 2.4rem; display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: center; }

/* ---------- Page banner (inner pages) ---------- */
.page-hero { position: relative; min-height: 52vh; display: flex; align-items: flex-end; overflow: hidden; }
.page-hero .hero-bg img { transform: scale(1.06); }
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(20,17,14,0.82) 0%, rgba(20,17,14,0.35) 60%, rgba(20,17,14,0.45) 100%);
}
.page-hero .inner { padding: 9rem 0 clamp(2.5rem, 6vh, 4rem); color: var(--sand); }
.page-hero h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); color: var(--sand); margin-top: 0.8rem; }
.crumb { font-size: 0.78rem; letter-spacing: 0.06em; color: rgba(245,241,234,0.8); display: flex; gap: 0.5rem; flex-wrap: wrap; }
.crumb a:hover { color: #e8c39c; }
.crumb span { color: #e8c39c; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--clay); color: var(--sand);
  padding: 0.95rem 1.8rem; border-radius: 100px;
  font-weight: 600; font-size: 0.85rem; letter-spacing: 0.04em;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
  border: none; cursor: pointer;
}
.btn:hover { background: var(--clay-dark); transform: translateY(-2px); }
.btn svg { transition: transform 0.3s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-ghost { background: transparent; border: 1px solid rgba(245,241,234,0.5); }
.btn-ghost:hover { background: rgba(245,241,234,0.12); }
.btn-clay-ghost { background: transparent; border: 1px solid var(--clay); color: var(--clay); }
.btn-clay-ghost:hover { background: var(--clay); color: var(--sand); }

.scroll-hint { position: absolute; bottom: 2rem; right: max(5vw, 1rem); writing-mode: vertical-rl; font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(245,241,234,0.7); display: flex; align-items: center; gap: 1rem; }
.scroll-hint::after { content: ""; width: 1px; height: 50px; background: rgba(245,241,234,0.5); animation: drop 1.8s var(--ease) infinite; }
@keyframes drop { 0%,100% { transform: scaleY(0.4); transform-origin: top; opacity: 0.4; } 50% { transform: scaleY(1); opacity: 1; } }

/* ---------- Sections ---------- */
section { padding: clamp(4.5rem, 11vh, 8rem) 0; }
.section-head { max-width: 60ch; margin-bottom: 3.5rem; }
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); margin: 1.2rem 0 0; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }

/* ---------- Prose ---------- */
.prose p { color: var(--ink-soft); margin-bottom: 1.2rem; font-size: 1.05rem; max-width: 68ch; }
.prose h3 { font-size: 1.6rem; margin: 2.2rem 0 0.9rem; }
.prose .lead { font-family: var(--serif); font-size: clamp(1.3rem, 2.2vw, 1.7rem); color: var(--ink); line-height: 1.45; }
.prose ul { list-style: none; margin: 1.2rem 0; max-width: 68ch; }
.prose ul li { position: relative; padding-left: 1.7rem; margin-bottom: 0.7rem; color: var(--ink-soft); }
.prose ul li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 8px; height: 8px; background: var(--clay); border-radius: 50%; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.about-text p { color: var(--ink-soft); margin-bottom: 1.2rem; font-size: 1.05rem; }
.about-text p:first-of-type { font-family: var(--serif); font-size: clamp(1.3rem, 2.2vw, 1.7rem); color: var(--ink); line-height: 1.45; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.5rem; border-top: 1px solid var(--line); padding-top: 2rem; }
.stat .num { font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.8rem); color: var(--clay); display: block; }
.stat .lbl { font-size: 0.8rem; letter-spacing: 0.04em; color: var(--ink-soft); text-transform: uppercase; }
.about-media { position: relative; aspect-ratio: 4/5; border-radius: 4px; overflow: hidden; }
.about-media .badge { position: absolute; bottom: 1.5rem; left: 1.5rem; background: var(--sand); padding: 1rem 1.3rem; border-radius: 3px; max-width: 60%; }
.about-media .badge b { font-family: var(--serif); display: block; font-size: 1.1rem; }
.about-media .badge small { color: var(--ink-soft); font-size: 0.78rem; }

/* values / team */
.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-top: 1rem; }
.value { background: var(--sand); border: 1px solid var(--line); border-radius: 4px; padding: 2rem 1.8rem; }
.value svg { width: 38px; height: 38px; color: var(--clay); margin-bottom: 1rem; }
.value h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.value p { color: var(--ink-soft); font-size: 0.94rem; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.member .photo { aspect-ratio: 3/4; border-radius: 4px; overflow: hidden; margin-bottom: 1rem; }
.member h3 { font-size: 1.25rem; }
.member small { color: var(--clay); font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; }

/* ---------- Services ---------- */
.services { background: var(--sand-deep); }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.svc { background: var(--sand); padding: 2.4rem 2rem; transition: background 0.4s var(--ease); position: relative; display: block; }
.svc:hover { background: #fff; }
.svc-icon { width: 46px; height: 46px; color: var(--clay); margin-bottom: 1.4rem; }
.svc h3 { font-size: 1.4rem; margin-bottom: 0.7rem; }
.svc p { color: var(--ink-soft); font-size: 0.95rem; }
.svc .idx { position: absolute; top: 1.6rem; right: 1.8rem; font-family: var(--serif); color: var(--concrete); font-size: 0.95rem; }
.svc .more { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 1.2rem; color: var(--clay); font-weight: 600; font-size: 0.85rem; }
.svc:hover .more svg { transform: translateX(4px); }
.svc .more svg { transition: transform 0.3s var(--ease); }

/* service detail two-column */
.detail-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.detail-media { position: sticky; top: 6rem; aspect-ratio: 3/4; border-radius: 4px; overflow: hidden; }
.aside-card { background: var(--sand-deep); border: 1px solid var(--line); border-radius: 4px; padding: 1.8rem; margin-top: 1.5rem; }
.aside-card h4 { font-family: var(--serif); font-size: 1.2rem; margin-bottom: 0.8rem; }
.aside-card ul { list-style: none; }
.aside-card li { padding: 0.5rem 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; color: var(--ink-soft); }
.aside-card li:last-child { border-bottom: none; }

/* ---------- Projects ---------- */
.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.proj { position: relative; aspect-ratio: 3/4; overflow: hidden; border-radius: 4px; }
.proj.tall { aspect-ratio: 3/3.4; }
.proj img { transition: transform 0.8s var(--ease); }
.proj:hover img { transform: scale(1.06); }
.proj::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(20,17,14,0.75), transparent 55%); opacity: 0.75; transition: opacity 0.4s; }
.proj:hover::after { opacity: 0.95; }
.proj-meta { position: absolute; left: 1.4rem; bottom: 1.3rem; right: 1.4rem; color: var(--sand); z-index: 2; transform: translateY(8px); opacity: 0; transition: 0.45s var(--ease); }
.proj:hover .proj-meta { transform: translateY(0); opacity: 1; }
.proj-meta .cat { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: #e8c39c; }
.proj-meta h3 { font-size: 1.5rem; color: var(--sand); }
.proj-all { margin-top: 2.8rem; text-align: center; }

/* project detail */
.proj-lead { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem,5vw,4rem); align-items: start; }
.proj-facts { border-top: 1px solid var(--line); }
.proj-facts .row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.95rem 0; border-bottom: 1px solid var(--line); }
.proj-facts .row b { font-weight: 600; }
.proj-facts .row span { color: var(--ink-soft); text-align: right; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; margin-top: 1.5rem; }
.gallery .g-item { aspect-ratio: 4/3; border-radius: 4px; overflow: hidden; }
.gallery .g-item.wide { grid-column: 1 / -1; aspect-ratio: 16/7; }

/* ---------- Process ---------- */
.process { background: var(--ink); color: var(--sand); }
.process .eyebrow { color: #e8c39c; }
.process .eyebrow::before { background: #e8c39c; }
.process .section-head h2 { color: var(--sand); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.step { border-top: 1px solid rgba(245,241,234,0.18); padding-top: 1.5rem; }
.step .num { font-family: var(--serif); font-size: 2.6rem; color: var(--clay); display: block; line-height: 1; }
.step h3 { color: var(--sand); font-size: 1.35rem; margin: 0.8rem 0 0.6rem; }
.step p { color: rgba(245,241,234,0.7); font-size: 0.92rem; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--clay); color: var(--sand); text-align: center; }
.cta-band h2 { color: var(--sand); font-size: clamp(2rem, 4.5vw, 3rem); max-width: 20ch; margin: 0 auto 1rem; }
.cta-band p { color: rgba(245,241,234,0.9); max-width: 50ch; margin: 0 auto 2rem; }
.cta-band .btn { background: var(--ink); }
.cta-band .btn:hover { background: #14110e; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); }
.contact-info .line { display: flex; gap: 1rem; padding: 1.3rem 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.contact-info .line svg { width: 22px; height: 22px; color: var(--clay); flex-shrink: 0; margin-top: 3px; }
.contact-info .line b { display: block; font-weight: 600; }
.contact-info .line span { color: var(--ink-soft); font-size: 0.95rem; }
form { display: grid; gap: 1.1rem; }
.field label { display: block; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.4rem; color: var(--ink-soft); }
.field input, .field textarea, .field select {
  width: 100%; padding: 0.85rem 1rem; border: 1px solid var(--line);
  background: #fff; border-radius: 3px; font-family: var(--sans); font-size: 0.95rem; color: var(--ink);
  transition: border-color 0.3s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--clay); }
.field textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.map-embed { margin-top: 3rem; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 21/8; }
.map-embed iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.3) sepia(0.1); }

/* ---------- Footer ---------- */
footer { background: var(--sand-deep); padding: 3.5rem 0 2rem; border-top: 1px solid var(--line); }
.foot-top { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 2rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.foot-nav { display: flex; gap: 1.8rem; flex-wrap: wrap; }
.foot-nav a { font-size: 0.85rem; color: var(--ink-soft); }
.foot-nav a:hover { color: var(--clay); }
.socials { display: flex; gap: 0.8rem; }
.socials a { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; transition: 0.3s var(--ease); }
.socials a:hover { background: var(--clay); border-color: var(--clay); color: var(--sand); }
.socials svg { width: 17px; height: 17px; }
.foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; padding-top: 1.8rem; font-size: 0.8rem; color: var(--concrete); }

/* ---------- Reveal anim ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-grid, .detail-grid, .proj-lead { grid-template-columns: 1fr; }
  .about-media { aspect-ratio: 16/11; }
  .detail-media { position: static; aspect-ratio: 16/10; }
  .proj-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 2rem; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px);
    background: var(--ink); flex-direction: column; justify-content: center;
    padding: 2rem; gap: 1.6rem; transform: translateX(100%);
    transition: transform 0.45s var(--ease); align-items: flex-start;
  }
  body.menu-open .nav-links { transform: translateX(0); }
  .nav-links a { color: var(--sand) !important; font-size: 1rem; }
  .nav-cta { color: var(--sand) !important; }
  .burger { display: flex; }
  .proj-grid, .gallery { grid-template-columns: 1fr; }
  .gallery .g-item.wide { aspect-ratio: 4/3; }
  .stats { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .proj-meta { opacity: 1; transform: none; }
  .proj::after { opacity: 0.9; }
}
