/* ═══════════════════════════════════════════════════════════
   COMPONENTS — preloader, nav, buttons, cards, tables, footer
   ═══════════════════════════════════════════════════════════ */

/* ═══════ PRELOADER ═══════ */
.preloader {
    position: fixed; inset: 0; z-index: 10000;
    background: var(--bg-primary);
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 32px;
}
.preloader-logo-container { display: flex; align-items: baseline; }
.preloader-a { font-size: 4rem; font-weight: 900; color: var(--accent-teal); line-height: 1; }
.preloader-spark { font-size: 4rem; font-weight: 800; color: var(--text-light); letter-spacing: -2px; position: relative; line-height: 1; }
.preloader-spark .spark-a { position: relative; display: inline-block; }
.preloader-spark .spark-triangle { color: var(--accent-orange); font-size: 1.2rem; position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); }
.preloader-bar { width: 200px; height: 3px; background: var(--bg-tertiary); border-radius: 3px; overflow: hidden; }
.preloader-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent-teal), var(--accent-orange)); border-radius: 3px; }
.preloader-text { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; letter-spacing: 3px; text-transform: uppercase; }

/* ═══════ CURSOR ═══════ */
.cursor-follower {
    position: fixed; width: 320px; height: 320px; border-radius: 50%;
    background: radial-gradient(circle, rgba(58, 189, 176, 0.06) 0%, transparent 70%);
    pointer-events: none; z-index: 1; transform: translate(-50%, -50%); opacity: 0;
}

/* ═══════ NAVBAR ═══════ */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 16px 48px; display: flex; align-items: center; justify-content: space-between;
    backdrop-filter: blur(20px); background: rgba(10, 10, 15, 0.85);
    border-bottom: 1px solid var(--border-subtle); transition: padding 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.navbar.scrolled { padding: 10px 48px; background: rgba(10, 10, 15, 0.95); box-shadow: 0 4px 30px rgba(0,0,0,0.3); }

.nav-brand { display: flex; align-items: center; text-decoration: none; z-index: 1102; position: relative; }
.nav-logo-img { height: 34px; width: auto; }
.nav-brand-fallback { display: flex; align-items: baseline; font-weight: 800; letter-spacing: -0.5px; }
.nav-brand-fallback .fb-a { font-size: 1.4rem; font-weight: 900; color: var(--accent-teal); }
.nav-brand-fallback .fb-sp { font-size: 1.4rem; color: var(--text-light); }
.nav-brand-fallback .fb-x { font-size: 1.4rem; color: var(--accent-orange); }

.nav-links { display: flex; align-items: center; gap: 20px; list-style: none; }
.nav-links a { text-decoration: none; color: var(--text-secondary); font-size: 0.86rem; font-weight: 500; transition: color 0.3s; position: relative; white-space: nowrap; }
.nav-links a::after { content: ''; position: absolute; bottom: -6px; left: 0; width: 0; height: 2px; background: var(--accent-teal); transition: width 0.3s; }
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--text-primary); }

.nav-cta { display: flex; align-items: center; gap: 12px; }

/* ═══════ PRODUCT DROPDOWN (desktop) ═══════ */
.nav-links .has-menu { position: relative; }
.nav-links .nav-menu-trigger { display: inline-flex; align-items: center; gap: 5px; }
.nav-chev { opacity: 0.6; transition: transform 0.25s ease, opacity 0.25s ease; }
.has-menu.is-open .nav-chev { transform: rotate(180deg); opacity: 1; }
.has-menu.is-open > .nav-menu-trigger { color: var(--text-primary); }
.has-menu.is-open > .nav-menu-trigger::after { width: 100%; }

.nav-menu {
    position: absolute; top: calc(100% + 20px); left: -22px;
    width: 520px; max-width: calc(100vw - 48px); padding: 8px;
    /* Fully opaque: even 3% transparency ghosts large headings through the panel. */
    background: linear-gradient(180deg, #16162a 0%, #101020 100%);
    border: 1px solid var(--border-line); border-radius: var(--radius-md);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), var(--shadow-glow);
    opacity: 0; visibility: hidden; transform: translateY(-10px) scale(0.985);
    transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.22s;
}
/* Bridges the gap to the trigger so a diagonal mouse path does not close the menu. */
.nav-menu::before { content: ''; position: absolute; left: 0; right: 0; top: -20px; height: 20px; }
/* Teal hairline along the top edge. */
.nav-menu::after {
    content: ''; position: absolute; top: 0; left: 28px; right: 28px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-teal), transparent); opacity: 0.6;
}
.has-menu.is-open .nav-menu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.nav-menu a::after { content: none; }

