/*
 * Half Lit: components
 * Built only from tokens.css. Load tokens.css first.
 */

/* Base */
*, *::before, *::after { box-sizing: border-box; }
.hl { margin: 0; background: var(--hl-black); color: var(--hl-white); font-family: var(--hl-sans); font-size: var(--hl-text-body); font-weight: var(--hl-weight-regular); line-height: 1.6; letter-spacing: var(--hl-tracking-body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
:where(.hl) a { color: inherit; text-decoration: none; }
:where(.hl) img, :where(.hl) svg { display: block; max-width: 100%; }
.hl ::selection { background: var(--hl-white); color: var(--hl-black); }
.hl-container { width: 100%; max-width: var(--hl-container); margin: 0 auto; padding: 0 clamp(var(--hl-gutter), 5.5vw, 80px); }
.hl-narrow { width: 100%; max-width: var(--hl-narrow); margin: 0 auto; padding: 0 var(--hl-gutter); }
.hl-section { padding: var(--hl-section) 0; }
.hl-section--flush { padding-top: 0; }
.hl-rule { height: 1px; border: 0; margin: 0; background: var(--hl-line); }

/* Type: the two-tone headline. Wrap the second clause in .hl-quiet */
.hl-display, .hl-h1, .hl-h2 { margin: 0; font-weight: var(--hl-weight-regular); letter-spacing: var(--hl-tracking-display); line-height: var(--hl-leading-display); color: var(--hl-white); text-wrap: balance; }
.hl-display { font-size: var(--hl-text-display); }
.hl-h1 { font-size: var(--hl-text-h1); }
.hl-h2 { font-size: var(--hl-text-h2); line-height: 1.12; letter-spacing: -.028em; }
.hl-quiet { color: var(--hl-grey); }
.hl-break { display: block; }
.hl-h3 { margin: 0; font-size: var(--hl-text-h3); font-weight: var(--hl-weight-medium); line-height: 1.35; letter-spacing: -.015em; }
.hl-lead { margin: 0; max-width: 520px; color: var(--hl-grey); font-size: var(--hl-text-lead); line-height: 1.55; }
.hl-muted { color: var(--hl-grey); }
.hl-label { display: block; color: var(--hl-grey); font-size: 15px; }
.hl-mono { font-family: var(--hl-mono); font-size: var(--hl-text-micro); letter-spacing: 0; color: var(--hl-dim); text-transform: uppercase; }

/* Buttons: white pill first, dark pill second, then plain text */
.hl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 22px 0 24px; border-radius: var(--hl-radius-pill); border: 1px solid var(--hl-white); background: var(--hl-white); color: var(--hl-black); font: var(--hl-weight-medium) 15px/1 var(--hl-sans); letter-spacing: -.01em; white-space: nowrap; cursor: pointer; transition: background var(--hl-fast) var(--hl-ease), color var(--hl-fast) var(--hl-ease), border-color var(--hl-fast) var(--hl-ease); }
.hl-btn:hover { background: var(--hl-grey); border-color: var(--hl-grey); }
.hl-btn:focus-visible { outline: none; box-shadow: var(--hl-focus); }
.hl-btn svg { width: 12px; height: 12px; transition: transform var(--hl-fast) var(--hl-ease); }
.hl-btn:hover svg { transform: translateX(2px); }
.hl-btn--dark { background: var(--hl-raise); border-color: var(--hl-line-bright); color: var(--hl-white); }
.hl-btn--dark:hover { background: var(--hl-line); border-color: var(--hl-grey); }
.hl-btn--text { background: transparent; border-color: transparent; color: var(--hl-white); padding: 0 8px; }
.hl-btn--text:hover { background: transparent; border-color: transparent; color: var(--hl-grey); }
.hl-btn--sm { height: 40px; padding: 0 16px 0 18px; font-size: 14px; }
.hl-btn--block { width: 100%; }
.hl-link { color: var(--hl-white); border-bottom: 1px solid var(--hl-line-bright); transition: border-color var(--hl-fast) var(--hl-ease); }
.hl-link:hover { border-color: var(--hl-white); }

/* Nav */
.hl-nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 80px; }
.hl-wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; font-weight: var(--hl-weight-regular); letter-spacing: -.03em; color: var(--hl-white); }
.hl-wordmark svg { width: 22px; height: 22px; }
.hl-nav__links { display: flex; gap: 32px; margin: 0; padding: 0; list-style: none; font-size: 16px; color: var(--hl-grey); }
.hl-nav__links a:hover, .hl-nav__links [aria-current] { color: var(--hl-white); }
.hl-nav__end { display: flex; align-items: center; gap: 12px; }
@media (max-width: 900px) { .hl-nav__links { display: none; } }
@media (max-width: 440px) { .hl-nav__end .hl-btn--text { display: none; } }

