/**
 * @file
 * Component styles for the DSV homepage (/home).
 *
 * These rely on the shared design tokens defined in css/style.css (:root).
 */

/* Homepage markup doesn't inherit a border-box reset from the base theme. */
.hp-hero, .hp-hero *,
.hp-card, .hp-card *,
.hp-pathway, .hp-pathway *,
.hp-legal, .hp-legal *,
.hp-final-cta, .hp-final-cta * {
  box-sizing: border-box;
}

.hp-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Hero ---- */

.hp-hero {
  background: linear-gradient(to bottom, var(--dsv-navy), var(--dsv-navy-dark));
  color: #fff;
  padding: 56px 0 88px;
}
.hp-hero__inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}
.hp-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 20px;
}
.hp-hero p.hp-lead {
  color: #cbd5e1;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}
.hp-hero__actions {
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.hp-hero__actions .button {
  margin: 0 !important;
}
.hp-hero__actions .button.outline {
  color: #e2e8f0 !important;
  border-color: rgba(226, 232, 240, .4) !important;
}
.hp-hero__actions .button.outline:hover {
  background: rgba(255, 255, 255, .1) !important;
}

.hp-hero__highlights {
  padding-top: 32px;
  margin-top: 32px;
  border-top: 1px solid rgba(148, 163, 184, .35);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  font-size: 0.85rem;
  color: #cbd5e1;
  text-align: center;
}
.hp-hero__highlights strong {
  display: block;
  color: #fff;
  font-size: 1rem;
  margin-bottom: 2px;
}

/* ---- Governance card ---- */

.hp-card {
  max-width: 1280px;
  margin: -32px auto 32px;
  padding: 0 24px;
  position: relative;
  z-index: 10;
}
.hp-card__inner {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}
.hp-card__header {
  background: var(--text);
  color: #fff;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.hp-card__header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hp-card__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, .2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, .4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hp-card__icon svg {
  width: 20px;
  height: 20px;
}
.hp-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin: 0;
}
.hp-card__subtitle {
  font-size: 0.8rem;
  color: #cbd5e1;
  margin: 0;
}
.hp-card__badge {
  font-size: 0.8rem;
  background: rgba(217, 45, 32, .15);
  border: 1px solid rgba(217, 45, 32, .4);
  color: #fca5a5;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.hp-card__body {
  padding: 20px 24px 32px;
}
.hp-card__body h3 {
  color: var(--dsv-navy);
  font-size: clamp(1.25rem, 2vw, 1.4rem);
  margin: 0 0 8px;
}
.hp-card__body > p {
  font-size: 1rem;
  color: var(--dsv-dark-grey);
  line-height: 1.6;
}

/* ---- Authorized / Unauthorized columns ---- */

.hp-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-top: 8px;
}
.hp-column {
  border-radius: var(--radius);
  padding: 20px;
  border-width: 2px;
  border-style: solid;
}
.hp-column--ok {
  border-color: rgba(16, 185, 129, .3);
  background: rgba(16, 185, 129, .05);
}
.hp-column--bad {
  border-color: var(--dsv-red);
  background: var(--dsv-red-bg);
}
.hp-column__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.hp-column__badge {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hp-column--ok .hp-column__badge {
  background: #059669;
}
.hp-column--bad .hp-column__badge {
  background: var(--dsv-red);
}
.hp-column__title h4 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin: 0;
}
.hp-column--ok .hp-column__title h4 {
  color: #064e3b;
}
.hp-column--bad .hp-column__title h4 {
  color: #7f1d1d;
}
.hp-column ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
  line-height: 1.6;
}
.hp-column li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}
.hp-column li::before {
  content: "•";
  font-weight: 700;
  flex-shrink: 0;
}
.hp-column li span {
  flex: 1 1 auto;
  min-width: 0;
}
.hp-column--ok li::before {
  color: #059669;
}
.hp-column--bad li {
  color: #7f1d1d;
}
.hp-column--bad li::before {
  color: var(--dsv-red);
}

/* ---- Alert ---- */

.hp-alert {
  margin-top: 24px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  line-height: 1.6;
}
.hp-alert--danger {
  background: rgba(217, 45, 32, .1);
  border-left: 4px solid var(--dsv-red);
  color: #7f1d1d;
}
.hp-alert svg {
  width: 20px;
  height: 20px;
  color: var(--dsv-red);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ---- Pathway / decision flow ---- */

.hp-pathway {
  padding: 64px 0;
}
.hp-pathway__intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}
.hp-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--dsv-accent-blue);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.hp-pathway__intro h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 4px 0 8px;
}
.hp-pathway__intro p {
  color: var(--dsv-dark-grey);
  font-size: 0.95rem;
}

