/* ============================================
   AFD.TECH — Romain recrute les Avengers
   Sober Gaming Theme — Accenture Purple
   ============================================ */

/* ---------- VARIABLES ---------- */
:root {
    --bg-dark: #0c0c14;
    --bg-darker: #08080e;
    --bg-card: #13131f;
    --bg-card-hover: #1a1a2a;
    --accent: #A100FF;
    --accent-light: #b84dff;
    --accent-soft: #7c3aed;
    --accent-muted: rgba(161, 0, 255, 0.15);
    --text-primary: #f0f0f5;
    --text-secondary: #9ca3b0;
    --text-muted: #555a6e;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(161, 0, 255, 0.25);
    --glow: 0 0 20px rgba(161, 0, 255, 0.2), 0 0 60px rgba(161, 0, 255, 0.05);
    --glow-strong: 0 0 30px rgba(161, 0, 255, 0.35), 0 0 80px rgba(161, 0, 255, 0.1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Montserrat', system-ui, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ---------- BACKGROUND GRID ---------- */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(161, 0, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(161, 0, 255, 0.02) 1px, transparent 1px);
    background-size: 80px 80px;
}

.bg-grid::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(161, 0, 255, 0.06) 0%, transparent 50%);
}

/* ---------- HEADER ---------- */
.header {
    position: relative;
    z-index: 10;
    padding: 4rem 2rem 2rem;
    text-align: center;
}

.header::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(circle, rgba(161, 0, 255, 0.35) 1.5px, transparent 1.5px);
    background-size: 20px 20px;
    pointer-events: none;
    mask-image:
        radial-gradient(ellipse 55% 60% at 50% 50%, black 0%, transparent 70%),
        linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
    -webkit-mask-image:
        radial-gradient(ellipse 55% 60% at 50% 50%, black 0%, transparent 70%),
        linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
    mask-composite: intersect;
    -webkit-mask-composite: source-in;
}

.header-inner {
    max-width: 960px;
    margin: 0 auto;
}

.logo {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-img {
    height: clamp(32px, 5vw, 50px);
    width: auto;
    display: block;
}

.header-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.05;
    margin-bottom: 1.5rem;
}

.header-title em {
    font-style: italic;
    color: var(--accent-light);
}

.header-intro {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.header-intro-avatar-wrap {
    flex-shrink: 0;
}

.header-intro-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    box-shadow: 0 0 25px rgba(161, 0, 255, 0.3), 0 0 60px rgba(161, 0, 255, 0.08);
}

.header-intro-text {
    position: relative;
    padding-left: 2rem;
}

.header-intro-line {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--accent), var(--accent-soft), transparent);
    border-radius: 2px;
}

.header-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(0.85rem, 1.8vw, 1rem);
    font-weight: 500;
    color: var(--text-secondary);
    font-style: normal;
    line-height: 1.7;
}

.header-subtitle-cta {
    margin-top: 0.8rem;
}

.header-subtitle strong {
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
}

/* ---------- HERO ---------- */
.hero {
    position: relative;
    z-index: 10;
    padding: 1rem 2rem 3rem;
    text-align: center;
}

.hero-inner {
    max-width: 600px;
    margin: 0 auto;
}

.hero-arrow {
    color: var(--accent);
    animation: bounce 2.5s ease-in-out infinite;
    cursor: pointer;
}

.hero-arrow svg {
    opacity: 0.6;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(18px); }
}

/* ---------- CHAMPIONS GRID ---------- */
.champions {
    position: relative;
    z-index: 10;
    padding: 4rem 2rem 6rem;
}

.champions::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(circle, rgba(161, 0, 255, 0.55) 2.5px, transparent 2.5px);
    background-size: 24px 24px;
    pointer-events: none;
    mask-image:
        radial-gradient(ellipse 50% 50% at center, black 0%, transparent 70%),
        linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    -webkit-mask-image:
        radial-gradient(ellipse 50% 50% at center, black 0%, transparent 70%),
        linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    mask-composite: intersect;
    -webkit-mask-composite: source-in;
}

.champions::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(circle, rgba(161, 0, 255, 0.3) 0.8px, transparent 0.8px);
    background-size: 14px 14px;
    pointer-events: none;
    mask-image:
        radial-gradient(ellipse 45% 45% at center, transparent 30%, black 70%),
        linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    -webkit-mask-image:
        radial-gradient(ellipse 45% 45% at center, transparent 30%, black 70%),
        linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    mask-composite: intersect;
    -webkit-mask-composite: source-in;
}

.champions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1440px;
    margin: 0 auto;
}

/* ---------- CARD ---------- */
.card {
    position: relative;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
}

.card:hover {
    transform: translateY(-6px) scale(1.02);
    z-index: 20;
}

