:root {
  --color-forest: #2C3E2D;
  --color-timber: #5C4A32;
  --color-stone: #8B8680;
  --color-cream: #F5F0E8;
  --color-parchment: #EDE6D6;
  --color-charcoal: #1E1E1A;
  --color-rust: #8B3A2A;
  --text-primary: #1E1E1A;
  --text-secondary: #4A453F;
  --text-muted: #8B8277;
  --text-inverse: #F5F0E8;
  --surface-warm: rgba(245, 240, 232, 0.92);
  --surface-card: rgba(255, 253, 248, 0.95);
  --surface-dark: #1E1E1A;
  --border-light: rgba(92, 74, 50, 0.12);
  --border-medium: rgba(92, 74, 50, 0.22);
  --border-strong: rgba(92, 74, 50, 0.35);
  --shadow-sm: 0 2px 8px rgba(30, 20, 10, 0.06);
  --shadow-md: 0 6px 24px rgba(30, 20, 10, 0.09);
  --shadow-lg: 0 16px 48px rgba(30, 20, 10, 0.12);
  --shadow-card: 0 2px 16px rgba(30, 20, 10, 0.07), 0 0 0 1px rgba(92, 74, 50, 0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --texture-noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--color-cream);
  background-image: var(--texture-noise);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
main { overflow: hidden; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-primary);
  line-height: 1.16;
}
h1 { font-size: clamp(42px, 6vw, 76px); }
h2 { font-size: clamp(30px, 4vw, 48px); }
h3 { font-size: 22px; }
p { margin: 0; color: var(--text-secondary); }
.container { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.section-padding { padding: 108px 0; }
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-timber);
}
.section-header {
  max-width: 760px;
  display: grid;
  gap: 14px;
  margin-bottom: 46px;
}
.text-link { color: var(--color-forest); font-weight: 700; border-bottom: 1px solid currentColor; }
.hidden { display: none !important; }
.glass-card { background: var(--surface-card); border: 1px solid var(--border-light); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }

.btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  transition: background 200ms var(--ease-smooth), transform 200ms var(--ease-spring), box-shadow 200ms;
}
.btn-primary { background: var(--color-forest); color: #fff; box-shadow: 0 2px 8px rgba(44, 62, 45, 0.25); }
.btn-primary:hover { background: #3a5140; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(44, 62, 45, 0.3); }
.btn-primary:active { transform: scale(0.97); }
.btn-ghost { background: transparent; color: rgba(255,255,255,0.88); border: 1px solid rgba(255,255,255,0.3); }
.btn-ghost:hover { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.5); }

.nav-shell {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  background: rgba(245, 240, 232, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
}
.nav-shell.scrolled { border-bottom-color: var(--border-medium); box-shadow: var(--shadow-sm); }
.nav {
  height: 64px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand, .footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Lora', Georgia, serif;
  font-weight: 700;
  color: var(--color-forest);
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 0;
}
.nav-logo-img { height: 38px; width: auto; }
.nav-menu { margin-left: auto; display: flex; align-items: center; gap: 24px; font-size: 14px; color: var(--text-secondary); }
.nav-menu a { padding: 6px 0; border-bottom: 2px solid transparent; transition: color 200ms, border-color 200ms; }
.nav-menu a:hover, .nav-menu a.active { color: var(--color-forest); border-bottom-color: var(--color-forest); }
.estimate-pill { background: var(--color-forest); color: var(--text-inverse); border-radius: var(--radius-md); padding: 10px 18px; font-size: 14px; font-weight: 600; }
.nav-toggle { display: none; margin-left: auto; width: 38px; height: 38px; border: 0; background: transparent; padding: 9px; }
.nav-toggle span { display: block; height: 2px; background: var(--text-primary); margin: 5px 0; border-radius: 2px; }

.hero { position: relative; min-height: calc(100svh - 64px); display: flex; align-items: center; overflow: hidden; }
.hero-bg, .hero-bg-gradient, .hero-bg-img, .hero-overlay { position: absolute; inset: 0; }
.hero-bg-img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg-gradient { background: linear-gradient(160deg, #3a4f3b 0%, #2C3E2D 45%, #1E2B1F 100%); }
.hero-overlay { background: linear-gradient(to right, rgba(20,20,18,0.76) 0%, rgba(20,20,18,0.38) 58%, rgba(20,20,18,0.12) 100%); }
.hero-content { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr); gap: 64px; align-items: center; padding: 92px 0; }
.hero-text { display: grid; gap: 22px; }
.hero .eyebrow, .dark-section .eyebrow { color: rgba(245,240,232,0.7); }
.hero-headline { color: #fff; font-size: clamp(44px, 6vw, 80px); line-height: 1.05; }
.hero-headline em { color: rgba(255,255,255,0.72); font-style: italic; }
.hero-sub { color: rgba(255,255,255,0.76); font-size: 18px; max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-feature { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: var(--radius-xl); box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.12); background: rgba(255,255,255,0.08); }
.hero-feature-img { width: 100%; height: 100%; object-fit: cover; }
.hero-feature-placeholder, .tech-card-placeholder, .area-photo-placeholder, .placeholder-image {
  min-height: 280px;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  background: linear-gradient(135deg, rgba(237,230,214,0.9), rgba(245,240,232,0.82));
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}
.hero-feature-placeholder a { color: var(--color-forest); font-weight: 700; }
.hero-feature-caption { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 12px; padding: 14px 20px; background: rgba(30,30,26,0.74); color: rgba(255,255,255,0.82); font-size: 13px; }

.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; border: 1px solid var(--border-light); border-radius: var(--radius-lg); overflow: hidden; background: var(--border-light); }
.service-card { min-height: 240px; padding: 36px 32px; background: var(--surface-card); transition: background 200ms; }
.service-card:hover { background: #fff; }
.service-card h3 { font-size: 20px; margin: 18px 0 10px; }
.service-card p { font-size: 14px; color: var(--text-muted); line-height: 1.65; }
.service-icon { display: block; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--color-forest); box-shadow: inset 0 0 0 8px rgba(44,62,45,0.08); }

.dark-section { background: var(--color-charcoal); color: var(--text-inverse); }
.dark-section h2, .dark-section h3 { color: #fff; }
.dark-section p { color: rgba(245,240,232,0.7); }
.tech-intro { max-width: 820px; display: grid; gap: 18px; margin-bottom: 42px; }
.tech-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.tech-card { overflow: hidden; border-radius: var(--radius-lg); background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.13); }
.tech-card-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.tech-card-body { padding: 28px; display: grid; gap: 10px; }

.service-area-grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 64px; align-items: start; }
.service-area-text { display: grid; gap: 18px; }
.area-list { display: grid; gap: 14px; margin-top: 12px; }
.area-list div { display: grid; gap: 4px; padding: 16px 0; border-top: 1px solid var(--border-light); }
.area-list strong { color: var(--color-forest); }
.area-list span { color: var(--text-secondary); }
.service-area-aside { display: grid; gap: 14px; }
.area-photo, .area-photo-placeholder { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { padding: 18px; border: 1px solid var(--border-light); border-radius: var(--radius-md); background: var(--surface-card); }
.stat-number { display: block; font-family: 'Lora', Georgia, serif; font-size: 20px; color: var(--color-forest); }
.stat-label { display: block; margin-top: 4px; color: var(--text-muted); font-size: 13px; }

.cta-band { padding: 0 24px 108px; }
.cta-inner { width: min(1180px, 100%); margin: 0 auto; padding: 36px; display: flex; justify-content: space-between; align-items: center; gap: 24px; background: var(--color-forest); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.cta-inner h2 { color: #fff; }
.cta-inner p { color: rgba(245,240,232,0.74); }

.page-hero { position: relative; width: min(900px, calc(100% - 48px)); margin: 0 auto; padding: 134px 0 58px; text-align: center; display: grid; gap: 18px; }
.page-hero p { margin: 0 auto; max-width: 760px; }
.page-hero a { color: var(--color-forest); font-weight: 700; }
.page-hero-photo { width: 100%; max-height: 320px; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); margin-bottom: 18px; }
.tech-hero { width: min(980px, calc(100% - 48px)); }

.service-detail-list, .gallery-section, .contact-layout, .tech-story { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 88px 0; }
.service-detail, .split-section { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin-bottom: 72px; }
.service-detail.reverse, .split-section.reverse { direction: rtl; }
.service-detail.reverse > *, .split-section.reverse > * { direction: ltr; }
.detail-copy, .split-copy { display: grid; gap: 18px; }
.detail-image { width: 100%; min-height: 360px; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }

.project-gallery-list { display: grid; gap: 64px; }
.project-gallery-group { display: grid; gap: 20px; }
.project-gallery-head { display: grid; gap: 8px; }
.project-gallery-head h2 { font-size: 38px; }
.gallery-grid { columns: 3 280px; column-gap: 18px; }
.gallery-item { width: 100%; margin: 0 0 18px; padding: 0; border: 0; border-radius: var(--radius-lg); overflow: hidden; background: #fff; box-shadow: var(--shadow-card); cursor: zoom-in; -webkit-touch-callout: none; user-select: none; }
.gallery-item img { width: 100%; min-height: 220px; object-fit: cover; pointer-events: none; -webkit-user-drag: none; user-select: none; }
.empty-gallery { text-align: center; padding: 60px 24px; }
.lightbox { position: fixed; inset: 0; z-index: 150; display: none; align-items: center; justify-content: center; padding: 32px; background: rgba(20,20,18,0.84); }
.lightbox.open { display: flex; }
.lightbox img { max-height: 88vh; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); pointer-events: none; -webkit-user-drag: none; user-select: none; }
.lightbox-close { position: fixed; top: 20px; right: 24px; width: 44px; height: 44px; border: 0; border-radius: 50%; color: #fff; background: rgba(255,255,255,0.16); font-size: 30px; cursor: pointer; }

.benefit-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.benefit-card { padding: 22px; border: 1px solid var(--border-light); border-radius: var(--radius-md); background: var(--surface-card); display: grid; gap: 10px; }
.benefit-card span { color: var(--color-forest); font-weight: 800; }
.benefit-card p { color: var(--text-primary); font-weight: 650; }

.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.contact-form, .side-card { background: var(--surface-card); border: 1px solid var(--border-light); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.contact-form { padding: 32px; display: grid; gap: 16px; }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 650; color: var(--text-secondary); }
input, textarea, select { width: 100%; background: #fff; border: 1px solid var(--border-medium); border-radius: var(--radius-md); padding: 12px 14px; color: var(--text-primary); transition: border-color 200ms, box-shadow 200ms; }
textarea { resize: vertical; min-height: 150px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--color-forest); box-shadow: 0 0 0 3px rgba(44,62,45,0.1); }
fieldset { border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 14px; display: flex; gap: 18px; flex-wrap: wrap; }
legend { color: var(--text-secondary); font-size: 13px; font-weight: 700; }
fieldset label { display: inline-flex; align-items: center; gap: 8px; }
fieldset input { width: auto; }
.form-status { display: none; padding: 12px 14px; border-radius: var(--radius-sm); font-weight: 650; }
.form-status.visible { display: block; }
.form-status.success { background: rgba(44,62,45,0.1); color: var(--color-forest); }
.form-status.error { background: rgba(139,58,42,0.12); color: var(--color-rust); }
.contact-sidebar { display: grid; gap: 16px; }
.side-card { padding: 26px; display: grid; gap: 12px; }
.side-card a { color: var(--color-forest); font-weight: 700; overflow-wrap: anywhere; }
.side-card.quiet { background: rgba(237,230,214,0.72); box-shadow: none; }

.footer { background: var(--color-charcoal); color: var(--text-inverse); padding: 68px 24px 28px; }
.footer p, .footer a { color: rgba(245,240,232,0.72); }
.footer-inner { width: min(1180px, 100%); margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 42px; }
.footer-logo { color: #fff; font-size: 22px; margin-bottom: 12px; }
.footer-logo-img { max-height: 52px; width: auto; }
.footer-links, .footer-contact { display: grid; gap: 10px; align-content: start; }
.footer-contact .btn-primary { width: fit-content; color: #fff; margin-top: 10px; }
.copyright { width: min(1180px, 100%); margin: 42px auto 0; padding-top: 22px; border-top: 1px solid rgba(245,240,232,0.12); font-size: 13px; display: flex; justify-content: space-between; gap: 16px; }

.animate-reveal { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.animate-reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .hero-content, .services-grid, .tech-cards, .service-area-grid, .service-detail, .split-section, .contact-layout, .footer-inner { grid-template-columns: 1fr; }
  .benefit-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { min-height: auto; }
  .hero-content { padding: 82px 0; }
}
@media (max-width: 720px) {
  .container, .service-detail-list, .gallery-section, .contact-layout, .tech-story, .page-hero { width: calc(100% - 32px); }
  .section-padding, .service-detail-list, .gallery-section, .contact-layout, .tech-story { padding: 72px 0; }
  .nav { padding: 0 16px; gap: 14px; }
  .brand span:last-child { display: none; }
  .nav-toggle { display: block; }
  .nav-menu { position: fixed; top: 64px; left: 0; right: 0; display: none; margin: 0; padding: 22px; background: var(--color-cream); border-bottom: 1px solid var(--border-light); box-shadow: var(--shadow-md); }
  .nav-menu.open { display: grid; }
  .estimate-pill { padding: 9px 12px; font-size: 13px; }
  .hero-content { gap: 32px; }
  .hero-feature { max-width: 520px; }
  .stat-row, .benefit-grid { grid-template-columns: 1fr; }
  .cta-inner { display: grid; padding: 28px; }
  .contact-form { padding: 22px; }
  .copyright { display: grid; }
}
