:root {
  --pine: #14261e;
  --pine-2: #1d362b;
  --pine-line: rgba(255, 255, 255, 0.11);
  --pine-line-2: rgba(255, 255, 255, 0.20);

  --birch: #f5f2eb;
  --paper: #ffffff;
  --tint: #eae4d9;
  --line: #dcd5c8;
  --line-strong: #c4baaa;

  --ink: #161b18;
  --ink-2: #3f4943;
  --muted: #667069;

  --cedar: #c87a24;
  --cedar-hover: #b1691a;
  --cedar-soft: #fcf1e3;
  --leaf: #1b7548;
  --leaf-soft: #e7f5ee;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --sh-sm: 0 4px 16px rgba(20, 38, 30, 0.05);
  --sh-md: 0 14px 36px rgba(20, 38, 30, 0.10);
  --sh-lg: 0 28px 60px rgba(20, 38, 30, 0.24);

  --head: 'Unbounded', 'Onest', sans-serif;
  --body: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max: 1220px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; overflow-x: clip; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 15.5px;
  line-height: 1.54;
  color: var(--ink);
  background: var(--birch);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body.modal-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
:focus-visible { outline: 2px solid var(--cedar); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 22px; }

/* Demo Bar */
.demo-bar {
  background: #0f1d17;
  border-bottom: 1px solid var(--pine-line);
  color: #c8d3cd;
  font-size: 12.5px;
}
.demo-bar-in {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 8px; padding-bottom: 8px;
}
.demo-bar b { color: #fff; }
.demo-bar a { color: #eeb05e; text-decoration: underline; text-underline-offset: 3px; }
.demo-close { width: 26px; height: 26px; border-radius: 7px; color: #95a49b; display: grid; place-items: center; }
.demo-close:hover { background: rgba(255,255,255,.08); color: #fff; }

/* Header */
.hdr {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.hdr-in {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: 70px;
}
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; min-width: 0; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--pine); color: #eeb05e;
  display: grid; place-items: center; flex-shrink: 0;
}
.brand-txt { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
  font-family: var(--head); font-size: 16px; font-weight: 700; line-height: 1.05;
  letter-spacing: -0.02em; color: var(--pine);
}
.brand-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; margin-top: 2px; }

.hdr-nav {
  display: none; align-items: center; gap: 22px;
  font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.hdr-nav a { white-space: nowrap; padding: 6px 0; transition: color .15s; }
.hdr-nav a:hover { color: var(--cedar); }
@media (min-width: 1000px) { .hdr-nav { display: flex; } }

.hdr-right { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.hdr-phone {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 40px; padding: 0 13px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--birch);
  font-size: 13.5px; font-weight: 700; color: var(--pine); white-space: nowrap;
}
.hdr-phone:hover { border-color: var(--pine); }
.hdr-phone span { display: none; }
@media (min-width: 680px) { .hdr-phone span { display: inline; } }

.hdr-cart {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 15px; border-radius: 10px;
  background: var(--pine); color: #fff; font-size: 13.5px; font-weight: 700; white-space: nowrap;
  transition: background .15s, transform .15s;
}
.hdr-cart:hover { background: var(--pine-2); transform: translateY(-1px); }
.hdr-badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--cedar); color: #fff; font-size: 11.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px; border-radius: 12px; font-size: 14.5px; font-weight: 600;
  line-height: 1.2; border: 1.5px solid transparent; text-align: center;
  transition: transform .15s, background .15s, border-color .15s, box-shadow .15s;
}
.btn:active { transform: scale(0.985); }
.btn-cedar {
  background: var(--cedar); color: #fff; font-weight: 700;
  box-shadow: 0 10px 24px rgba(200, 122, 36, 0.24);
}
.btn-cedar:hover { background: var(--cedar-hover); transform: translateY(-1px); }
.btn-pine { background: var(--pine); color: #fff; font-weight: 700; }
.btn-pine:hover { background: var(--pine-2); transform: translateY(-1px); }
.btn-line { background: var(--paper); color: var(--ink); border-color: var(--line-strong); }
.btn-line:hover { border-color: var(--pine); background: var(--birch); }
.btn-ghost-light { background: rgba(255,255,255,.06); color: #f2f5f3; border-color: var(--pine-line-2); }
.btn-ghost-light:hover { border-color: #eeb05e; color: #eeb05e; }
.btn-sm { padding: 9px 14px; font-size: 13.5px; border-radius: 10px; }

/* Hero */
.hero {
  background: var(--birch);
  padding: 40px 0 54px;
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 36px;
  align-items: center;
}
.hero-left { min-width: 0; }
.hero-pill-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin-bottom: 16px; font-size: 13.5px; color: var(--ink-2);
}
.rating-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  background: var(--pine); color: #f7c777; font-weight: 700; white-space: nowrap;
}
h1 {
  margin: 0 0 16px;
  font-family: var(--head);
  font-size: clamp(27px, 3.5vw, 43px);
  font-weight: 700; line-height: 1.13; letter-spacing: -0.025em; color: var(--pine);
}
.hero-lead {
  margin: 0 0 24px; font-size: 16px; line-height: 1.6; color: var(--ink-2); max-width: 52ch;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.hero-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
  padding-top: 22px; border-top: 1px solid var(--line);
}
.stat-box { min-width: 0; }
.stat-box strong {
  display: block; font-family: var(--head); font-size: 18px; color: var(--pine);
  line-height: 1.15; margin-bottom: 3px; white-space: nowrap;
}
.stat-box span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.38; }

.hero-bento {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0;
}
.hero-main-card {
  grid-column: 1 / -1; position: relative; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); background: var(--pine); box-shadow: var(--sh-md);
}
.hero-main-card img { width: 100%; aspect-ratio: 16 / 9.8; object-fit: cover; }
.hero-cap {
  position: absolute; left: 14px; right: 14px; bottom: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 15px; border-radius: 13px;
  background: rgba(20, 38, 30, 0.86); backdrop-filter: blur(8px);
  color: #fff; border: 1px solid rgba(255,255,255,0.14);
}
.hero-cap strong { display: block; font-size: 14px; }
.hero-cap > div span { display: block; font-size: 12px; color: #ccd7d0; }
.cap-tag {
  padding: 5px 10px; border-radius: 8px; background: var(--cedar); color: #fff;
  font-weight: 700; font-size: 12px; white-space: nowrap;
}
.mini-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 15px 16px; box-shadow: var(--sh-sm);
}
.mini-card strong { display: block; font-size: 14.5px; color: var(--pine); margin-bottom: 3px; }
.mini-card span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.4; }