/* Hero */
.hl-hero { padding: clamp(32px, 5vw, 64px) 0 clamp(48px, 6vw, 72px); }
.hl-hero__body { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(28px, 4vw, 52px); }
.hl-hero__body--center { align-items: center; text-align: center; }
.hl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* Panels: dark, square-ish tiles that sit side by side like product shots */
.hl-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .9fr); gap: var(--hl-gap); align-items: start; }
.hl-stage__aside { align-self: center; display: flex; flex-direction: column; justify-content: center; gap: 40px; padding: 24px 0 24px clamp(0px, 2vw, 24px); }
.hl-stage__aside .hl-h2 { font-size: clamp(24px, 2.3vw, 32px); line-height: 1.18; }
.hl-stage > .hl-panel { width: 100%; }
@media (max-width: 980px) { .hl-stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .hl-stage__aside { grid-column: 1 / -1; padding: 8px 0 0; } }
@media (max-width: 600px) { .hl-stage { grid-template-columns: minmax(0, 1fr); } }
.hl-panel { position: relative; overflow: hidden; min-height: 320px; border-radius: var(--hl-radius-panel); background: var(--hl-sheen); box-shadow: var(--hl-shadow-panel); isolation: isolate; }
.hl-panel::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--hl-spot); pointer-events: none; }
.hl-panel--tall { aspect-ratio: 4 / 5; min-height: 0; }
.hl-panel--wide { aspect-ratio: 16 / 9; min-height: 0; }
.hl-panel__caption { position: absolute; left: 20px; bottom: 18px; font-family: var(--hl-mono); font-size: 11px; color: var(--hl-dim); text-transform: uppercase; }
.hl-panel__art { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 12%; }
.hl-panel__art svg { width: 100%; height: 100%; overflow: visible; }

/* A small app window that sits inside a panel */
.hl-window { position: absolute; left: 12%; top: 14%; right: 6%; bottom: -8%; border: 1px solid var(--hl-line-bright); border-radius: 14px 0 0 0; background: var(--hl-panel); padding: 20px; font-size: 13px; color: var(--hl-grey); transform: rotate(-4deg); transform-origin: top left; }
.hl-window__title { margin: 0 0 14px; color: var(--hl-white); font-size: 15px; }
.hl-window__row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--hl-line); white-space: nowrap; min-width: 0; }
.hl-window__row span, .hl-window__row b { overflow: hidden; text-overflow: ellipsis; }
.hl-window__row b { color: var(--hl-white); font-weight: var(--hl-weight-regular); }

/* Labelled list: grey label, white items, no bullets */
.hl-list { margin: 0; padding: 0; list-style: none; }
.hl-list li { padding: 3px 0; color: var(--hl-white); font-size: 16px; }
.hl-list--lined li { padding: 14px 0; border-bottom: 1px solid var(--hl-line); display: flex; gap: 14px; align-items: baseline; }
.hl-list--lined li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--hl-thread); transform: translateY(-2px); }

/* Feature rows */
.hl-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--hl-gap); }
@media (max-width: 900px) { .hl-features { grid-template-columns: 1fr; } }
.hl-feature { display: flex; flex-direction: column; gap: 10px; padding-top: 20px; border-top: 1px solid var(--hl-line-bright); }
.hl-feature p { margin: 0; color: var(--hl-grey); }
.hl-feature__num { font-family: var(--hl-mono); font-size: 12px; color: var(--hl-dim); }

/* Split section: heading left, body right */
.hl-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 860px) { .hl-split { grid-template-columns: minmax(0, 1fr); } }

