/* ============================================================
   DESIGN BROKER — Article page styles
   Extends tokens.css + shares popup.css
   ============================================================ */

@import url("tokens.css");

/* ---------- RESET (same as main) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--cream);
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
::selection { background: var(--text); color: var(--cream); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

/* ---------- SHARED LAYOUT ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.row {
  display: grid;
  grid-template-columns: 195px 172px minmax(0, 1fr);
  column-gap: 24px;
  align-items: start;
}
.row > .rail { grid-column: 2; text-align: right; }
.row > .content { grid-column: 3; min-width: 0; }
.row + .row { margin-top: clamp(40px, 6vw, 70px); }

.rail {
  color: var(--text);
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
}

/* ---------- LINK ---------- */
.link {
  display: inline-block;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
  color: var(--text);
  transition: color .2s var(--ease-out);
}
.link:hover { color: var(--orange); }
.link.sm { font-size: 14px; }

/* ---------- BUTTON ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  height: 38px;
  padding: 0 18px;
  background: var(--text);
  color: var(--cream);
  border: 0;
  border-radius: 0;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: opacity .2s var(--ease-out);
}
.btn:hover { opacity: 0.85; }

/* ---------- HEADER ---------- */
.site-header { padding-top: 40px; padding-bottom: clamp(48px, 7vw, 90px); }
.site-header .rail { padding-top: 4px; }
.header-row { align-items: start; }
.header-brand-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.header-brand {
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}
.header-nav-link {
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
  color: var(--warm-muted);
  text-decoration: none;
  transition: color .2s var(--ease-out);
}
.header-nav-link:hover { color: var(--text); }
.header-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.header-contact .name {
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
}
.header-contact .btn { margin-top: 14px; }

/* ============================================================
   ARTICLE-SPECIFIC
   ============================================================ */

/* ---------- ARTICLE HERO ---------- */
.article-label {
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--warm-muted);
  letter-spacing: 0.04em;
}

.article-title {
  font-weight: 700;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 0.88;
  letter-spacing: 0.1px;
  text-transform: uppercase;
  text-wrap: balance;
  margin: 0;
  max-width: 640px;
}

.article-intro {
  margin-top: clamp(20px, 3vw, 32px);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.45;
  text-transform: none;
  color: var(--text);
  max-width: 580px;
}

.article-byline {
  margin-top: 16px;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--warm-muted);
  letter-spacing: 0.01em;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ---------- ARTICLE BODY (prose column) ---------- */
.article-body {
  max-width: 600px;
}

.article-body h2 {
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1;
  text-transform: uppercase;
  color: var(--text);
  margin: clamp(48px, 6vw, 72px) 0 20px;
  letter-spacing: 0.02em;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  font-family: var(--font);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--text);
  margin: 36px 0 14px;
  letter-spacing: 0.01em;
}

.article-body p {
  font-family: var(--font);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.5;
  text-transform: none;
  color: var(--text);
  margin: 0 0 18px;
}

.article-body p:last-child {
  margin-bottom: 0;
}

.article-body p strong {
  font-weight: 700;
}

.article-body p em {
  font-style: italic;
}

/* ---------- ARTICLE LISTS ---------- */
.article-body ul,
.article-body ol {
  margin: 18px 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.article-body ul li,
.article-body ol li {
  font-family: var(--font);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.45;
  text-transform: none;
  color: var(--text);
  padding-left: 20px;
  position: relative;
}

.article-body ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--warm-muted);
}

.article-body ol {
  counter-reset: article-ol;
}

.article-body ol li {
  counter-increment: article-ol;
}

.article-body ol li::before {
  content: counter(article-ol) ".";
  position: absolute;
  left: 0;
  color: var(--warm-muted);
  font-weight: 500;
  font-size: 14px;
  top: 2px;
}

/* ---------- ARTICLE TABLE ---------- */
.article-table-wrap {
  margin: 24px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  text-transform: none;
}

