/* ═══════════════════════════════════════════════════════════════
   ESPURNA · COMING SOON
   Paleta: carbó fosc + accents foc (ambre, taronja, groc)
   Tipografies: Space Grotesk (titulars) + Inter (text)
   ═══════════════════════════════════════════════════════════════ */

/* ── TOKENS ────────────────────────────────────────────────────── */
:root {
    /* Fons */
    --bg-base: #16120e;
    /* Carbó càlid molt fosc */
    --bg-surface: #1f1a13;
    /* Superfície de targetes/seccions */
    --bg-elevated: #2a2218;
    /* Elements elevats */

    /* Accents foc */
    --fire-amber: #f5a623;
    /* Ambre principal */
    --fire-orange: #e8621a;
    /* Taronja foc */
    --fire-red: #c0392b;
    /* Vermell brasa */
    --fire-yellow: #ffd24c;
    /* Groc llampant */

    /* Gradient foc */
    --gradient-fire: linear-gradient(135deg, var(--fire-yellow) 0%, var(--fire-amber) 40%, var(--fire-orange) 100%);
    --gradient-glow: radial-gradient(ellipse at center, rgba(245, 166, 35, 0.18) 0%, transparent 70%);

    /* Text */
    --text-primary: #f5ede0;
    /* Cru càlid */
    --text-secondary: #b8a898;
    /* Segon pla */
    --text-muted: #7a6a5a;
    /* Silenciat */

    /* Tipografies */
    --font-head: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;

    /* Espaiat */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;

    /* Radis */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-pill: 9999px;

    /* Transicions */
    --ease-fire: cubic-bezier(0.22, 1, 0.36, 1);
    --dur-fast: 150ms;
    --dur-med: 300ms;
    --dur-slow: 600ms;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100dvh;
}

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

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

ul {
    list-style: none;
}

/* Accessible skip link */
.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;
}

/* ── LAYOUT ─────────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ── NOISE OVERLAY ──────────────────────────────────────────────── */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.045;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-size: 180px 180px;
    mix-blend-mode: overlay;
}

/* ── AMBIENT GLOW ───────────────────────────────────────────────── */
.glow {
    position: fixed;
    z-index: 0;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(80px);
    animation: glowPulse 8s ease-in-out infinite alternate;
}

.glow-1 {
    top: -10%;
    left: 30%;
    width: 60vw;
    height: 50vw;
    background: radial-gradient(ellipse, rgba(228, 98, 26, 0.12) 0%, transparent 70%);
}

.glow-2 {
    bottom: 5%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(ellipse, rgba(245, 166, 35, 0.08) 0%, transparent 70%);
    animation-delay: 4s;
}

@keyframes glowPulse {
    0% {
        opacity: 0.7;
        transform: scale(1);
    }

    100% {
        opacity: 1.0;
        transform: scale(1.08);
    }
}

/* Ensure content is above overlays */
.site-header,
main,
.site-footer {
    position: relative;
    z-index: 1;
}

/* ── HEADER ─────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: var(--space-sm) 0;
    background: rgba(22, 18, 14, 0.85);
    backdrop-filter: blur(14px) saturate(1.3);
    -webkit-backdrop-filter: blur(14px) saturate(1.3);
    border-bottom: 1px solid rgba(245, 166, 35, 0.1);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity var(--dur-fast) var(--ease-fire);
}

.logo:hover {
    opacity: 0.85;
}

.logo-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.logo-name {
    font-family: var(--font-head);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--text-primary);
}

/* Social nav */
.social-nav {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: color var(--dur-fast) var(--ease-fire),
        background var(--dur-fast) var(--ease-fire);
}

.social-link svg,
.social-link [data-lucide] {
    width: 18px;
    height: 18px;
}

.social-link:hover {
    color: var(--fire-amber);
    background: rgba(245, 166, 35, 0.1);
}

/* ── HERO ───────────────────────────────────────────────────────── */
.hero {
    padding: var(--space-xl) 0 var(--space-2xl);
    text-align: center;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

/* Badge "Aviat" */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    background: rgba(245, 166, 35, 0.1);
    border: 1px solid rgba(245, 166, 35, 0.25);
    font-family: var(--font-head);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--fire-amber);
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--fire-amber);
    box-shadow: 0 0 8px var(--fire-amber);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {

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

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

/* Hero icon */
.hero-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hero-icon {
    width: clamp(140px, 22vw, 200px);
    height: auto;
    filter: drop-shadow(0 0 32px rgba(232, 98, 26, 0.45)) drop-shadow(0 0 60px rgba(245, 166, 35, 0.2));
    animation: iconFloat 6s ease-in-out infinite;
    will-change: transform;
}

@keyframes iconFloat {

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

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

.hero-icon-glow {
    position: absolute;
    inset: -30%;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(245, 166, 35, 0.18) 0%, transparent 65%);
    animation: glowPulse 4s ease-in-out infinite alternate;
    pointer-events: none;
}

/* Headings */
.hero-h1 {
    font-family: var(--font-head);
    font-size: clamp(2.4rem, 7vw, 4.2rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.hero-sub {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 52ch;
    line-height: 1.6;
}

/* Desktop line break on subtitle */
.br-desktop {
    display: none;
}

@media (min-width: 640px) {
    .br-desktop {
        display: block;
    }
}

/* ── EMAIL FORM ─────────────────────────────────────────────────── */
.email-form {
    width: 100%;
    max-width: 520px;
}

.form-group {
    display: flex;
    gap: 8px;
    background: var(--bg-elevated);
    border: 1px solid rgba(245, 166, 35, 0.2);
    border-radius: var(--radius-lg);
    padding: 6px 6px 6px 18px;
    transition: border-color var(--dur-med) var(--ease-fire),
        box-shadow var(--dur-med) var(--ease-fire);
}

.form-group:focus-within {
    border-color: rgba(245, 166, 35, 0.55);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.1),
        0 4px 20px rgba(232, 98, 26, 0.15);
}

.email-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    min-width: 0;
}

.email-input::placeholder {
    color: var(--text-muted);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--gradient-fire);
    font-family: var(--font-head);
    font-size: 0.88rem;
    font-weight: 600;
    color: #16120e;
    cursor: pointer;
    white-space: nowrap;
    transition: filter var(--dur-fast) var(--ease-fire),
        transform var(--dur-fast) var(--ease-fire),
        box-shadow var(--dur-med) var(--ease-fire);
    box-shadow: 0 2px 12px rgba(232, 98, 26, 0.35);
}

