:root {
  --bg: #f6f4ef;
  --paper: #fbfaf7;
  --ink: #20272b;
  --muted: #6e7476;
  --line: #deddd8;
  --accent: #173936;
  --accent-2: #2c5350;
  --white: #ffffff;
  --max: 1360px;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: var(--sans); line-height: 1.5; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }
.container { width: min(calc(100% - 64px), var(--max)); margin-inline: auto; }
.narrow { max-width: 920px; margin-inline: auto; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

.site-header { position: sticky; top: 0; z-index: 1000; background: rgba(251,250,247,.96); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(32,39,43,.08); }
.header-inner { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.brand { display: inline-flex; align-items: center; gap: 16px; min-width: max-content; }
.brand-mark { width: 64px; height: 64px; object-fit: contain; }
.brand-name { font-size: 1.04rem; letter-spacing: .28em; font-weight: 500; }
.main-nav { display: flex; align-items: center; gap: 38px; }
.main-nav a { padding: 33px 0 29px; font-size: .96rem; border-bottom: 2px solid transparent; transition: color .2s ease, border-color .2s ease; }
.main-nav a:hover, .main-nav a.active { color: #000; border-color: var(--accent); }
.menu-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; padding: 10px; }
.menu-toggle span { display: block; height: 2px; background: var(--ink); margin: 5px 0; }

.hero { background: #111; }
.carousel { position: relative; min-height: 545px; overflow: hidden; isolation: isolate; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; }
.slide.is-active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hero-shade { position: absolute; inset: 0; z-index: 2; background: linear-gradient(90deg, rgba(14,22,24,.82) 0%, rgba(14,22,24,.58) 30%, rgba(14,22,24,.20) 58%, rgba(14,22,24,.08) 100%); }
.hero-content { position: relative; z-index: 3; min-height: 545px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; color: var(--white); padding-top: 36px; padding-bottom: 48px; }
.eyebrow { margin: 0 0 20px; font-size: .84rem; letter-spacing: .27em; line-height: 1.65; font-weight: 500; }
.eyebrow.dark { color: var(--muted); }
.hero h1 { margin: 0; max-width: 650px; font-family: var(--serif); font-size: clamp(4rem, 6vw, 6.7rem); line-height: .88; letter-spacing: -.045em; font-weight: 400; }
.hero-copy { max-width: 520px; margin: 24px 0 28px; font-size: 1.14rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 26px; min-height: 52px; padding: 0 24px; border-radius: 4px; font-weight: 600; transition: transform .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--accent); color: white; }
.button-primary:hover { background: var(--accent-2); }
.carousel-arrow { position: absolute; z-index: 4; top: 50%; transform: translateY(-50%); border: 0; background: rgba(255,255,255,.06); color: white; width: 48px; height: 80px; font-size: 3.2rem; line-height: 1; cursor: pointer; transition: background .2s; }
.carousel-arrow:hover { background: rgba(255,255,255,.16); }
.carousel-prev { left: 0; }
.carousel-next { right: 0; }
.carousel-status { position: absolute; z-index: 4; right: max(32px, calc((100vw - var(--max))/2 + 8px)); bottom: 28px; display: flex; gap: 18px; }
.carousel-number { color: rgba(255,255,255,.65); border: 0; border-bottom: 1px solid transparent; background: transparent; cursor: pointer; padding: 4px 0 8px; }
.carousel-number.is-active { color: white; border-color: white; }

.services-strip { background: var(--paper); border-bottom: 1px solid var(--line); }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.service-mini { display: grid; grid-template-columns: 44px 1fr; gap: 22px; padding: 38px 34px; border-right: 1px solid var(--line); transition: background .2s ease; }
.service-mini:first-child { border-left: 1px solid var(--line); }
.service-mini:hover { background: #fff; }
.service-mini svg { width: 38px; height: 38px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.service-mini h2 { margin: 0 0 6px; font-size: 1rem; }
.service-mini p { margin: 0; color: var(--muted); font-size: .95rem; }

.section-space { padding: 56px 0 76px; }
.section-heading-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.section-kicker { margin: 0; font-size: .78rem; letter-spacing: .24em; color: var(--muted); }
.section-kicker::before { content: ''; display: inline-block; width: 42px; border-top: 1px solid var(--ink); margin-right: 14px; vertical-align: middle; }
.text-link { font-size: .92rem; display: inline-flex; gap: 14px; align-items: center; }
.text-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.project-card { display: block; background: var(--paper); border: 1px solid var(--line); overflow: hidden; transition: transform .22s ease, box-shadow .22s ease; }
.project-card:hover { transform: translateY(-4px); box-shadow: 0 18px 45px rgba(30,40,42,.10); }
.project-preview { min-height: 260px; padding: 36px; display: grid; place-items: center; }
.legal-preview { background: linear-gradient(135deg, #d8d0c2, #806f5a); }
.construction-preview { background: linear-gradient(135deg, #c7c7c0, #6b716c); }
.shop-preview { background: linear-gradient(135deg, #dfd7ca, #b8a38b); }
.browser-frame { width: 86%; min-height: 165px; background: #f8f7f3; border-radius: 4px; box-shadow: 0 18px 45px rgba(0,0,0,.22); padding: 14px 18px; color: #262626; transform: perspective(900px) rotateX(2deg) rotateY(-4deg); }
.browser-frame > span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #bdb8af; margin-right: 4px; }
.browser-frame strong { display: block; font-family: var(--serif); font-size: 1.65rem; margin: 34px 0 8px; font-weight: 400; }
.browser-frame small { color: #7b7a75; }
.project-meta { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; font-weight: 600; }

.page-hero { background: var(--paper); border-bottom: 1px solid var(--line); }
.compact-hero { padding: 100px 0 88px; }
.compact-hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(3.2rem, 6vw, 6.4rem); line-height: .98; letter-spacing: -.04em; margin: 0 0 24px; }
.compact-hero p:last-child { color: var(--muted); font-size: 1.18rem; max-width: 720px; margin: 0; }
.page-section { min-height: 420px; }
.service-detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.detail-card { background: var(--paper); border: 1px solid var(--line); padding: 42px; min-height: 250px; }
.card-number { color: var(--muted); font-size: .8rem; letter-spacing: .2em; }
.detail-card h2 { margin: 34px 0 12px; font-family: var(--serif); font-size: 2.2rem; font-weight: 400; }
.detail-card p { color: var(--muted); font-size: 1.03rem; max-width: 560px; }
.projects-grid-page { grid-template-columns: repeat(3, 1fr); }
.about-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 70px; align-items: center; }
.about-copy h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.5rem, 4vw, 4.5rem); line-height: 1; margin: 0 0 30px; }
.about-copy p { color: var(--muted); font-size: 1.08rem; max-width: 680px; }
.about-mark { display: grid; place-items: center; background: var(--paper); border: 1px solid var(--line); min-height: 460px; padding: 40px; }
.about-mark img { width: min(420px, 90%); }
.contact-panel { background: var(--paper); border: 1px solid var(--line); padding: 48px; display: grid; grid-template-columns: 1fr 1fr auto; gap: 40px; align-items: end; }
.contact-label { display: block; color: var(--muted); font-size: .75rem; letter-spacing: .22em; margin-bottom: 10px; }
.contact-email, .contact-domain { font-family: var(--serif); font-size: clamp(1.45rem, 2vw, 2.2rem); }
.contact-email:hover, .contact-domain:hover { text-decoration: underline; text-underline-offset: 5px; }

.site-footer { background: #2c3033; color: #d8d8d5; min-height: 160px; display: grid; place-items: center; }
.footer-inner { text-align: center; font-size: .9rem; }
.back-to-top { position: fixed; right: 22px; bottom: 22px; z-index: 1100; width: 52px; height: 52px; border: 0; border-radius: 4px; background: #202427; color: white; cursor: pointer; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; font-size: 1.3rem; }
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: var(--accent); }

@media (max-width: 1050px) {
  .container { width: min(calc(100% - 40px), var(--max)); }
  .header-inner { min-height: 82px; }
  .brand-mark { width: 54px; height: 54px; }
  .brand-name { font-size: .9rem; letter-spacing: .2em; }
  .menu-toggle { display: block; }
  .main-nav { position: absolute; top: 82px; left: 0; right: 0; display: none; background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 20px 16px; flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 14px 8px; border-bottom: 1px solid var(--line); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service-mini:nth-child(3) { border-left: 1px solid var(--line); }
  .projects-grid, .projects-grid-page { grid-template-columns: 1fr 1fr; }
  .about-layout, .contact-panel { grid-template-columns: 1fr; }
  .contact-panel { align-items: start; }
}

@media (max-width: 700px) {
  .container { width: min(calc(100% - 28px), var(--max)); }
  .brand-name { font-size: .78rem; letter-spacing: .16em; }
  .brand-mark { width: 48px; height: 48px; }
  .header-inner { min-height: 72px; }
  .main-nav { top: 72px; }
  .carousel, .hero-content { min-height: 620px; }
  .hero-content { justify-content: flex-end; padding-bottom: 72px; }
  .hero h1 { font-size: clamp(3.6rem, 18vw, 5.4rem); }
  .hero-copy { font-size: 1rem; max-width: 90%; }
  .hero-shade { background: linear-gradient(0deg, rgba(14,22,24,.86) 0%, rgba(14,22,24,.62) 50%, rgba(14,22,24,.18) 100%); }
  .carousel-arrow { top: 46%; width: 38px; height: 64px; }
  .carousel-status { right: 18px; bottom: 18px; }
  .services-grid { grid-template-columns: 1fr; }
  .service-mini, .service-mini:first-child, .service-mini:nth-child(3) { border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .projects-grid, .projects-grid-page, .service-detail-grid { grid-template-columns: 1fr; }
  .section-heading-row { align-items: flex-start; gap: 20px; }
  .project-preview { min-height: 220px; padding: 28px; }
  .compact-hero { padding: 72px 0 62px; }
  .detail-card { padding: 30px; min-height: 220px; }
  .about-layout { gap: 34px; }
  .about-mark { min-height: 340px; }
  .contact-panel { padding: 30px; }
  .contact-email, .contact-domain { overflow-wrap: anywhere; }
}