.article-table thead th {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cream);
  background: var(--text);
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
}

.article-table thead th:first-child { padding-left: 16px; }
.article-table thead th:last-child { padding-right: 16px; }

.article-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  vertical-align: top;
}

.article-table tbody td:first-child {
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  white-space: nowrap;
  padding-left: 16px;
}

.article-table tbody td:last-child {
  color: var(--warm-muted);
  padding-right: 16px;
}

.article-table tbody tr:last-child td {
  border-bottom: none;
}

/* ---------- MID-ARTICLE CTA ---------- */
.article-cta {
  margin: clamp(48px, 6vw, 72px) 0;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.article-cta p {
  font-family: var(--font);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.45;
  text-transform: none;
  color: var(--text);
  margin-bottom: 20px;
}

.article-cta p strong {
  font-weight: 700;
}

.article-cta .btn {
  height: 44px;
  padding: 0 28px;
}

/* ---------- FAQ (same as homepage) ---------- */
.faq-item { border-bottom: 1px solid var(--line); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.05;
  text-transform: uppercase;
}

.faq-item:first-child summary { padding-top: 0; }
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary .plus {
  flex: 0 0 auto;
  font-size: 22px;
  line-height: 1;
  color: var(--warm-muted);
  transition: transform .25s var(--ease-out);
}

.faq-item[open] summary .plus { transform: rotate(45deg); }

.faq-item .answer {
  padding: 0 0 22px;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.45;
  text-transform: none;
  color: var(--warm-muted);
  max-width: 580px;
}

/* ---------- RELATED ARTICLES ---------- */
.related-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.related-list a {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--text);
  transition: color .2s var(--ease-out);
}

.related-list a:hover { color: var(--orange); }

/* ---------- GUIDE INDEX CARDS ---------- */
.guide-list {
  display: flex;
  flex-direction: column;
}

.guide-card {
  display: block;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
  transition: opacity .2s var(--ease-out);
}

.guide-card:first-child {
  border-top: none;
  padding-top: 0;
}

.guide-card:hover {
  opacity: 0.7;
}

.guide-card-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--warm-muted);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.guide-card-title {
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(20px, 2.5vw, 26px);
  line-height: 1;
  text-transform: uppercase;
  color: var(--text);
  margin: 0;
  letter-spacing: 0.02em;
}

.guide-card-desc {
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
  text-transform: none;
  color: var(--warm-muted);
  margin: 10px 0 0;
  max-width: 500px;
}

/* ---------- ARTICLE FOOTER ---------- */
.article-footer {
  padding: clamp(60px, 10vw, 120px) 0 clamp(60px, 10vw, 100px);
}

.article-footer .h2 {
  font-weight: 700;
  font-size: clamp(28px, 5vw, 52px);
  line-height: 0.9;
  letter-spacing: 0.1px;
  text-transform: uppercase;
  text-wrap: balance;
}

.article-footer .btn {
  margin-top: 24px;
  height: 44px;
  padding: 0 28px;
}

/* ---------- SCROLL REVEAL ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.js .reveal.in { opacity: 1; transform: none; }

/* skip + sr-only */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: var(--cream);
  padding: 12px 18px;
  z-index: 100;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 500;
}
.skip:focus { left: 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---------- MUTED TEXT ---------- */
.muted { color: var(--warm-muted); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1000px) {
  .row { grid-template-columns: 140px 1fr; column-gap: 20px; }
  .row > .rail { grid-column: 1; text-align: left; justify-self: start; }
  .row > .content { grid-column: 2; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .row { grid-template-columns: 1fr; column-gap: 0; }
  .row > .rail,
  .row > .content { grid-column: 1; }
  .rail { margin-bottom: 12px; }
  .article-title { font-size: clamp(32px, 10vw, 48px); }
  .article-body h2 { font-size: 20px; }
  .article-body p,
  .article-body ul li,
  .article-body ol li { font-size: 16px; }
  .faq-item summary { font-size: 16px; }
  .related-list a { font-size: 16px; }
  .article-table { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* db-popup-styles */
/* ============================================================
   REQUEST POPUP — side panel
   ============================================================ */



/* ---------- OVERLAY ---------- */
.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  pointer-events: none;
  visibility: hidden;
}

.popup-overlay.is-open {
  pointer-events: auto;
  visibility: visible;
}

/* ---------- BACKDROP ---------- */
.popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 16, 8, 0.45);
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
}

.popup-overlay.is-open .popup-backdrop {
  opacity: 1;
}

/* ---------- PANEL ---------- */
.popup-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 440px;
  max-width: 100vw;
  background: var(--cream);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  transform: translateX(100%);
  opacity: 0;
  transition: transform 0.55s var(--ease-out), opacity 0.45s var(--ease-out);
}