.card-inner {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.4s, box-shadow 0.4s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card {
    display: flex;
}

.card:hover .card-inner {
    border-color: var(--border-accent);
    box-shadow: var(--glow);
}

.card-glow {
    position: absolute;
    inset: -1px;
    border-radius: 13px;
    opacity: 0;
    transition: opacity 0.4s;
    z-index: -1;
    background: linear-gradient(135deg, rgba(161, 0, 255, 0.08), transparent 60%);
}

.card:hover .card-glow {
    opacity: 1;
}

/* Foil holographic canvas overlay */
.card-foil-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    mix-blend-mode: color-dodge;
    transition: opacity 0.4s;
}

.card:hover .card-foil-canvas {
    opacity: 1;
}

/* Card Image */
.card-image-wrap {
    position: relative;
    overflow: hidden;
}

.card-image {
    position: relative;
}

.card-avatar {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.card:hover .card-avatar {
    transform: scale(1.03);
}

.card-rank {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    color: var(--accent);
    opacity: 0.8;
    line-height: 1;
}

/* Card Content */
.card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-role {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-light);
    margin-bottom: 0.3rem;
}

.card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--text-primary);
}

/* Tags */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.2rem;
    flex: 1;
    align-content: flex-start;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tag-tech {
    background: var(--accent-muted);
    color: var(--accent-light);
    border: 1px solid rgba(161, 0, 255, 0.2);
}

.tag-human {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Card CTA Button */
.card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-secondary);
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    justify-content: center;
}

.card-cta:hover {
    border-color: var(--accent);
    color: var(--accent-light);
    background: var(--accent-muted);
}

/* ---------- MODAL ---------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 14, 0.93);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: 16px;
    max-width: 680px;
    width: calc(100% - 2rem);
    max-height: 90vh;
    overflow-y: auto;
    padding: 2.5rem;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: var(--glow), 0 25px 80px rgba(0, 0, 0, 0.5);
}

.modal.active .modal-content {
    transform: translateY(0) scale(1);
}

/* Scrollbar style */
.modal-content::-webkit-scrollbar {
    width: 5px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 1.4rem;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
    line-height: 1;
}

.modal-close:hover {
    border-color: var(--accent);
    color: var(--accent-light);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-right: 3rem;
}

.modal-rank {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--accent);
    opacity: 0.12;
    line-height: 1;
    flex-shrink: 0;
}

.modal-role {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-light);
    margin-bottom: 0.25rem;
}

.modal-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.1;
    color: var(--text-primary);
}

/* Modal Body */
.modal-body h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.modal-description {
    margin-bottom: 2rem;
}

.modal-description p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 0.8rem;
}

.modal-section {
    margin-bottom: 2rem;
}

/* ---------- SKILL BARS ---------- */
.skill-bars {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.skill-bar {
    width: 100%;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.skill-info span:first-child {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
}

.skill-pct {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.skill-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 3px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent-soft), var(--accent));
    transition: width 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ---------- HUMAN SKILLS BADGES ---------- */
.human-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    transition: all 0.3s;
}

.badge:hover {
    border-color: var(--border-accent);
    color: var(--accent-light);
    background: var(--accent-muted);
}

/* ---------- SOFTWARE GRID ---------- */
.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.7rem;
}

.software-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    transition: all 0.3s;
}

.software-item:hover {
    border-color: var(--border-accent);
    background: var(--accent-muted);
}

.software-icon {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem;
    font-weight: 900;
    flex-shrink: 0;
    background: var(--accent-muted);
    color: var(--accent-light);
    border: 1px solid rgba(161, 0, 255, 0.2);
}

.software-item span {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ---------- LE MOT DU DIRLO ---------- */
.dirlo-section {
    position: relative;
    z-index: 10;
    padding: 2rem 2rem 2.5rem;
}

.dirlo-inner {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.dirlo-title-big {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.dirlo-paragraph {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 1rem;
    text-align: center;
}

.dirlo-cta-text strong {
    color: #ffffff;
}

/* ---------- CTA SECTION ---------- */
.cta-section {
    position: relative;
    z-index: 10;
    padding: 2.5rem 2rem 6rem;
}

.cta-inner {
    max-width: 660px;
    margin: 0 auto;
}

.cta-inner-dual {
    max-width: 960px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.cta-card {
    display: flex;
    flex-direction: row;
    border-radius: 16px;
    overflow: hidden;
}

.cta-card-photo {
    flex-shrink: 0;
    width: 160px;
}

.cta-card-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.cta-card .cta-box {
    border-radius: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.8rem;
}

.cta-card .cta-text {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
}

.cta-card .cta-button {
    margin-top: auto;
}

.cta-box {
    text-align: center;
    padding: 2.5rem;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

/* Foil animated background for CTA */
.cta-foil-bg {
    background: linear-gradient(
        135deg,
        #a100ff,
        #ff3278,
        #00b4ff,
        #00ff96,
        #ffd200,
        #ff3278,
        #a100ff
    );
    background-size: 400% 400%;
    animation: cta-foil-shift 8s ease infinite;
    box-shadow: 0 0 40px rgba(161, 0, 255, 0.3), 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Dot pattern overlay */
.cta-foil-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.25) 2px, transparent 2px);
    background-size: 12px 12px;
    pointer-events: none;
    z-index: 1;
}

/* Diagonal shine sweep */
.cta-foil-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 30%,
        rgba(255, 255, 255, 0.15) 45%,
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0.15) 55%,
        transparent 70%
    );
    background-size: 250% 100%;
    animation: cta-shine-sweep 5s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

.cta-foil-bg > * {
    position: relative;
    z-index: 2;
}

@keyframes cta-foil-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes cta-shine-sweep {
    0% { background-position: 200% 0; }
    100% { background-position: -50% 0; }
}

.cta-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0;
    color: #000000;
    text-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
}

