/*------------2026 Pomerancee. All rights reserved.-----------------*/
/*------------https://creativecommons.org/licenses/by-nc-sa/4.0/----*/
/*------------Licensed under CC BY-NC-SA 4.0------------------------*/

/* ─── DESIGN TOKENS ───────────────────────────────────────────────── */
:root {
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --success: #10b981;
    --blue: #3b82f6;
    --orange: #f97316;
    --purple: #a855f7;
    --teal: #14b8a6;

    --text-main: #f9fafb;
    --text-secondary: #9ca3af;
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --border: #334155;

    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.25rem;
    --radius-xl: 1.75rem;

    --shadow-card: 0 4px 24px -4px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 32px 4px;

    --font: 'Inter', system-ui, -apple-system, sans-serif;

    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── RESET ────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ─── BASE ─────────────────────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

/* ─── BACKGROUND ANIMATION ─────────────────────────────────────────── */
.bg-animation {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    pointer-events: none;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.3;
    pointer-events: none;
}

.orb-1 {
    top: -20%;
    left: -15%;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, var(--primary) 0%, transparent 65%);
    animation: floatOrbit 28s infinite ease-in-out alternate;
}

.orb-2 {
    bottom: -20%;
    right: -15%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--success) 0%, transparent 65%);
    animation: floatOrbit2 34s infinite ease-in-out alternate-reverse;
}

.orb-3 {
    top: 40%;
    left: 40%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, var(--blue) 0%, transparent 65%);
    opacity: 0.12;
    animation: floatOrbit 42s infinite ease-in-out alternate;
    animation-delay: -10s;
}

@keyframes floatOrbit {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(4%, 6%) scale(1.04);
    }

    66% {
        transform: translate(-3%, 8%) scale(0.96);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

@keyframes floatOrbit2 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(-5%, -4%) scale(1.08);
    }

    66% {
        transform: translate(3%, -6%) scale(0.92);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* ─── LAYOUT ────────────────────────────────────────────────────────── */
.app-container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

/* ─── HEADER ─────────────────────────────────────────────────────────── */
.site-header {
    padding-top: 2.5rem;
    padding-bottom: 3.5rem;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3.5rem;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon {
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.5));
    transition: filter var(--transition-base);
}

.brand-icon:hover {
    filter: drop-shadow(0 0 14px rgba(99, 102, 241, 0.8));
}

.brand-name {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-main), var(--text-secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.9rem;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-hover);
    letter-spacing: 0.02em;
}

/* ─── GITHUB BUTTON ─────────────────────────────────────────────────── */
@keyframes animate-rainbow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.github-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    height: 2.5rem;
    padding: 0 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font);
    color: var(--text-main);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    border: calc(0.08 * 1rem) solid transparent;
    background:
        linear-gradient(var(--bg-card), var(--bg-card)),
        linear-gradient(var(--bg-card) 50%, rgba(30, 41, 59, 0.6) 80%, rgba(15, 23, 42, 0)),
        linear-gradient(90deg,
            hsl(245, 82%, 67%),
            hsl(160, 84%, 39%),
            hsl(213, 93%, 68%),
            hsl(160, 84%, 39%),
            hsl(245, 82%, 67%));
    background-origin: border-box;
    background-clip: padding-box, border-box, border-box;
    background-size: 200% auto;
    animation: animate-rainbow 4s linear infinite;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.github-btn::before {
    content: '';
    position: absolute;
    bottom: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 20%;
    background: linear-gradient(90deg,
            hsl(245, 82%, 67%),
            hsl(160, 84%, 39%),
            hsl(213, 93%, 68%),
            hsl(160, 84%, 39%),
            hsl(245, 82%, 67%));
    background-size: 200% auto;
    animation: animate-rainbow 4s linear infinite;
    filter: blur(2rem);
    z-index: 0;
}

.github-btn:hover {
    transform: scale(1.12);
}

.github-btn:active {
    transform: scale(0.95);
}

