:root {
  --paper: #f8f5f0;
  --paper-2: #eee6dc;
  --ink: #171715;
  --muted: #6f6a63;
  --line: rgba(23, 23, 21, 0.14);
  --white: #fffdf9;
  --accent: #9b6d42;
  --shadow: 0 26px 80px rgba(54, 41, 28, 0.12);
  --radius-lg: 34px;
  --radius-md: 22px;
  --radius-sm: 14px;
  --max: 1440px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
code { padding: 0.16em 0.4em; background: rgba(23, 23, 21, .07); border-radius: 6px; }

.noise {
  position: fixed;
  inset: 0;
  z-index: 99;
  pointer-events: none;
  opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 48px), var(--max));
  margin: 18px auto 0;
  padding: 15px 22px;
  background: rgba(248, 245, 240, .82);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 999px;
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 34px rgba(54, 41, 28, .07);
}
.brand { font-size: 21px; font-weight: 800; letter-spacing: -.04em; }
.brand span { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 32px; font-size: 14px; }
.nav a { position: relative; color: #49453f; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -7px;
  height: 1px;
  background: var(--ink);
  transition: right .25s ease;
}
.nav a:hover::after, .nav a.active::after { right: 0; }
.menu-button { display: none; border: 0; background: transparent; width: 40px; height: 40px; }
.menu-button span { display:block; width:22px; height:1px; margin:6px auto; background:var(--ink); }

