/* "Our Why" pop-up and /why page, plus the yard questionnaire sign-in gate.
   Kept in its own file so it can evolve without touching styles.css. Uses the tokens in styles.css. */

.why { padding-bottom: 24px; }
.why-narrow { max-width: 960px; }
.why .accent { color: var(--green); }
.why-hero { padding: 56px 0 28px; }
@media (min-width: 900px) { .why-hero { padding: 80px 0 36px; } }
.why-hero .lead { margin-bottom: 32px; }

.why-stats { display: grid; gap: 14px; }
@media (min-width: 760px) { .why-stats { grid-template-columns: repeat(3, 1fr); } }
.why-stat { display: grid; gap: 6px; align-content: start; background: var(--red-bg); border: 1px solid var(--red-line); border-radius: var(--radius); padding: 20px 22px; min-width: 0; }
.why-stat .light { margin-bottom: 4px; box-shadow: 0 0 12px rgba(239, 68, 68, 0.5); }
.why-stat strong { font-family: var(--font-head); font-size: clamp(2rem, 5vw, 2.6rem); line-height: 1; color: var(--red-soft); }
.why-stat > span:not(.light) { color: var(--text-2); font-size: 0.98rem; line-height: 1.45; }

.why-src { display: inline-block; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; margin: 2px 2px 0 0; text-decoration: none; white-space: nowrap; vertical-align: middle; }
.why-src:hover { color: var(--text); border-color: var(--border-strong); }

/* Founder note */
.why-letter { padding: 20px 0 36px; }
.why-note { position: relative; background: var(--surface); border: 1px solid var(--border-strong); border-left: 4px solid var(--purple); border-radius: var(--radius); padding: 28px 24px; }
@media (min-width: 760px) { .why-note { padding: 36px 44px; } }
.why-note p { color: var(--text-2); font-size: 1.12rem; }
.why-pull { font-family: var(--font-head); font-size: clamp(1.5rem, 3.6vw, 2.1rem) !important; font-weight: 800; color: var(--text) !important; line-height: 1.15; margin: 8px 0 18px; }
.why-sign { display: flex; flex-direction: column; margin: 18px 0 0 !important; }
.why-sign span { color: var(--muted); font-size: 0.95rem; }

