/* ============================================================
   2026 REFRESH LAYER — loaded after custom.bundle.css
   Restrained dark editorial pass over the existing token system.
   Reversible: delete this file + the <link> tag to roll back.
   ============================================================ */

/* ---------- 1. Token refinements ---------- */
:root {
    --global-border-radius: 14px;
    /* soften the loud magenta glow shadows into neutral depth */
    --box-shadow-top-left: 0 1px 2px rgba(0, 0, 0, 0.35);
    --box-shadow-bottom-right: 0 6px 24px rgba(0, 0, 0, 0.35);
    --box-shadow-top-left-wide: 0 1px 2px rgba(0, 0, 0, 0.35);
    --box-shadow-bottom-right-wide: 0 10px 32px rgba(0, 0, 0, 0.4);
    /* calmer animation timing */
    --animation-normal: 0.6s;
    --animation-slow: 0.9s;
    --animation-fast: 0.4s;
    /* tamed display sizes (were 100–200px, causing mobile overflow) */
    --font-size-15xl: clamp(40px, 7vw, 76px);
    --font-size-16xl: clamp(44px, 8vw, 96px);
    --font-size-17xl: clamp(48px, 9vw, 112px);
    --font-size-14xl: clamp(34px, 5.5vw, 60px);
    --font-size-13xl: clamp(30px, 4.5vw, 52px);
    --font-size-12xl: clamp(28px, 4vw, 46px);
}

/* ---------- 2. Reliability: content must never be invisible ---------- */
/* The old system hid everything behind scroll-triggered animations
   (.animate-box{opacity:0}) and disabled the animations on low-end
   devices — leaving blank pages. Content is now visible by default. */
.animate-box {
    opacity: 1 !important;
}

/* Never let decorative entrance animations hide meaning */
.animated,
.animate-box.animated {
    animation-fill-mode: both;
}

/* Overflow safety: heavy display type must wrap, never clip */
h1, h2, h3, .title-heading, .title-heading-banner, .main-title {
    overflow-wrap: break-word;
    text-wrap: balance;
}
html, body {
    overflow-x: clip;
}

/* ---------- 3. Typography discipline ---------- */
.title-heading {
    letter-spacing: -0.02em;
    line-height: 1.12;
}
.title-heading-banner {
    letter-spacing: -0.02em;
}
p {
    line-height: 1.65;
}

/* Ghost gradient headings → solid, readable */
.banner-layout .title-heading,
.section-banner .title-heading {
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
    color: var(--text-color-2);
    opacity: 1;
}

/* ---------- 4. Compact interior page banners ---------- */
.section-banner {
    min-height: 0 !important;
}
.banner-layout-wrapper {
    padding: 0 !important;
}
.banner-layout {
    min-height: 200px !important;
    padding: 110px 24px 36px !important;
}
.banner-layout .spacer,
.banner-layout-wrapper .spacer {
    height: 0 !important;
    min-height: 0 !important;
}

/* ---------- 5. Header CTA: one line, sane size ---------- */
#header .btn-accent,
.navbar .btn-accent {
    padding: 10px 22px !important;
    border-radius: 999px !important;
    line-height: 1 !important;
    max-width: none !important;
}
#header .btn-accent .btn-title,
.navbar .btn-accent .btn-title {
    white-space: nowrap !important;
    font-size: var(--font-size-sm) !important;
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.01em;
}

/* Buttons: consistent, restrained */
.btn-accent {
    box-shadow: none !important;
    transition: transform 0.15s ease, filter 0.15s ease;
}
.btn-accent:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
}

/* ---------- 6. Cards: quiet borders instead of neon glows ---------- */
.card {
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
}
[data-theme="light"] .card {
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
}

/* ---------- 7. New product-first hero (index) ---------- */
.hero-pf {
    position: relative;
    padding: 148px 24px 72px;
    max-width: 1200px;
    margin: 0 auto;
}
.hero-pf-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: var(--font-size-sm);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 7px 16px;
    margin-bottom: 28px;
}
[data-theme="light"] .hero-pf-badge { border-color: rgba(0,0,0,0.12); }
.hero-pf-badge .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
}
.hero-pf h1 {
    font-size: clamp(2.3rem, 5.6vw, 4.2rem);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.03em;
    line-height: 1.06;
    color: var(--text-color-2);
    margin: 0 0 22px;
    max-width: 17ch;
}
.hero-pf h1 .accent { color: var(--accent-color); }
.hero-pf .hero-pf-sub {
    font-size: clamp(1.02rem, 1.4vw, 1.2rem);
    color: var(--text-color);
    max-width: 56ch;
    margin-bottom: 34px;
}
.hero-pf-ctas {
    display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
    margin-bottom: 56px;
}
.hero-pf-ctas .btn-accent { padding: 14px 28px; border-radius: 999px; }
.hero-pf-ctas .link-more {
    color: var(--text-color-2);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 2px;
}
.hero-pf-ctas .link-more:hover { color: var(--accent-color); }