.hp-tabs {
  display: flex;
  justify-content: center;
  margin-top: 24px;
  border-bottom: 1px solid var(--border);
}
.hp-tabs .hp-tab {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 3px solid transparent !important;
  box-shadow: none !important;
  color: var(--dsv-dark-grey) !important;
  padding: 12px 24px !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  border-radius: 0 !important;
  margin: 0 !important;
}
.hp-tabs .hp-tab:hover {
  color: var(--dsv-navy) !important;
  box-shadow: none !important;
  background: transparent !important;
}
.hp-tabs .hp-tab.is-active {
  border-bottom-color: var(--dsv-accent-blue) !important;
  color: var(--dsv-navy) !important;
  font-weight: 700 !important;
}

.hp-flow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.hp-flow-grid[hidden] {
  display: none;
}
.hp-flow-step {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hp-flow-step__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dsv-navy);
  margin: 4px 0 4px;
}
.hp-flow-step__question {
  font-size: 0.9rem;
  color: var(--dsv-dark-grey);
  margin: 0 0 16px;
}
.hp-flow-branches {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hp-branch {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--dsv-slate);
}
.hp-branch--danger {
  border-color: rgba(217, 45, 32, .3);
  background: var(--dsv-red-bg);
}
.hp-branch--info {
  border-color: rgba(0, 128, 200, .25);
  background: rgba(0, 128, 200, .06);
}
.hp-branch--ok {
  border-color: rgba(16, 185, 129, .3);
  background: rgba(16, 185, 129, .06);
}
.hp-branch__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--dsv-dark-grey);
  display: block;
}
.hp-branch--danger .hp-branch__label {
  color: #b91c1c;
}
.hp-branch--info .hp-branch__label {
  color: var(--dsv-accent-blue);
}
.hp-branch--ok .hp-branch__label {
  color: #047857;
}
.hp-branch__value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dsv-navy);
  margin: 2px 0 0;
}
.hp-branch--danger .hp-branch__value {
  color: #7f1d1d;
}
.hp-branch__footer {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}
.hp-branch--danger .hp-branch__footer {
  border-top-color: rgba(217, 45, 32, .2);
  display: block;
}
.hp-branch__footer--link {
  color: var(--dsv-accent-blue);
}
.hp-branch__stop {
  width: 100%;
  background: var(--dsv-red);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.hp-flow-step__footnote {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 16px 0 0;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.hp-flow-step__signoff {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dsv-navy);
}
.hp-pill {
  background: #ede9fe;
  color: #5b21b6;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

/* ---- Legal accordion ---- */

.hp-legal {
  background: #fff;
  padding: 32px 0 96px;
  border-top: 1px solid var(--border);
}
.hp-legal__intro {
  text-align: center;
  margin-bottom: 32px;
}
.hp-legal__intro h3 {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
}
.hp-legal__intro p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 4px;
}
.hp-legal__list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.hp-legal__list details {
  background: var(--dsv-slate);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 16px 20px;
  margin: 0;
}
.hp-legal__list summary {
  font-weight: 600;
  color: var(--dsv-navy);
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
}
.hp-legal__list summary::-webkit-details-marker {
  display: none;
}
.hp-legal__list summary .hp-chevron {
  color: var(--dsv-accent-blue);
  transition: transform 0.15s ease-in-out;
  margin-left: 8px;
}
.hp-legal__list details[open] summary .hp-chevron {
  transform: rotate(180deg);
}
.hp-legal__list .hp-legal__answer {
  font-size: 0.95rem;
  color: var(--dsv-dark-grey);
  line-height: 1.6;
  margin-top: 12px;
}
.hp-legal__answer p + p {
  margin-top: 8px;
}

/* ---- CTA ---- */

.hp-final-cta {
  background: var(--dsv-navy);
  color: #fff;
  padding: 64px 0;
  border-top: 1px solid var(--dsv-navy-dark);
}
.hp-final-cta__inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}
.hp-final-cta h3 {
  color: #fff;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  margin: 0 0 12px;
}
.hp-final-cta p {
  color: #cbd5e1;
  font-size: 1.05rem;
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.6;
}
.hp-final-cta__action {
  padding-top: 20px;
}
.hp-final-cta__note {
  padding-top: 12px;
  font-size: 0.8rem;
  color: #94a3b8;
}

/* ---- Responsive ---- */

@media (max-width: 900px) {
  .hp-columns {
    grid-template-columns: 1fr;
  }
  .hp-flow-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hp-hero__highlights {
    grid-template-columns: 1fr;
  }
  .hp-hero__actions .button {
    width: 100%;
  }
  .hp-card__header {
    flex-direction: column;
    align-items: flex-start;
  }
}