.btn-primary:hover {
    filter: brightness(1.1) saturate(1.15);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(232, 98, 26, 0.55);
}

.btn-primary:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

.btn-primary:focus-visible {
    outline: 2px solid var(--fire-amber);
    outline-offset: 3px;
}

.btn-primary .btn-icon {
    width: 16px;
    height: 16px;
    transition: transform var(--dur-fast) var(--ease-fire);
}

.btn-primary:hover .btn-icon {
    transform: translateX(3px);
}

/* Form messages */
.form-error {
    margin-top: 10px;
    font-size: 0.84rem;
    color: #e07070;
    min-height: 1.2em;
}

.form-success {
    margin-top: 10px;
    font-size: 0.84rem;
    color: var(--fire-amber);
    min-height: 1.2em;
}

/* ── SECONDARY CTA ──────────────────────────────────────────────── */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(245, 166, 35, 0.3);
    background: transparent;
    font-family: var(--font-head);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--dur-fast) var(--ease-fire),
        border-color var(--dur-fast) var(--ease-fire),
        background var(--dur-fast) var(--ease-fire),
        box-shadow var(--dur-med) var(--ease-fire);
}

.btn-secondary svg,
.btn-secondary [data-lucide] {
    width: 17px;
    height: 17px;
}

.btn-secondary:hover {
    color: var(--fire-amber);
    border-color: rgba(245, 166, 35, 0.6);
    background: rgba(245, 166, 35, 0.07);
    box-shadow: 0 0 16px rgba(245, 166, 35, 0.12);
}

.btn-secondary:focus-visible {
    outline: 2px solid var(--fire-amber);
    outline-offset: 3px;
}

/* ── ABOUT SECTION ──────────────────────────────────────────────── */
.about-section {
    padding: var(--space-xl) 0;
    border-top: 1px solid rgba(245, 166, 35, 0.08);
}

.about-heading {
    font-family: var(--font-head);
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-surface);
    border: 1px solid rgba(245, 166, 35, 0.1);
    border-radius: var(--radius-md);
    transition: border-color var(--dur-med) var(--ease-fire),
        background var(--dur-med) var(--ease-fire),
        transform var(--dur-med) var(--ease-fire),
        opacity var(--dur-slow) var(--ease-fire);
}

.feature-item:hover {
    border-color: rgba(245, 166, 35, 0.3);
    background: var(--bg-elevated);
    transform: translateX(4px);
}

.feature-icon-wrap {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: rgba(245, 166, 35, 0.1);
    color: var(--fire-amber);
}

.feature-icon-wrap [data-lucide],
.feature-icon-wrap svg {
    width: 20px;
    height: 20px;
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feature-text strong {
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.feature-text span {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ── SCROLL REVEAL ──────────────────────────────────────────────── */
.reveal-ready {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--dur-slow) var(--ease-fire),
        transform var(--dur-slow) var(--ease-fire);
}

.reveal-ready.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ── FOOTER ─────────────────────────────────────────────────────── */
.site-footer {
    padding: var(--space-xl) 0 var(--space-lg);
    border-top: 1px solid rgba(245, 166, 35, 0.08);
    text-align: center;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.75;
}

.footer-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.footer-name {
    font-family: var(--font-head);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--text-muted);
}

.footer-quote {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 40ch;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-link {
    color: var(--fire-amber);
    transition: opacity var(--dur-fast);
}

.footer-link:hover {
    opacity: 0.75;
}

/* ── MOBILE ─────────────────────────────────────────────────────── */
@media (max-width: 520px) {
    .form-group {
        flex-direction: column;
        padding: 10px;
        border-radius: var(--radius-md);
        gap: 10px;
    }

    .email-input {
        font-size: 1rem;
        padding: 4px 0;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
        padding: 14px 22px;
    }

    .feature-item {
        gap: var(--space-sm);
    }
}

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

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal-ready {
        opacity: 1;
        transform: none;
    }
}

/* ── PRINT ──────────────────────────────────────────────────────── */
@media print {

    .noise-overlay,
    .glow {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}