/* Hungry Nuggets — Linktree
   Couleurs et typo issues du site hungrynuggets.com */

:root {
    --bg: #f9f7f2;
    --bg-card: #ffffff;
    --ink: #1e2122;
    --ink-soft: #606e79;
    --line: rgba(30, 33, 34, 0.08);
    --accent: #fbbb21;
    --accent-soft: #ffe79b;
    --shadow-sm: 0 1px 2px rgba(30, 33, 34, 0.04);
    --shadow-md: 0 8px 24px -8px rgba(30, 33, 34, 0.12);
    --shadow-lg: 0 20px 40px -12px rgba(30, 33, 34, 0.18);
    --radius: 16px;
    --radius-lg: 22px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-feature-settings: 'ss01', 'ss02';
    line-height: 1.5;
    min-height: 100dvh;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-image:
        radial-gradient(circle at 18% 12%, rgba(251, 187, 33, 0.08), transparent 38%),
        radial-gradient(circle at 88% 90%, rgba(251, 187, 33, 0.06), transparent 32%);
    background-attachment: fixed;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

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

a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

ul {
    list-style: none;
}

/* ───────────────────────────── Layout ───────────────────────────── */

.wrap {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 48px 20px 56px;
    display: flex;
    flex-direction: column;
    gap: 36px;
    animation: fade-up 0.6s var(--ease) both;
}

@media (min-width: 600px) {
    .wrap {
        padding-top: 72px;
        padding-bottom: 72px;
        gap: 44px;
    }
}

/* ───────────────────────────── Hero ───────────────────────────── */

.hero {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.hero-card {
    position: relative;
    width: 280px;
    aspect-ratio: 16 / 10;
    background: var(--accent);
    border-radius: 22px;
    display: grid;
    place-items: center;
    padding: 24px 36px;
    box-shadow: 0 18px 36px -12px rgba(251, 187, 33, 0.45);
    transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
    overflow: hidden;
}

.hero-card:hover {
    transform: rotate(-1.5deg) scale(1.02);
    box-shadow: 0 24px 48px -14px rgba(251, 187, 33, 0.6);
}

.hero-card__logo {
    width: 80%;
    max-width: 200px;
    height: auto;
    position: relative;
    z-index: 1;
}

.hero-card__bite {
    position: absolute;
    top: 0;
    right: 0;
    width: 78px;
    height: 71px;
    background: var(--bg);
    -webkit-mask: url(croc.svg) top right / contain no-repeat;
    mask: url(croc.svg) top right / contain no-repeat;
    pointer-events: none;
    z-index: 2;
}

.tagline {
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--ink);
    max-width: 22em;
    margin: 6px 0 0;
}

.tagline::after {
    content: '';
    display: block;
    width: 32px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    margin: 14px auto 0;
}

.locale {
    font-size: 0.875rem;
    color: var(--ink-soft);
    font-weight: 500;
}

@media (min-width: 600px) {
    .hero-card {
        width: 320px;
    }
    .tagline {
        font-size: 1.1875rem;
    }
}

/* ───────────────────────────── Sections ───────────────────────────── */

.card-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 8px;
    padding-left: 4px;
}

.section-title--center {
    text-align: center;
    padding-left: 0;
}

/* ───────────────────────────── Cards ───────────────────────────── */

.card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 64px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s var(--ease),
                box-shadow 0.25s var(--ease),
                border-color 0.25s var(--ease),
                background 0.25s var(--ease);
    position: relative;
    overflow: hidden;
}

.card:hover,
.card:focus-visible {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
    outline: none;
}

.card:active {
    transform: translateY(0);
    transition-duration: 0.1s;
}

.card:focus-visible {
    box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-md);
}

