/* ============================================================
 * AURORA PREMIUM POLISH
 * Load AFTER style.css so these rules win the cascade.
 * ============================================================ */

/* ============================================================
 * 1. TYPOGRAPHY — refined hierarchy + smoothing
 * ============================================================ */

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "ss01", "cv11", "kern";
    color: #0F172A;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.025em;
    line-height: 1.15;
    color: #0F172A;
}

h1 { font-weight: 700; letter-spacing: -0.03em; }
h2 { font-weight: 700; letter-spacing: -0.025em; }
h3 { font-weight: 600; letter-spacing: -0.02em; }

p { line-height: 1.65; }

/* Numeric font feature for currency, prices, stats */
.num, .price, [class*="stat-value"], [class*="dash-card-value"] {
    font-feature-settings: "tnum", "lnum";
}

/* ============================================================
 * 2. SHADOW SYSTEM — layered, soft, premium
 * ============================================================ */

:root {
    --shadow-xs:  0 1px 2px rgba(15, 28, 36, 0.04);
    --shadow-sm:  0 2px 4px rgba(15, 28, 36, 0.06), 0 1px 2px rgba(15, 28, 36, 0.04);
    --shadow-md:  0 4px 12px rgba(15, 28, 36, 0.08), 0 2px 4px rgba(15, 28, 36, 0.04);
    --shadow-lg:  0 12px 28px rgba(15, 28, 36, 0.10), 0 4px 8px rgba(15, 28, 36, 0.04);
    --shadow-xl:  0 24px 48px rgba(15, 28, 36, 0.12), 0 8px 16px rgba(15, 28, 36, 0.06);
    --shadow-2xl: 0 40px 80px rgba(15, 28, 36, 0.16), 0 16px 32px rgba(15, 28, 36, 0.08);
}

/* ============================================================
 * 3. NAVBAR — centered nav with refined glass effect
 * ============================================================ */

.nav-main {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
            backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(15, 28, 36, 0.04);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    padding: 0;
}

.nav-main.scrolled {
    background: rgba(255, 255, 255, 0.88);
    border-bottom-color: rgba(15, 28, 36, 0.08);
    box-shadow: var(--shadow-xs);
}

/* Three-column grid: brand | nav | cta */
.nav-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    padding: 14px 20px;
    min-height: 64px;
    max-width: 1280px;
    margin: 0 auto;
}