.github-btn .gh-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.github-btn .gh-star-group {
    margin-left: 0.5rem;
}

.github-btn .gh-label {
    margin-left: 0.25rem;
    color: var(--text-main);
}

.github-btn .gh-logo {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.github-btn .gh-star-icon {
    width: 1rem;
    height: 1rem;
    color: #6b7280;
    transform-origin: center;
    transition: color 0.3s ease, filter 0.3s ease, rotate 0.6s ease, scale 0.3s ease;
}

.github-btn:hover .gh-star-icon {
    color: #facc15;
    scale: 1.1;
    rotate: 360deg;
    filter: drop-shadow(0 0 5px rgba(255, 208, 0, 0.8)) drop-shadow(0 0 10px rgba(255, 208, 0, 0.6));
}

.github-btn .gh-star-count {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}

/* ─── HERO ───────────────────────────────────────────────────────────── */
.hero-section {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.04em;
    color: var(--text-main);
    margin-bottom: 1.25rem;
    animation: fadeInUp 0.7s ease both;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--success));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
    animation: fadeInUp 0.7s 0.1s ease both;
}

.hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 0.75rem 2rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: fadeInUp 0.7s 0.2s ease both;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1.5rem;
}

.stat-number {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-hover), var(--success));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.stat-label {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-divider {
    width: 1px;
    height: 2.2rem;
    background: var(--border);
    flex-shrink: 0;
}

/* ─── GRID ────────────────────────────────────────────────────────────── */
.calculators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* ─── TILE ────────────────────────────────────────────────────────────── */
.calc-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    outline: none;
    transition:
        transform var(--transition-bounce),
        box-shadow var(--transition-base),
        border-color var(--transition-base);
    box-shadow: var(--shadow-card);
    animation: tileReveal 0.5s ease both;
    text-decoration: none;
    color: inherit;
}

/* Dynamically tint the entire tile (waves, hover borders, etc) based on status badge inner text */
/* Ready/WIP Defaults */
.calc-tile:has(.tile-badge-status.ready) { --primary: var(--success); }
.calc-tile:has(.tile-badge-status.wip) { --primary: var(--orange); }