.card__icon {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(251, 187, 33, 0.14);
    color: var(--ink);
    display: grid;
    place-items: center;
    transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.card__icon svg {
    width: 20px;
    height: 20px;
}

.card:hover .card__icon {
    background: var(--accent);
}

.card__label {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.card__title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--ink);
    letter-spacing: -0.005em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card__sub {
    font-size: 0.8125rem;
    color: var(--ink-soft);
    font-weight: 500;
}

.card__chevron {
    flex: 0 0 auto;
    color: var(--ink-soft);
    font-size: 1.25rem;
    font-weight: 500;
    transition: transform 0.25s var(--ease), color 0.25s var(--ease);
}

.card:hover .card__chevron {
    color: var(--ink);
    transform: translateX(4px);
}

/* Primary card — CTA principal jaune nugget */
.card--primary {
    background: var(--ink);
    border-color: var(--ink);
    padding: 20px 22px;
    min-height: 76px;
    color: #fff;
    box-shadow: 0 8px 24px -8px rgba(30, 33, 34, 0.4);
}

.card--primary .card__title {
    color: #fff;
    font-size: 1.0625rem;
    font-weight: 700;
}

.card--primary .card__sub {
    color: rgba(255, 255, 255, 0.65);
}

.card--primary .card__chevron {
    color: var(--accent);
    font-size: 1.4rem;
    font-weight: 700;
}

.card--primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(251, 187, 33, 0.18));
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
    opacity: 0;
}

.card--primary:hover {
    border-color: var(--accent);
    box-shadow: 0 14px 30px -10px rgba(30, 33, 34, 0.5);
}

.card--primary:hover::before {
    opacity: 1;
}

.card--primary:hover .card__chevron {
    color: #fff;
    transform: translateX(4px);
}

/* Feature card — Click by HN ou autres offres dédiées */
.card--feature {
    background: linear-gradient(135deg, #fff7e0 0%, #fff 65%);
    border-color: rgba(251, 187, 33, 0.55);
    padding: 14px 18px 18px;
    display: grid;
    grid-template-columns: 40px 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 14px;
    row-gap: 12px;
    align-items: center;
    position: relative;
    overflow: hidden;
    min-height: 0;
}

.card--feature::after {
    content: '';
    position: absolute;
    right: -40px;
    top: -40px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(251, 187, 33, 0.18), transparent 65%);
    pointer-events: none;
    transition: transform 0.5s var(--ease);
}

.card--feature:hover::after {
    transform: scale(1.15) rotate(8deg);
}

.card--feature:hover {
    border-color: var(--accent);
    box-shadow: 0 14px 30px -10px rgba(251, 187, 33, 0.35);
}

.card__icon--feature {
    background: var(--accent);
    color: var(--ink);
}

.card--feature:hover .card__icon--feature {
    background: var(--ink);
    color: var(--accent);
    transform: rotate(-8deg);
}

.card__icon {
    transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

.card__badge {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--accent);
    padding: 3px 10px;
    border-radius: 999px;
    z-index: 1;
}

.card--feature .card__icon { grid-column: 1; grid-row: 2; }
.card--feature .card__label { grid-column: 2; grid-row: 2; }
.card--feature .card__chevron { grid-column: 3; grid-row: 2; }

.card--feature .card__title {
    font-weight: 700;
    font-size: 1.0625rem;
    white-space: normal;
    line-height: 1.3;
}

/* ───────────────────────────── Socials ───────────────────────────── */

