:root {
    /* Light mode tokens */
    --bg: #f6f8fc;
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --text: #0f172a;   /* slate-900 */
    --muted: #475569;  /* slate-600 */
    --border: rgba(15, 23, 42, 0.08);

    --accent-1: #7c3aed; /* violet */
    --accent-2: #06b6d4; /* cyan */
    --ring: rgba(59, 130, 246, 0.35);
    --shadow: 0 8px 24px rgba(2, 6, 23, 0.08), 0 2px 6px rgba(2, 6, 23, 0.06);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
            radial-gradient(800px 400px at 10% -10%, rgba(124, 58, 237, 0.10), transparent 60%),
            radial-gradient(800px 400px at 90% -20%, rgba(6, 182, 212, 0.10), transparent 60%),
            linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
    font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: min(1100px, 92vw);
    margin: 0 auto;
}

/* Hero */
.hero {
    position: relative;
    padding: clamp(48px, 10vw, 96px) 0 24px;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -20% -10% auto -10%;
    height: 60%;
    background:
            radial-gradient(closest-side, rgba(124, 58, 237, 0.15), transparent 70%),
            radial-gradient(closest-side, rgba(6, 182, 212, 0.14), transparent 70%);
    filter: blur(40px);
    z-index: -1;
}

.hero__content h1 {
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    font-weight: 800;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: 0.2px;
    margin: 0 0 12px;
    background: linear-gradient(90deg, #0b1220 0%, #334155 60%, #64748b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tagline {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: clamp(14px, 1.8vw, 18px);
}

/* Countries grid */
.countries {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(12px, 2vw, 20px);
    margin-top: clamp(28px, 6vw, 48px);
}

@media (max-width: 900px) {
    .countries {
        grid-template-columns: 1fr;
    }
}

.country-card {
    position: relative;
    isolation: isolate;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    color: #fff; /* text inside the glass plate remains white for contrast on flags */
    background: var(--surface);
    box-shadow: var(--shadow);
    transform-style: preserve-3d;
    transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 320ms ease, filter 320ms ease;
    outline: 0;

    /* Uniform card sizing */
    aspect-ratio: 16 / 9;
    min-height: 0;
    display: block;
}

.country-card:focus-visible {
    box-shadow: 0 0 0 6px var(--ring), var(--shadow);
}

.country-card__overlay {
    position: absolute;
    inset: 0;
    background:
            radial-gradient(120% 80% at 10% 10%, rgba(0, 0, 0, 0.06), transparent 60%),
            linear-gradient(180deg, rgba(0, 0, 0, 0.08), transparent 50%),
            linear-gradient(180deg, rgba(0, 0, 0, 0.14), transparent 70%);
    mix-blend-mode: multiply;
    z-index: 1;
}

/* Italy and France (flag-style gradients) */
.country-card.italy {
    background:
            linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(124, 58, 237, 0.10)) 0 0/cover no-repeat,
            linear-gradient(90deg, #1ca24a 0 33%, #f0f3f7 33% 66%, #e94b3c 66% 100%);
}
.country-card.france {
    background:
            linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(124, 58, 237, 0.10)) 0 0/cover no-repeat,
            linear-gradient(90deg, #1f5eff 0 33%, #f0f3f7 33% 66%, #e94b3c 66% 100%);
}

/* Egypt uses the real flag (with the eagle) */
.country-card.egypt {
    background:
            linear-gradient(135deg, rgba(6, 182, 212, 0.10), rgba(124, 58, 237, 0.08)) 0 0/cover no-repeat,
            url("https://flagcdn.com/eg.svg") center/cover no-repeat;
}
.country-card.egypt .country-card__overlay {
    mix-blend-mode: normal;
    background: linear-gradient(180deg, rgba(0,0,0,0.08), transparent 60%);
}

/* Readable text over the flags (dark glass plate) */
.country-card__content {
    position: relative;
    z-index: 2;
    display: inline-grid;
    gap: 6px;
    padding: 14px 16px;
    margin: 16px;
    max-width: min(440px, 78%);
    color: #fff;
    background: linear-gradient(90deg, rgba(8,12,20,0.58), rgba(8,12,20,0.42) 70%, rgba(8,12,20,0.18));
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    backdrop-filter: blur(4px) saturate(1.05);
    -webkit-backdrop-filter: blur(4px) saturate(1.05);
    box-shadow: 0 10px 30px rgba(2,6,23,0.18);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55), 0 0 1px rgba(0,0,0,0.6);
    overflow: hidden;
}

.country-card h2 {
    margin: 2px 0 0;
    font-size: clamp(22px, 3vw, 28px);
    line-height: 1.15;
    letter-spacing: 0.2px;
}

.country-card p {
    margin: 4px 0 0;
    color: #eef2ff;
    opacity: 0.95;
    font-size: clamp(13px, 1.8vw, 15px);
}

.country-card:hover {
    transform: translateY(-6px) rotateX(4deg) rotateY(-2deg) scale(1.02);
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.12), 0 6px 16px rgba(2, 6, 23, 0.08);
    filter: brightness(1.01) contrast(1.01);
}

/* Scroll hint */
.scroll-hint {
    display: inline-block;
    margin: 18px auto 0;
    padding: 10px 16px;
    color: #0f172a;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.4px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.6));
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.8), 0 6px 18px rgba(2, 6, 23, 0.06);
    transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.scroll-hint:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.9), 0 10px 28px rgba(2, 6, 23, 0.10);
}

/* Cuisine sections */
.cuisine-section {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: clamp(18px, 4vw, 28px);
    align-items: center;
    padding: clamp(36px, 7vw, 64px) 0;
    border-top: 1px solid var(--border);
}

.cuisine-section:nth-child(odd of .container) {
    grid-template-columns: 1fr 1.1fr;
}

@media (max-width: 900px) {
    .cuisine-section,
    .cuisine-section:nth-child(odd of .container) {
        grid-template-columns: 1fr;
    }
}

.cuisine-media {
    position: relative;
}
.cuisine-media img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 18px;
    box-shadow: var(--shadow);
    outline: 1px solid #e2e8f0;
    transform: translateZ(0);
    transition: transform 300ms ease;
}
.cuisine-media img:hover {
    transform: scale(1.02);
}

.cuisine-media::after {
    content: "";
    position: absolute;
    inset: -12px -12px auto auto;
    width: min(160px, 28%);
    height: 38%;
    background: conic-gradient(from 180deg, var(--accent-1), var(--accent-2), var(--accent-1));
    filter: blur(28px);
    opacity: 0.2;
    border-radius: 50%;
    pointer-events: none;
}

.cuisine-content h3 {
    margin: 0 0 10px;
    font-size: clamp(22px, 3.4vw, 28px);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.3px;
    background: linear-gradient(90deg, #0b1220, #334155);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.cuisine-content p {
    margin: 0;
    color: var(--muted);
    font-size: clamp(14px, 2vw, 16px);
}

/* Target highlight on anchor jump */
.cuisine-section:target {
    scroll-margin-top: 18px;
    animation: target-ring 1200ms ease 1;
}
@keyframes target-ring {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.0); }
    30% { box-shadow: 0 0 0 14px rgba(59, 130, 246, 0.16); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.0); }
}

/* Footer */
.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 28px 0 64px;
    color: var(--muted);
    font-size: 14px;
    border-top: 1px solid var(--border);
}
.footer .back-to-top {
    color: #0f172a;
    text-decoration: none;
    border-bottom: 1px dashed #cbd5e1;
    transition: color 200ms ease, border-color 200ms ease;
}
.footer .back-to-top:hover {
    color: #111827;
    border-color: #94a3b8;
}