/* Specific Tile Theme Overrides */
.calc-tile:has(.tile-glow--blue)   { --primary: var(--blue); }
.calc-tile:has(.tile-glow--green)  { --primary: var(--success); }
.calc-tile:has(.tile-glow--orange) { --primary: var(--orange); }
.calc-tile:has(.tile-glow--purple) { --primary: var(--purple); }
.calc-tile:has(.tile-glow--teal)   { --primary: var(--teal); }
.calc-tile:has(.tile-glow--indigo) { --primary: var(--indigo, #6366f1); }

/* Stagger reveal animation for each tile */
.calc-tile:nth-child(1) {
    animation-delay: 0.05s;
}

.calc-tile:nth-child(2) {
    animation-delay: 0.1s;
}

.calc-tile:nth-child(3) {
    animation-delay: 0.15s;
}

.calc-tile:nth-child(4) {
    animation-delay: 0.2s;
}

.calc-tile:nth-child(5) {
    animation-delay: 0.25s;
}

.calc-tile:nth-child(6) {
    animation-delay: 0.3s;
}

.calc-tile:nth-child(7) {
    animation-delay: 0.35s;
}

.calc-tile:nth-child(8) {
    animation-delay: 0.4s;
}

.calc-tile:hover,
.calc-tile:focus-visible {
    transform: translateY(-6px) scale(1.018);
    border-color: color-mix(in srgb, var(--primary) 80%, transparent);
    box-shadow:
        var(--shadow-card),
        0 0 0 1px color-mix(in srgb, var(--primary) 20%, transparent),
        0 20px 48px -8px rgba(0, 0, 0, 0.7);
}

.calc-tile:active {
    transform: translateY(-2px) scale(1.008);
}

/* ─── TILE SVG WAVE BORDER ───────────────────────────────────────────── */
.tile-border {
    display: none;
    /* hidden on mobile/small – enabled on desktop below */
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
    z-index: 3;
    border-radius: inherit;
}

.tile-border path {
    fill: none;
    vector-effect: non-scaling-stroke;
}

.tile-border-track {
    stroke: color-mix(in srgb, var(--primary) 70%, white);
    stroke-width: 1.25;
    opacity: 0;
    filter:
        drop-shadow(0 0 5px color-mix(in srgb, var(--primary) 30%, transparent)) drop-shadow(0 0 12px color-mix(in srgb, var(--primary) 20%, transparent));
    transition: opacity var(--transition-base);
}

.tile-border-wave {
    stroke: color-mix(in srgb, var(--primary) 88%, white);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 12 88;
    stroke-dashoffset: 0;
    opacity: 0;
    filter:
        drop-shadow(0 0 6px color-mix(in srgb, var(--primary) 40%, transparent)) drop-shadow(0 0 14px color-mix(in srgb, var(--primary) 25%, transparent));
    transition: opacity var(--transition-base);
    animation: tileWave 18s linear infinite;
}

.tile-border-wave-secondary {
    stroke: color-mix(in srgb, var(--primary) 76%, white);
    stroke-width: 1.25;
    stroke-dasharray: 8 92;
    opacity: 0;
    filter:
        drop-shadow(0 0 5px color-mix(in srgb, var(--primary) 32%, transparent)) drop-shadow(0 0 11px color-mix(in srgb, var(--primary) 18%, transparent));
    transition: opacity var(--transition-base);
    animation: tileWave 18s linear infinite;
    animation-delay: -9s;
}

@keyframes tileWave {
    from {
        stroke-dashoffset: 0;
    }

    to {
        stroke-dashoffset: -100;
    }
}

/* Show border on desktop */
@media (min-width: 601px) {
    .tile-border {
        display: block;
    }
}

/* Activate wave on hover */
.calc-tile:hover .tile-border-wave,
.calc-tile:focus-visible .tile-border-wave,
.calc-tile:hover .tile-border-wave-secondary,
.calc-tile:focus-visible .tile-border-wave-secondary {
    opacity: 0.85;
}

.calc-tile:hover .tile-border-track,
.calc-tile:focus-visible .tile-border-track {
    opacity: 1;
}

/* ─── TILE IMAGE ──────────────────────────────────────────────────────── */
.tile-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #0b1222;
}

.tile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    filter: blur(3px) brightness(0.75) saturate(0.85);
    transform: scale(1.04);
    transition:
        filter var(--transition-base),
        transform var(--transition-base);
    will-change: filter, transform;
}

.calc-tile:hover .tile-img,
.calc-tile:focus-visible .tile-img {
    filter: blur(0) brightness(1) saturate(1.1);
    transform: scale(1.0);
}

.tile-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(30, 41, 59, 0.1) 0%,
            rgba(15, 23, 42, 0.35) 60%,
            rgba(15, 23, 42, 0.8) 100%);
    transition: opacity var(--transition-base);
}

.calc-tile:hover .tile-img-overlay {
    opacity: 0.6;
}

/* ─── TILE GLOW ───────────────────────────────────────────────────────── */
.tile-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-base);
    border-radius: inherit;
    box-shadow: inset 0 0 60px -10px var(--primary);
}

.tile-glow--blue {
    box-shadow: inset 0 0 60px -10px var(--blue);
}

.tile-glow--green {
    box-shadow: inset 0 0 60px -10px var(--success);
}

.tile-glow--orange {
    box-shadow: inset 0 0 60px -10px var(--orange);
}

.tile-glow--purple {
    box-shadow: inset 0 0 60px -10px var(--purple);
}

.tile-glow--teal {
    box-shadow: inset 0 0 60px -10px var(--teal);
}

.tile-glow--indigo {
    box-shadow: inset 0 0 60px -10px var(--primary);
}

.calc-tile:hover .tile-glow,
.calc-tile:focus-visible .tile-glow {
    opacity: 1;
}

