/* ============================================
   get.bd hosting pages: the hand-written parts.
   Layout is Tailwind; this file holds what Tailwind cannot express (the race,
   the route map, flip cards, meters) and loads only on hosting pages.
   Everything respects prefers-reduced-motion and works in both themes.
   ============================================ */

.hz {
    --hz-green: #006A4E;
    --hz-green-2: #10b981;
    --hz-red: #F42A41;
    --hz-amber: #f59e0b;
    --hz-card: #ffffff;
    --hz-soft: #f4f4f5;
    --hz-line: #e4e4e7;
    --hz-text: #18181b;
    --hz-muted: #52525b;
    --hz-track: #e4e4e7;
}

.dark .hz {
    --hz-green-2: #34d399;
    --hz-card: #0f172a;
    --hz-soft: rgba(255, 255, 255, 0.04);
    --hz-line: rgba(255, 255, 255, 0.1);
    --hz-text: #ffffff;
    --hz-muted: #a1a1aa;
    --hz-track: rgba(255, 255, 255, 0.1);
}

.hz section[id] { scroll-margin-top: 5rem; }

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

.hz-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(60rem 26rem at 85% -10%, rgba(0, 106, 78, 0.12), transparent 70%),
        radial-gradient(40rem 20rem at 0% 110%, rgba(244, 42, 65, 0.05), transparent 70%);
}

.dark .hz-hero {
    background:
        radial-gradient(60rem 26rem at 85% -10%, rgba(0, 106, 78, 0.28), transparent 70%),
        radial-gradient(40rem 20rem at 0% 110%, rgba(244, 42, 65, 0.07), transparent 70%);
}

.hz-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--hz-card);
    border: 1px solid var(--hz-line);
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-size: 0.8125rem;
    color: var(--hz-muted);
}

.hz-chip b {
    color: var(--hz-text);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.hz-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--hz-green-2);
    position: relative;
    flex: none;
}

.hz-dot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.6);
    animation: hz-pulse 1.8s infinite;
}

@keyframes hz-pulse {
    70%, 100% { transform: scale(2.75); opacity: 0; }
}

/* Family switcher */
.hz-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
}

.hz-tabs::-webkit-scrollbar { display: none; }

.hz-tab {
    flex: none;
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--hz-line);
    background: var(--hz-card);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--hz-muted);
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.hz-tab:hover { border-color: var(--hz-green); color: var(--hz-text); }

.hz-tab[aria-current="page"] {
    background: var(--hz-green);
    border-color: var(--hz-green);
    color: #fff;
}

.hz-tab small { font-size: 0.72rem; font-weight: 500; opacity: 0.92; }

/* The server rack ------------------------------------------------------ */

.hz-rack {
    background: #0b1220;
    border-radius: 1.25rem;
    padding: 0.9rem;
    box-shadow: 0 30px 60px -30px rgba(0, 106, 78, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hz-unit {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(180deg, #172033, #111a2b);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0.55rem;
    padding: 0.6rem 0.7rem;
    margin-bottom: 0.5rem;
    color: #e2e8f0;
    font-size: 0.75rem;
    font-weight: 600;
}

.hz-unit:last-child { margin-bottom: 0; }
.hz-unit > span:nth-of-type(2) { flex: 1; min-width: 0; }

.hz-unit--on {
    border-color: rgba(52, 211, 153, 0.55);
    box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.2), 0 0 24px -8px rgba(52, 211, 153, 0.6);
}

.hz-leds { display: inline-flex; gap: 0.3rem; flex: none; }

.hz-led {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: #34d399;
    animation: hz-blink 1.3s steps(2, end) infinite;
}

.hz-led:nth-child(2) { animation-duration: 0.9s; animation-delay: 0.2s; }
.hz-led:nth-child(3) { background: #F42A41; animation-duration: 2.1s; animation-delay: 0.5s; }

@keyframes hz-blink { 50% { opacity: 0.25; } }

.hz-rack-foot {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.7rem;
    font-size: 0.6875rem;
    color: #94a3b8;
}

/* Fact tiles ----------------------------------------------------------- */

.hz-fact a { color: var(--hz-green); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.dark .hz-fact a { color: var(--hz-green-2); }

/* Finder --------------------------------------------------------------- */

.hz-type {
    position: relative;
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.75rem 0.85rem;
    border-radius: 0.9rem;
    border: 1.5px solid var(--hz-line);
    background: var(--hz-card);
    transition: border-color 0.2s, transform 0.2s, background 0.2s;
}

.hz-type:hover { transform: translateY(-2px); border-color: var(--hz-green-2); }

.hz-type[aria-pressed="true"] {
    border-color: var(--hz-green);
    background: rgba(0, 106, 78, 0.06);
    box-shadow: 0 0 0 1px var(--hz-green) inset;
}

.dark .hz-type[aria-pressed="true"] { background: rgba(52, 211, 153, 0.08); border-color: var(--hz-green-2); box-shadow: 0 0 0 1px var(--hz-green-2) inset; }

.hz-type b { display: block; font-size: 0.875rem; color: var(--hz-text); font-weight: 700; }
.hz-type small { display: block; margin-top: 0.1rem; font-size: 0.72rem; line-height: 1.35; color: var(--hz-muted); }

.hz-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 0.5rem;
    border-radius: 999px;
    outline-offset: 4px;
    background: linear-gradient(to right, var(--hz-green) var(--p, 0%), var(--hz-track) var(--p, 0%));
    cursor: pointer;
}

.hz-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--hz-green);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s;
}

.hz-range::-webkit-slider-thumb:hover { transform: scale(1.12); }

.hz-range::-moz-range-thumb {
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--hz-green);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.hz-pop { animation: hz-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }

@keyframes hz-pop {
    0% { transform: scale(0.97); }
    55% { transform: scale(1.015); }
    100% { transform: scale(1); }
}

/* Usage meters */
.hz-meter {
    display: block;
    height: 0.3rem;
    border-radius: 999px;
    background: var(--hz-track);
    overflow: hidden;
}

html.no-alpine #compare [x-cloak] { display: block !important; }

.hz-meter i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: var(--hz-green-2);
}

