/* ===================================================
   BASE STYLES - Reset & Fundamentals
   =================================================== */

/* Box Sizing Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Base Body Styles */
body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-regular);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: var(--bg-base);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Reset */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    color: var(--text-primary);
}

h1 {
    font-size: var(--text-5xl);
}

h2 {
    font-size: var(--text-4xl);
}

h3 {
    font-size: var(--text-2xl);
}

h4 {
    font-size: var(--text-xl);
}

h5 {
    font-size: var(--text-lg);
}

h6 {
    font-size: var(--text-base);
}

p {
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

/* Link Reset */
a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--text-accent);
}

/* List Reset */
ul,
ol {
    list-style: none;
}

/* Image Reset */
img,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Button Reset */
button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

/* Focus Styles */
:focus-visible {
    outline: 2px solid var(--color-brand-primary);
    outline-offset: 3px;
}

/* Selection Styles */
::selection {
    background: var(--color-brand-primary);
    color: var(--bg-base);
}

/* ===================================================
   LAYOUT UTILITIES
   =================================================== */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--space-6);
}

.container--narrow {
    max-width: var(--container-narrow);
}

section {
    padding-block: var(--section-padding);
    position: relative;
}

/* ===================================================
   TYPOGRAPHY UTILITIES
   =================================================== */

.text-gradient {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

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

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

/* ===================================================
   SECTION HEADERS
   =================================================== */

.section-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-5);
    background: hsla(161, 62%, 55%, 0.1);
    border: 1px solid hsla(161, 62%, 55%, 0.2);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-brand-primary);
    margin-bottom: var(--space-4);
}

.section-badge i {
    font-size: var(--text-base);
}

.section-title {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-4);
    position: relative;
}

.section-title .title-number {
    font-family: var(--font-mono);
    font-size: var(--text-xl);
    font-weight: var(--font-medium);
    color: var(--color-brand-primary);
    margin-right: var(--space-3);
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    max-width: 600px;
    margin-inline: auto;
    line-height: var(--leading-relaxed);
}

/* ===================================================
   BUTTONS
   =================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-base);
    border: none;
    white-space: nowrap;
}

.btn i {
    font-size: 1.1em;
}

/* Primary Button */
.btn-primary {
    background: var(--gradient-brand);
    color: var(--bg-base);
    box-shadow: 0 4px 20px hsla(161, 62%, 55%, 0.25);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px hsla(161, 62%, 55%, 0.35);
    color: var(--bg-base);
}

/* Secondary Button */
.btn-secondary {
    background: transparent;
    color: var(--color-brand-primary);
    border: 2px solid var(--color-brand-primary);
}

.btn-secondary:hover {
    background: var(--color-brand-primary);
    color: var(--bg-base);
    transform: translateY(-3px);
}

/* Ghost Button */
.btn-ghost {
    background: hsla(0, 0%, 100%, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-ghost:hover {
    background: hsla(0, 0%, 100%, 0.1);
    border-color: hsla(0, 0%, 100%, 0.15);
    color: var(--text-primary);
}

/* Coffee Button */
.btn-coffee {
    background: linear-gradient(135deg, hsl(45, 100%, 50%) 0%, hsl(25, 95%, 55%) 100%);
    color: hsl(30, 80%, 10%);
    box-shadow: 0 4px 20px hsla(45, 100%, 50%, 0.25);
}

.btn-coffee:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px hsla(45, 100%, 50%, 0.35);
    color: hsl(30, 80%, 10%);
}

/* Icon Button */
.btn-icon {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: var(--radius-lg);
}

/* ===================================================
   SOCIAL LINKS
   =================================================== */

.social-links {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: var(--text-xl);
    transition: var(--transition-base);
}

.social-link:hover {
    background: var(--color-brand-primary);
    border-color: var(--color-brand-primary);
    color: var(--bg-base);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

/* ===================================================
   CARD COMPONENT
   =================================================== */

.card {
    background: var(--gradient-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    transition: var(--transition-base);
}

.card:hover {
    border-color: hsla(161, 62%, 55%, 0.3);
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
}

/* ===================================================
   GLASS CARD
   =================================================== */

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
}

/* ===================================================
   ANIMATIONS
   =================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

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

@keyframes pulse {

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

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 20px hsla(161, 62%, 55%, 0.3);
    }

    50% {
        box-shadow: 0 0 40px hsla(161, 62%, 55%, 0.5);
    }
}

.animate-fade-in {
    animation: fadeIn var(--duration-slow) var(--ease-out-expo) forwards;
}

.animate-fade-in-up {
    animation: fadeInUp var(--duration-slow) var(--ease-out-expo) forwards;
}

/* ===================================================
   SCROLLBAR STYLING
   =================================================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-surface);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-brand-primary);
}

/* ===================================================
   VIEW TRANSITIONS (Animated Theme Switch)
   =================================================== */

::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
    display: block;
}