/* Compiler home (/compiler). Built on the .lx tokens from listing-ui.css and the logo orbit from company-ui.css. */
.cp-hero { padding: clamp(28px, 5vw, 64px) 0 clamp(24px, 4vw, 48px); }
.cp-hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.cp-hero .lx-lead { max-width: 46ch; }

/* logo with tech badges riding the rings */
.cp-orbit { position: relative; justify-self: center; width: min(100%, 440px); aspect-ratio: 1; display: grid; place-items: center; }
.cp-orbit .ab-mark { position: absolute; inset: 0; width: 100%; }
.cp-chip { position: absolute; z-index: 2; display: grid; place-items: center; width: clamp(44px, 9vw, 58px); aspect-ratio: 1; border: 1px solid var(--lx-line); border-radius: 16px; background: var(--lx-card); box-shadow: var(--lx-shadow); transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s; }
.cp-chip img { width: 56%; height: auto; }
.cp-chip:hover { transform: translateY(-4px) scale(1.06); box-shadow: var(--lx-shadow-hover); }
.cp-chip:nth-of-type(1) { top: 4%; left: 44%; }
.cp-chip:nth-of-type(2) { top: 22%; right: 3%; }
.cp-chip:nth-of-type(3) { bottom: 22%; right: 0; }
.cp-chip:nth-of-type(4) { bottom: 3%; left: 44%; }
.cp-chip:nth-of-type(5) { bottom: 22%; left: 2%; }
.cp-chip:nth-of-type(6) { top: 22%; left: 0; }

/* languages, in two groups */
.cp-langs { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 20px; }
.cp-group { padding: clamp(18px, 2.4vw, 28px); border: 1px solid var(--lx-line); border-radius: var(--lx-r); background: var(--lx-card); box-shadow: var(--lx-shadow); }
.cp-group h3 { margin: 0 0 4px; font-size: 1.125rem; font-weight: 800; color: var(--lx-ink); }
.cp-group > p { margin: 0 0 18px; font-size: .9rem; color: var(--lx-muted); }
.cp-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cp-group--web .cp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cp-group--web .cp-tile:last-child { grid-column: 1 / -1; }
.cp-tile { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; border: 1px solid var(--lx-line); border-radius: 14px; background: var(--lx-surface); color: var(--lx-ink) !important; font-size: .9375rem; font-weight: 700; transition: transform .25s cubic-bezier(.2, .7, .2, 1), border-color .25s, box-shadow .25s; }
.cp-tile img { flex: none; width: 32px; height: 32px; object-fit: contain; }
.cp-tile small { display: block; font-size: .75rem; font-weight: 500; color: var(--lx-muted); }
.cp-tile:hover { transform: translateY(-3px); border-color: rgba(var(--lx-glow), .55); box-shadow: var(--lx-shadow-hover); }
.cp-tile:active { transform: translateY(0) scale(.98); }

