:root {
  --cream: #fffdf8;
  --paper: #fffdf8;
  --green: #174d38;
  --dark: #103b2c;
  --ink: #1f2824;
  --muted: #6f746f;
  --line: #ddd8cc;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Manrope, Arial, sans-serif;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
.status-error { color: #9b2c2c !important; }
.admin-page { min-height: 100vh; padding: 48px 20px; background: #eef2ee; }
.admin-card { width: min(680px, 100%); margin: auto; border: 1px solid var(--line); border-radius: 14px; padding: 34px; background: var(--paper); box-shadow: 0 24px 70px rgba(31,40,36,.09); }
.admin-card h1 { margin-bottom: 12px; font-size: 38px; }
.admin-card > p { color: var(--muted); line-height: 1.6; }
.admin-fields { display: grid; margin: 28px 0; grid-template-columns: repeat(2,1fr); gap: 16px; }
.admin-fields label, .admin-card > form > label { display: block; color: #37413c; font-size: 13px; font-weight: 700; }
.admin-fields input, .admin-card > form > label input { width: 100%; margin-top: 8px; border: 1px solid #d4d5cf; border-radius: 7px; padding: 14px 15px; background: white; }
.admin-actions { display: flex; align-items: center; gap: 14px; }
.admin-note { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 20px; font-size: 12px; }
.alert { margin: 18px 0; border-radius: 8px; padding: 13px 15px; background: #eef6f0; color: var(--green); font-size: 13px; font-weight: 700; }
.alert.error { background: #fff0ef; color: #9b2c2c; }
@media (max-width: 600px) { .admin-fields { grid-template-columns: 1fr; } .admin-card { padding: 24px; } }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.container { width: min(1320px, calc(100% - 96px)); margin: auto; }

header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(221,216,204,.8);
  background: rgba(255,253,248,.94);
  backdrop-filter: blur(16px);
}
.header-inner { display: flex; min-height: 84px; align-items: center; gap: 42px; }
.brand { display: flex; min-width: 190px; flex-direction: column; line-height: 1; }
.brand strong { color: var(--green); font-size: 28px; font-weight: 850; letter-spacing: -.05em; }
.brand span { margin-top: 7px; color: var(--muted); font-size: 12px; font-weight: 600; }
nav { display: flex; flex: 1; justify-content: center; gap: clamp(20px,3vw,44px); }
nav a { font-size: 14px; font-weight: 650; }
.header-button { border: 1px solid var(--green); border-radius: 7px; padding: 12px 18px; color: var(--green); font-size: 13px; font-weight: 750; }

.hero { padding-top: 54px; }
.hero-grid { display: grid; min-height: 610px; grid-template-columns: .9fr 1.1fr; border-bottom: 1px solid var(--line); }
.hero-copy { display: flex; padding: 50px 58px 58px 0; flex-direction: column; justify-content: center; align-items: flex-start; }
.eyebrow { margin: 0 0 18px; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1 { max-width: 700px; margin: 0 0 24px; font-size: clamp(48px,5vw,76px); font-weight: 780; letter-spacing: -.06em; line-height: .98; }
.lead { max-width: 570px; margin: 0 0 26px; color: #515a55; font-size: 19px; line-height: 1.65; }
.price { display: flex; margin: 0 0 30px; align-items: baseline; gap: 14px; }
.price span { color: var(--muted); font-size: 13px; }
.price strong { color: var(--green); font-size: 36px; letter-spacing: -.04em; }
.actions { display: flex; gap: 14px; }
.button { display: inline-flex; min-height: 54px; align-items: center; justify-content: center; border: 1px solid var(--green); border-radius: 7px; padding: 0 24px; font-size: 14px; font-weight: 750; }
.primary { background: var(--green); color: white; }
.secondary { color: var(--green); }
.hero-image { position: relative; min-height: 600px; overflow: hidden; border-radius: 10px 10px 0 0; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; right: 24px; bottom: 24px; display: flex; width: 150px; height: 150px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(16,59,44,.92); color: white; flex-direction: column; }
.badge strong { font-size: 25px; }
.badge span { width: 90px; margin-top: 5px; text-align: center; font-size: 11px; }
.trust { display: grid; padding-bottom: 48px; grid-template-columns: repeat(3,1fr); }
.trust div { display: flex; min-height: 110px; align-items: center; gap: 20px; border-right: 1px solid var(--line); padding: 20px 38px; }
.trust div:first-child { padding-left: 0; }
.trust div:last-child { border: 0; }
.trust span { color: var(--green); font-size: 12px; font-weight: 800; }
.trust b { font-size: 15px; }

.services { padding: 110px 0; background: var(--paper); }
.section-title { display: grid; margin-bottom: 44px; grid-template-columns: 1.2fr .8fr; align-items: end; gap: 60px; }
h2 { margin: 0; font-size: clamp(38px,4.2vw,60px); font-weight: 760; letter-spacing: -.055em; line-height: 1.03; }
.section-title > p { margin: 0 0 6px; color: var(--muted); line-height: 1.75; }
.cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.cards article { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: white; }
.cards article > img { width: 100%; height: 220px; object-fit: cover; }
.cards article > div { display: flex; min-height: 205px; padding: 24px; flex-direction: column; }
.cards h3 { margin: 0 0 7px; font-size: 21px; }
.cards p { margin: 0 0 22px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.cards strong { margin-top: auto; color: var(--green); font-size: 19px; }
.cards a { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; color: var(--green); font-size: 13px; font-weight: 800; }

.production { padding: 92px 0; background: var(--dark); color: white; }
.production .eyebrow, .contacts .eyebrow { color: #b1cdbd; }
.production-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 100px; }
.production-grid > div:last-child { padding-top: 38px; }
.production-grid > div:last-child > p { margin: 0 0 28px; color: rgba(255,255,255,.72); font-size: 17px; line-height: 1.75; }
.production ul { margin: 0; padding: 0; list-style: none; }
.production li { border-top: 1px solid rgba(255,255,255,.18); padding: 17px 0; font-size: 14px; font-weight: 650; }

.works { padding: 110px 0; background: var(--paper); }
.works-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.works figure { position: relative; min-height: 420px; margin: 0; overflow: hidden; border-radius: 10px; background: var(--dark); }
.works figure::after { position: absolute; inset: 45% 0 0; content: ""; background: linear-gradient(transparent,rgba(8,27,20,.88)); }
.works figure img { width: 100%; height: 100%; min-height: 420px; object-fit: cover; transition: transform .4s ease; }
.works figure:hover img { transform: scale(1.025); }
.works figcaption { position: absolute; z-index: 1; right: 28px; bottom: 26px; left: 28px; display: flex; color: white; flex-direction: column; }
.works figcaption strong { font-size: 21px; }
.works figcaption span { margin-top: 5px; color: rgba(255,255,255,.72); font-size: 13px; }

.calculator-section { padding: 110px 0; background: #e9eee9; }
.calculator-grid { display: grid; grid-template-columns: .85fr 1.15fr; align-items: start; gap: 80px; }
.calculator-copy { position: sticky; top: 125px; }
.calculator-copy > p:not(.eyebrow) { max-width: 500px; margin: 24px 0 34px; color: var(--muted); line-height: 1.75; }
.estimate { display: flex; max-width: 430px; border: 1px solid #c8d7cd; border-radius: 8px; padding: 22px; background: rgba(255,255,255,.55); flex-direction: column; }
.estimate span, .estimate small { color: var(--muted); font-size: 12px; }
.estimate strong { margin: 7px 0; color: var(--green); font-size: 30px; }
.calculator-card { min-height: 545px; border: 1px solid #d9dfda; border-radius: 12px; padding: 38px; background: var(--paper); box-shadow: 0 24px 70px rgba(31,40,36,.08); }
.progress { display: grid; margin-bottom: 32px; grid-template-columns: repeat(3,1fr); gap: 8px; }
.progress span { height: 4px; border-radius: 4px; background: #e2e2dc; }
.progress .active { background: var(--green); }
.form-step { animation: enter .25s ease both; }
.step-hidden { display: none; }
@keyframes enter { from { transform: translateY(8px); opacity: 0; } }
.step-label { margin: 0; color: var(--green); font-size: 12px; font-weight: 800; }
.form-step h3 { margin: 7px 0 25px; font-size: 28px; letter-spacing: -.035em; }
.form-step label { display: block; margin-bottom: 18px; color: #37413c; font-size: 13px; font-weight: 700; }
.form-step input, .form-step select, .form-step textarea { width: 100%; margin-top: 8px; border: 1px solid #d4d5cf; border-radius: 7px; outline: 0; padding: 14px 15px; background: white; color: var(--ink); }
.form-step input:focus, .form-step select:focus, .form-step textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23,77,56,.1); }
.field-row { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.check-grid { display: grid; margin-bottom: 18px; grid-template-columns: repeat(2,1fr); gap: 12px; }
.check-grid label { display: flex; margin: 0; align-items: center; gap: 10px; border: 1px solid #d9dfda; border-radius: 8px; padding: 14px; background: #f8faf8; }
.check-grid input { width: 18px; height: 18px; margin: 0; accent-color: var(--green); }
.opening-panel { margin: 0 0 18px; border: 1px solid #d9dfda; border-radius: 8px; padding: 16px; background: #f8faf8; }
.wide { width: 100%; margin-top: 12px; }
.form-buttons { display: flex; gap: 14px; }
.form-buttons .button { flex: 1; }
.privacy { margin: -4px 0 20px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.honeypot { position: absolute !important; left: -10000px !important; }
.result { margin-top: 26px; border: 1px solid #b9d1c2; border-radius: 8px; padding: 22px; background: #eef6f0; }
.result span, .result p { color: var(--muted); font-size: 12px; }
.result strong { display: block; margin: 4px 0 8px; color: var(--green); font-size: 30px; }
.result p { margin: 0; }
.breakdown { margin-top: 18px; border-top: 1px solid #c8d7cd; padding-top: 14px; }
.breakdown > b { display: block; margin-bottom: 8px; color: var(--ink); font-size: 13px; }
.breakdown > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-bottom: 1px solid #d9e6dc; padding: 8px 0; }
.breakdown > div span { color: var(--muted); }
.breakdown > div strong { margin: 0; color: var(--ink); font-size: 13px; white-space: nowrap; }
.form-message { margin: 16px 0 0; color: var(--green); font-size: 13px; font-weight: 750; text-align: center; }

.process { padding: 110px 0; }
.process-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 1px; background: var(--line); }
.process-grid article { min-height: 250px; padding: 28px 24px; background: var(--paper); }
.process-grid article > span { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; color: var(--green); font-size: 11px; font-weight: 800; }
.process-grid h3 { margin: 48px 0 12px; font-size: 17px; }
.process-grid p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }

.faq { padding: 110px 0; background: var(--paper); }
.faq-grid { display: grid; grid-template-columns: .72fr 1.28fr; gap: 100px; }
.faq details { border-top: 1px solid var(--line); padding: 23px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-size: 16px; font-weight: 750; }
.faq details p { max-width: 700px; margin: 14px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }

.contacts { padding: 90px 0; background: var(--green); color: white; }
.contact-grid { display: grid; grid-template-columns: 1.2fr .8fr; align-items: end; gap: 80px; }
.contact-grid > div:first-child > p:last-child { max-width: 650px; margin: 24px 0 0; color: rgba(255,255,255,.72); line-height: 1.7; }
.contact-grid > div:last-child { display: flex; align-items: center; justify-content: flex-end; gap: 24px; }
.light { background: white; color: var(--green); }
.contact-grid > div:last-child > a:last-child { border-bottom: 1px solid rgba(255,255,255,.5); font-size: 13px; }
footer { padding: 40px 0; background: #0d2b20; color: white; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
footer .brand strong, footer .brand span { color: white; }
.footer-inner p { margin: 0; color: rgba(255,255,255,.62); font-size: 12px; }
.mobile-cta { display: none; }

.admin-page { min-height: 100vh; padding: 70px 24px; background: #eef2ed; }
.admin-shell { width: min(680px,100%); margin: auto; }
.admin-shell .brand { margin-bottom: 70px; }
.admin-shell h1 { margin-bottom: 22px; font-size: clamp(40px,6vw,64px); }
.admin-lead { max-width: 610px; margin: 0 0 30px; color: var(--muted); line-height: 1.7; }
.admin-card { display: grid; border: 1px solid #d9dfda; border-radius: 12px; padding: 34px; background: var(--paper); box-shadow: 0 24px 70px rgba(31,40,36,.08); gap: 16px; }
.admin-card label { color: #37413c; font-size: 13px; font-weight: 700; }
.admin-card input { width: 100%; margin-top: 8px; border: 1px solid #d4d5cf; border-radius: 7px; padding: 14px 15px; background: white; color: var(--ink); }
.admin-back { display: inline-block; margin-top: 24px; color: var(--green); font-size: 13px; font-weight: 800; }

@media (max-width: 1000px) {
  .container { width: min(100% - 48px, 920px); }
  .header-button { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding-right: 0; }
  .cards { grid-template-columns: repeat(2,1fr); }
  .calculator-grid { gap: 44px; }
  .process-grid { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 720px) {
  body { padding-bottom: 70px; }
  .container { width: min(100% - 32px, 640px); }
  .header-inner { min-height: 70px; }
  nav { display: none; }
  .brand strong { font-size: 23px; }
  .hero { padding-top: 10px; }
  .hero-copy { padding: 45px 0 36px; }
  h1 { font-size: 46px; }
  .lead { font-size: 16px; }
  .actions { width: 100%; flex-direction: column; }
  .button { width: 100%; }
  .hero-image { min-height: 410px; }
  .badge { width: 118px; height: 118px; }
  .trust { grid-template-columns: 1fr; }
  .trust div, .trust div:first-child { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 18px 0; }
  .section-title { grid-template-columns: 1fr; gap: 24px; }
  .cards { grid-template-columns: 1fr; }
  .production, .works, .calculator-section, .process, .faq { padding: 76px 0; }
  .production-grid, .calculator-grid, .faq-grid, .contact-grid { grid-template-columns: 1fr; gap: 34px; }
  .production-grid > div:last-child { padding-top: 0; }
  .works-grid { grid-template-columns: 1fr; }
  .works figure, .works figure img { min-height: 340px; }
  .calculator-copy { position: static; }
  .calculator-card { min-height: 0; padding: 25px 20px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .check-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .process-grid article { min-height: 0; }
  .process-grid h3 { margin-top: 26px; }
  .contact-grid > div:last-child { align-items: flex-start; flex-direction: column; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .mobile-cta { position: fixed; z-index: 30; right: 12px; bottom: 12px; left: 12px; display: flex; min-height: 52px; align-items: center; justify-content: center; border-radius: 7px; background: var(--green); color: white; box-shadow: 0 10px 28px rgba(16,59,44,.3); font-size: 14px; font-weight: 800; }
}

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

/* Portfolio photo gallery. */
.works figure.work-gallery { height: 420px; }
.work-gallery-slides { position: absolute; inset: 0; }
.works .work-gallery-slide { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .45s ease, transform .4s ease; }
.works .work-gallery-slide.is-active { opacity: 1; }
.works .work-gallery::after { pointer-events: none; }
.work-gallery-controls { position: absolute; z-index: 2; top: 18px; right: 18px; display: flex; align-items: center; gap: 8px; color: white; }
.work-gallery-controls[hidden] { display: none; }
.work-gallery-arrow { width: 44px; height: 44px; padding: 0; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; background: rgba(8,27,20,.65); color: white; font-size: 30px; line-height: 1; }
.work-gallery-arrow:hover { background: var(--green); }
.work-gallery-arrow:focus-visible { outline: 3px solid white; outline-offset: 3px; }
.work-gallery-count { min-width: 48px; padding: 7px; border-radius: 5px; background: rgba(8,27,20,.65); text-align: center; font-size: 12px; }
.work-gallery-slides { touch-action: pan-y; }
@media (max-width: 720px) { .works figure.work-gallery { height: 340px; } }

/* Client calculator */
.calc-layout { grid-template-columns: 1.25fr .75fr; gap: 32px; }
.calc-form { min-height: 0; }
.calc-form [hidden], .calc-summary [hidden] { display: none !important; }
.calc-block { min-width: 0; margin: 0 0 28px; padding: 0 0 24px; border: 0; border-bottom: 1px solid var(--line); }
.calc-block legend { display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 20px; padding: 0; font-size: 20px; font-weight: 750; }
.calc-block legend > span { display: inline-flex; width: 30px; height: 30px; flex-shrink: 0; justify-content: center; align-items: center; border-radius: 50%; background: #e9eee9; color: var(--green); font-size: 13px; }
.calc-form label, .calc-lead label { display: block; margin-bottom: 18px; font-size: 13px; font-weight: 700; color: #37413c; }
.calc-form input:not([type=radio]), .calc-form select, .calc-lead input, .calc-lead textarea { width: 100%; min-height: 48px; margin-top: 8px; padding: 12px; border: 1px solid #d4d5cf; border-radius: 7px; background: white; }
.calc-form input:focus-visible, .calc-form select:focus-visible, .calc-lead input:focus-visible, .calc-lead textarea:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.calc-form label > small, .field-help { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.6; }
.fence-choice { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 24px; }
.calc-form .fence-choice label { position: relative; display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 14px; border: 1px solid #d4d5cf; border-radius: 8px; cursor: pointer; }
.fence-choice label:has(input:checked) { border-color: var(--green); background: #eef5ef; box-shadow: inset 0 0 0 1px var(--green); }
.fence-choice input { margin: 3px 0 0; accent-color: var(--green); }
.fence-choice span { display: flex; flex-direction: column; gap: 5px; }
.fence-choice b { font-size: 14px; }
.fence-choice small { font-size: 11px; font-weight: 400; line-height: 1.5; color: var(--muted); }
.catalog-status { margin-bottom: 14px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.catalog-status button { margin-left: 10px; border: 0; padding: 4px; background: transparent; color: var(--green); text-decoration: underline; }
.calc-summary { position: sticky; top: 104px; min-width: 0; }
.calc-summary-card, .calc-lead { padding: 28px; border: 1px solid #d9dfda; border-radius: 12px; background: var(--paper); }
.calc-lead { margin-top: 18px; }
.calc-summary h3 { margin: 0 0 14px; font-size: 23px; letter-spacing: -.025em; }
.calc-summary p { font-size: 13px; line-height: 1.7; color: var(--muted); }
.calc-total { display: block; margin: 22px 0; color: var(--green); font-size: clamp(32px,3.4vw,46px); letter-spacing: -.04em; }
#estimate-selection { overflow-wrap: anywhere; }
.calc-summary .breakdown summary { margin: 18px 0 10px; font-weight: 700; font-size: 13px; cursor: pointer; }
.calc-summary .breakdown div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12px; line-height: 1.5; }
.calc-summary .breakdown strong { white-space: nowrap; }
.calc-disclaimer { border-top: 1px solid var(--line); padding-top: 16px; }
#estimate-stale { color: #866123; }
#result { scroll-margin-top: 100px; }
@media (max-width: 1000px) { .calc-layout { gap: 22px; } .calc-form { padding: 24px; } .calc-summary-card, .calc-lead { padding: 22px; } }
@media (max-width: 720px) { .calc-layout { grid-template-columns: 1fr; } .calc-summary { position: static; } .calc-form { padding: 22px 18px; } .fence-choice { grid-template-columns: 1fr; } .calc-block legend { font-size: 18px; } }