/* Reasons */
.why-reasons { padding: 28px 0 24px; }
.why-reasons-head h2 { margin-bottom: 6px; }
.why-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 26px; }
.why-chip { font-family: var(--font-body); font-size: 0.9rem; font-weight: 600; color: var(--text-2); background: transparent; border: 1px solid var(--border-strong); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.why-chip:hover { color: var(--text); background: #241a3d; }
.why-chip.is-on { background: var(--purple); border-color: var(--purple); color: #fff; }
.why-chip .n { font-family: var(--font-mono); font-size: 0.75rem; opacity: 0.8; margin-left: 4px; }

.why-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; counter-reset: why; }
.why-item { counter-increment: why; position: relative; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 20px 22px 20px; min-width: 0; }
@media (min-width: 760px) { .why-item { padding: 28px 32px 26px 96px; } }
.why-item::before { content: counter(why, decimal-leading-zero); display: block; font-family: var(--font-mono); font-size: 0.9rem; color: var(--purple-2); margin-bottom: 10px; }
@media (min-width: 760px) { .why-item::before { position: absolute; left: 32px; top: 30px; font-size: 1.35rem; margin: 0; } }
.why-item[hidden] { display: none; }
.why-item h3 { font-size: clamp(1.25rem, 2.6vw, 1.55rem); margin: 10px 0 14px; }
.why-tag { display: inline-block; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.why-tag.waste { background: var(--red-fill); color: var(--red-soft); }
.why-tag.people { background: #241a3d; color: var(--purple-2); }
.why-tag.predict { background: var(--green-fill); color: var(--green-soft); }
.why-tag.now { background: var(--amber-fill); color: var(--amber-soft); }
.why-tag.us { background: #1d2333; color: #a5c8ff; }
.why-red, .why-green { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 12px; font-size: 1.02rem; line-height: 1.55; }
.why-red .light, .why-green .light { margin-top: 7px; }
.why-red { color: var(--text-2); }
.why-green { color: var(--text); }
.why-voice { margin: 14px 0 0; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--bg); border: 1px dashed var(--border-strong); font-size: 0.96rem; color: var(--text-2); }
.why-voice-label { display: block; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green-2); margin-bottom: 6px; }
.why-last { border-color: var(--purple); background: var(--surface); }
.why-empty { color: var(--muted); }

/* Review flags: visible on previews only. build.mjs refuses a production build while any remain. */
.review-flag { display: inline-block; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: #1c1405; background: var(--amber); border-radius: 6px; padding: 2px 7px; margin: 0 6px 6px 0; vertical-align: middle; cursor: help; }
.why-note .review-flag { position: absolute; top: 14px; right: 14px; margin: 0; }

/* Paths */
.why-paths { padding: 40px 0 12px; text-align: center; }
.why-paths .signal { margin-bottom: 18px; }
.why-path-grid { display: grid; gap: 14px; margin-top: 26px; text-align: left; }
@media (min-width: 700px) { .why-path-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .why-path-grid { grid-template-columns: repeat(3, 1fr); } }
.why-path { display: flex; flex-direction: column; padding: 22px; }
.why-path h3 { font-size: 1.2rem; }
.why-path p { color: var(--text-2); font-size: 0.98rem; flex: 1; }
.why-path .btn-row { gap: 8px; }

/* Home hero link that opens the pop-up */
.why-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; color: var(--text-2); font-weight: 600; text-decoration: none; border-bottom: 1px dashed var(--border-strong); padding-bottom: 2px; }
.why-link:hover { color: var(--text); border-bottom-color: var(--green); }
.why-link .light { box-shadow: 0 0 10px rgba(239, 68, 68, 0.55); }

/* Overlay shell (pop-up) */
html.why-lock, html.why-lock body { overflow: hidden; }
.nd-overlay { position: fixed; inset: 0; z-index: 1500; background: rgba(9, 7, 14, 0.82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; overflow-y: auto; overscroll-behavior: contain; padding: 0; opacity: 0; transition: opacity 0.18s ease; }
.nd-overlay.is-open { opacity: 1; }
.nd-panel { position: relative; width: 100%; max-width: 1040px; min-height: 100%; background: var(--bg); border-left: 1px solid var(--border); border-right: 1px solid var(--border); outline: none; }
@media (min-width: 1100px) { .nd-overlay { padding: 28px 0; } .nd-panel { min-height: 0; border: 1px solid var(--border-strong); border-radius: 28px; overflow: hidden; } }
.nd-close { position: sticky; top: 12px; float: right; margin: 12px 12px 0 0; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; display: grid; place-items: center; }
.nd-close:hover { background: #241a3d; }
.nd-close svg { width: 20px; height: 20px; }
.nd-loading { padding: 120px 24px; text-align: center; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .nd-overlay { transition: none; } }

/* Questionnaire sign-in gate (small dialog) */
.nd-overlay.gate { align-items: center; padding: 16px; }
.nd-overlay.gate .nd-panel { max-width: 520px; min-height: 0; border: 1px solid var(--border-strong); border-radius: 24px; padding: 28px 22px 24px; }
@media (min-width: 640px) { .nd-overlay.gate .nd-panel { padding: 36px 36px 30px; } }
.nd-overlay.gate .nd-close { position: absolute; top: 12px; right: 12px; float: none; margin: 0; }
.gate h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); margin-right: 44px; }
.gate .lead { font-size: 1.02rem; margin-bottom: 20px; }
.gate .small { margin: 4px 0 0; }
.why-item[data-n]::before { content: attr(data-n); }