/* ═══════ PRODUCT MENU ROWS (shared: dropdown + mobile accordion) ═══════ */
.pm-group + .pm-group { margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--border-line); }
.pm-group-label {
    display: flex; align-items: center; gap: 8px; padding: 10px 14px 6px;
    font-size: 0.68rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase;
    color: var(--text-muted);
}
.pm-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.pm-dot-shipped { background: var(--accent-green); box-shadow: 0 0 8px rgba(0, 184, 148, 0.7); }
.pm-dot-dev { background: var(--accent-amber); box-shadow: 0 0 8px rgba(253, 203, 110, 0.6); }
.pm-dot-planned { background: var(--text-muted); }

.nav-menu .pm-item, .mobile-sub .pm-item {
    display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center;
    gap: 12px; padding: 9px 14px; border-radius: 10px; color: var(--text-secondary);
    transition: background 0.18s ease;
}
.nav-menu .pm-item:hover, .mobile-sub .pm-item:hover { background: rgba(58, 189, 176, 0.08); }
.nav-menu .pm-item[aria-current], .mobile-sub .pm-item[aria-current] { background: rgba(58, 189, 176, 0.12); }
.pm-ic {
    width: 34px; height: 34px; display: grid; place-items: center; font-size: 1.05rem;
    border-radius: 9px; background: var(--teal-dim); border: 1px solid var(--border-subtle);
    transition: border-color 0.18s ease;
}
.pm-item:hover .pm-ic { border-color: var(--border-active); }
.pm-body { display: flex; flex-direction: column; min-width: 0; }
.pm-name { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); line-height: 1.35; }
.pm-role { font-size: 0.76rem; color: var(--text-muted); line-height: 1.4; }
.pm-ver {
    font-size: 0.7rem; font-weight: 600; color: var(--accent-teal-light);
    background: var(--teal-dim); border: 1px solid var(--border-subtle);
    padding: 3px 9px; border-radius: 100px;
}

.nav-menu .nav-menu-foot {
    display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 12px 14px;
    border-top: 1px solid var(--border-line); color: var(--accent-teal-light);
    font-size: 0.8rem; font-weight: 600; transition: gap 0.2s ease;
}
.nav-menu .nav-menu-foot:hover { gap: 12px; color: var(--accent-teal-light); }