.cta-subtitle {
    font-size: 0.75rem;
    font-weight: 600;
    font-style: italic;
    color: rgba(0, 0, 0, 0.55);
    margin-top: -0.1rem;
    margin-bottom: 0.8rem;
}

.cta-text {
    color: #000000;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-shadow: 0 1px 6px rgba(255, 255, 255, 0.25);
}

.cta-card .cta-button {
    font-size: 0.72rem;
    padding: 0.7rem 1rem;
    white-space: nowrap;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 2rem;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.cta-button:hover {
    transform: translateY(-2px);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.cta-button-label,
.cta-button-icon,
.cta-button-copied {
    transition: opacity 0.15s, transform 0.15s;
}

.cta-button-copied {
    display: none;
    color: #000000;
    font-weight: 700;
}

.cta-button.copying {
    animation: copy-pulse 0.35s ease;
}

@keyframes copy-pulse {
    0% { transform: scale(1); }
    40% { transform: scale(0.85); }
    100% { transform: scale(1); }
}

.cta-button.copied .cta-button-label,
.cta-button.copied .cta-button-icon {
    display: none;
}

.cta-button.copied .cta-button-copied {
    display: inline;
}

.cta-button.copied {
    border-color: #000000;
    background: rgba(255, 255, 255, 0.35);
}

/* ---------- FOOTER ---------- */
.footer {
    position: relative;
    z-index: 10;
    padding: 3rem 2rem;
    border-top: 1px solid var(--border-subtle);
}

.footer-inner {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.footer-message {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.footer-message strong {
    color: var(--accent-light);
    font-weight: 700;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.footer-sep {
    color: var(--accent);
    opacity: 0.5;
}

/* ---------- FOIL TEXT EFFECT ---------- */
.foil-text {
    background: linear-gradient(
        90deg,
        var(--accent-light),
        #ff3278,
        #00b4ff,
        #00ff96,
        #ffd200,
        #ff3278,
        var(--accent-light)
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-position: var(--foil-x, 50%) 50%;
    transition: background-position 0.3s ease-out;
}

/* Card titles: foil hidden, appears on card hover */
.card-title.foil-text {
    -webkit-text-fill-color: var(--text-primary);
    transition: -webkit-text-fill-color 0.4s, background-position 0.3s ease-out;
}
.card:hover .card-title.foil-text {
    -webkit-text-fill-color: transparent;
}

/* Modal titles: foil always visible, moves on hover */
.modal-title.foil-text {
    -webkit-text-fill-color: transparent;
    transition: background-position 0.3s ease-out;
    cursor: default;
}

/* ---------- SCROLL ANIMATIONS ---------- */
.reveal {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.card.reveal {
    transition-delay: calc(var(--i, 0) * 0.12s);
}

/* ---------- RESPONSIVE ---------- */

/* Tablet */
@media (max-width: 1024px) {
    .champions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .card-content {
        padding: 1.2rem;
    }

    .card-title {
        font-size: 1.1rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .header {
        padding: 2.5rem 1.5rem 1.5rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .header-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }

    .header-intro {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }

    .header-intro-text {
        padding-left: 0;
    }

    .header-intro-line {
        display: none;
    }

    .header-intro-avatar {
        width: 110px;
        height: 110px;
    }

    .header-subtitle {
        font-size: 0.85rem;
    }

    .champions {
        padding: 1rem 1.5rem 4rem;
    }

    .champions-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 400px;
    }

    .card:hover {
        transform: scale(1.01);
    }

    .modal-content {
        padding: 1.5rem;
        border-radius: 12px;
        max-height: 85vh;
    }

    .modal-header {
        flex-direction: column;
        gap: 0.5rem;
        padding-right: 2.5rem;
    }

    .modal-rank {
        font-size: 2rem;
    }

    .dirlo-title-big {
        font-size: clamp(1.5rem, 7vw, 2rem);
    }

    .cta-inner-dual {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cta-card {
        flex-direction: row;
    }

    .cta-card-photo {
        width: 120px;
    }

    .cta-box {
        padding: 1.8rem;
    }

    .cta-button {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        justify-content: center;
    }

    .software-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small Mobile */
@media (max-width: 380px) {
    .header-title {
        font-size: 1rem;
        letter-spacing: 0;
    }

    .hero-text {
        font-size: 0.85rem;
    }

    .card-tags {
        gap: 0.3rem;
    }

    .tag {
        font-size: 0.62rem;
        padding: 0.2rem 0.5rem;
    }

    .software-grid {
        grid-template-columns: 1fr;
    }
}