/* Brand on left */
.nav-brand {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display, var(--font, system-ui));
    font-weight: 700;
    font-size: 1.125rem;
    color: #0F172A !important;
    text-decoration: none;
    letter-spacing: -0.02em;
}
.nav-brand .brand-mark {
    background: linear-gradient(135deg, #1cbfa7, #2db8a1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.nav-brand .brand-dot {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: linear-gradient(135deg, #1cbfa7, #2db8a1);
    box-shadow: 0 2px 8px -2px rgba(28, 191, 167, 0.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
    position: relative;
}
.nav-brand .brand-dot::after {
    content: '✦';
    line-height: 1;
}

/* Centered navigation */
.nav-links-center {
    justify-self: center;
    display: flex;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 6px;
    background: rgba(15, 28, 36, 0.04);
    border-radius: 999px;
}

.nav-links-center a {
    display: block;
    padding: 7px 16px;
    color: #475569;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 999px;
    transition: color 0.15s ease, background 0.15s ease;
}
.nav-links-center a:hover { color: #0F172A; }
.nav-links-center a.active {
    background: #fff;
    color: #0F172A;
    font-weight: 600;
    box-shadow: var(--shadow-xs);
}

/* Right side: auth state */
.nav-right {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: #475569;
    text-decoration: none;
    transition: all 0.15s ease;
}
.nav-icon-link:hover { background: rgba(15, 28, 36, 0.05); color: #0F172A; }
.nav-icon-link.active { color: #1cbfa7; background: rgba(28, 191, 167, 0.08); }

.nav-login {
    color: #475569 !important;
    font-weight: 500;
    font-size: 0.88rem;
    padding: 8px 14px;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.15s ease;
}
.nav-login:hover { color: #0F172A !important; background: rgba(15, 28, 36, 0.04); }

.nav-cta {
    display: inline-flex;
    align-items: center;
    padding: 9px 18px;
    background: #0F172A;
    color: #fff !important;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.15s ease;
    box-shadow: var(--shadow-sm);
}
.nav-cta:hover {
    background: #1E293B;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* User dropdown */
.nav-user { position: relative; }
.nav-user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    background: rgba(15, 28, 36, 0.04);
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.nav-user-trigger:hover { background: rgba(15, 28, 36, 0.08); }
.nav-user.open .nav-user-trigger { background: rgba(15, 28, 36, 0.08); border-color: rgba(15, 28, 36, 0.08); }

.nav-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1cbfa7, #4aa9d3);
    color: #fff;
    font-weight: 700;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-user-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #0F172A;
}

.nav-user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid rgba(15, 28, 36, 0.06);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, visibility 0.15s ease, transform 0.15s ease;
}
.nav-user.open .nav-user-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-user-menu a,
.nav-user-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    color: #475569;
    text-decoration: none;
    font-size: 0.88rem;
    border-radius: 8px;
    transition: all 0.12s ease;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}
.nav-user-menu a:hover,
.nav-user-menu button:hover {
    background: rgba(15, 28, 36, 0.04);
    color: #0F172A;
}
.nav-user-menu i { width: 16px; color: #94a3b8; }
.nav-user-divider {
    height: 1px;
    background: rgba(15, 28, 36, 0.06);
    margin: 4px 6px;
}

/* Mobile nav */
.nav-toggle {
    display: none;
    justify-self: end;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(15, 28, 36, 0.1);
    border-radius: 10px;
    color: #0F172A;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    padding: 12px 20px 20px;
    background: #fff;
    border-top: 1px solid rgba(15, 28, 36, 0.06);
}
.mobile-nav.open { display: flex; }
.mobile-nav a, .mobile-nav button {
    padding: 12px 14px;
    color: #475569;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    width: 100%;
}
.mobile-nav a:hover, .mobile-nav button:hover { background: rgba(15, 28, 36, 0.04); color: #0F172A; }
.mobile-nav a.active { color: #1cbfa7; }
.mobile-nav-divider {
    height: 1px;
    background: rgba(15, 28, 36, 0.06);
    margin: 10px 0;
}
.mobile-nav .mobile-cta {
    background: #0F172A;
    color: #fff;
    margin-top: 4px;
    justify-content: center;
}

@media (max-width: 991px) {
    .nav-links-center, .nav-right { display: none; }
    .nav-toggle { display: inline-flex; }
    .nav-grid {
        grid-template-columns: 1fr auto;
        gap: 16px;
        padding: 12px 16px;
    }
}

/* ============================================================
 * 4. BUTTONS — refined hover states, smoother transitions
 * ============================================================ */

button, .btn, [class*="btn-"] {
    transition: transform 0.12s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.btn-primary-full, .btn-generate, .btn-pricing.primary {
    box-shadow: var(--shadow-sm);
}
.btn-primary-full:hover, .btn-generate:hover, .btn-pricing.primary:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.btn-primary-full:active, .btn-generate:active, .btn-pricing.primary:active {
    transform: translateY(0);
}

/* Refined focus state — visible only when keyboard navigating */
*:focus { outline: none; }
*:focus-visible {
    outline: 2px solid rgba(28, 191, 167, 0.5);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ============================================================
 * 5. FORMS — refined focus, smoother borders
 * ============================================================ */

input, textarea, select {
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #1cbfa7;
    box-shadow: 0 0 0 4px rgba(28, 191, 167, 0.12);
}

/* ============================================================
 * 6. SECTIONS — more generous spacing
 * ============================================================ */

.section {
    padding: 88px 0;
}

@media (max-width: 768px) {
    .section { padding: 56px 0; }
}

/* ============================================================
 * 7. CARDS / SURFACES — refined shadows
 * ============================================================ */

.form-card, .feature-card, .pricing-card, .config-card {
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.feature-card:hover, .pricing-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* ============================================================
 * 8. SCROLLBAR — subtle, premium
 * ============================================================ */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(15, 28, 36, 0.15);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(15, 28, 36, 0.3); background-clip: padding-box; border: 2px solid transparent; }

/* ============================================================
 * 9. SELECTION COLOR
 * ============================================================ */

::selection { background: rgba(28, 191, 167, 0.25); color: #0F172A; }

/* ============================================================
 * 10. LINK POLISH
 * ============================================================ */

a {
    transition: color 0.15s ease, opacity 0.15s ease;
}
a:not([class]) {
    color: #1cbfa7;
    text-decoration: none;
    border-bottom: 1px solid rgba(28, 191, 167, 0.3);
}
a:not([class]):hover {
    color: #0f5e54;
    border-bottom-color: #1cbfa7;
}

/* ============================================================
 * 11. HERO REFINEMENTS — softer gradient blobs
 * ============================================================ */

.hero-section, .inner-hero {
    background-color: #FBFAF8;
}

.inner-hero { padding: 80px 0 56px; }
@media (max-width: 768px) { .inner-hero { padding: 56px 0 40px; } }

.inner-hero h1 {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    margin: 0 auto;
    max-width: 26ch;
}
.inner-hero p {
    font-size: 1.0625rem;
    color: #64748b;
    margin-top: 12px;
}

/* ============================================================
 * 12. MISC PREMIUM TOUCHES
 * ============================================================ */

img, canvas, svg { vertical-align: middle; }

/* Smoother hash anchors */
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

/* Site notice banner — refined */
.site-notice {
    font-weight: 500;
    border-bottom: 1px solid rgba(15, 28, 36, 0.04);
}

/* Site footer polish */
.site-footer {
    border-top: 1px solid rgba(15, 28, 36, 0.06);
}
