/* Import Fonts from local */
@font-face {
    font-family: 'Bricolage Grotesque';
    src: url('/assets/fonts/bricolage-grotesque-variable.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Schibsted Grotesk';
    src: url('/assets/fonts/schibsted-grotesk-variable.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* Light Theme (Default) */
:root {
    --background: hsl(27, 60%, 97%);
    --foreground: hsl(242, 70%, 19%);
    --primary: hsl(253, 100%, 74%);
    --action: hsl(44, 100%, 70%);
    --secondary: hsl(214, 57%, 93%);
    --border: hsl(242, 70%, 19%);
    --muted-default: hsl(242, 20%, 90%);
    --muted-foreground: hsl(242, 30%, 40%);
    --card: #FFFFFF;
    --card-foreground: hsl(242, 70%, 19%);
}

/* Dark Theme */
[data-theme="dark"] {
    --background: #000000;
    --foreground: hsl(27, 60%, 95%);
    --primary: hsl(253, 100%, 74%);
    --action: #FCD666;
    --secondary: hsl(214, 57%, 15%);
    --border: #A16207;
    --muted-default: hsl(242, 20%, 18%);
    --muted-foreground: hsl(242, 30%, 70%);
    --card: transparent;
    --card-foreground: hsl(27, 60%, 95%);
}

/* Base Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Remove blue focus outline globally */
*:focus {
    outline: none !important;
    box-shadow: none !important;
}

*:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* Remove tap highlight color on mobile */
* {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
}

/* Remove button active/pressed state color */
button:active,
a:active,
.btn:active {
    background-color: inherit !important;
    filter: none !important;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Bricolage Grotesque', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    padding: 80px 1rem 2rem;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100vw;
    transform: none;
    will-change: auto;
}

/* Section spacing */
main > section {
    margin-bottom: 6rem;
}

@media (min-width: 768px) {
    main > section {
        margin-bottom: 8rem;
    }
}

/* Prevent images from overflowing */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Hard Shadows */
.shadow-hard-sm {
    box-shadow: 2px 2px 0px 0px var(--border);
}

.shadow-hard-md {
    box-shadow: 4px 4px 0px 0px var(--border);
}

.shadow-hard-lg {
    box-shadow: 8px 8px 0px 0px var(--border);
}

/* Border utilities */
.border-border {
    border: 1px solid var(--border);
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

.rounded-3xl {
    border-radius: 1.5rem;
}

/* Typography Classes */
.font-sans {
    font-family: 'Bricolage Grotesque', sans-serif;
}

.font-heading {
    font-family: 'Schibsted Grotesk', sans-serif;
}

.text-foreground {
    color: var(--foreground);
}

.text-primary {
    color: var(--primary);
}

/* Background utilities */
.bg-background {
    background-color: var(--background);
}

.bg-primary {
    background-color: var(--primary);
    color: white;
}

.bg-action {
    background-color: var(--action);
    color: #1a1a1a;
}

.bg-white {
    background-color: white;
}

.text-muted-foreground {
    color: var(--muted-foreground);
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.025em;
    transition: all 0.2s ease-in-out;
    border: 2px solid #A16207;
    cursor: pointer;
    background-color: var(--action);
    color: #1a1a1a;
    box-shadow: 2px 2px 0px 0px var(--border);
    outline: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 0px 0px var(--border);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 2px 2px 0px 0px var(--border);
}

.btn-primary {
    /* Uses .btn base styles */
}

.btn-secondary {
    background-color: white;
    color: #1a1a1a;
    border: 1px solid var(--border);
    box-shadow: 2px 2px 0px 0px var(--border);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 0px 0px var(--border);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: 2px 2px 0px 0px var(--border);
}

.btn-icon {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--foreground);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

/* Dark mode button adjustments */
[data-theme="dark"] .btn {
    box-shadow: 2px 2px 0px 0px var(--border);
}

[data-theme="dark"] .btn:hover {
    box-shadow: 4px 4px 0px 0px var(--border);
}

[data-theme="dark"] .btn-secondary {
    background-color: transparent;
    color: white;
}

[data-theme="dark"] .btn-secondary:hover {
    box-shadow: 4px 4px 0px 0px var(--border);
}

/* Card Container */
.card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 4px 4px 0px 0px var(--border);
    position: relative;
}

/* NO hover scale */
.card:hover {
    /* no transform */
}

[data-theme="dark"] .card {
    background-color: transparent;
    border-color: var(--primary);
    box-shadow: 4px 4px 0px 0px var(--primary);
}

.card-content {
    position: relative;
}

/* Card Color Variants - Use var(--border) for borders and shadows in light mode */
.card-red {
    border: 2px solid var(--border) !important;
    box-shadow: 4px 4px 0px 0px var(--border) !important;
}

[data-theme="dark"] .card-red {
    border-color: #ef4444 !important;
    box-shadow: 4px 4px 0px 0px #ef4444 !important;
}

.card-purple {
    border: 1px solid var(--border);
    box-shadow: 4px 4px 0px 0px var(--border);
}

[data-theme="dark"] .card-purple {
    border: 3px solid var(--primary);
    box-shadow: 4px 4px 0px 0px var(--primary);
}

.card-gold {
    box-shadow: 4px 4px 0px 0px var(--border);
}

.card-yellow {
    box-shadow: 4px 4px 0px 0px var(--border);
}

[data-theme="dark"] .card-yellow {
    border-color: var(--action);
    box-shadow: 4px 4px 0px 0px var(--action);
}

.card-green {
    border: 1px solid var(--border);
    box-shadow: 4px 4px 0px 0px var(--border);
}

[data-theme="dark"] .card-green {
    border: 1px solid #22c55e;
    box-shadow: 4px 4px 0px 0px #22c55e;
}

[data-theme="dark"] .card-green .section-h2,
[data-theme="dark"] .card-green .ti-shield-check,
[data-theme="dark"] .card-green .ti-lock,
[data-theme="dark"] .card-green .ti-refresh {
    color: #22c55e;
}

[data-theme="light"] .card-green .section-h2,
[data-theme="light"] .card-green .ti-shield-check,
[data-theme="light"] .card-green .ti-lock,
[data-theme="light"] .card-green .ti-refresh {
    color: var(--border);
}

.card-gold {
    border-color: #f59e0b;
    box-shadow: 4px 4px 0px 0px var(--border);
}

.card-yellow {
    box-shadow: 4px 4px 0px 0px var(--border);
}

[data-theme="dark"] .card-yellow {
    border-color: #d97706;
    box-shadow: 4px 4px 0px 0px #d97706;
}

.card-green {
    box-shadow: 4px 4px 0px 0px var(--border);
}

[data-theme="dark"] .card-yellow {
    border-color: #d97706;
    box-shadow: 4px 4px 0px 0px #d97706;
}

/* Yellow Badge */
.badge-yellow {
    font-family: 'Schibsted Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1a1a1a;
    border: 1px solid var(--action);
    background-color: var(--action);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    box-shadow: 2px 2px 0px 0px var(--border);
    display: inline-block;
}

/* Regular License card text/icons - dark navy in light mode, yellow in dark mode */
.card-yellow .card-content .subtitle,
.card-yellow .card-content .ti-check {
    color: var(--border);
}

[data-theme="dark"] .card-yellow .card-content .subtitle,
[data-theme="dark"] .card-yellow .card-content .ti-check {
    color: var(--action);
}

/* Extended License Badge */
.badge-extended {
    background: var(--primary);
    color: white;
    box-shadow: 2px 2px 0px 0px var(--border);
}

[data-theme="dark"] .badge-extended {
    background: var(--primary);
    box-shadow: 2px 2px 0px 0px #581c87;
}

.card-green {
    border: 1px solid var(--border);
    box-shadow: 4px 4px 0px 0px var(--border);
}

/* Extended License separator */
.card-purple .separator {
    border-top: 1px solid var(--border) !important;
}

[data-theme="dark"] .card-purple .separator {
    border-top: 1px solid var(--primary) !important;
}

/* Extended License CTA Button - Dark Purple Shadow */
.btn-extended {
    background-color: var(--primary) !important;
    color: white !important;
    border: 2px solid var(--primary) !important;
    box-shadow: 4px 4px 0px 0px #3b0764 !important;
}

.btn-extended:hover {
    box-shadow: 6px 6px 0px 0px #3b0764 !important;
    transform: translateY(-2px);
}

[data-theme="dark"] .btn-extended {
    box-shadow: 4px 4px 0px 0px #581c87 !important;
}

[data-theme="dark"] .btn-extended:hover {
    box-shadow: 6px 6px 0px 0px #581c87 !important;
}

/* Mobile Theme Toggle Button */
.mobile-theme-toggle .btn {
    background-color: var(--action) !important;
    color: #1a1a1a !important;
    border: 2px solid var(--border) !important;
    border-radius: 0.375rem !important;
}

/* Mobile Header - Remove edge spacing */
@media (max-width: 767px) {
    .header {
        padding: 0.75rem 0;
    }
}

/* Typography Display */
h1, h2, h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    color: var(--foreground);
    line-height: 1.2;
}

.hero-h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

@media (min-width: 768px) {
    .hero-h1 {
        font-size: 3.5rem;
    }
}

.section-h2 {
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .section-h2 {
        font-size: 2.25rem;
    }
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.subtitle {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--muted-foreground);
    line-height: 1.625;
}

.nav-link {
    font-family: 'Schibsted Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--foreground);
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: var(--primary);
}

.badge {
    font-family: 'Schibsted Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted-foreground);
    border: 1px solid var(--border);
    background-color: var(--card);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    box-shadow: 2px 2px 0px 0px var(--border);
    display: inline-block;
}

[data-theme="dark"] .badge {
    background-color: transparent;
    color: white;
    border: 1px solid var(--primary);
    box-shadow: 2px 2px 0px 0px var(--primary);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

.grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-4 {
    gap: 1rem;
}

.gap-8 {
    gap: 2rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-16 {
    margin-bottom: 4rem;
}

/* Features page specific spacing */
.features-page {
    padding-top: 2rem;
}

.page-header {
    padding: 4rem 0;
}

.cta-section {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 3rem 2rem;
    box-shadow: 4px 4px 0px 0px var(--border);
    margin: 4rem 0;
}

[data-theme="dark"] .cta-section {
    background-color: transparent;
    border-color: var(--primary);
    box-shadow: 4px 4px 0px 0px var(--primary);
}

.cta-h2 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
    text-align: center;
}

@media (min-width: 768px) {
    .cta-h2 {
        font-size: 2.5rem;
    }
}

.p-8 {
    padding: 2rem;
}

.text-center {
    text-align: center;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

/* Fixed Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--background);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
    transition: background-color 0.3s, border-color 0.3s;
}

/* Mobile: reduce header padding for tighter fit */
@media (max-width: 767px) {
    .header {
        padding: 0.75rem 0;
    }
}

.navbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 0.5rem;
    width: 100%;
    padding: 0;
}

/* Mobile navbar - full width */
@media (max-width: 767px) {
    .navbar {
        padding: 0;
        gap: 0.25rem;
    }
}

.logo {
    display: flex;
    align-items: center;
    font-family: 'Schibsted Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--foreground);
    text-decoration: none;
    justify-self: center;
}

/* Hamburger Menu (Mobile) */
.hamburger {
    display: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--foreground);
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-self: center;
}

/* Mobile menu overlay - darken only, no blur */
.nav-overlay {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Tablet & Mobile breakpoint */
@media (max-width: 1024px) {
    .hamburger,
    .nav-overlay,
    .mobile-theme-toggle {
        display: block;
    }

    /* Hide desktop theme toggle on mobile/tablet */
    #theme-toggle {
        display: none;
    }

    .nav-menu {
        display: flex;
        position: fixed;
        top: 70px;
        left: 0;
        width: 85%;
        max-width: 320px;
        background-color: var(--background);
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1001;
        border-right: 1px solid var(--border);
        height: calc(100vh - 70px);
        overflow-y: auto;
        align-items: flex-start;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .navbar {
        position: relative;
    }

    .logo {
        flex: 1;
        text-align: center;
        order: 2;
        margin: 0 auto;
    }

    .hamburger {
        order: 1;
    }

    .nav-actions {
        order: 3;
    }

    .btn-buy-desktop {
        display: none;
    }

    .btn-buy-mobile {
        display: inline-flex;
    }

    .btn {
        padding: 0.375rem 0.75rem;
        font-size: 1rem;
        white-space: nowrap;
    }

    /* Theme toggle container in mobile menu */
    .mobile-theme-toggle {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border);
        width: 100%;
    }

    .mobile-theme-toggle .btn {
        width: 100%;
        justify-content: center;
        border-radius: 0.75rem;
    }
    
    /* Prevent content shift when menu opens */
    body.menu-open {
        overflow: hidden;
    }
    
    body.menu-open .container,
    body.menu-open main {
        transform: none;
        filter: none;
    }
}

/* Desktop */
@media (min-width: 1025px) {
    .hamburger,
    .nav-overlay,
    .mobile-theme-toggle,
    .btn-buy-mobile {
        display: none;
    }

    .btn-buy-desktop {
        display: inline-flex;
    }

    /* Desktop theme toggle spacing */
    #theme-toggle {
        padding-right: 1rem;
    }
}

/* Active nav link style */
.nav-link.active {
    color: var(--primary);
    font-weight: 600;
}

/* Hero Section - Two Column */
.hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
    padding: 2rem 0 3rem;
    min-width: 0;
}

@media (min-width: 768px) {
    .hero {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        padding: 4rem 0 6rem;
    }
}

.hero-content {
    max-width: 100%;
    min-width: 0;
}

@media (min-width: 768px) {
    .hero-content {
        max-width: 540px;
    }
}

.hero-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
}

/* Icon styling */
.icon {
    font-family: 'Tabler Icons' !important;
    font-size: 1.5rem;
    line-height: 1;
}

.icon-sm {
    font-size: 1.25rem;
}

/* Feature cards with icons */
.feature-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Smooth transitions */
body, .card, .btn, .badge {
    transition: background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--muted-foreground);
    font-family: 'Schibsted Grotesk', sans-serif;
    font-size: 0.875rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
}

.cta-h2 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--foreground);
}

@media (min-width: 768px) {
    .cta-h2 {
        font-size: 2.5rem;
    }
}

/* Text Primary utility */
.text-primary {
    color: var(--primary);
}

/* Utility classes */
.w-5 {
    width: 1.25rem;
}

.h-5 {
    height: 1.25rem;
}

.text-sm {
    font-size: 0.875rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

/* Mobile menu transition */
.nav-menu {
    will-change: transform;
}
