/* ---------------------------------------------------------------
   Bulk Yard — material quantity calculators
   Visual direction: landscape supply yard. Stencilled bin labels,
   printed weigh tickets, safety-yellow signage.
   --------------------------------------------------------------- */

:root {
  --dust:    #E6E7E3;  /* concrete dust, page ground */
  --dust-2:  #DCDED8;
  --ink:     #191D1A;  /* wet slate */
  --bin:     #26332B;  /* deep pine, bulk bins + header */
  --bin-2:   #33443A;
  --hazard:  #F5B800;  /* safety yellow, signage accent */
  --kraft:   #DCD3BE;  /* ticket paper */
  --kraft-2: #CDC2A8;
  --stone:   #6B716A;  /* muted */
  --rule:    #C2C5BD;
  --white:   #FBFBF9;

  --shell: 1140px;
  --gap: 24px;
  --r: 3px;

  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--dust);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}

img { max-width: 100%; }

a { color: var(--ink); text-decoration-color: var(--stone); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--hazard);
  outline-offset: 2px;
}

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 20px; }
.shell-narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* --- headings ---------------------------------------------------- */

h1, h2, h3, .display {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.015em;
  line-height: 1.06;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(34px, 6.2vw, 58px); text-transform: uppercase; }
h2 { font-size: clamp(24px, 3.4vw, 32px); margin: 56px 0 16px; }
h3 { font-size: 20px; margin: 32px 0 8px; font-stretch: 100%; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
  margin: 0 0 12px;
}

.lede { font-size: 19px; color: #3A403B; max-width: 60ch; }

/* --- header ------------------------------------------------------ */

.masthead {
  background: var(--bin);
  color: var(--white);
  border-bottom: 4px solid var(--hazard);
}
.masthead .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  flex-wrap: wrap;
}
.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 125%;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 19px;
  color: var(--white);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.wordmark .mark {
  width: 15px; height: 15px;
  background: var(--hazard);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.masthead nav { display: flex; gap: 20px; flex-wrap: wrap; }
.masthead nav a {
  color: #D6DCD6;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 0;
}
.masthead nav a:hover { color: var(--hazard); }

/* --- hero -------------------------------------------------------- */

.hero { padding: 48px 0 8px; }
.hero h1 { max-width: 16ch; }
.hero .lede { margin-top: 18px; }

.stat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--stone);
  letter-spacing: 0.04em;
}
.stat-strip b { color: var(--ink); font-weight: 600; }

/* --- calculator layout ------------------------------------------- */

.calc {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 36px;
  align-items: start;
  margin: 36px 0 8px;
}
@media (max-width: 860px) {
  .calc { grid-template-columns: 1fr; gap: 26px; }
}

.panel {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 22px;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}
.panel-head h2 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-stretch: 100%;
  font-weight: 800;
}
.panel-head .hint { font-family: var(--mono); font-size: 12px; color: var(--stone); }

/* --- form controls ----------------------------------------------- */

.field { margin-bottom: 16px; }
.field > label,
.field-label {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 6px;
}

input[type="number"], input[type="text"], select {
  font-family: var(--mono);
  font-size: 16px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 10px 11px;
  width: 100%;
  min-width: 0;
  -moz-appearance: textfield;
}
input[type="number"]:focus, select:focus { border-color: var(--ink); }
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--stone) 50%),
                    linear-gradient(135deg, var(--stone) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
  cursor: pointer;
}

.dims { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.dim-unit { max-width: 82px; }
.pair { display: flex; gap: 8px; }
.pair > :first-child { flex: 1 1 auto; }

/* segmented shape picker */
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--dust-2);
  color: #454B46;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 7px 12px;
  cursor: pointer;
}
.seg button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}
.seg button:hover { border-color: var(--ink); }

/* depth presets */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chips button {
  font-family: var(--mono);
  font-size: 12px;
  background: transparent;
  border: 1px dashed var(--rule);
  border-radius: 40px;
  padding: 5px 11px;
  cursor: pointer;
  color: #454B46;
}
.chips button:hover { border-style: solid; border-color: var(--ink); color: var(--ink); }
.chips button[aria-pressed="true"] {
  border-style: solid;
  border-color: var(--ink);
  background: var(--hazard);
  color: var(--ink);
}

/* area sections */
.section-card {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--ink);
  border-radius: var(--r);
  padding: 14px;
  margin-bottom: 12px;
  background: #FDFDFB;
}
.section-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.section-card h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--stone);
}
.link-btn {
  background: none;
  border: 0;
  padding: 2px 4px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--stone);
  cursor: pointer;
  text-decoration: underline;
}
.link-btn:hover { color: #A02C1E; }

.add-section {
  width: 100%;
  background: transparent;
  border: 1px dashed var(--stone);
  border-radius: var(--r);
  padding: 11px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  cursor: pointer;
  color: #454B46;
}
.add-section:hover { border-style: solid; background: var(--dust-2); }

.subtle {
  font-size: 14px;
  color: var(--stone);
  margin: 6px 0 0;
}

details.prices { margin-top: 18px; border-top: 1px solid var(--rule); padding-top: 14px; }
details.prices summary {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--ink);
  list-style: none;
}
details.prices summary::-webkit-details-marker { display: none; }
details.prices summary::before { content: "+ "; color: var(--stone); }
details.prices[open] summary::before { content: "– "; }
details.prices .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }

/* --- the ticket (signature element) ------------------------------- */

.ticket-wrap { position: sticky; top: 18px; }
@media (max-width: 860px) { .ticket-wrap { position: static; } }