/* Groups fade up one after another when the menu opens. */
.nav-menu .pm-group, .nav-menu .nav-menu-foot {
    opacity: 0; transform: translateY(6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.has-menu.is-open .nav-menu .pm-group, .has-menu.is-open .nav-menu .nav-menu-foot { opacity: 1; transform: none; }
.has-menu.is-open .nav-menu .pm-group:nth-child(2) { transition-delay: 0.05s; }
.has-menu.is-open .nav-menu .pm-group:nth-child(3) { transition-delay: 0.1s; }
.has-menu.is-open .nav-menu .nav-menu-foot { transition-delay: 0.14s; }

/* Language switch — two links, the active one is the current page */
.langtoggle { display: flex; border: 1px solid var(--border-line-strong); border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.langtoggle a { color: var(--text-muted); font-size: 0.76rem; font-weight: 700; padding: 7px 12px; transition: 0.15s; line-height: 1.2; }
.langtoggle a:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.langtoggle a.active { background: var(--accent-teal); color: #04121a; }
.langtoggle a.active:hover { background: var(--accent-teal); color: #04121a; }

/* ═══════ BUTTONS ═══════ */
.btn {
    padding: 10px 22px; border-radius: var(--radius-sm); font-size: 0.86rem; font-weight: 600;
    text-decoration: none; cursor: pointer; transition: all 0.3s ease; border: none;
    font-family: var(--font-main); display: inline-flex; align-items: center; gap: 8px;
}
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-subtle); }
.btn-ghost:hover { border-color: var(--accent-teal); color: var(--text-primary); background: rgba(58, 189, 176, 0.05); }
.btn-primary { background: linear-gradient(135deg, var(--accent-teal), #2ea89c); color: white; box-shadow: 0 4px 20px rgba(58, 189, 176, 0.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(58, 189, 176, 0.45); }
.btn-lg { padding: 15px 32px; font-size: 1rem; border-radius: var(--radius-md); }
.btn-outline-teal { background: transparent; color: var(--accent-teal-light); border: 2px solid var(--accent-teal); }
.btn-outline-teal:hover { background: var(--accent-teal); color: white; }

/* ═══════ HAMBURGER ═══════ */
.mobile-toggle {
    display: none; width: 46px; height: 46px; cursor: pointer; background: none;
    border: 1px solid transparent; border-radius: var(--radius-sm); z-index: 1102;
    position: relative; align-items: center; justify-content: center; flex-direction: column;
    gap: 6px; transition: border-color 0.3s; -webkit-tap-highlight-color: transparent;
}
.mobile-toggle:hover { border-color: var(--border-subtle); }
.mobile-toggle .bar {
    display: block; width: 22px; height: 2px; background: var(--text-primary);
    border-radius: 2px; transition: all 0.35s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    transform-origin: center center; pointer-events: none;
}
.mobile-toggle.is-open .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); background: var(--accent-teal); }
.mobile-toggle.is-open .bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.mobile-toggle.is-open .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); background: var(--accent-teal); }

/* ═══════ MOBILE SLIDE-IN NAV ═══════ */
.mobile-backdrop {
    position: fixed; inset: 0; z-index: 1090; background: rgba(5, 5, 10, 0.6);
    backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity 0.35s ease;
}
.mobile-backdrop.is-visible { opacity: 1; pointer-events: auto; }
.mobile-panel {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 1100; width: min(360px, 86vw);
    background: rgba(14, 14, 24, 0.98); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
    border-left: 1px solid var(--border-subtle); box-shadow: -20px 0 60px rgba(0,0,0,0.5);
    transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex; flex-direction: column; padding: 90px 0 24px;
}
.mobile-panel.is-open { transform: translateX(0); }
.mobile-panel-scroll { flex: 1; overflow-y: auto; padding: 0 24px; }
.mobile-nav-links { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.mobile-nav-links a {
    display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text-secondary);
    font-size: 1.02rem; font-weight: 600; padding: 12px 16px; border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s; position: relative;
}
.mobile-nav-links a::before {
    content: ''; position: absolute; left: 6px; top: 50%; transform: translateY(-50%);
    width: 0; height: 60%; background: var(--accent-teal); border-radius: 2px; transition: width 0.25s;
}
.mobile-nav-links a:hover, .mobile-nav-links a:active, .mobile-nav-links a.active { color: var(--text-primary); background: rgba(58, 189, 176, 0.06); }
.mobile-nav-links a.active::before { width: 3px; }

/* Products row: label on the left, expand chevron on the right */
.mobile-nav-row { display: flex; align-items: center; }
.mobile-nav-row .mobile-nav-link { flex: 1; min-width: 0; }
.mobile-sub-toggle {
    flex-shrink: 0; width: 44px; height: 44px; display: grid; place-items: center;
    background: none; border: 1px solid transparent; border-radius: var(--radius-sm);
    color: var(--text-muted); cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: color 0.2s ease;
}
.mobile-sub-toggle svg { transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.mobile-sub-toggle[aria-expanded="true"] { color: var(--accent-teal); }
.mobile-sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
/* 0fr → 1fr animates to the content's natural height without a magic max-height. */
.mobile-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.mobile-sub.is-open { grid-template-rows: 1fr; }
.mobile-sub-inner { overflow: hidden; }
.mobile-sub .pm-group-label { padding: 12px 10px 4px; }
.mobile-sub .pm-item { padding: 10px; }
.mobile-sub .pm-item::before { content: none; }
.mobile-panel-footer { padding: 20px 24px 0; border-top: 1px solid var(--border-subtle); margin-top: 16px; display: flex; flex-direction: column; gap: 14px; }
.mobile-panel-footer .langtoggle { align-self: flex-start; }
.mobile-panel-footer .btn { width: 100%; justify-content: center; }

/* ═══════ SECTION SCAFFOLDING ═══════ */
.section { padding: 110px 48px; position: relative; }
.section-alt { background: var(--bg-secondary); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.section-header { max-width: 760px; margin: 0 auto 60px; }
.section-header.center { text-align: center; }
.section-label {
    display: inline-flex; align-items: center; gap: 10px; font-size: 0.78rem; font-weight: 700;
    color: var(--accent-teal); text-transform: uppercase; letter-spacing: 3px; margin-bottom: 16px;
}
.section-label::before { content: ''; width: 22px; height: 2px; background: var(--accent-teal); border-radius: 2px; }
.section-header.center .section-label { justify-content: center; }
.section-label.o { color: var(--accent-orange-light); }
.section-label.o::before { background: var(--accent-orange); }
.section-title { font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 800; letter-spacing: -1.5px; line-height: 1.13; margin-bottom: 18px; }
.section-desc { font-size: 1.05rem; color: var(--text-secondary); line-height: 1.7; max-width: 720px; }
.section-header.center .section-desc { margin-left: auto; margin-right: auto; }

/* ═══════ GENERIC GRID + CARD ═══════ */
.grid { display: grid; gap: 20px; max-width: var(--maxw); margin: 0 auto; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.card {
    background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
    padding: 30px 28px; transition: border-color 0.3s, transform 0.3s, background 0.3s;
}
.card:hover { border-color: var(--border-active); background: var(--bg-card-hover); }
.card .num { font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent-teal); font-weight: 700; letter-spacing: 0.05em; }
.card h3 { font-size: 1.12rem; font-weight: 700; margin-bottom: 10px; }
.card p { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.65; }
.card .ic { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 16px; background: var(--teal-dim); border: 1px solid rgba(58, 189, 176, 0.25); }
.card.o .ic { background: var(--orange-dim); border-color: rgba(232, 98, 58, 0.28); }
.card-center { display: flex; flex-direction: column; justify-content: center; }

/* Product card — a .card that is a link */
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 12px; }
.card-head h3 { margin: 0; }
a.card { display: block; }
a.card .more { display: inline-block; margin-top: 14px; font-size: 0.84rem; font-weight: 600; color: var(--accent-teal-light); }
a.card:hover .more { color: var(--accent-teal); }

/* Landing-page signposts. Blurbs differ in length, so the link is pushed to the
   bottom and the three cards line up along their last row. */
/* Exactly three cards: auto-fit rather than .g3, whose 1024px breakpoint would
   drop to two columns and leave the third stranded on a row of its own. */
.grid.teasers { grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }
.card.teaser { display: flex; flex-direction: column; }
.card.teaser .section-label { margin-bottom: 12px; }
.card.teaser .more { margin-top: auto; padding-top: 14px; }

/* ═══════ CALLOUT ═══════ */
.callout {
    border: 1px solid var(--border-line-strong); border-radius: var(--radius-lg); padding: 34px;
    background: linear-gradient(135deg, rgba(58, 189, 176, 0.10), rgba(232, 98, 58, 0.07));
    position: relative; overflow: hidden; max-width: var(--maxw); margin: 0 auto;
}
.callout::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(var(--accent-teal), var(--accent-orange)); }
.callout .k { font-size: 0.72rem; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--accent-teal); margin-bottom: 12px; }
.callout .big { font-size: clamp(1.15rem, 2.2vw, 1.6rem); font-weight: 700; line-height: 1.4; letter-spacing: -0.5px; }

