/*
 * Horizon Grid: components
 * Needs tokens.css first. Every class starts with "hg-" so it can sit next to any other CSS.
 */

/* Base */
.hg { margin: 0; background: var(--hg-night); color: var(--hg-text); font-family: var(--hg-sans); font-size: var(--hg-text-body); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip; }
.hg *, .hg *::before, .hg *::after { box-sizing: border-box; }
.hg a { color: var(--hg-violet); }
.hg-container { width: min(100% - 40px, var(--hg-container)); margin-inline: auto; }
.hg-narrow { width: min(100% - 40px, var(--hg-narrow)); margin-inline: auto; }
.hg-center { text-align: center; }
.hg-center .hg-lead { margin-inline: auto; }

/* Sections */
.hg-section { padding-block: var(--hg-section); }
.hg-section--deep { background: var(--hg-deep); border-block: var(--hg-border); }
.hg-rule { height: 1px; border: 0; margin: 0; background: var(--hg-line); }
.hg-horizon-line { height: 1px; border: 0; margin: 0; background: var(--hg-horizon); box-shadow: var(--hg-glow-mint); }

/* Type: thin display headlines, never bold; mono capitals for labels and buttons */
.hg-hero-title, .hg-h2, .hg-h3 { margin: 0; font-family: var(--hg-display); font-weight: 300; color: var(--hg-text); }
.hg-hero-title { font-size: var(--hg-text-hero); letter-spacing: var(--hg-tracking-hero); line-height: 1.02; font-weight: 200; }
.hg-h2 { font-size: var(--hg-text-h2); letter-spacing: -.025em; line-height: 1.08; }
.hg-h3 { font-size: var(--hg-text-h3); letter-spacing: -.01em; line-height: 1.25; font-weight: 400; }
.hg-glow-text { background: linear-gradient(90deg, var(--hg-violet), var(--hg-magenta) 50%, var(--hg-mint)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hg-lead { max-width: 620px; margin: 20px 0 0; color: var(--hg-muted); font-size: var(--hg-text-lead); line-height: 1.55; }
.hg-label { display: inline-block; font-family: var(--hg-mono); font-size: var(--hg-text-micro); letter-spacing: var(--hg-tracking-mono); text-transform: uppercase; color: var(--hg-mint); }
.hg-label--muted { color: var(--hg-dim); }
.hg-mono { font-family: var(--hg-mono); font-size: var(--hg-text-small); }

/* Announcement strip: a full-width violet bar above the nav */
.hg-announce { display: block; padding: 8px 20px; background: var(--hg-violet-dark); color: #fff; font-size: var(--hg-text-small); text-align: center; text-decoration: none; }
.hg .hg-announce { color: #fff; }
.hg-announce u { text-underline-offset: 3px; }

/* Nav */
.hg-nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 18px; }
.hg-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--hg-text); font-family: var(--hg-display); font-size: 20px; font-weight: 400; letter-spacing: -.02em; text-decoration: none; }
.hg .hg-logo { color: var(--hg-text); }
.hg-nav__links { display: flex; gap: 28px; font-size: 15px; }
.hg .hg-nav__links a { color: var(--hg-muted); text-decoration: none; }
.hg .hg-nav__links a:hover { color: var(--hg-text); }
.hg-nav__actions { display: flex; gap: 10px; }
@media (max-width: 860px) { .hg-nav__links { display: none; } }
@media (max-width: 480px) { .hg-nav__actions .hg-btn--outline { display: none; } }

/* Buttons: square, mono capitals. Violet for the one main action */
.hg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 22px; border: 1px solid transparent; border-radius: var(--hg-radius); font-family: var(--hg-mono); font-size: 13px; letter-spacing: var(--hg-tracking-mono); text-transform: uppercase; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .2s var(--hg-ease), box-shadow .2s var(--hg-ease), color .2s var(--hg-ease); }
.hg .hg-btn--primary, .hg-btn--primary { background: var(--hg-violet); color: var(--hg-night); }
.hg-btn--primary:hover { background: #B39BFF; box-shadow: var(--hg-glow); }
.hg .hg-btn--outline, .hg-btn--outline { background: transparent; border-color: var(--hg-text); color: var(--hg-text); }
.hg-btn--outline:hover { background: var(--hg-text); color: var(--hg-night); }
.hg .hg-btn--ghost, .hg-btn--ghost { background: transparent; color: var(--hg-text); padding-inline: 8px; }
.hg-btn--ghost:hover { color: var(--hg-mint); }
.hg-btn--sm { padding: 9px 14px; font-size: 12px; }
.hg-btn--block { width: 100%; }
.hg-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hg-center .hg-actions { justify-content: center; }

/* Hero: aurora sky over a perspective floor grid. The signature move */
.hg-hero { position: relative; overflow: hidden; padding: clamp(64px, 9vw, 120px) 0 clamp(220px, 24vw, 320px); text-align: center; isolation: isolate; }
.hg-hero__inner { width: min(100% - 40px, 1000px); margin-inline: auto; }
.hg-hero__sky { position: absolute; inset: 0; z-index: -2; background: var(--hg-sky); }
.hg-hero__floor { position: absolute; left: -50%; right: -50%; bottom: -10px; height: clamp(170px, 20vw, 250px); z-index: -1; transform: perspective(360px) rotateX(62deg); transform-origin: 50% 0; background-image: linear-gradient(rgba(156, 124, 255, .55) 1px, transparent 1px), linear-gradient(90deg, rgba(156, 124, 255, .55) 1px, transparent 1px); background-size: 64px 64px; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 40%); mask-image: linear-gradient(to bottom, transparent, #000 40%); }
.hg-hero__horizon { position: absolute; left: 0; right: 0; bottom: clamp(160px, 19.3vw, 240px); height: 1px; z-index: -1; background: var(--hg-horizon); box-shadow: 0 0 40px 6px rgba(108, 239, 194, .35); }
.hg-hero .hg-lead { margin-inline: auto; }
.hg-hero--short { padding-bottom: clamp(200px, 22vw, 290px); }

/* Pill tag above a hero */
.hg-tag { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px; padding: 6px 12px; border: 1px solid var(--hg-line-bright); background: rgba(19, 17, 31, .7); color: var(--hg-muted); font-size: var(--hg-text-small); }
.hg-tag b { padding: 2px 8px; background: var(--hg-mint); color: var(--hg-night); font-family: var(--hg-mono); font-size: 11px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; }

/* Marquee strip of names */
.hg-marquee { overflow-x: clip; border-block: var(--hg-border); padding-block: 22px; }
.hg-marquee__track { display: flex; gap: 64px; width: max-content; animation: hg-slide 40s linear infinite; font-family: var(--hg-display); font-size: 22px; font-weight: 300; color: var(--hg-dim); white-space: nowrap; }
@keyframes hg-slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .hg-marquee__track { animation: none; } }

/* Grid helpers */
.hg-grid { display: grid; gap: var(--hg-gap); }
.hg-grid--3 { grid-template-columns: repeat(3, 1fr); }
.hg-grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .hg-grid--3, .hg-grid--2 { grid-template-columns: 1fr; } }
.hg-split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 860px) { .hg-split { grid-template-columns: 1fr; } }