.ticket {
  --notch: 9px;
  background: var(--kraft);
  color: var(--ink);
  padding: 26px 22px 22px;
  position: relative;
  -webkit-mask:
    radial-gradient(var(--notch) at 50% 0, #0000 98%, #000) 50% 0 / calc(2 * var(--notch)) var(--notch) repeat-x,
    radial-gradient(var(--notch) at 50% 100%, #0000 98%, #000) 50% 100% / calc(2 * var(--notch)) var(--notch) repeat-x,
    linear-gradient(#000 0 0) 50% 50% / 100% calc(100% - 2 * var(--notch)) no-repeat;
  mask:
    radial-gradient(var(--notch) at 50% 0, #0000 98%, #000) 50% 0 / calc(2 * var(--notch)) var(--notch) repeat-x,
    radial-gradient(var(--notch) at 50% 100%, #0000 98%, #000) 50% 100% / calc(2 * var(--notch)) var(--notch) repeat-x,
    linear-gradient(#000 0 0) 50% 50% / 100% calc(100% - 2 * var(--notch)) no-repeat;
}

.ticket-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 10px;
  margin-bottom: 4px;
}
.ticket-top .t-title {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 112%;
  text-transform: uppercase;
  font-size: 15px;
  letter-spacing: 0.12em;
}
.ticket-top .t-no { font-family: var(--mono); font-size: 11px; color: #6A6350; letter-spacing: 0.08em; }

.row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--mono);
  font-size: 14px;
  padding: 7px 0;
}
.row .r-label { color: #5C5645; white-space: nowrap; }
.row .leader {
  flex: 1 1 auto;
  border-bottom: 1px dotted #A79B7E;
  transform: translateY(-4px);
  min-width: 12px;
}
.row .r-val { font-weight: 600; white-space: nowrap; }
.row-note {
  font-family: var(--mono);
  font-size: 11.5px;
  color: #6A6350;
  margin: -4px 0 6px;
  line-height: 1.45;
}

.row-group { border-top: 1px solid #B7AB8E; margin-top: 10px; padding-top: 4px; }
.row-group-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6A6350;
  padding: 8px 0 2px;
}

.buy-line {
  background: var(--hazard);
  margin: 16px -22px 0;
  padding: 14px 22px;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.buy-line .bl-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #4A3E00;
}
.buy-line .bl-val {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 112%;
  font-size: clamp(26px, 4.4vw, 34px);
  line-height: 1.1;
  margin-top: 2px;
  text-transform: uppercase;
}
.buy-line .bl-sub { font-family: var(--mono); font-size: 12px; color: #4A3E00; margin-top: 4px; }

.verdict {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  background: #EFE8D6;
  border-left: 3px solid var(--ink);
  padding: 11px 12px;
  margin-top: 16px;
}
.verdict b { font-weight: 600; }

.stamp {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8A8069;
  text-align: center;
  border-top: 1px dashed #B7AB8E;
  padding-top: 12px;
}

.ticket-empty {
  font-family: var(--mono);
  font-size: 13px;
  color: #6A6350;
  padding: 26px 0;
  text-align: center;
  line-height: 1.7;
}

/* --- content ----------------------------------------------------- */

.prose { max-width: 68ch; }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin-bottom: 7px; }

table.data {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 24px;
  font-size: 15px;
}
table.data th, table.data td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
table.data th {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
  border-bottom: 2px solid var(--ink);
}
table.data td:first-child { font-weight: 600; }
table.data tbody tr:hover { background: var(--dust-2); }
.wrap-scroll { overflow-x: auto; }

.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--stone); font-size: 20px; }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 0 18px; color: #3A403B; max-width: 68ch; }
.faq .answer p { margin: 0 0 12px; }

/* --- material grid (home) ---------------------------------------- */

.bin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 14px;
  margin: 24px 0 8px;
}
.bin {
  display: block;
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 18px;
  position: relative;
  transition: transform .12s ease, border-color .12s ease;
}
.bin:hover { transform: translateY(-2px); border-color: var(--ink); }
.bin .bin-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
}
.bin .bin-name {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 112%;
  text-transform: uppercase;
  font-size: 21px;
  line-height: 1.1;
  margin: 8px 0 8px;
}
.bin .bin-sub { font-size: 14px; color: #4B514C; line-height: 1.5; }
.bin::after {
  content: "";
  position: absolute;
  right: 0; top: 0;
  width: 0; height: 0;
  border-top: 16px solid var(--hazard);
  border-left: 16px solid transparent;
}

/* --- ad slots ----------------------------------------------------- */

.ad {
  margin: 34px auto;
  text-align: center;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9AA096;
  display: block;
  margin-bottom: 6px;
}
.ad-placeholder {
  width: 100%;
  border: 1px dashed var(--rule);
  border-radius: var(--r);
  padding: 30px 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: #9AA096;
}

/* --- footer ------------------------------------------------------- */

.foot {
  background: var(--bin);
  color: #C3CBC4;
  margin-top: 64px;
  padding: 40px 0 30px;
  font-size: 15px;
}
.foot a { color: #E6E7E3; }
.foot .cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 28px;
}
.foot h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hazard);
  margin: 0 0 12px;
  font-weight: 500;
}
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 7px; }
.foot .fine {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid #3B4A40;
  font-family: var(--mono);
  font-size: 11.5px;
  color: #8E9990;
  line-height: 1.7;
}

.crumbs {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--stone);
  padding: 16px 0 0;
  letter-spacing: 0.04em;
}
.crumbs a { color: var(--stone); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