.socials {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.social-list {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.social-list a {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s var(--ease),
                background 0.3s var(--ease),
                color 0.3s var(--ease),
                border-color 0.3s var(--ease),
                box-shadow 0.3s var(--ease);
}

.social-list a:hover,
.social-list a:focus-visible {
    background: var(--ink);
    color: var(--accent);
    border-color: var(--ink);
    transform: translateY(-3px) rotate(-3deg);
    box-shadow: var(--shadow-md);
    outline: none;
}

.social-list a:focus-visible {
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.social-list svg {
    width: 22px;
    height: 22px;
}

/* ───────────────────────────── Footer ───────────────────────────── */

.foot {
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.8125rem;
    line-height: 1.6;
    margin-top: 8px;
    border-top: 1px solid var(--line);
    padding-top: 24px;
}

.foot__address {
    margin-bottom: 10px;
    font-weight: 500;
}

.foot__copy {
    font-size: 0.75rem;
    opacity: 0.85;
}

.foot__taste {
    color: var(--ink);
    font-weight: 600;
}

/* ───────────────────────────── Animations ───────────────────────────── */

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card,
.hero,
.section-title,
.social-list a,
.foot {
    animation: fade-up 0.6s var(--ease) both;
}

.hero { animation-delay: 0.05s; }
.card-group:nth-of-type(1) .section-title { animation-delay: 0.10s; }
.card-group:nth-of-type(1) .card:nth-child(2) { animation-delay: 0.14s; }
.card-group:nth-of-type(1) .card:nth-child(3) { animation-delay: 0.18s; }
.card-group:nth-of-type(1) .card:nth-child(4) { animation-delay: 0.22s; }
.card-group:nth-of-type(2) .section-title { animation-delay: 0.26s; }
.card-group:nth-of-type(2) .card:nth-child(2) { animation-delay: 0.30s; }
.card-group:nth-of-type(2) .card:nth-child(3) { animation-delay: 0.34s; }
.card-group:nth-of-type(2) .card:nth-child(4) { animation-delay: 0.38s; }
.card-group:nth-of-type(2) .card:nth-child(5) { animation-delay: 0.42s; }
.socials .section-title { animation-delay: 0.46s; }
.social-list a:nth-child(1) { animation-delay: 0.50s; }
.social-list a:nth-child(2) { animation-delay: 0.54s; }
.social-list a:nth-child(3) { animation-delay: 0.58s; }
.social-list a:nth-child(4) { animation-delay: 0.62s; }
.foot { animation-delay: 0.66s; }

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ───────────────────────────── Dark mode (auto) ───────────────────────────── */

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #15171a;
        --bg-card: #1f2226;
        --ink: #f1eee6;
        --ink-soft: #9aa3ac;
        --line: rgba(255, 255, 255, 0.07);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, 0.5);
        --shadow-lg: 0 20px 40px -12px rgba(0, 0, 0, 0.6);
    }

    body {
        background-image:
            radial-gradient(circle at 18% 12%, rgba(251, 187, 33, 0.10), transparent 38%),
            radial-gradient(circle at 88% 90%, rgba(251, 187, 33, 0.07), transparent 32%);
    }

    .nugget {
        filter: drop-shadow(0 12px 28px rgba(251, 187, 33, 0.5));
    }

    .nugget:hover {
        filter: drop-shadow(0 18px 36px rgba(251, 187, 33, 0.7));
    }

    .card--primary {
        background: var(--accent);
        border-color: var(--accent);
        color: var(--ink);
        box-shadow: 0 14px 30px -10px rgba(251, 187, 33, 0.35);
    }

    .card--primary .card__title { color: #1e2122; }
    .card--primary .card__sub { color: rgba(30, 33, 34, 0.7); }
    .card--primary .card__chevron { color: #1e2122; }

    .card--primary:hover {
        border-color: #fff;
        box-shadow: 0 18px 36px -12px rgba(251, 187, 33, 0.5);
    }

    .card__icon {
        background: rgba(251, 187, 33, 0.16);
    }

    .social-list a:hover {
        background: var(--accent);
        color: var(--ink);
        border-color: var(--accent);
    }

    /* Feature card en dark mode — fond anthracite chaud + accent jaune */
    .card--feature {
        background: linear-gradient(135deg, #2a2520 0%, var(--bg-card) 65%);
        border-color: rgba(251, 187, 33, 0.35);
    }

    .card--feature::after {
        background: radial-gradient(circle, rgba(251, 187, 33, 0.22), transparent 65%);
    }

    .card--feature .card__title {
        color: var(--ink);
    }

    .card__icon--feature {
        background: var(--accent);
        color: #1e2122;
    }

    .card--feature:hover .card__icon--feature {
        background: var(--bg-card);
        color: var(--accent);
    }
}