/* Cards: outlined boxes with a corner tick */
.hg-card { position: relative; padding: 28px; border: var(--hg-border); background: var(--hg-deep); }
.hg-card::before { content: ""; position: absolute; top: -1px; left: -1px; width: 14px; height: 14px; border-top: 1px solid var(--hg-mint); border-left: 1px solid var(--hg-mint); }
.hg-card p { margin: 12px 0 0; color: var(--hg-muted); }
.hg-card__icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 22px; border: 1px solid var(--hg-line-bright); color: var(--hg-violet); }

/* Console: a dark run panel that plays a sequence of steps */
.hg-console { border: var(--hg-border); background: var(--hg-deep); font-family: var(--hg-mono); font-size: 13px; }
.hg-console__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: var(--hg-border); color: var(--hg-dim); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.hg-console__body { padding: 8px 0; }
.hg-step { display: grid; grid-template-columns: 64px 18px 1fr auto; gap: 10px; align-items: center; padding: 10px 16px; color: var(--hg-muted); }
.hg-step__time { color: var(--hg-dim); }
.hg-step__dot { width: 10px; height: 10px; border: 1px solid var(--hg-dim); }
.hg-step__state { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--hg-dim); }
.hg-step--done .hg-step__dot { background: var(--hg-mint); border-color: var(--hg-mint); }
.hg-step--done .hg-step__state { color: var(--hg-mint); }
.hg-step--live { background: var(--hg-raised); color: var(--hg-text); }
.hg-step--live .hg-step__dot { border-color: var(--hg-violet); background: var(--hg-violet); box-shadow: var(--hg-glow); }
.hg-step--live .hg-step__state { color: var(--hg-violet); }
.hg-step--warn .hg-step__state { color: var(--hg-amber); }
@media (max-width: 480px) { .hg-step { grid-template-columns: 48px 14px 1fr; } .hg-step__state { grid-column: 3; } }