/* proof strip: real app screenshots */
.hero-pf-proof {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    align-items: end;
}
.hero-pf-proof a {
    display: block;
    text-decoration: none;
    color: var(--text-color);
    font-size: var(--font-size-xs);
    text-align: center;
}
.hero-pf-proof img.shot {
    width: 100%;
    aspect-ratio: 1290 / 2796;
    object-fit: cover;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #101010;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    transition: transform 0.2s ease;
}
.hero-pf-proof a:hover img.shot { transform: translateY(-4px); }
.hero-pf-proof .cap {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    margin-top: 10px;
}
.hero-pf-proof .cap img.ico {
    width: 18px; height: 18px; border-radius: 5px;
}
@media (max-width: 760px) {
    .hero-pf { padding-top: 120px; }
    .hero-pf-proof { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 8. Portfolio components ---------- */
.pf-intro { max-width: 1200px; margin: 0 auto; padding: 0 24px 8px; }
.pf-filters {
    display: flex; flex-wrap: wrap; gap: 10px;
    max-width: 1200px; margin: 0 auto 26px; padding: 0 24px;
}
.pf-filter {
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text-color);
    background: transparent;
    border-radius: 999px;
    padding: 8px 18px;
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: var(--global-font);
}
[data-theme="light"] .pf-filter { border-color: rgba(0,0,0,0.14); }
.pf-filter:hover { color: var(--text-color-2); border-color: var(--accent-color); }
.pf-filter.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}
.pf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 22px;
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 0 24px;
}
.pf-card {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--global-border-radius);
    background: var(--accent-color-3);
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.18s ease;
}
[data-theme="light"] .pf-card { background: #fff; border-color: rgba(0,0,0,0.09); }
.pf-card:hover { transform: translateY(-4px); border-color: rgba(200, 42, 239, 0.45); }
.pf-media {
    position: relative;
    background: #0B0B0B;
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 22px 18px 0;
    min-height: 230px;
    overflow: hidden;
}
[data-theme="light"] .pf-media { background: #F2F0F5; }
.pf-media img.phone {
    width: 31%;
    aspect-ratio: 1290 / 2796;
    object-fit: cover;
    object-position: top;
    border-radius: 14px 14px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 0;
    transform: translateY(6px);
    transition: transform 0.25s ease;
}
.pf-card:hover .pf-media img.phone { transform: translateY(0); }
.pf-media img.browser {
    width: 92%;
    aspect-ratio: 16 / 9.6;
    object-fit: cover;
    object-position: top;
    border-radius: 10px 10px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 0;
    align-self: flex-end;
}
.pf-media.textual {
    min-height: 0;
    padding: 0;
}
.pf-status {
    position: absolute;
    top: 14px; left: 14px;
    z-index: 2;
    font-size: 11px;
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 5px 12px;
    backdrop-filter: blur(6px);
}
.pf-status.live { background: rgba(16, 185, 129, 0.18); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.4); }
.pf-status.shipped { background: rgba(59, 130, 246, 0.16); color: #7ab8ff; border: 1px solid rgba(122, 184, 255, 0.4); }
.pf-status.dev { background: rgba(245, 158, 11, 0.14); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.38); }
.pf-status.internal { background: rgba(148, 163, 184, 0.14); color: #a8b3c4; border: 1px solid rgba(168, 179, 196, 0.35); }
.pf-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 22px 22px;
    flex: 1;
}
.pf-body .pf-title {
    display: flex; align-items: center; gap: 10px;
}
.pf-body .pf-title img.ico { width: 26px; height: 26px; border-radius: 7px; }
.pf-body h3 {
    font-size: var(--font-size-xl);
    color: var(--text-color-2);
    margin: 0;
    letter-spacing: -0.01em;
}
.pf-body .pf-tagline { color: var(--text-color); font-size: var(--font-size-base); margin: 0; }
.pf-tech { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 2px; }
.pf-tech span {
    font-size: 12px;
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 4px 11px;
}
[data-theme="light"] .pf-tech span { border-color: rgba(0,0,0,0.12); }
.pf-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 12px; }
.pf-btn {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    border-radius: 999px;
    padding: 9px 18px;
    transition: all 0.15s ease;
}
.pf-btn.store { background: #fff; color: #0B0B0B; border: 1px solid #fff; }
.pf-btn.store:hover { filter: brightness(0.92); }
[data-theme="light"] .pf-btn.store { background: #111; color: #fff; border-color: #111; }
.pf-btn.ghost { border: 1px solid rgba(255, 255, 255, 0.2); color: var(--text-color-2); }
[data-theme="light"] .pf-btn.ghost { border-color: rgba(0,0,0,0.2); }
.pf-btn.ghost:hover { border-color: var(--accent-color); color: var(--accent-color); }

/* honest stats band */
.pf-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 16px;
    max-width: 1200px;
    margin: 8px auto 46px;
    padding: 0 24px;
}
.pf-stat {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--global-border-radius);
    padding: 18px 20px;
    background: var(--accent-color-3);
}
[data-theme="light"] .pf-stat { background: #fff; border-color: rgba(0,0,0,0.09); }
.pf-stat b {
    display: block;
    font-size: var(--font-size-6xl);
    color: var(--text-color-2);
    letter-spacing: -0.02em;
}
.pf-stat span { color: var(--text-color); font-size: var(--font-size-sm); }

/* ---------- 9. Calm the homepage extras ---------- */
.crosshair, .code-particle { display: none !important; }
.grid-plane { opacity: 0.35; }

/* ---------- 9.5 Entrance animations: fade only, never slide ---------- */
/* animate.css slide-ins translate full viewport widths and clip text
   mid-animation; same-name keyframes defined later win the cascade. */
@keyframes fadeInLeft  { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInRight { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp    { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: none; } }
@keyframes fadeInDown  { from { opacity: 0; transform: translate3d(0, -14px, 0); } to { opacity: 1; transform: none; } }
@keyframes zoomIn      { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInLeft { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInRight{ from { opacity: 0; } to { opacity: 1; } }

/* Accent chips/badges: white text for contrast */
span[style*="background: var(--accent-color)"],
div[style*="background: var(--accent-color)"] {
    color: #FFFFFF !important;
}

/* ---------- 10. Focus visibility & motion respect ---------- */
a:focus-visible, button:focus-visible, .pf-filter:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
    border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) {
    .animated, .animate-box { animation: none !important; transition: none !important; }
}