/* what is inside the editor */
.cp-bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.cp-cell { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 24px; border: 1px solid var(--lx-line); border-radius: var(--lx-r); background: var(--lx-card); box-shadow: var(--lx-shadow); }
.cp-cell h3 { margin: 0; font-size: 1.0625rem; font-weight: 800; color: var(--lx-ink); }
.cp-cell p { margin: 0; font-size: .9rem; line-height: 1.6; }
.cp-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--lx-soft); color: var(--lx-a); font-size: 1.15rem; }
.cp-cell--shot { grid-column: span 2; grid-row: span 2; padding: 0; background: linear-gradient(160deg, rgba(var(--lx-glow), .16), transparent 60%), var(--lx-card); }
.cp-cell--shot .cp-cell__txt { display: grid; gap: 10px; padding: 24px 24px 0; }
.cp-cell--shot img { margin: auto 24px 0; width: calc(100% - 48px); height: auto; border: 1px solid var(--lx-line); border-radius: 14px 14px 0 0; box-shadow: 0 -8px 40px -20px rgba(var(--lx-glow), .6); }
.cp-cell--grad { color: #fff; border-color: transparent; background: linear-gradient(135deg, #0e7490, #2563eb); }
.cp-cell--grad h3, .cp-cell--grad p { color: #fff; }
.cp-cell--grad .cp-ic { background: rgba(255, 255, 255, .18); color: #fff; }
.cp-cell--dark { border-color: transparent; background: #0b1424; }
.cp-cell--dark h3 { color: #eef7ff; }
.cp-cell--dark p { color: #b4c6d9; }
.cp-cell--dark .cp-ic { background: rgba(34, 211, 238, .12); color: #22d3ee; }
.cp-cell--tint { background: var(--lx-surface); }
.cp-cell--phone { grid-column: 3; grid-row: span 2; padding-bottom: 0; }
.cp-cell--phone img { align-self: center; width: min(100%, 250px); height: auto; flex: 1 1 0; min-height: 280px; margin-top: auto; border: 1px solid var(--lx-line); border-bottom: 0; border-radius: 18px 18px 0 0; object-fit: cover; object-position: top; box-shadow: 0 -10px 30px -18px rgba(var(--lx-glow), .6); }

/* starter code, by language */
.cp-try { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.cp-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.cp-tab { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--lx-line); border-radius: 12px; background: var(--lx-card); color: var(--lx-ink); font: inherit; font-size: .875rem; font-weight: 700; cursor: pointer; transition: border-color .2s, background-color .2s, transform .2s; }
.cp-tab img { width: 18px; height: 18px; object-fit: contain; }
.cp-tab:hover { border-color: rgba(var(--lx-glow), .5); }
.cp-tab[aria-selected="true"] { border-color: transparent; background: linear-gradient(135deg, #0e7490, #2563eb); color: #fff; }
.cp-code { overflow: hidden; border: 1px solid rgba(110, 190, 230, .18); border-radius: var(--lx-r); background: #0b1424; box-shadow: 0 30px 60px -34px rgba(8, 145, 178, .55); }
.cp-code__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid rgba(110, 190, 230, .14); color: #8aa0b8; font-size: .8125rem; font-weight: 600; }
.cp-code__bar a { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border-radius: 10px; background: linear-gradient(135deg, #06b6d4, #3b82f6); color: #04121f !important; font-weight: 800; }
.cp-code pre { margin: 0; padding: 20px; overflow-x: auto; color: #d6e6f5; font: 500 .875rem/1.7 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 2; }
.cp-code pre:focus-visible { outline: 2px solid #22d3ee; outline-offset: -2px; }

/* questions */
.cp-faq { display: grid; gap: 12px; max-width: 820px; }
.cp-faq details { border: 1px solid var(--lx-line); border-radius: 14px; background: var(--lx-card); }
.cp-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; color: var(--lx-ink); font-weight: 700; cursor: pointer; list-style: none; }
.cp-faq summary::-webkit-details-marker { display: none; }
.cp-faq summary::after { content: "\F4FE"; font-family: "bootstrap-icons"; color: var(--lx-a); transition: transform .3s; }
.cp-faq details[open] summary::after { transform: rotate(45deg); }
.cp-faq details p { margin: 0; padding: 0 20px 18px; line-height: 1.7; }

.cp-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: clamp(24px, 4vw, 40px); border-radius: 24px; background: linear-gradient(135deg, #0e7490, #2563eb); color: #fff; }
.cp-end h2 { margin: 0; max-width: 24ch; font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 800; letter-spacing: -.02em; color: #fff; }
.cp-end .ab-cta { --edge: rgba(6, 40, 90, .4); background: #fff; color: #0b3a5a !important; box-shadow: 0 4px 0 var(--edge), 0 18px 28px -14px rgba(6, 40, 90, .6); }
.cp-end .ab-cta .ab-cta__ic { background: rgba(8, 145, 178, .14); color: #0e7490; box-shadow: none; }

@media (max-width: 991.98px) {
    .cp-hero__grid, .cp-try, .cp-langs { grid-template-columns: minmax(0, 1fr); }
    .cp-orbit { width: min(86%, 380px); }
    .cp-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cp-cell--shot { grid-column: 1 / -1; grid-row: auto; }
    .cp-cell--phone { grid-column: auto; grid-row: auto; }
    .cp-cell--phone img { flex: none; height: 300px; }
}
@media (max-width: 575.98px) {
    .cp-bento { grid-template-columns: minmax(0, 1fr); }
    .cp-cell--shot img { display: none; }
    .cp-cell--shot { padding-bottom: 24px; }
    .cp-tiles, .cp-group--web .cp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cp-group--web .cp-tile:last-child { grid-column: auto; }
    .cp-tab { flex: 1 1 auto; justify-content: center; }
    .cp-end .ab-cta { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: no-preference) {
    .cp-chip { animation: cp-float 7s ease-in-out infinite; }
    .cp-chip:nth-of-type(even) { animation-delay: -3.5s; }
}
@keyframes cp-float { 50% { translate: 0 -8px; } }
@media (prefers-reduced-motion: reduce) { .cp-tile, .cp-chip, .cp-tab { transition: none; } }