/* Stats */
.hg-stats { display: grid; grid-template-columns: repeat(4, 1fr); border: var(--hg-border); }
.hg-stat { padding: 28px 24px; border-right: var(--hg-border); }
.hg-stat:last-child { border-right: 0; }
.hg-stat strong { display: block; font-family: var(--hg-display); font-size: 44px; font-weight: 200; letter-spacing: -.03em; line-height: 1; }
.hg-stat span { display: block; margin-top: 10px; color: var(--hg-muted); font-size: var(--hg-text-small); }
@media (max-width: 860px) { .hg-stats { grid-template-columns: 1fr 1fr; } .hg-stat:nth-child(2) { border-right: 0; } .hg-stat:nth-child(-n+2) { border-bottom: var(--hg-border); } }

/* Badges */
.hg-badge { display: inline-block; padding: 3px 8px; border: 1px solid currentColor; font-family: var(--hg-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--hg-muted); }
.hg-badge--mint { color: var(--hg-mint); }
.hg-badge--violet { color: var(--hg-violet); }
.hg-badge--amber { color: var(--hg-amber); }

/* Quote */
.hg-quote { margin: 0; font-family: var(--hg-display); font-size: clamp(24px, 3vw, 36px); font-weight: 300; line-height: 1.3; letter-spacing: -.015em; }
.hg-quote cite { display: block; margin-top: 24px; font-family: var(--hg-mono); font-size: 12px; font-style: normal; letter-spacing: var(--hg-tracking-mono); text-transform: uppercase; color: var(--hg-dim); }