/* Stats */
.hl-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--hl-gap); }
@media (max-width: 700px) { .hl-stats { grid-template-columns: 1fr; } }
.hl-stat { padding: 28px 0; border-top: 1px solid var(--hl-line); }
.hl-stat__value { display: block; font-size: clamp(40px, 5vw, 64px); font-weight: var(--hl-weight-light); letter-spacing: -.04em; line-height: 1; }
.hl-stat__label { display: block; margin-top: 10px; color: var(--hl-grey); }

/* Badges */
.hl-badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 12px; border-radius: var(--hl-radius-pill); border: 1px solid var(--hl-line-bright); font-size: 13px; color: var(--hl-grey); white-space: nowrap; }
.hl-badge--thread { border-color: rgba(201, 164, 124, .4); color: var(--hl-thread); }
.hl-badge--ok { border-color: rgba(169, 216, 184, .35); color: var(--hl-ok); }
.hl-badge--white { background: var(--hl-white); border-color: var(--hl-white); color: var(--hl-black); }

/* Quote */
.hl-quote { margin: 0; font-size: var(--hl-text-h2); font-weight: var(--hl-weight-regular); letter-spacing: -.028em; line-height: 1.15; }
.hl-quote footer { margin-top: 24px; font-size: 15px; letter-spacing: -.01em; color: var(--hl-grey); }

/* Forms */
.hl-form { display: flex; flex-direction: column; gap: 18px; }
.hl-field { display: flex; flex-direction: column; gap: 8px; }
.hl-field label { font-size: 14px; color: var(--hl-grey); }
.hl-input, .hl-select { width: 100%; height: 48px; padding: 0 16px; border-radius: var(--hl-radius); border: 1px solid var(--hl-line-bright); background: var(--hl-panel); color: var(--hl-white); font: inherit; font-size: 15px; transition: border-color var(--hl-fast) var(--hl-ease), box-shadow var(--hl-fast) var(--hl-ease); }
.hl-input::placeholder { color: var(--hl-dim); }
.hl-input:focus, .hl-select:focus { outline: none; border-color: var(--hl-thread); box-shadow: var(--hl-focus); }
.hl-select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--hl-grey) 50%), linear-gradient(135deg, var(--hl-grey) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.hl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .hl-row { grid-template-columns: 1fr; } }
.hl-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--hl-grey); }
.hl-check input { margin: 3px 0 0; accent-color: var(--hl-white); }
.hl-segment { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hl-segment label { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: var(--hl-radius); border: 1px solid var(--hl-line-bright); cursor: pointer; font-size: 14px; color: var(--hl-white); }
.hl-segment label span { font-size: 12px; color: var(--hl-grey); }
.hl-segment input { position: absolute; opacity: 0; pointer-events: none; }
.hl-segment input:checked + label { border-color: var(--hl-white); background: var(--hl-raise); }
@media (max-width: 520px) { .hl-segment { grid-template-columns: 1fr; } }
.hl-note { font-size: 13px; color: var(--hl-dim); }

/* Pricing */
.hl-toggle { display: inline-flex; padding: 4px; border-radius: var(--hl-radius-pill); border: 1px solid var(--hl-line-bright); background: var(--hl-panel); }
.hl-toggle button { height: 36px; padding: 0 18px; border: 0; border-radius: var(--hl-radius-pill); background: transparent; color: var(--hl-grey); font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
.hl-toggle button[aria-pressed="true"] { background: var(--hl-white); color: var(--hl-black); }
.hl-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--hl-gap); }
@media (max-width: 960px) { .hl-plans { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; } }
.hl-plan { display: flex; flex-direction: column; gap: 24px; padding: 32px; border-radius: var(--hl-radius-panel); background: var(--hl-panel); border: 1px solid var(--hl-line); }
.hl-plan--featured { background: var(--hl-sheen); border-color: var(--hl-line-bright); box-shadow: var(--hl-shadow-panel); }
.hl-plan__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hl-price { display: flex; align-items: baseline; gap: 8px; }
.hl-price__amount { font-size: 52px; font-weight: var(--hl-weight-light); letter-spacing: -.045em; line-height: 1; }
.hl-price__per { color: var(--hl-grey); font-size: 15px; }
.hl-plan .hl-list { flex: 1; }
.hl-plan .hl-list li { padding: 8px 0; border-top: 1px solid var(--hl-line); color: var(--hl-grey); }
.hl-plan .hl-list li b { color: var(--hl-white); font-weight: var(--hl-weight-regular); }
.hl-table-wrap { overflow-x: auto; }
.hl-table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; }
.hl-table th, .hl-table td { padding: 16px 12px; text-align: left; border-bottom: 1px solid var(--hl-line); }
.hl-table th { font-weight: var(--hl-weight-regular); color: var(--hl-grey); }
.hl-table td:first-child { color: var(--hl-grey); }
.hl-faq details { border-bottom: 1px solid var(--hl-line); }
.hl-faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 22px 0; cursor: pointer; list-style: none; font-size: 18px; letter-spacing: -.015em; }
.hl-faq summary::-webkit-details-marker { display: none; }
.hl-faq summary::after { content: "+"; color: var(--hl-grey); }
.hl-faq details[open] summary::after { content: "\2212"; }
.hl-faq p { margin: 0 0 22px; max-width: 620px; color: var(--hl-grey); }