/* ═══════ TABLE ═══════ */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); max-width: var(--maxw); margin: 0 auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.94rem; min-width: 560px; }
th { text-align: left; padding: 15px 18px; background: rgba(255,255,255,0.03); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); font-weight: 700; border-bottom: 1px solid var(--border-subtle); }
td { padding: 15px 18px; border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td .strong { color: var(--text-primary); font-weight: 600; }
.mark { color: var(--accent-teal-light); } .mark-o { color: var(--accent-orange-light); }
.row-highlight { background: rgba(58, 189, 176, 0.08); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.68rem; font-weight: 700; padding: 3px 10px; border-radius: 100px; letter-spacing: 0.02em; white-space: nowrap; text-transform: uppercase; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.b-ship { background: rgba(0,184,148,0.14); color: var(--accent-green); } .b-ship::before { background: var(--accent-green); }
.b-dev { background: rgba(253,203,110,0.14); color: var(--accent-amber); } .b-dev::before { background: var(--accent-amber); }
.b-plan { background: rgba(162,155,254,0.16); color: var(--accent-violet); } .b-plan::before { background: var(--accent-violet); }

/* Code block */
.code { background: #060a12; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 22px; overflow-x: auto; font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.75; color: #c9d6e8; white-space: pre; }
.code .c { color: var(--text-muted); } .code .k { color: var(--accent-teal-light); } .code .s { color: var(--accent-orange-light); } .code .v { color: var(--accent-amber); }
.filetree { white-space: pre; color: var(--text-secondary); }
.filetree .an { color: var(--accent-teal-light); }
.tree-item { opacity: 0; transform: translateX(-10px); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { font-size: 0.76rem; font-weight: 600; padding: 6px 12px; border-radius: 100px; border: 1px solid var(--border-line-strong); color: var(--text-secondary); }
.chip.t { border-color: rgba(58,189,176,0.4); color: var(--accent-teal-light); background: var(--teal-dim); }

/* Split two-col */
.split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 32px; align-items: start; max-width: var(--maxw); margin: 0 auto; }

/* ═══════ FOOTER ═══════ */
.footer { background: var(--bg-secondary); border-top: 1px solid var(--border-subtle); padding: 64px 48px 32px; }
.footer-container { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 2fr minmax(0,1fr) minmax(0,1fr) minmax(0,1fr); gap: 40px; }
.footer-brand p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; margin-top: 16px; max-width: 320px; }
.footer-brand-logo { height: 32px; margin-bottom: 4px; }
.footer-col h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-primary); margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--text-secondary); font-size: 0.9rem; transition: color 0.3s; }
.footer-col a:hover { color: var(--accent-teal); }
.footer-bottom { max-width: var(--maxw); margin: 40px auto 0; padding-top: 24px; border-top: 1px solid var(--border-subtle); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--text-muted); font-size: 0.84rem; }
.footer-socials a { color: var(--accent-teal); }