.popup-overlay.is-open .popup-panel {
  transform: translateX(0);
  opacity: 1;
}

/* ---------- CLOSE BUTTON ---------- */
.popup-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--warm-muted);
  font-size: 18px;
  font-family: var(--font);
  font-weight: 400;
  line-height: 1;
  transition: color 0.2s var(--ease-out);
}

.popup-close:hover {
  color: var(--text);
}

/* ---------- FORM WRAPPER ---------- */
.popup-form-wrap {
  display: flex;
  flex-direction: column;
  padding: 48px 40px 40px;
  flex: 1;
  min-height: 0;
}

/* ---------- HEADER ---------- */
.popup-header {
  margin-bottom: 36px;
}

.popup-eyebrow {
  display: block;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--warm-muted);
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.popup-title {
  font-family: var(--font);
  font-size: 32px;
  font-weight: 700;
  line-height: 0.88;
  text-transform: uppercase;
  color: var(--text);
  margin: 0;
  letter-spacing: 0.02em;
}

.popup-subtitle {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--warm-muted);
  margin: 14px 0 0;
  line-height: 1.3;
}

/* ---------- FORM ---------- */
.popup-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.popup-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.popup-label {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--warm-muted);
}

.popup-input {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--text);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  padding: 10px 0;
  outline: none;
  width: 100%;
  line-height: 1.2;
  border-radius: 0;
  transition: border-color 0.25s var(--ease-out);
}

.popup-input::placeholder {
  color: var(--warm-muted);
  opacity: 0.6;
}

.popup-input:focus {
  border-bottom-color: var(--text);
}

/* Select */
.popup-select-wrap {
  position: relative;
}

.popup-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 28px;
}

.popup-select-arrow {
  position: absolute;
  right: 0;
  bottom: 14px;
  pointer-events: none;
  color: var(--warm-muted);
}

/* Textarea */
.popup-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.35;
}

/* ---------- SUBMIT BUTTON ---------- */
.popup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  height: 44px;
  padding: 0 24px;
  background: var(--text);
  color: var(--cream);
  border: none;
  border-radius: 0;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  letter-spacing: 0.02em;
  width: 100%;
  margin-top: 8px;
  transition: opacity 0.2s var(--ease-out);
}

.popup-btn:hover {
  opacity: 0.85;
}

/* ---------- FOOTER ---------- */
.popup-footer {
  margin-top: auto;
  padding-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.popup-footer-label {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--warm-muted);
}

.popup-footer-link {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}

.popup-footer-link:hover {
  color: var(--orange);
}

/* ---------- SUCCESS STATE ---------- */
.popup-success {
  display: none;
  flex: 1;
  padding: 48px 40px 40px;
}

.popup-success-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  height: 100%;
  gap: 20px;
}

.popup-success .popup-title {
  font-size: 36px;
}

.popup-success .popup-btn {
  margin-top: 12px;
  width: auto;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 500px) {
  .popup-panel {
    width: 100vw;
    border-left: none;
  }

  .popup-form-wrap {
    padding: 40px 24px 32px;
  }

  .popup-success {
    padding: 40px 24px 32px;
  }
}