/* ─── TILE DESCRIPTION OVERLAY ────────────────────────────────────────── */
.tile-desc-layer {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    transform: translateY(100%);
    opacity: 0;
}

.tile-desc-layer .desc-content {
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.55;
    text-align: center;
    font-weight: 500;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
    display: inline-block;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 0.45rem 0.8rem;
    border-radius: 0.75rem;
}

.calc-tile:hover .tile-desc-layer,
.calc-tile:focus-visible .tile-desc-layer {
    transform: translateY(0%);
    opacity: 1;
}

/* ─── TILE BADGE ──────────────────────────────────────────────────────── */
.tile-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem 0.3rem 0.5rem;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity var(--transition-base), transform var(--transition-base);
    z-index: 20;
}

.tile-icon {
    width: 14px;
    height: 14px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.tile-badge-status {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tile-badge-status.ready {
    color: var(--success);
}

.tile-badge-status.wip {
    color: var(--orange);
}

.tile-badge:has(.tile-badge-status.ready) {
    background: color-mix(in srgb, var(--success) 20%, rgba(15, 23, 42, 0.6));
    border-color: color-mix(in srgb, var(--success) 35%, rgba(255, 255, 255, 0.1));
}

.tile-badge:has(.tile-badge-status.ready) .tile-icon {
    color: var(--success);
}

.tile-badge:has(.tile-badge-status.wip) {
    background: color-mix(in srgb, var(--orange) 20%, rgba(15, 23, 42, 0.6));
    border-color: color-mix(in srgb, var(--orange) 35%, rgba(255, 255, 255, 0.1));
}

.tile-badge:has(.tile-badge-status.wip) .tile-icon {
    color: var(--orange);
}

/* ─── TILE FOOTER ─────────────────────────────────────────────────────── */
.tile-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.1rem;
    background: #000000;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    min-height: 52px;
    transition: background var(--transition-base);
}

.calc-tile:hover .tile-footer {
    background: #0a0a0a;
}

.tile-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calc-tile[data-tool="investment"] .tile-name {
    background: linear-gradient(135deg, #6366f1, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calc-tile[data-tool="currency"] .tile-name {
    background: linear-gradient(110deg, #818cf8, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calc-tile[data-tool="dividend"] .tile-name {
    background: linear-gradient(95deg, #10b981, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calc-tile[data-tool="inflation"] .tile-name {
    background: linear-gradient(120deg, #f97316, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calc-tile[data-tool="loan"] .tile-name {
    background: linear-gradient(140deg, #a855f7, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calc-tile[data-tool="mortgage"] .tile-name {
    background: linear-gradient(115deg, #14b8a6, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calc-tile[data-tool="portfolio"] .tile-name {
    background: linear-gradient(150deg, #6366f1, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calc-tile[data-tool="saving"] .tile-name {
    background: linear-gradient(100deg, #818cf8, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tile-arrow {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    flex-shrink: 0;
    margin-left: 0.5rem;
    transform: translateX(0);
    transition: transform var(--transition-base), color var(--transition-base);
}

.calc-tile:hover .tile-arrow {
    transform: translateX(4px);
    color: var(--primary-hover);
}

/* ─── GITHUB CTA BANNER ──────────────────────────────────────────────── */
.gh-cta {
    position: relative;
    margin: 3.5rem 0 0;
    padding: 2.75rem 2rem;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.97) 0%, rgba(15, 23, 42, 0.99) 100%);
    text-align: center;
    overflow: hidden;
    isolation: isolate;
    animation: fadeInUp 0.6s 0.5s ease both;
}

/* Rainbow animated border */
.gh-cta::before {
    content: '';
    position: absolute;
    inset: -1.5px;
    border-radius: calc(var(--radius-xl) + 2px);
    background: linear-gradient(90deg,
            hsl(245, 65%, 55%),
            hsl(160, 60%, 32%),
            hsl(213, 70%, 55%),
            hsl(160, 60%, 32%),
            hsl(245, 65%, 55%));
    background-size: 200% auto;
    animation: animate-rainbow 8s linear infinite;
    z-index: -1;
    opacity: 0.22;
}

/* Subtle inner glow */
.gh-cta::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 50%;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.gh-cta-inner {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.gh-cta-octocat {
    width: 56px;
    height: 56px;
    color: var(--text-main);
    margin: 0 auto 1.25rem;
    display: block;
    opacity: 0.92;
    filter: drop-shadow(0 0 14px rgba(99, 102, 241, 0.55));
    transition: filter var(--transition-base), transform var(--transition-bounce);
}

.gh-cta:hover .gh-cta-octocat {
    filter: drop-shadow(0 0 22px rgba(129, 140, 248, 0.8));
    transform: scale(1.08) rotate(-4deg);
}

.gh-cta-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.8rem;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-hover);
    margin-bottom: 1rem;
}

.gh-cta-eyebrow-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary-hover);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.65);
    }
}

.gh-cta-title {
    font-size: clamp(1.35rem, 2.5vw, 1.9rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: #f1f5f9;
    text-shadow:
        -1px -1px 0 rgba(0, 0, 0, 0.9),
        1px -1px 0 rgba(0, 0, 0, 0.9),
        -1px 1px 0 rgba(0, 0, 0, 0.9),
        1px 1px 0 rgba(0, 0, 0, 0.9),
        0 0 18px rgba(129, 140, 248, 0.3);
    margin-bottom: 0.85rem;
}

.gh-cta-text {
    color: #e2e8f0;
    font-size: 1rem;
    line-height: 1.72;
    max-width: 500px;
    margin: 0 auto 2rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.gh-cta-text strong {
    color: var(--text-main);
    font-weight: 600;
}

.gh-cta .github-btn {
    height: 2.85rem;
    padding: 0 1.5rem;
    font-size: 0.95rem;
}

/* ─── SITE FOOTER ─────────────────────────────────────────────────────── */
.site-footer {
    text-align: center;
    padding: 2.5rem 0 0;
    color: var(--text-secondary);
    font-size: 0.825rem;
}

.site-footer a {
    color: var(--primary-hover);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--transition-base);
}

.site-footer a:hover {
    color: #ffffff;
}

/* ─── ANIMATIONS ──────────────────────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes tileReveal {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Click ripple effect */
.bg-click-ripple {
    position: fixed;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 65%);
    opacity: 0.55;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(1);
    animation: rippleOut 0.9s ease-out forwards;
    z-index: 9999;
    mix-blend-mode: screen;
}

@keyframes rippleOut {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }

    100% {
        transform: translate(-50%, -50%) scale(22);
        opacity: 0;
    }
}

/* ─── RESPONSIVE ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .app-container {
        padding: 0 1.25rem 3rem;
    }

    .site-header {
        padding-top: 1.75rem;
        padding-bottom: 2.5rem;
    }

    .header-inner {
        margin-bottom: 2.5rem;
    }

    .hero-stats {
        padding: 0.65rem 1.2rem;
    }

    .stat-item {
        padding: 0 1rem;
    }
}

@media (max-width: 600px) {
    .calculators-grid {
        grid-template-columns: 1fr;
        gap: 1.1rem;
    }

    .hero-stats {
        gap: 0;
    }

    .stat-item {
        padding: 0 0.75rem;
    }

    .stat-number {
        font-size: 1.15rem;
    }
}

@media (max-width: 400px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* ─── REDUCED MOTION ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

    .orb-1,
    .orb-2,
    .orb-3,
    .hero-title,
    .hero-subtitle,
    .hero-stats,
    .calc-tile {
        animation: none;
    }

    .calc-tile:hover {
        transform: none;
    }

    .tile-img {
        filter: blur(0) brightness(0.85);
        transform: none;
    }

    .calc-tile:hover .tile-img {
        filter: blur(0) brightness(1);
        transform: none;
    }
}
