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

/* Sora FONT */
@font-face {
  font-family: 'Sora';
  src: url('/assets/font/sora-light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: 'Sora';
  src: url('/assets/font/sora-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Sora';
  src: url('/assets/font/sora-medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Sora';
  src: url('/assets/font/sora-semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: 'Sora';
  src: url('/assets/font/sora-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
}

/* POPPINS FONT */
@font-face {
  font-family: 'Poppins';
  src: url('/assets/font/poppins-light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: 'Poppins';
  src: url('/assets/font/poppins-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Poppins';
  src: url('/assets/font/poppins-medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Poppins';
  src: url('/assets/font/poppins-semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: 'Poppins';
  src: url('/assets/font/poppins-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
}

:root {
    /* Colors */
    --athanor-purple-dark: #252554;
    --athanor-purple: #323265;
    --athanor-violet: #6D2381;
    --athanor-magenta: #C7017F;
    --athanor-dark-void: #111423;
    --athanor-dark-void-50: rgba(17, 20, 35, 0.50);
    --athanor-deep-purple: #151828;
    --athanor-silver: #95A6C1;
    --athanor-snow: #D9DDE2;
    --athanor-focus: #00FF88;
    --athanor-dark-green: #0C2A2E;
    --athanor-teal: #00fffb;
    --primary-color: #E91E63;
    --primary-dark: #C2185B;
    --secondary-color: #6366F1;
    --accent-color: #00FF88;
    --background-dark: #0F1419;
    --background-darker: #0A0E13;
    --surface-color: #111423;
    --surface-lighter: #2D3748;
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0A0;
    --text-muted: #718096;
    --border-color: #2D3748;
    
    /* Typography */
    --font-family: 'Poppins', sans-serif;
    --font-family-heading: 'Sora', sans-serif;
    --font-size-xxs: 0.65rem;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 0.95rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.85rem;
    --font-size-4xl: 2.1rem;
    --font-size-5xl: 2.7rem;

    /* Line Height*/
    --line-height-none: 1;
    --line-height-tight: 1.2;
    --line-height-base: 1.4;
    --line-height-relaxed: 1.6;
    --line-height-loose: 2;
    
    /* Spacing */
    --boxed: max(1300px, 94%);
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    --spacing-4xl: 5rem;
    --spacing-5xl: 6rem;
    
    /* Border radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-green: 0px 3px 16px #0c2a2eab;
    --shadow-blue: 0px 3px 16px #3c2b864a;
    --shadow-magenta: 0px 3px 16px #ff00ff38;
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;

    /* Form Specific */
    --form-max-width: 480px;
    --input-height: 48px;
    --focus-ring: 0 0 0 3px rgba(199, 1, 127, 0.2);
}

/* Screen reader only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Selezione testo */
::selection {
  background-color: var(--athanor-magenta);
  color: white;
}

::-moz-selection {
  background-color: var(--athanor-magenta);
  color: white;
}

/* Base styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text-primary);
    background-color: var(--athanor-dark-void);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: none;
}

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #00fff2;
  box-shadow: 0 0 12px 6px rgba(0, 255, 242, 0.3);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.05s ease-out;
}

.container {
    max-width: var(--boxed);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--athanor-focus);
    outline-offset: 2px;
}

/* Skip link */
.skip-link {      
    position: absolute;
    top: -40px;
    left: 6px;  
    background: var(--athanor-snow);
    color: var(--athanor-dark-void);
    padding: var(--spacing-sm) var(--spacing-md);
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    font-family: var(--font-family);  
    z-index: 10001;
}

:is(.skip-link:hover, .skip-link:focus) {
    top: 6px;
    background: var(--accent-color);
    color: var(--background-dark);
}

/* Header */
.header {
    /*background: rgba(15, 20, 25, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);*/
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition-normal);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    max-width: var(--boxed);
    margin: 0 auto;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.nav-toggle:hover {
    background: var(--surface-color);
}

.hamburger {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition-fast);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: var(--spacing-lg);
    margin: 0;
}

.nav-links a {
    display: flex;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.nav-links a:hover,
.nav-links a:focus {
    color: var(--athanor-magenta);
    /*background: var(--surface-color);*/
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.language-selector select {
    background: var(--surface-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.language-selector select:hover,
.language-selector select:focus {
    border-color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-fast);
    min-height: 44px; /* WCAG AAA touch target size */
    line-height: var(--line-height-none);
    width: fit-content;
    font-family: var(--font-family-heading);
    position: relative;
    overflow: hidden;
}

.btn-cta {
    background: linear-gradient(135deg, var(--athanor-violet), var(--athanor-purple));
    color: var(--text-primary);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

.btn:hover,
.btn:focus {
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.2);
}

.btn-transparent {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid transparent;
}

.btn-transparent:hover,
.btn-transparent:focus {
    border-color: var(--athanor-silver);
    background: linear-gradient(90deg, var(--athanor-purple), var(--athanor-purple-dark)) !important;
    color: var(--text-primary) !important;
}

.btn-cta-magenta {
    background: linear-gradient(135deg, var(--athanor-magenta), var(--athanor-violet));
    color: var(--text-primary);
}

.btn-cta-magenta:hover,
.btn-cta-magenta:focus {
    background: linear-gradient(135deg, var(--athanor-violet), var(--athanor-purple)) !important;
    color: var(--text-primary) !important;
}

@scope (nav) {
    .btn {
        padding: 0 var(--spacing-lg) !important;
        font-size: var(--font-size-sm);
        line-height: var(--line-height-none);
    }
}

.btn-cta-white {
    background: var(--athanor-snow);
    color: var(--athanor-magenta);
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-md);
    border-radius: var(--radius-xl);
    font-weight: 700;
}

.btn-cta-white:hover,
.btn-cta-white:focus {
    background: var(--athanor-purple);
    color: var(--text-primary);
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  pointer-events: none;
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  width: 20px;
  height: 20px;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Main content offset for fixed header */
main {
    overflow: hidden;
    position: relative;
}

/* Hero Section */
.hero {
    padding: var(--spacing-2xl) var(--spacing-5xl);
    position: relative;
    text-align: center;
    height: 100vh;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(1366px, 100%);
    margin-inline: auto;
}

:is(.hero .hero-text, .hero .hero-visual) {
    z-index: 3;
}

.hero-loader.typewriter {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    gap: 0.5em;
    color: white;
    min-height: 39px;
    min-width: 29ch;
    justify-content: center;
    margin-block-end: 1rem;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    padding: 0.5rem 1.5rem;
    width: max-content;
    margin: 1rem auto;
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-loader.typewriter .word {
    line-height: 1;
    min-width: 1ch;
}

h1 {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-5xl);
    line-height: var(--line-height-tight);
    font-weight: 800;
    margin-block: var(--spacing-xl);
}

h1 > span {
    position: relative;
    margin-inline: 0.25rem;
}

h1 > span:before {
    background-color: var(--athanor-magenta);
    opacity: 0.8;
    content: '';
    display: block;
    position: absolute;
    width: calc(100% + 2rem);
    height: 85%;
    border-radius: 2rem;
    left: 0;
    bottom: 0.35rem;
    z-index: -1;
    transform: rotate(-0.75deg) translateX(-1rem);
    box-shadow: var(--shadow-magenta);
}

h2 {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary);
    line-height: var(--line-height-tight);
    margin-bottom: var(--spacing-sm);
}

h2 > span {
    background-image: linear-gradient(90deg, var(--athanor-violet) 25%, var(--athanor-magenta) 100%);
    padding-inline: 0.5rem;
    border-radius: 1rem;
    position: relative;
}

.hero p {
    color: var(--athanor-snow);
    line-height: var(--line-height-base);
    margin-bottom: var(--spacing-xl);
    font-size: var(--font-size-lg);
}

.hero img {
    position: absolute;
    left: 50%;
    bottom: 50%;
    transform: translate(-50%, 50%);
    width: 600px;
    opacity: 0.075;
    z-index: 2;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.blur-gradient {
  position: absolute;
  top: 90%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 135%;
  height: 135%;
  background: radial-gradient(circle at center, #00fffb, #7f00ff, #ff0099);
  filter: blur(80px);
  opacity: 0.25;
  animation: gradientShift 10s ease infinite;
  border-radius: 50%;
  z-index: 0;
}

@keyframes gradientShift {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.25);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

.tech-grid-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -1;
  pointer-events: none;
  mix-blend-mode: overlay;
  filter: blur(1px);
  animation: moveGrid 40s linear infinite;
}

@keyframes moveGrid {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 100px 100px;
  }
}

/* Footer */
footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    display: flex;
    z-index: 2;
    padding: 1rem;
}

footer a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

footer a:hover {
    color: var(--athanor-magenta);
}

.footer-legal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
}

.footer-legal p {
    color: var(--athanor-silver);
    font-size: var(--font-size-sm);
}

.footer-legal nav {
    display: flex;
    gap: var(--spacing-lg);
}

.footer-legal nav a {
    color: var(--athanor-silver);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: var(--transition-fast);
}

.footer-legal nav a:hover,
.footer-legal nav a:focus {
    color: var(--athanor-magenta);
}

/* Responsive Design */
@media (max-width: 768px) {
    .cursor-dot {
        display: none;
    }
    .nav-menu ul li:last-child {
        display: none !important;
        visibility: hidden !important;
    }
    p {
        font-size: var(--font-size-base) !important;
        line-height: var(--line-height-relaxed);
    }
    .hero {
        padding: var(--spacing-2xl);
    }
    .hero-loader.typewriter {
        font-size: var(--font-size-lg);
        min-height: 36px;
    }
    h1 {
        font-size: var(--font-size-4xl);
    }
    .hero img {
        width: 500px;
    }
    .btn-cta:not(.btn-cta-white) {
        background: linear-gradient(180deg, var(--athanor-magenta), var(--athanor-violet));
        padding: var(--spacing-xs) var(--spacing-lg);
        line-height: var(--line-height-loose);
        min-height: auto;
    }
}

@media (max-width: 480px) {
    main {
        height: 100dvh;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
    .nav-container {
        padding: var(--spacing-md) var(--spacing-xl) 0;
    }
    .hero {
        padding: var(--spacing-sm) var(--spacing-xl);
    }
    h1 {
        font-size: var(--font-size-2xl);
    }
    h2 {
        font-size: var(--font-size-base);
    }
    .hero p {
        margin-bottom: var(--spacing-xl);
    }
    .hero-loader.typewriter {
        font-size: var(--font-size-sm);
        min-height: 33px;
    }
    .footer-legal p {
        font-size: var(--font-size-xxs) !important;
        text-align: center;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-secondary: #FFFFFF;
        --border-color: #FFFFFF;
    }
    
    .step-card,
    .feature-card,
    .course-card {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .shape {
        animation: none;
    }
}

/* Print styles */
@media print {
    .header,
    .nav-toggle,
    .btn,
    .social-links {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .hero,
    .how-it-works,
    .why-choose,
    .financial-alchemy,
    .learning-courses,
    .cta-section,
    .footer {
        background: white;
        color: black;
    }
}