/* Only once the finder is running: otherwise every load replays them from zero. */
.hz-ready .hz-meter i {
    transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s;
}

.hz-meter[data-level="tight"] i { background: var(--hz-amber); }
.hz-meter[data-level="over"] i { background: var(--hz-red); }

/* Plan cards ----------------------------------------------------------- */

.hz-plan {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--hz-card);
    border: 1px solid var(--hz-line);
    border-radius: 1.25rem;
    padding: 1.35rem;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s, opacity 0.3s;
}

.hz-plan:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -22px rgba(0, 106, 78, 0.45); }

.hz-plan--best {
    border-color: var(--hz-green);
    box-shadow: 0 0 0 2px var(--hz-green), 0 22px 44px -24px rgba(0, 106, 78, 0.6);
}

.dark .hz-plan--best { border-color: var(--hz-green-2); box-shadow: 0 0 0 2px var(--hz-green-2), 0 22px 44px -24px rgba(52, 211, 153, 0.45); }

.hz-plan--small { border-style: dashed; box-shadow: none; }

.hz-badge {
    position: absolute;
    top: -0.7rem;
    left: 1.1rem;
    max-width: calc(100% - 2.2rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    color: #fff;
    background: var(--hz-green);
}

.hz-badge--value { background: #52525b; }

.hz-fit {
    display: inline-block;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
}

.hz-fit--yes { color: #047857; background: rgba(16, 185, 129, 0.14); }
.hz-fit--tight { color: #b45309; background: rgba(245, 158, 11, 0.16); }
.hz-fit--no { color: #be1a2e; background: rgba(244, 42, 65, 0.1); }
.dark .hz-fit--yes { color: #34d399; }
.dark .hz-fit--tight { color: #fbbf24; }
.dark .hz-fit--no { color: #fca5a5; }

/* The race ------------------------------------------------------------- */

.hz-race {
    background: #0b1220;
    color: #e2e8f0;
    border-radius: 1.5rem;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 40px 80px -50px rgba(0, 106, 78, 0.8);
}

.hz-lane {
    display: grid;
    grid-template-columns: 6.25rem 1fr 4.5rem;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0;
}

.hz-lane-name { font-size: 0.8125rem; font-weight: 700; color: #fff; line-height: 1.2; }
.hz-lane-name small { display: block; font-size: 0.66rem; font-weight: 500; color: #94a3b8; }

.hz-track {
    position: relative;
    height: 1.5rem;
    border-radius: 999px;
    background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 6px, transparent 6px 14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hz-track::after {
    content: '';
    position: absolute;
    right: 0.25rem;
    top: 50%;
    width: 0.55rem;
    height: 0.55rem;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.hz-lane--home .hz-track { border-color: rgba(52, 211, 153, 0.5); }

.hz-packet {
    position: absolute;
    top: 50%;
    left: 0;
    width: 1rem;
    height: 1rem;
    margin-top: -0.5rem;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 0 12px rgba(148, 163, 184, 0.8);
}

.hz-lane--home .hz-packet { background: #34d399; box-shadow: 0 0 16px rgba(52, 211, 153, 1); }
.hz-lane--waiting .hz-packet { animation: hz-pulse-dot 0.8s ease-in-out infinite; }

@keyframes hz-pulse-dot { 50% { transform: scale(0.65); opacity: 0.6; } }

.hz-lane-ms {
    text-align: right;
    font-weight: 800;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
    color: #fff;
    white-space: nowrap;
}

.hz-lane-ms small { font-size: 0.68rem; font-weight: 500; color: #94a3b8; margin-left: 0.15rem; }
.hz-lane--first .hz-lane-ms { color: #34d399; }

.hz-race-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #d91e34;
    color: #fff;
    font-weight: 700;
    font-size: 0.9375rem;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    transition: transform 0.2s, background 0.2s, opacity 0.2s;
}

.hz-race-btn:hover:not(:disabled) { transform: translateY(-2px); background: #d91e34; }
.hz-race-btn:disabled { opacity: 0.6; cursor: wait; }

.hz-wait-bar {
    display: block;
    height: 0.4rem;
    border-radius: 999px;
    background: #64748b;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hz-wait-row--home .hz-wait-bar { background: #34d399; }

.hz-confetti {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 2px;
    pointer-events: none;
    animation: hz-burst 1s cubic-bezier(0.15, 0.7, 0.3, 1) forwards;
}

@keyframes hz-burst {
    from { transform: translate(-50%, -50%) rotate(0); opacity: 1; }
    to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; }
}

/* Route explorer ------------------------------------------------------- */

.hz-toggle {
    display: inline-flex;
    padding: 0.25rem;
    border-radius: 999px;
    background: var(--hz-soft);
    border: 1px solid var(--hz-line);
}

.hz-toggle button {
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--hz-muted);
    transition: background 0.2s, color 0.2s;
}

.hz-toggle button[aria-pressed="true"] { background: var(--hz-green); color: #fff; }

.hz-route-svg { width: 100%; height: auto; display: block; }
.hz-route-svg text { font-size: 13px; font-weight: 600; fill: var(--hz-text); }
.hz-route-svg .hz-node { fill: var(--hz-card); stroke: var(--hz-line); stroke-width: 1.5; }
.hz-route-svg .hz-node--on { stroke: var(--hz-green-2); stroke-width: 2; }
.hz-route-svg .hz-path { fill: none; stroke: var(--hz-track); stroke-width: 3; stroke-dasharray: 2 7; stroke-linecap: round; }
.hz-route-svg .hz-spark { fill: var(--hz-green-2); }
.hz-route-svg .hz-spark--far { fill: var(--hz-red); }

/* Compare table -------------------------------------------------------- */

.hz-cmp {
    width: 100%;
    min-width: 40rem;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.hz-cmp th, .hz-cmp td {
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid var(--hz-line);
    text-align: center;
    color: var(--hz-muted);
    transition: background 0.2s;
}

.hz-cmp tbody th {
    position: sticky;
    left: 0;
    z-index: 1;
    text-align: left;
    font-weight: 600;
    color: var(--hz-text);
    background: var(--hz-card);
}

.hz-cmp thead th:first-child { position: sticky; left: 0; z-index: 2; background: var(--hz-card); }
.hz-cmp thead button { font-weight: 800; color: var(--hz-text); font-size: 0.9375rem; }
.hz-cmp thead button:hover { color: var(--hz-green); }
.dark .hz-cmp thead button:hover { color: var(--hz-green-2); }
.hz-cmp td b { color: var(--hz-text); font-weight: 800; }
.hz-cmp tbody tr:hover td { background: var(--hz-soft); }
.hz-cmp .hz-col-on { background: rgba(16, 185, 129, 0.12) !important; }
.hz-cmp .hz-col-on, .hz-cmp .hz-col-on button { color: var(--hz-text); }

/* Glossary flip cards -------------------------------------------------- */

.hz-flip {
    display: block;
    width: 100%;
    perspective: 900px;
    text-align: left;
    height: 100%;
}

.hz-flip-in {
    position: relative;
    display: grid;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hz-flip[aria-pressed="true"] .hz-flip-in { transform: rotateY(180deg); }

.hz-face {
    grid-area: 1 / 1;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 1rem;
    border: 1px solid var(--hz-line);
    background: var(--hz-card);
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.hz-face b { color: var(--hz-text); font-size: 0.9375rem; font-weight: 800; }
.hz-face-p { display: block; color: var(--hz-muted); font-size: 0.8125rem; line-height: 1.5; }
.hz-face small { margin-top: auto; padding-top: 0.5rem; color: var(--hz-green); font-size: 0.7rem; font-weight: 700; }
.dark .hz-face small { color: var(--hz-green-2); }

.hz-face--back {
    transform: rotateY(180deg);
    background: linear-gradient(145deg, #006A4E, #004a35);
    border-color: transparent;
    justify-content: center;
}

.hz-face--back b { color: #a7f3d0; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; }
.hz-face--back .hz-face-p { color: #fff; font-size: 0.9rem; font-weight: 600; line-height: 1.45; }

/* Long-form sections ---------------------------------------------------- */

/*
 * Text capped at 48rem, which is already about 96 characters a line, so it cannot
 * simply fill the container. Instead it starts on the same left edge as every other
 * section heading, and the rail ends on the same right edge. Below lg it stacks,
 * still capped, so a tablet does not get lines far too long to read. .blog-layout
 * in style.css uses the same numbers, so text columns line up across the site.
 */
.hz-split { max-width: 48rem; }
.hz-rail { margin-bottom: 2.25rem; }

@media (min-width: 1024px) {
    .hz-split {
        max-width: none;
        display: grid;
        grid-template-columns: minmax(0, 48rem) 20rem;
        justify-content: space-between;
        column-gap: 3rem;
        align-items: start;
    }

    .hz-split > .hz-rail {
        order: 2;
        position: sticky;
        top: 5.5rem;
        margin-bottom: 0;
    }
}

/* Contents links jump to these; keep them clear of the fixed header. */
.hz .blog-content h2, .hz .blog-content h3 { scroll-margin-top: 5.5rem; }

.hz .blog-content table { font-size: 0.875rem; }

.hz-help {
    border: 1px solid var(--hz-line);
    background: var(--hz-soft);
    border-radius: 0.9rem;
    padding: 1.1rem 1.25rem;
    margin-top: 2rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--hz-muted);
}

@media (min-width: 1024px) {
    .hz-split > .hz-help { margin-top: 0; }
}

.hz-help a { color: var(--hz-green); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.dark .hz-help a { color: var(--hz-green-2); }

/* FAQ uses the blog's <details> styling. */
.hz .blog-faq__answer a { color: var(--hz-green); text-decoration: underline; }

/* Phones --------------------------------------------------------------- */

@media (max-width: 480px) {
    .hz-lane { grid-template-columns: 4.6rem 1fr 3.6rem; gap: 0.45rem; }
    .hz-lane-name { font-size: 0.72rem; }
    .hz-lane-name small { display: none; }
    .hz-lane-ms { font-size: 0.8125rem; }
    .hz-race { padding: 1rem; }
    .hz-route-svg text { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
    .hz-dot::after, .hz-led, .hz-pop, .hz-lane--waiting .hz-packet { animation: none; }
    .hz-flip-in, .hz-meter i, .hz-wait-bar, .hz-plan { transition: none; }
    .hz-confetti { display: none; }
    .hz-route-svg animateMotion { display: none; }
}

/* The hub's other families are tabs. Without Alpine they all show, one after another. */
html.no-alpine .hz-fam-panel[x-cloak] { display: block !important; }

/* Nothing loops on a phone. See the note in style.css. */
@media (max-width: 1023px), (hover: none) {
    .hz-dot::after,
    .hz-led {
        animation: none;
    }
}

/* These fill in when Alpine arrives and wrap to two lines on a phone. */
@media (max-width: 639px) {
    .hz-two-lines { min-height: 2.5rem; }
}

/* Plan cards sit two by two on a phone, so they lose some padding there, and the
   value badge shrinks to fit a half-width card. Nothing lifts on hover without a mouse. */
@media (max-width: 639px) {
    .hz-plan-grid .hz-plan { padding: 1.1rem 0.85rem 0.9rem; }
    .hz-plan-grid .hz-badge { left: 0.6rem; max-width: calc(100% - 1.2rem); font-size: 0.6rem; }
}
@media (hover: none) {
    .hz-plan:hover { transform: none; box-shadow: none; }
}

/* The line saying who a plan is for keeps two lines' room, so the prices below it
   line up across the cards. */
.hz-plan-grid .hz-for { min-height: 2.75em; } /* two lines at leading-snug */

/* The hub's family tabs: the same buttons as the finder's, tighter, so the prices
   below them stay on the first screen. */
.hz-type--tab { padding: 0.55rem 0.5rem; }
.hz-type--tab small { font-size: 0.7rem; }

/* The first-year code under the plans heading: a dashed "coupon" chip that copies the
   code. It sits inline in the sentence, so it keeps the text's baseline. */
.hz-code {
    display: inline-flex; align-items: center; gap: 0.35rem;
    margin: 0 0.1rem; padding: 0.15rem 0.5rem;
    border: 1px dashed var(--hz-green); border-radius: 0.5rem;
    background: rgba(0, 106, 78, 0.06); color: var(--hz-green);
    vertical-align: baseline; cursor: pointer; transition: background-color 0.15s;
}
.hz-code:hover { background: rgba(0, 106, 78, 0.12); }
.hz-code code { font: 700 0.8125rem/1.25 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.05em; }
.hz-code-done { font-size: 0.7rem; font-weight: 600; }
.dark .hz-code { border-color: var(--hz-green-2); background: rgba(52, 211, 153, 0.08); color: var(--hz-green-2); }
.dark .hz-code:hover { background: rgba(52, 211, 153, 0.16); }