/* Segmented toggle */
.hg-segment { display: inline-flex; border: var(--hg-border); }
.hg-segment button { padding: 10px 18px; border: 0; background: transparent; color: var(--hg-muted); font-family: var(--hg-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.hg-segment button[aria-pressed="true"] { background: var(--hg-text); color: var(--hg-night); }

/* Pricing */
.hg-plans { display: grid; grid-template-columns: repeat(3, 1fr); border: var(--hg-border); }
.hg-plan { display: flex; flex-direction: column; padding: 32px 28px; border-right: var(--hg-border); background: var(--hg-night); }
.hg-plan:last-child { border-right: 0; }
.hg-plan--featured { position: relative; background: var(--hg-deep); box-shadow: inset 0 1px 0 var(--hg-mint); }
.hg-plan__name { font-family: var(--hg-mono); font-size: 12px; letter-spacing: var(--hg-tracking-mono); text-transform: uppercase; color: var(--hg-muted); }
.hg-plan__price { margin: 18px 0 6px; font-family: var(--hg-display); font-size: 52px; font-weight: 200; letter-spacing: -.04em; line-height: 1; }
.hg-plan__price small { font-family: var(--hg-sans); font-size: 15px; letter-spacing: 0; color: var(--hg-muted); }
.hg-plan__note { margin: 0 0 24px; color: var(--hg-muted); font-size: var(--hg-text-small); }
.hg-plan ul { flex: 1; margin: 0 0 28px; padding: 0; list-style: none; }
.hg-plan li { position: relative; padding: 9px 0 9px 22px; border-top: var(--hg-border); font-size: 15px; }
.hg-plan li::before { content: ""; position: absolute; left: 0; top: 17px; width: 8px; height: 8px; background: var(--hg-violet); }
@media (max-width: 860px) { .hg-plans { grid-template-columns: 1fr; } .hg-plan { border-right: 0; border-bottom: var(--hg-border); } .hg-plan:last-child { border-bottom: 0; } }

/* Table */
.hg-table-wrap { overflow-x: auto; border: var(--hg-border); }
.hg-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.hg-table th, .hg-table td { padding: 14px 18px; border-bottom: var(--hg-border); text-align: left; }
.hg-table th { font-family: var(--hg-mono); font-size: 12px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; color: var(--hg-dim); }
.hg-table td:not(:first-child) { color: var(--hg-muted); }
.hg-table tr:last-child td { border-bottom: 0; }

/* FAQ */
.hg-faq details { border-bottom: var(--hg-border); padding: 20px 0; }
.hg-faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; font-family: var(--hg-display); font-size: 19px; font-weight: 300; }
.hg-faq summary::after { content: "+"; font-family: var(--hg-mono); color: var(--hg-violet); }
.hg-faq details[open] summary::after { content: "-"; }
.hg-faq p { margin: 12px 0 0; color: var(--hg-muted); }

/* Article */
.hg-article { font-size: 18px; line-height: 1.75; color: #D7D5E6; }
.hg-article h2 { margin: 56px 0 16px; font-family: var(--hg-display); font-size: 30px; font-weight: 300; letter-spacing: -.02em; line-height: 1.2; color: var(--hg-text); }
.hg-article p { margin: 0 0 22px; }
.hg-article blockquote { margin: 40px 0; padding: 4px 0 4px 24px; border-left: 1px solid var(--hg-mint); font-family: var(--hg-display); font-size: 24px; font-weight: 300; line-height: 1.4; color: var(--hg-text); }
.hg-article code { padding: 2px 6px; background: var(--hg-raised); font-family: var(--hg-mono); font-size: 14px; color: var(--hg-mint); }
.hg-article ul { padding-left: 20px; margin: 0 0 22px; }
.hg-article li { margin-bottom: 8px; }
.hg-figure { margin: 40px 0; border: var(--hg-border); background: var(--hg-deep); }
.hg-figure figcaption { padding: 12px 16px; border-top: var(--hg-border); font-family: var(--hg-mono); font-size: 12px; color: var(--hg-dim); }
.hg-byline { display: flex; align-items: center; gap: 14px; margin-top: 32px; color: var(--hg-muted); font-size: var(--hg-text-small); }
.hg-avatar { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--hg-line-bright); background: var(--hg-raised); font-family: var(--hg-mono); font-size: 13px; color: var(--hg-violet); }

/* Forms */
.hg-form { display: grid; gap: 18px; }
.hg-field { display: grid; gap: 8px; }
.hg-field label { font-family: var(--hg-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--hg-muted); }
.hg-input, .hg-select { width: 100%; padding: 13px 14px; border: var(--hg-border); border-radius: var(--hg-radius); background: var(--hg-night); color: var(--hg-text); font-family: var(--hg-sans); font-size: 16px; }
.hg-input::placeholder { color: var(--hg-dim); }
.hg-input:focus, .hg-select:focus { outline: 0; border-color: var(--hg-violet); box-shadow: var(--hg-glow); }
.hg-hint { color: var(--hg-dim); font-size: 13px; }
.hg-check { display: flex; gap: 10px; align-items: flex-start; color: var(--hg-muted); font-size: 14px; }
.hg-check input { margin-top: 4px; accent-color: var(--hg-violet); }
.hg-panel { padding: clamp(24px, 4vw, 40px); border: var(--hg-border); background: var(--hg-deep); }

/* Footer */
.hg-footer { padding: 64px 0 40px; border-top: var(--hg-border); color: var(--hg-muted); font-size: var(--hg-text-small); }
.hg-footer__grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; }
.hg-footer h4 { margin: 0 0 14px; font-family: var(--hg-mono); font-size: 12px; font-weight: 400; letter-spacing: var(--hg-tracking-mono); text-transform: uppercase; color: var(--hg-dim); }
.hg-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.hg .hg-footer a { color: var(--hg-muted); text-decoration: none; }
.hg .hg-footer a:hover { color: var(--hg-text); }
.hg-footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: var(--hg-border); font-family: var(--hg-mono); font-size: 12px; color: var(--hg-dim); }
@media (max-width: 860px) { .hg-footer__grid { grid-template-columns: 1fr 1fr; } }
.hg-label + .hg-h2 { margin-top: 16px; }
.hg-hero .hg-actions { justify-content: center; }