/* Article */
.hl-article__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--hl-grey); font-size: 14px; }
.hl-prose { color: var(--hl-grey); font-size: 18px; line-height: 1.7; }
.hl-prose > * { margin: 0; }
.hl-prose > * + * { margin-top: 1.2em; }
.hl-prose strong { color: var(--hl-white); font-weight: var(--hl-weight-medium); }
.hl-prose > h2 { margin-top: 2em; color: var(--hl-white); font-size: 28px; font-weight: var(--hl-weight-regular); letter-spacing: -.025em; line-height: 1.2; }
.hl-prose ul, .hl-prose ol { padding-left: 1.2em; }
.hl-prose li + li { margin-top: .5em; }
.hl-prose li::marker { color: var(--hl-thread); }
.hl-prose > blockquote { margin: 2em 0; padding-left: 24px; border-left: 1px solid var(--hl-thread); color: var(--hl-white); font-size: 24px; line-height: 1.4; letter-spacing: -.02em; }
.hl-prose code { font-family: var(--hl-mono); font-size: .85em; color: var(--hl-white); }
.hl-figure { margin: 2em 0 0; }
.hl-figure figcaption { margin-top: 12px; font-size: 14px; color: var(--hl-dim); }
.hl-author { display: flex; align-items: center; gap: 14px; }
.hl-avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(160deg, var(--hl-line-bright), var(--hl-raise)); display: grid; place-items: center; font-size: 15px; color: var(--hl-white); }

/* Cards */
.hl-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--hl-gap); }
@media (max-width: 900px) { .hl-cards { grid-template-columns: 1fr; } }
.hl-card { display: flex; flex-direction: column; gap: 14px; }
.hl-card p { margin: 0; color: var(--hl-grey); }
.hl-card .hl-panel { min-height: 0; aspect-ratio: 4 / 3; }

/* CTA band */
.hl-cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(40px, 6vw, 80px); border-top: 1px solid var(--hl-line); }

/* Footer */
.hl-footer { padding: 64px 0 48px; border-top: 1px solid var(--hl-line); font-size: 15px; }
.hl-footer__grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; }
@media (max-width: 760px) { .hl-footer__grid { grid-template-columns: 1fr 1fr; } .hl-footer__grid > :first-child { grid-column: 1 / -1; } }
.hl-footer h4 { margin: 0 0 14px; font-size: 15px; font-weight: var(--hl-weight-regular); color: var(--hl-grey); }
.hl-footer ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.hl-footer a:hover { color: var(--hl-grey); }
.hl-footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; color: var(--hl-dim); font-size: 13px; }

/* Motion */
.hl-rise { animation: hl-rise var(--hl-slow) var(--hl-ease) both; }
.hl-rise--2 { animation-delay: 120ms; }
.hl-rise--3 { animation-delay: 240ms; }
@keyframes hl-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hl-rise { animation: none; } }