main { overflow: hidden; }
.hero {
  --hero-position-desktop: center center;
  --hero-position-mobile: center center;
  position: relative;
  isolation: isolate;
  min-height: max(680px, calc(100svh - 92px));
  width: min(calc(100% - 48px), var(--max));
  margin: 18px auto 0;
  color: #fff;
  background: #2c2925;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero-background {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: var(--hero-position-desktop);
  transform: scale(1.002);
}
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(17, 15, 13, .76) 0%, rgba(17, 15, 13, .52) 38%, rgba(17, 15, 13, .12) 72%, rgba(17, 15, 13, .06) 100%),
    linear-gradient(0deg, rgba(17, 15, 13, .46) 0%, rgba(17, 15, 13, .05) 45%, rgba(17, 15, 13, .13) 100%);
  pointer-events: none;
}
.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: inherit;
  max-width: 860px;
  padding: clamp(64px, 7vw, 108px);
}
.eyebrow { margin: 0 0 18px; font-size: 12px; font-weight: 700; letter-spacing: .16em; color: var(--accent); }
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 28px;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(50px, 6.4vw, 96px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -.06em;
}
.hero h1 { color:#fff; text-shadow:0 3px 34px rgba(0,0,0,.22); }
.hero .eyebrow { color:rgba(255,255,255,.78); }
.hero-intro { max-width: 650px; margin-bottom: 34px; color: rgba(255,255,255,.78); font-size: 17px; text-shadow:0 2px 20px rgba(0,0,0,.16); }
.hero-actions { display: flex; align-items: center; gap: 28px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 52px;
  padding: 0 23px;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: transform .25s ease, background .25s ease, color .25s ease;
}
.button:hover { transform: translateY(-2px); }
.button-dark { color: white; background: var(--ink); }
.button-dark:hover { background: #3b3732; }
.hero .button-dark { color:var(--ink); background:#fff; }
.hero .button-dark:hover { background:#f0ece6; }
.text-link { border-bottom: 1px solid rgba(23,23,21,.4); padding-bottom: 4px; }
.hero .text-link { color:#fff; border-bottom-color:rgba(255,255,255,.54); }
.hero-stats { display: flex; gap: 40px; margin-top: 58px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.28); }
.hero-stats div { display: grid; gap: 2px; }
.hero-stats strong { color:#fff; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.hero-stats span { color: rgba(255,255,255,.66); font-size: 12px; }
.hero-scroll {
  position:absolute;
  right:34px;
  bottom:34px;
  z-index:3;
  display:flex;
  align-items:center;
  gap:12px;
  color:rgba(255,255,255,.76);
  font-size:10px;
  letter-spacing:.18em;
  writing-mode:vertical-rl;
}
.hero-scroll i { font-style:normal; font-size:17px; animation:hero-bob 1.8s ease-in-out infinite; }
@keyframes hero-bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(6px)} }

.section { width: min(calc(100% - 48px), var(--max)); margin: 0 auto; padding: 130px 0; }
.section-heading { display: grid; grid-template-columns: 1fr minmax(280px, 500px); gap: 80px; align-items: end; margin-bottom: 54px; }
.section-heading h2, .about-copy h2, .process-intro h2, .contact-copy h2 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(38px, 5vw, 66px); font-weight: 500; line-height: 1.12; letter-spacing: -.045em; }
.section-heading > p { margin: 0; color: var(--muted); }
.filters { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:34px; }
.filter { padding:10px 16px; border:1px solid var(--line); border-radius:999px; color:#5b554e; background:transparent; cursor:pointer; transition:.2s ease; }
.filter:hover, .filter.active { color:white; background:var(--ink); border-color:var(--ink); }
.project-grid { display:grid; grid-template-columns:repeat(12,1fr); gap:22px; }
.project-card { grid-column: span 4; position:relative; cursor:pointer; }
.project-card:nth-child(1), .project-card:nth-child(5) { grid-column: span 7; }
.project-card:nth-child(2), .project-card:nth-child(6) { grid-column: span 5; }
.project-card:nth-child(3), .project-card:nth-child(4) { grid-column: span 6; }
.project-image { position:relative; aspect-ratio:4/3; overflow:hidden; border-radius:var(--radius-md); background:#e9e1d7; }
.project-image img { width:100%; height:100%; object-fit:cover; transition:transform .6s cubic-bezier(.2,.7,.2,1); }
.project-card:hover .project-image img { transform:scale(1.035); }
.project-arrow { position:absolute; right:18px; top:18px; display:grid; place-items:center; width:44px; height:44px; border-radius:50%; background:rgba(255,255,255,.87); backdrop-filter:blur(10px); transform:translateY(-8px); opacity:0; transition:.25s ease; }
.project-card:hover .project-arrow { opacity:1; transform:translateY(0); }
.project-info { display:flex; justify-content:space-between; align-items:start; gap:20px; padding:19px 4px 8px; }
.project-info h3 { margin:0 0 5px; font-size:19px; }
.project-info p { margin:0; color:var(--muted); font-size:13px; }
.project-year { color:var(--muted); font-size:12px; }
.loading-card { grid-column:span 4; aspect-ratio:4/3; border-radius:var(--radius-md); background:linear-gradient(90deg,#ece7df 25%,#f4f0e9 50%,#ece7df 75%); background-size:200% 100%; animation:loading 1.3s infinite; }
@keyframes loading { to { background-position:-200% 0; } }

.about-section { padding-top: 20px; }
.about-card { position:relative; display:grid; grid-template-columns:100px 1fr .7fr; gap:70px; padding:80px; background:var(--ink); color:white; border-radius:var(--radius-lg); overflow:hidden; }
.about-card::after { content:""; position:absolute; width:420px; height:420px; right:-110px; bottom:-220px; border-radius:50%; border:1px solid rgba(255,255,255,.16); box-shadow:0 0 0 54px rgba(255,255,255,.025),0 0 0 108px rgba(255,255,255,.018); }
.about-index { font-family:Georgia,serif; font-size:56px; color:#7d756d; }
.about-copy { position:relative; z-index:2; }
.about-copy p:not(.eyebrow) { max-width:720px; color:#bcb5ac; }
.about-copy h2 { margin-bottom:36px; }
.about-tags { position:relative; z-index:2; display:flex; align-content:flex-start; align-items:flex-start; flex-wrap:wrap; gap:10px; padding-top:76px; }
.about-tags span { padding:10px 14px; border:1px solid rgba(255,255,255,.18); border-radius:999px; color:#d8d1c8; font-size:13px; }

.services-section { padding-bottom:80px; }
.service-grid { display:grid; grid-template-columns:repeat(4,1fr); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.service-card { min-height:290px; padding:34px 28px; border-right:1px solid var(--line); }
.service-card:last-child { border-right:0; }
.service-card > span { display:block; margin-bottom:80px; color:var(--accent); font-family:Georgia,serif; }
.service-card h3 { margin-bottom:14px; font-size:22px; }
.service-card p { margin:0; color:var(--muted); font-size:14px; }

.process-section { display:grid; grid-template-columns:.8fr 1.2fr; gap:110px; align-items:start; padding-top:80px; }
.process-intro { position:sticky; top:130px; }
.process-list { list-style:none; margin:0; padding:0; border-top:1px solid var(--line); }
.process-list li { display:grid; grid-template-columns:80px 1fr; gap:35px; padding:32px 0; border-bottom:1px solid var(--line); }
.process-list strong { color:var(--accent); font-family:Georgia,serif; font-size:20px; font-weight:500; }
.process-list h3 { margin-bottom:8px; font-size:20px; }
.process-list p { margin:0; color:var(--muted); }

.contact-section { display:grid; grid-template-columns:.9fr 1.1fr; gap:90px; padding:90px; margin-bottom:80px; background:#e8ded2; border-radius:var(--radius-lg); }
.contact-copy h2 { margin-bottom:30px; }
.contact-copy > p:not(.eyebrow) { color:var(--muted); }
.contact-meta { display:grid; gap:8px; margin-top:40px; font-size:14px; }
.contact-form { display:grid; gap:22px; padding:34px; background:rgba(255,255,255,.52); border:1px solid rgba(255,255,255,.7); border-radius:var(--radius-md); }
.contact-form label { display:grid; gap:8px; }
.contact-form label span { font-size:13px; color:#4d4842; }
.contact-form input, .contact-form textarea { width:100%; padding:14px 0; border:0; border-bottom:1px solid rgba(23,23,21,.23); outline:none; resize:vertical; background:transparent; }
.contact-form input:focus, .contact-form textarea:focus { border-bottom-color:var(--ink); }
.submit-button { border:0; margin-top:5px; }
.submit-button:disabled { cursor:wait; opacity:.65; }
.form-status { min-height:24px; margin:0; font-size:13px; }
.form-status.success { color:#356a42; }
.form-status.error { color:#a33e32; }

.footer { display:flex; align-items:center; justify-content:space-between; gap:30px; width:min(calc(100% - 48px),var(--max)); margin:0 auto; padding:30px 0 50px; border-top:1px solid var(--line); color:var(--muted); font-size:13px; }
.footer .brand { color:var(--ink); }
.back-top { color:var(--ink); }

.project-dialog { width:min(920px,calc(100% - 32px)); max-height:calc(100vh - 40px); padding:0; border:0; border-radius:28px; background:var(--paper); box-shadow:0 40px 120px rgba(0,0,0,.28); overflow:auto; }
.project-dialog::backdrop { background:rgba(18,16,14,.66); backdrop-filter:blur(8px); }
.dialog-close { position:sticky; z-index:10; float:right; top:18px; right:18px; display:grid; place-items:center; width:44px; height:44px; margin:18px; border:0; border-radius:50%; background:rgba(255,255,255,.9); font-size:25px; cursor:pointer; box-shadow:0 8px 28px rgba(0,0,0,.12); }
.dialog-gallery { clear:both; display:grid; gap:16px; margin:-80px 0 0; padding:0 16px 16px; }
.dialog-media-item { overflow:hidden; margin:0; border-radius:18px; background:#e8dfd3; }
.dialog-media-item img, .dialog-media-item video { display:block; width:100%; max-height:78vh; object-fit:contain; background:#151515; }
.dialog-media-item img { background:#e8dfd3; }
.dialog-video-item video { aspect-ratio:16/9; }
.dialog-media-item figcaption { padding:12px 16px; color:var(--muted); background:#f3ede5; font-size:13px; line-height:1.6; }
.dialog-content { padding:40px 46px 46px; }
.dialog-content h2 { margin-bottom:16px; font-family:Georgia,"Songti SC",serif; font-size:38px; font-weight:500; }
.dialog-content > p:not(.eyebrow) { color:var(--muted); }
.dialog-tags { display:flex; flex-wrap:wrap; gap:8px; margin:26px 0; }
.dialog-tags span { padding:8px 12px; border:1px solid var(--line); border-radius:999px; font-size:12px; }
.dialog-metrics { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:28px 0 34px; }
.dialog-metrics div { padding:18px; background:#eee7de; border-radius:12px; font-size:13px; text-align:center; }

.reveal { opacity:0; transform:translateY(24px); transition:opacity .7s ease, transform .7s ease; transition-delay:var(--delay,0ms); }
.reveal.is-visible { opacity:1; transform:none; }

@media (max-width: 1080px) {
  .hero-copy { max-width:760px; }
  .section-heading { grid-template-columns:1fr; gap:22px; }
  .about-card { grid-template-columns:70px 1fr; }
  .about-tags { grid-column:2; padding-top:0; }
  .service-grid { grid-template-columns:repeat(2,1fr); }
  .service-card:nth-child(2) { border-right:0; }
  .service-card:nth-child(-n+2) { border-bottom:1px solid var(--line); }
  .process-section, .contact-section { grid-template-columns:1fr; }
  .process-intro { position:static; }
}

@media (max-width: 760px) {
  .site-header { width:calc(100% - 24px); margin-top:10px; padding:10px 14px 10px 18px; }
  .menu-button { display:block; }
  .nav { position:absolute; top:58px; left:0; right:0; display:none; padding:22px; border-radius:22px; background:rgba(248,245,240,.98); box-shadow:0 20px 50px rgba(54,41,28,.14); }
  .nav.open { display:grid; }
  .hero, .section, .footer { width:calc(100% - 24px); }
  .hero { margin-top:10px; min-height:max(640px,calc(100svh - 78px)); border-radius:24px; }
  .hero-background { object-position:var(--hero-position-mobile); }
  .hero-shade { background:linear-gradient(0deg,rgba(17,15,13,.76) 0%,rgba(17,15,13,.38) 58%,rgba(17,15,13,.12) 100%); }
  .hero-copy { justify-content:flex-end; max-width:none; padding:82px 24px 42px; }
  h1 { font-size:47px; }
  .hero-intro { font-size:15px; }
  .hero-actions { align-items:flex-start; flex-direction:column; gap:18px; }
  .hero-stats { gap:18px; margin-top:38px; }
  .hero-stats strong { font-size:21px; }
  .hero-scroll { display:none; }
  .section { padding:88px 0; }
  .project-grid { display:block; }
  .project-card { margin-bottom:28px; }
  .filters { flex-wrap:nowrap; overflow-x:auto; padding-bottom:8px; scrollbar-width:none; }
  .filters::-webkit-scrollbar { display:none; }
  .filter { white-space:nowrap; }
  .about-card { display:block; padding:38px 24px; border-radius:24px; }
  .about-index { margin-bottom:25px; font-size:42px; }
  .about-tags { padding-top:20px; }
  .service-grid { display:block; }
  .service-card { min-height:auto; border-right:0; border-bottom:1px solid var(--line); }
  .service-card > span { margin-bottom:46px; }
  .process-section { gap:50px; }
  .process-list li { grid-template-columns:50px 1fr; gap:18px; }
  .contact-section { width:calc(100% - 24px); padding:42px 22px; gap:44px; border-radius:24px; }
  .contact-form { padding:24px 18px; }
  .footer { align-items:flex-start; flex-direction:column; }
  .dialog-content { padding:30px 22px; }
  .dialog-metrics { grid-template-columns:1fr; }
}

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