/* Homepage main content and conversion sections */

.hp-dark { background: var(--am-navy-900); color: var(--am-text-on-dark); }
.hp-dark .hp-intro h2, .hp-dark h3 { color: #fff; }
.hp-dark .hp-intro p, .hp-dark .hp-closing { color: var(--am-text-on-dark-muted); }

.hp-panel { background: var(--am-surface); border: 1px solid var(--am-border); border-radius: var(--am-radius-panel); padding: clamp(1.25rem, 1rem + 1vw, 2rem); min-width: 0; }
.hp-panel h3 { font-size: 1.25rem; line-height: 1.3; margin-bottom: 1.25rem; }

/* Where revenue disappears */
.hp-leaks { display: grid; gap: 1.25rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hp-leak h3 { font-size: 1.0625rem; }
.hp-leak__icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; background: #e8f0fe; color: var(--am-blue); margin-bottom: 1rem; }

/* Financial impact */
.hp-impact { display: grid; gap: 1.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }

.hp-calc__field { margin-bottom: 1.25rem; }
.hp-calc__field label { display: block; font-weight: 600; margin-bottom: 0.5rem; }
.hp-calc__money { display: flex; align-items: center; border: 1px solid var(--am-border); border-radius: var(--am-radius-btn); padding-left: 0.875rem; background: #fff; }
.hp-calc__money:focus-within { border-color: var(--am-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2); }
.hp-calc__money span { color: var(--am-text-muted); font-weight: 600; }
.hp-calc__money input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0.75rem 0.875rem 0.75rem 0.375rem; font-size: 1.0625rem; background: transparent; }
.hp-calc__money input[aria-invalid="true"] { color: #b91c1c; }
.hp-calc__error { color: #b91c1c; font-size: 0.875rem; margin: 0.375rem 0 0; }
.hp-calc input[type="range"] { width: 100%; accent-color: var(--am-blue); min-height: 32px; }
.hp-calc__scale { display: flex; justify-content: space-between; font-size: 0.8125rem; color: var(--am-text-muted); }
.hp-calc output { color: var(--am-blue); font-weight: 700; }

.hp-calc__results { margin-top: 0.5rem; }
.hp-calc__annual { background: var(--am-navy-800); color: #fff; border-radius: var(--am-radius-card); padding: 1.25rem; margin-bottom: 0.75rem; }
.hp-calc__annual span { display: block; color: var(--am-text-on-dark-muted); font-size: 0.875rem; }
.hp-calc__annual strong { display: block; font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); line-height: 1.15; overflow-wrap: anywhere; }
.hp-calc__sub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.hp-calc__sub > div { border: 1px solid var(--am-border); border-radius: var(--am-radius-card); padding: 0.875rem 1rem; background: var(--am-surface-alt); }
.hp-calc__sub span { display: block; font-size: 0.8125rem; color: var(--am-text-muted); }
.hp-calc__sub strong { font-size: 1.25rem; overflow-wrap: anywhere; }
.hp-calc__disclaimer { font-size: 0.8125rem; color: var(--am-text-muted); line-height: 1.55; margin: 1rem 0 1.25rem; }
.hp-calc__cta { width: 100%; white-space: normal; }

.hp-profit__list { margin: 0 0 1.5rem; }
.hp-profit__list > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.625rem 0; border-bottom: 1px solid var(--am-border); }
.hp-profit__list dt { font-weight: 500; color: var(--am-text-muted); }
.hp-profit__list dd { margin: 0; font-weight: 700; white-space: nowrap; }
.hp-profit__highlight dt, .hp-profit__highlight dd { color: var(--am-positive); }
.hp-profit__row { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) 5.5rem; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; font-size: 0.875rem; }
.hp-profit__label { font-weight: 600; }
.hp-profit__val { text-align: right; font-weight: 700; }
.hp-profit__track { display: flex; height: 18px; background: var(--am-surface-alt); border-radius: 6px; overflow: hidden; }
.hp-profit__base { background: var(--am-navy-700); }
.hp-profit__add { background: var(--am-positive); }
.hp-profit__legend { list-style: none; padding: 0; margin: 0.75rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-size: 0.8125rem; color: var(--am-text-muted); }
.hp-profit__swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 0.375rem; vertical-align: -1px; }
.hp-profit__note { font-size: 0.8125rem; color: var(--am-text-muted); margin: 1.25rem 0 0; line-height: 1.55; }

/* Accounting comparison */
.hp-compare { display: grid; gap: 1.25rem; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 960px; margin: 0 auto; }
.hp-compare__panel { border: 1px solid var(--am-border-on-dark); border-radius: var(--am-radius-panel); padding: 1.5rem; background: rgba(255, 255, 255, 0.03); }
.hp-compare__panel h3 { font-size: 1.125rem; margin-bottom: 1rem; }
.hp-compare__panel ul { margin: 0; padding-left: 1.25rem; color: var(--am-text-on-dark-muted); line-height: 1.8; }
.hp-compare__panel--amithos { border-color: var(--am-sky); background: rgba(56, 189, 248, 0.08); }
.hp-compare__panel--amithos ul { color: #fff; }

/* Offers */
.hp-offers { display: grid; gap: 1.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.hp-offer { display: flex; flex-direction: column; background: var(--am-surface); border: 1px solid var(--am-border); border-radius: var(--am-radius-panel); padding: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem); min-width: 0; }
.hp-offer--featured { border: 2px solid var(--am-blue); box-shadow: 0 18px 40px -24px rgba(16, 36, 59, 0.45); }
.hp-offer__label { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; font-weight: 700; color: var(--am-blue); margin-bottom: 0.5rem; }
.hp-offer h3 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.hp-offer__price { font-size: 1.125rem; font-weight: 700; color: var(--am-text); margin-bottom: 1rem; }
.hp-offer__list { padding-left: 1.25rem; line-height: 1.7; color: var(--am-text-muted); margin-bottom: 1.25rem; }
.hp-offer__support { font-weight: 600; margin-top: auto; margin-bottom: 1.25rem; }
.hp-offer .btn { white-space: normal; align-self: flex-start; }

/* Process diagram */
.hp-diagram { display: grid; grid-template-columns: minmax(0, 1.1fr) 48px minmax(0, 1fr) 48px minmax(0, 1.1fr); align-items: center; gap: 0.5rem; }
.hp-diagram__inputs, .hp-diagram__outputs { display: grid; gap: 1rem; }
.hp-diagram__box { background: var(--am-surface); border: 1px solid var(--am-border); border-radius: var(--am-radius-card); padding: 1.125rem 1.25rem; }
.hp-diagram__box h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.hp-diagram__box ul { margin: 0; padding-left: 1.125rem; font-size: 0.9375rem; color: var(--am-text-muted); line-height: 1.6; }
.hp-diagram__box p { margin: 0; font-size: 0.9375rem; color: var(--am-text-muted); }
.hp-diagram__box--ok { border-left: 4px solid var(--am-positive); }
.hp-diagram__box--warn { border-left: 4px solid var(--am-warning); }
.hp-diagram__engine { background: var(--am-navy-800); color: #fff; border-radius: var(--am-radius-panel); padding: 1.5rem; text-align: center; }
.hp-diagram__engine h3 { color: #fff; font-size: 1.125rem; margin-bottom: 0.75rem; }
.hp-diagram__engine p { color: var(--am-text-on-dark-muted); font-size: 0.9375rem; margin: 0.25rem 0 0; }
.hp-diagram__arrow { position: relative; height: 2px; background: var(--am-blue); }
.hp-diagram__arrow::after { content: ""; position: absolute; right: -2px; top: 50%; width: 10px; height: 10px; border-top: 2px solid var(--am-blue); border-right: 2px solid var(--am-blue); transform: translateY(-50%) rotate(45deg); }

.hp-urgency { max-width: 760px; margin: 3rem auto 0; text-align: center; background: var(--am-surface); border: 1px solid var(--am-border); border-radius: var(--am-radius-panel); padding: clamp(1.5rem, 1.1rem + 1.5vw, 2.5rem); }
.hp-urgency h3 { font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.75rem); margin-bottom: 1rem; }
.hp-urgency p { color: var(--am-text-muted); line-height: 1.65; }
.hp-urgency .btn { margin-top: 0.75rem; white-space: normal; }

@media (max-width: 1100px) {
    .hp-leaks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
    .hp-impact, .hp-offers, .hp-compare { grid-template-columns: minmax(0, 1fr); }
    .hp-diagram { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .hp-diagram__inputs, .hp-diagram__outputs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hp-diagram__arrow { width: 2px; height: 40px; margin: 0.5rem auto; }
    .hp-diagram__arrow::after { right: auto; left: 50%; top: auto; bottom: -2px; transform: translateX(-50%) rotate(135deg); }
}

@media (max-width: 600px) {
    .hp-leaks, .hp-diagram__inputs, .hp-diagram__outputs { grid-template-columns: minmax(0, 1fr); }
    .hp-offer .btn { align-self: stretch; }
    .hp-profit__row { grid-template-columns: 3rem minmax(0, 1fr) 4.75rem; gap: 0.5rem; }
    .hp-profit__list > div { flex-direction: column; gap: 0.125rem; }
}