/* Sections */
.section { padding: 62px 0; scroll-margin-top: 76px; }
.section-pine { background: var(--pine); color: #eef3f0; }
.section-paper { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { max-width: 64ch; margin-bottom: 28px; }
.sec-head h2 {
  margin: 0 0 8px; font-family: var(--head);
  font-size: clamp(22px, 2.8vw, 33px); font-weight: 700; line-height: 1.16; letter-spacing: -0.02em;
}
.sec-head p { margin: 0; font-size: 15.5px; color: var(--muted); }
.section-pine .sec-head p { color: #b5c4bc; }

/* SIGNATURE WIDGET: Timber m3 / Pieces / m2 Calculator */
.calc-shell {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  background: var(--paper); color: var(--ink);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-lg);
}
.calc-left { padding: 30px; display: grid; gap: 20px; min-width: 0; }
.c-label { display: block; font-size: 14px; font-weight: 700; color: var(--pine); margin-bottom: 9px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-btn {
  padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--birch); color: var(--ink-2); font-size: 13.5px; font-weight: 600;
  transition: background .14s, border-color .14s, color .14s;
}
.pill-btn:hover { border-color: var(--pine); color: var(--pine); }
.pill-btn.active { background: var(--pine); border-color: var(--pine); color: #fff; }
.pill-btn.cedar.active { background: var(--cedar); border-color: var(--cedar); color: #fff; }

.mode-tabs {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
}
.mode-tab {
  padding: 10px 8px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--birch); font-size: 13px; font-weight: 700; color: var(--ink-2); text-align: center;
}
.mode-tab.active { background: var(--cedar-soft); border-color: var(--cedar); color: var(--cedar-hover); }

.qty-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 12px; align-items: center;
}
.num-input {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid var(--line-strong); background: #fff;
  font-family: var(--head); font-size: 18px; font-weight: 700; color: var(--pine);
}
.num-input:focus { outline: none; border-color: var(--cedar); }
.range-sl { width: 100%; accent-color: var(--cedar); cursor: pointer; }

.calc-right {
  background: var(--pine-2); color: #f2f6f4;
  padding: 30px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px;
  min-width: 0;
}
.res-tag {
  display: inline-block; padding: 4px 10px; border-radius: 8px;
  background: rgba(200, 122, 36, 0.22); border: 1px solid rgba(238, 176, 94, 0.4);
  color: #f7c777; font-size: 12.5px; font-weight: 700; margin-bottom: 10px;
}
.res-sum {
  font-family: var(--head); font-size: 32px; font-weight: 700; color: #f7c777;
  line-height: 1.1; white-space: nowrap; margin-bottom: 6px;
}
.res-sub { font-size: 13.5px; color: #c4d2ca; margin-bottom: 18px; }
.res-metrics {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
  margin-bottom: 16px;
}
.m-box {
  background: rgba(15, 29, 23, 0.65); border: 1px solid var(--pine-line);
  border-radius: 12px; padding: 12px 13px;
}
.m-box small { display: block; font-size: 11.5px; color: #9eb2a7; }
.m-box strong { display: block; font-family: var(--head); font-size: 16px; color: #fff; margin-top: 2px; white-space: nowrap; }
.delivery-hint {
  padding: 10px 13px; border-radius: 10px; background: rgba(27, 117, 72, 0.25);
  border: 1px solid rgba(114, 214, 162, 0.35); font-size: 13px; color: #c8f3dc;
}
.calc-actions { display: grid; gap: 9px; }
.calc-actions .btn { width: 100%; }

/* Catalog Cards */
.cat-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 22px;
}
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.prod-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--sh-sm);
  transition: transform .18s, box-shadow .18s; min-width: 0;
}
.prod-card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.prod-img { position: relative; aspect-ratio: 16 / 10; background: #262e29; overflow: hidden; }
.prod-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.prod-card:hover .prod-img img { transform: scale(1.04); }
.prod-badge {
  position: absolute; top: 10px; left: 10px;
  padding: 4px 9px; border-radius: 8px; background: rgba(20, 38, 30, 0.88);
  color: #f7c777; font-size: 11.5px; font-weight: 700; backdrop-filter: blur(6px);
}
.prod-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.prod-body h3 { margin: 0 0 6px; font-family: var(--head); font-size: 16px; line-height: 1.25; color: var(--pine); }
.prod-desc { margin: 0 0 12px; font-size: 13.5px; color: var(--muted); }
.spec-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.spec-chips span {
  padding: 3px 8px; border-radius: 6px; background: var(--birch);
  color: var(--ink-2); font-size: 12px; font-weight: 600;
}
.prod-foot {
  margin-top: auto; padding-top: 13px; border-top: 1px solid #ede8de;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.prod-price { font-family: var(--head); font-size: 18px; font-weight: 700; color: var(--pine); white-space: nowrap; }
.prod-price small { display: block; font-family: var(--body); font-size: 11.5px; font-weight: 500; color: var(--muted); }

/* Factory & Grades Section */
.factory-grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 36px; align-items: center; }
.factory-img { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.factory-img img { width: 100%; aspect-ratio: 16 / 10.5; object-fit: cover; }
.grades-list { display: grid; gap: 12px; margin-top: 20px; }
.grade-row {
  padding: 14px 16px; border-radius: 12px; background: var(--birch); border: 1px solid var(--line);
}
.grade-row strong { display: block; font-size: 15px; color: var(--pine); margin-bottom: 3px; }
.grade-row span { display: block; font-size: 13.5px; color: var(--ink-2); }

/* Contacts & Trust */
.trust-grid { display: grid; grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr); gap: 24px; }
.card-box {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px; box-shadow: var(--sh-sm); display: flex; flex-direction: column; justify-content: space-between; gap: 20px;
}
.c-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; }
.c-item label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 3px; }
.c-item .c-val { display: block; font-size: 16px; font-weight: 700; color: var(--pine); }
.c-item a.c-val:hover { color: var(--cedar); }

/* Drawer */
.drawer-bg {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(12, 22, 18, 0.65); backdrop-filter: blur(4px);
  display: flex; justify-content: flex-end;
}
.drawer {
  width: 100%; max-width: 440px; height: 100%; background: var(--paper);
  display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(0,0,0,.22);
}
.drawer-head {
  padding: 18px 20px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.drawer-head h3 { margin: 0; font-family: var(--head); font-size: 16px; color: var(--pine); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.smeta-item {
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--birch);
}
.drawer-foot {
  padding: 16px 20px 20px; border-top: 1px solid var(--line); background: var(--birch);
  display: grid; gap: 10px;
}

footer {
  background: var(--pine); color: #9eb2a7; padding: 26px 0 36px; font-size: 13.5px;
}
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.foot-in a { color: #eef3f0; text-decoration: underline; text-underline-offset: 3px; }

.mobile-bar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  background: rgba(20, 38, 30, 0.97); border-top: 1px solid var(--pine-line-2);
  padding: 10px 14px; gap: 8px;
}
.mobile-bar a {
  flex: 1; min-height: 44px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13.5px; font-weight: 700; white-space: nowrap;
}
.mb-call { background: var(--pine-2); color: #fff; border: 1px solid var(--pine-line-2); }
.mb-max { background: var(--cedar); color: #fff; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  z-index: 100; background: var(--pine); color: #fff; border: 1px solid #eeb05e;
  padding: 11px 18px; border-radius: 12px; font-size: 13.5px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 980px) {
  .hero-grid, .calc-shell, .factory-grid, .trust-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .wrap { padding: 0 15px; }
  .hdr-in { min-height: 60px; gap: 8px; }
  .brand-name { font-size: 14.5px; }
  .brand-sub { font-size: 10.5px; }
  .hdr-cart-lbl { display: none; }
  .hero { padding: 24px 0 36px; }
  .hero-stats { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .hero-bento, .grid-3, .c-grid, .qty-row { grid-template-columns: minmax(0, 1fr); }
  .hero-cap { flex-direction: column; align-items: flex-start; gap: 6px; }
  .hero-ctas .btn { width: 100%; }
  .section { padding: 44px 0; }
  .calc-left, .calc-right, .card-box { padding: 20px 16px; }
  .mobile-bar { display: flex; }
  footer { padding-bottom: 92px; }
}
