/* =====================================================
   جيل النهضة — OBM Youth page
   Colours are sampled from the youth logo (youth/logo.jpg)
   ===================================================== */
:root {
    --maroon: #641201;          /* «جيل» and «OBM» */
    --maroon-deep: #2a0803;
    --maroon-night: #170402;
    --rust: #984902;            /* «النهضة» and «REVIVAL GEN» */
    --rust-bright: #c8661a;
    --paper: #e6d5cd;           /* the logo's paper */
    --paper-light: #f1e5df;
    --flame-peach: #e8bfa8;
    --flame-pink: #c98f86;
    --flame-gold: #f0c27a;
    --ink: #3b0d04;
    --ink-soft: #6b4038;
    --ease-out: cubic-bezier(.22, 1, .36, 1);
    --ease-back: cubic-bezier(.34, 1.56, .64, 1);
    --logo-ratio: 650 / 935;

    /* ---- Theme tokens: dark by default (proposal A), light below (proposal B) ---- */
    --page-bg: var(--maroon-night);
    --page-text: var(--paper-light);
    --header-solid: rgba(42, 8, 3, .72);
    --header-opaque: #2a0803;
    --chip-bg: rgba(255, 255, 255, .08);
    --chip-line: rgba(255, 220, 200, .18);
    --footer-bg: var(--maroon-night);
    --footer-text: var(--paper-light);
    color-scheme: dark;
}
:root[data-theme="light"] {
    --page-bg: var(--paper);
    --page-text: var(--ink);
    --header-solid: rgba(241, 229, 223, .86);
    --header-opaque: #f1e5df;
    --chip-bg: rgba(255, 255, 255, .45);
    --chip-line: rgba(100, 18, 1, .2);
    --footer-bg: var(--paper-light);
    --footer-text: var(--ink);
    color-scheme: light;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }
body {
    font-family: 'Tajawal', sans-serif;
    background: var(--page-bg);
    color: var(--page-text);
    overflow-x: hidden;
    overflow-x: clip;
    line-height: 1.6;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
.lat, .kicker, .sec-kicker, .y-brand-text .en { font-family: 'Poppins', sans-serif; }

.scroll-progress {
    position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60;
    background: linear-gradient(90deg, var(--rust), var(--flame-gold), var(--flame-pink));
    transform-origin: right; transform: scaleX(var(--p, 0));
}

/* ---------- Header ---------- */
.y-header {
    position: fixed; inset: 0 0 auto 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .8rem clamp(1rem, 4vw, 2.5rem);
    padding-top: max(.8rem, env(safe-area-inset-top));
    transition: background .4s, box-shadow .4s, padding .4s;
}
.y-header.scrolled {
    background: var(--header-solid);
    box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
}
.y-brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.y-brand-mark {
    width: 46px; height: 46px; flex: none; border-radius: 14px; padding: 4px;
    background: var(--paper) url(brand/paper.jpg) center / 300px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
    transition: transform .5s var(--ease-back);
}
.y-brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.y-brand:hover .y-brand-mark { transform: rotate(-8deg) scale(1.08); }
.y-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.y-brand-text .ar { font-weight: 800; font-size: 1.05rem; }
.y-brand-text .en { font-size: .68rem; letter-spacing: .18em; color: var(--flame-peach); }

.obm-link {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .35rem .45rem .35rem .9rem; border-radius: 999px;
    text-decoration: none; font-weight: 700; font-size: .9rem;
    background: var(--chip-bg); border: 1px solid var(--chip-line);
    transition: background .3s, transform .3s var(--ease-out);
}
.obm-link img { width: 30px; height: 30px; border-radius: 50%; background: #fff; padding: 3px; }
.obm-link:hover { background: rgba(255, 255, 255, .16); transform: translateY(-2px); }

/* ---------- Hero ---------- */
.y-hero {
    position: relative; min-height: 100svh; overflow: hidden;
    display: grid; place-items: center;
    padding: 6.5rem clamp(1rem, 5vw, 4rem) 5rem;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-video, .hero-fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-video { object-fit: cover; }
/* Shown until (or instead of) the reel: slow-moving warm light */
.hero-fallback {
    background:
        radial-gradient(40% 50% at 70% 75%, rgba(240, 194, 122, .35), transparent 70%),
        radial-gradient(45% 55% at 30% 30%, rgba(201, 143, 134, .32), transparent 70%),
        radial-gradient(60% 60% at 50% 100%, rgba(152, 73, 2, .55), transparent 70%),
        linear-gradient(160deg, #3b0b04, #170402 70%);
    background-size: 160% 160%, 170% 170%, 140% 140%, 100% 100%;
    animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
    0% { background-position: 0% 0%, 100% 0%, 50% 100%, 0 0; }
    100% { background-position: 100% 60%, 0% 80%, 40% 60%, 0 0; }
}
.embers { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-tint {
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(23, 4, 2, .55) 0%, rgba(100, 18, 1, .45) 45%, rgba(23, 4, 2, .92) 100%),
        radial-gradient(70% 60% at 50% 45%, transparent, rgba(23, 4, 2, .6));
}
.grain {
    position: absolute; inset: -50%; opacity: .12; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grain 1s steps(6) infinite;
}
@keyframes grain {
    0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
    60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

.hero-inner {
    position: relative; z-index: 2; width: min(1100px, 100%);
    display: grid; grid-template-columns: auto 1fr; align-items: center;
    gap: clamp(2rem, 6vw, 5rem);
}

/* The paper card that carries the logo */
.logo-card {
    position: relative; width: clamp(240px, 32vw, 380px);
    aspect-ratio: 1 / 1.18; border-radius: 28px;
    display: grid; place-items: center; padding: 8% 10%;
    background: var(--paper) url(brand/paper.jpg) center / cover;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .25) inset;
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) rotate(-3deg);
    transition: transform .6s var(--ease-out);
    animation: card-in 1s var(--ease-out) both, bob 7s ease-in-out 1.2s infinite;
}
@keyframes card-in { from { opacity: 0; transform: translateY(40px) rotate(-10deg) scale(.9); } }
@keyframes bob { 50% { translate: 0 -10px; } }
.logo-glow {
    position: absolute; inset: 10% 15% 35%; border-radius: 50%;
    background: radial-gradient(circle, rgba(240, 194, 122, .55), transparent 70%);
    filter: blur(24px); animation: glow 3.2s ease-in-out infinite;
}
@keyframes glow { 50% { opacity: .5; transform: scale(1.12); } }

/* Logo layers share one canvas, so stacking them rebuilds the logo */
.ylogo, .footer-logo { position: relative; width: 100%; aspect-ratio: var(--logo-ratio); }
.yl, .fl { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Build sequence on load, then the flame keeps flickering */
.yl-flame {
    transform-origin: 46% 62%;
    animation: flame-in 1.3s var(--ease-out) .3s both, flicker 2.6s ease-in-out 1.6s infinite;
}
@keyframes flame-in {
    from { opacity: 0; transform: scale(.2, .05); filter: blur(10px) brightness(1.6); }
    60% { opacity: 1; filter: blur(0) brightness(1.3); }
}
@keyframes flicker {
    0%, 100% { transform: scale(1, 1) skewX(0deg); }
    25% { transform: scale(1.015, 1.035) skewX(-1.2deg); }
    50% { transform: scale(.99, 1.01) skewX(.8deg); }
    75% { transform: scale(1.01, 1.045) skewX(-.6deg); }
}
.yl-jeel { animation: drop .9s var(--ease-back) .9s both; }
@keyframes drop { from { opacity: 0; transform: translateY(-30%) scale(1.15); } }
.yl-nahda { animation: write 1.1s ease-out 1.5s both; }
@keyframes write { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
.yl-obm { animation: slide-l .8s var(--ease-back) 1.7s both; }
@keyframes slide-l { from { opacity: 0; transform: translateX(-25%); } }
.yl-revival { animation: track 1s var(--ease-out) 2s both; }
@keyframes track { from { opacity: 0; transform: scaleX(1.25); filter: blur(4px); } }
.yl-line { animation: draw .9s var(--ease-out) 2.4s both; }
@keyframes draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* Hero text */
.hero-copy { text-align: right; }
.kicker {
    display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .35em;
    color: var(--flame-gold); margin-bottom: .6rem;
    animation: rise .8s var(--ease-out) .6s both;
}
.hero-title {
    font-weight: 900; line-height: 1; font-size: clamp(3.2rem, 9vw, 6.8rem);
    display: flex; flex-wrap: wrap; gap: 0 .3em; margin-bottom: .8rem;
}
.hero-title .w { display: inline-block; animation: rise 1s var(--ease-back) calc(.8s + var(--i) * .18s) both; }
.hero-title .accent {
    background: linear-gradient(100deg, var(--flame-gold), var(--rust-bright) 40%, var(--flame-pink) 70%, var(--flame-gold));
    background-size: 220% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: rise 1s var(--ease-back) 1s both, shimmer 5s linear 2s infinite;
}
@keyframes shimmer { to { background-position: -220% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(30px); } }
.hero-sub {
    font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--paper); opacity: .9; margin-bottom: 1.8rem;
    animation: rise .9s var(--ease-out) 1.3s both;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; animation: rise .9s var(--ease-out) 1.5s both; }

.btn {
    display: inline-flex; align-items: center; gap: .55rem;
    padding: .85rem 1.5rem; border-radius: 999px;
    font: 700 1rem 'Tajawal', sans-serif; text-decoration: none; color: #fff;
    border: 0; cursor: pointer; position: relative; overflow: hidden;
    transition: transform .35s var(--ease-back), box-shadow .35s;
}
.btn::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
    transform: translateX(100%); transition: transform .7s var(--ease-out);
}
.btn:hover { transform: translateY(-3px) scale(1.03); }
.btn:hover::after { transform: translateX(-100%); }
.btn-ig { background: linear-gradient(45deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888); box-shadow: 0 10px 30px rgba(220, 39, 67, .35); }
.btn-fb { background: #1877f2; box-shadow: 0 10px 30px rgba(24, 119, 242, .35); }
.btn-yt { background: #e62117; box-shadow: 0 10px 30px rgba(230, 33, 23, .35); }
.btn-maroon { background: var(--maroon); box-shadow: 0 10px 30px rgba(100, 18, 1, .35); }

.scroll-cue {
    position: absolute; z-index: 2; bottom: 1.6rem; left: 50%; translate: -50% 0;
    width: 28px; height: 46px; border-radius: 16px; border: 2px solid rgba(241, 229, 223, .5);
}
.scroll-cue span {
    position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px;
    border-radius: 2px; background: var(--flame-gold); animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(16px); } }

/* ---------- Moving band ---------- */
.band {
    position: relative; z-index: 3; overflow: hidden;
    background: var(--maroon); color: var(--paper-light);
    transform: rotate(-1.5deg) scale(1.03); margin: -1.2rem 0 -.6rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.band-track {
    display: flex; align-items: center; gap: 1.6rem; width: max-content;
    padding: .9rem 0; white-space: nowrap;
    animation: marquee 26s linear infinite;
}
.band span { font-weight: 900; font-size: clamp(1.3rem, 3vw, 2rem); }
.band .lat { font-family: 'Oswald', sans-serif; font-weight: 700; letter-spacing: .06em; color: var(--flame-peach); }
.band i { font-style: normal; color: var(--flame-gold); }
@keyframes marquee { to { transform: translateX(50%); } }

/* ---------- Sections ---------- */
.y-section { position: relative; padding: clamp(4rem, 9vw, 7rem) clamp(1rem, 5vw, 4rem); }
.y-section.paper { background: var(--paper) url(brand/paper.jpg) center / 900px; color: var(--ink); }
.y-section.dark { background: radial-gradient(80% 60% at 50% 0%, #4a0f05, var(--maroon-night) 70%); color: var(--paper-light); }
.sec-head { text-align: center; max-width: 640px; margin: 0 auto 2.6rem; }
.sec-kicker { font-size: .78rem; font-weight: 600; letter-spacing: .35em; color: var(--rust); }
.dark .sec-kicker { color: var(--flame-gold); }
.sec-head h2 { font-weight: 900; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.2; }
.paper .sec-head h2 { color: var(--maroon); }
.sec-sub { color: var(--ink-soft); margin-top: .4rem; }
.sec-foot { text-align: center; margin-top: 2.4rem; }

/* Instagram posts: official embeds in a responsive grid */
.posts-grid {
    max-width: 1150px; margin: 0 auto;
    display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 1.5rem;
}
.posts-grid .post { flex: 0 1 360px; min-width: 0; }
.post {
    position: relative; border-radius: 22px; overflow: hidden;
    background: #fff; box-shadow: 0 20px 40px -18px rgba(59, 13, 4, .45);
    transition: transform .5s var(--ease-out), box-shadow .5s;
}
.post:hover { transform: translateY(-6px) rotate(-.4deg); box-shadow: 0 30px 50px -18px rgba(59, 13, 4, .55); }
.post .instagram-media { margin: 0 !important; min-width: 0 !important; width: 100% !important; max-width: 100% !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; }
.post iframe { border-radius: 0 !important; }
.post-loading {
    min-height: 480px; display: grid; place-items: center; gap: .6rem;
    color: var(--ink-soft); font-weight: 700; text-decoration: none; padding: 2rem; text-align: center;
    background: linear-gradient(110deg, #f6eeea 30%, #fff 50%, #f6eeea 70%); background-size: 220% 100%;
    animation: shimmer 1.6s linear infinite;
}
.posts-empty { grid-column: 1 / -1; text-align: center; color: var(--ink-soft); }

/* Live slot */
.live-wrap { max-width: 960px; margin: 0 auto; }
.live-player { position: relative; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 60px rgba(0, 0, 0, .5); }
.live-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Offline strip: one slim row; the player takes its place while the channel is live */
.live-soon {
    max-width: 760px; margin: 0 auto;
    display: flex; align-items: center; gap: 1rem 1.25rem;
    padding: 1rem 1.25rem; border-radius: 999px;
    border: 1px solid rgba(232, 191, 168, .22);
    background: linear-gradient(100deg, rgba(100, 18, 1, .55), rgba(152, 73, 2, .25));
    box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
.soon-badge {
    flex: none; display: inline-flex; align-items: center; gap: .5rem;
    padding: .45rem .85rem; border-radius: 999px;
    font-family: 'Poppins', sans-serif; font-size: .75rem; font-weight: 600; letter-spacing: .2em;
    color: var(--flame-gold); background: rgba(0, 0, 0, .3); border: 1px solid rgba(240, 194, 122, .3);
}
.soon-dot { width: 8px; height: 8px; border-radius: 50%; background: #8a6a60; }
.soon-badge.is-live { color: #fff; background: #d4220f; border-color: #ff6a4d; }
.soon-badge.is-live .soon-dot { background: #fff; box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); animation: live-pulse 1.8s ease-out infinite; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }
.live-on-head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.live-on-title { min-width: 0; font-weight: 800; font-size: clamp(1.05rem, 2.6vw, 1.3rem); color: var(--paper-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Latest YouTube videos */
.videos-grid { max-width: 1100px; margin: clamp(2rem, 5vw, 3rem) auto 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1.4rem; }
.video-card {
    display: flex; flex-direction: column; min-width: 0; padding: 0; border: 1px solid rgba(232, 191, 168, .16); border-radius: 20px; overflow: hidden;
    background: rgba(255, 255, 255, .05); color: inherit; font: inherit; text-align: start; cursor: pointer;
    transition: transform .4s var(--ease-out), border-color .3s, background .3s;
}
.video-card:hover, .video-card:focus-visible { transform: translateY(-6px); border-color: rgba(240, 194, 122, .5); background: rgba(255, 255, 255, .08); }
.video-thumb { position: relative; aspect-ratio: 16 / 9; background: #120302; overflow: hidden; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease-out); }
.video-card:hover .video-thumb img { transform: scale(1.06); }
.video-thumb iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play {
    position: absolute; inset: 0; margin: auto; width: 58px; height: 58px; border-radius: 50%;
    display: grid; place-items: center; color: #fff; background: rgba(100, 18, 1, .85); box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
    transition: transform .3s, background .3s;
}
.video-card:hover .video-play { transform: scale(1.1); background: var(--rust); }
.video-meta { padding: .9rem 1.1rem 1.1rem; display: grid; gap: .3rem; }
.video-title { font-weight: 700; line-height: 1.5; color: var(--paper-light); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-date { font-size: .85rem; color: var(--paper); opacity: .7; }
.video-card.is-skeleton { aspect-ratio: 16 / 12; cursor: default; background: linear-gradient(110deg, rgba(255,255,255,.04) 30%, rgba(255,255,255,.1) 50%, rgba(255,255,255,.04) 70%); background-size: 220% 100%; animation: shimmer 1.6s linear infinite; }
.videos-empty { grid-column: 1 / -1; text-align: center; color: var(--paper); opacity: .8; }
.live-soon[hidden], .live-on[hidden] { display: none; }
.soon-text { flex: 1; min-width: 0; }
.soon-title { font-size: clamp(1.1rem, 3vw, 1.35rem); font-weight: 800; line-height: 1.4; color: var(--paper-light); }
.soon-title span { color: var(--flame-gold); }
.soon-sub { font-size: .92rem; color: var(--paper); opacity: .8; }
.soon-links { flex: none; display: flex; gap: .5rem; }
.soon-links a {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
    color: var(--paper-light); background: rgba(255, 255, 255, .08); border: 1px solid rgba(232, 191, 168, .25);
    transition: background .2s, transform .2s;
}
.soon-links a:hover, .soon-links a:focus-visible { background: var(--rust); transform: translateY(-2px); }
@media (max-width: 560px) {
    .live-soon { flex-direction: column; text-align: center; border-radius: 24px; padding: 1.4rem 1.2rem; gap: .8rem; }
}
@media (prefers-reduced-motion: reduce) { .soon-badge .soon-dot, .video-card.is-skeleton { animation: none; } }

/* Card back to the main site */
.obm-card-wrap { padding-top: clamp(3rem, 6vw, 4.5rem); padding-bottom: clamp(3rem, 6vw, 4.5rem); }
.obm-card {
    max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 1.2rem;
    padding: 1.2rem 1.4rem; border-radius: 24px; text-decoration: none;
    background: linear-gradient(120deg, #0d2b2b, #1b5b5c); color: #eef7f5;
    box-shadow: 0 24px 50px -20px rgba(13, 43, 43, .7);
    transition: transform .45s var(--ease-out), box-shadow .45s;
}
.obm-card:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -20px rgba(13, 43, 43, .8); }
.obm-card-mark { flex: none; width: 64px; height: 64px; border-radius: 50%; background: #fff; padding: 7px; }
.obm-card-mark img { width: 100%; height: 100%; object-fit: contain; }
.obm-card-text { flex: 1; display: flex; flex-direction: column; }
.obm-card-text .t { font-weight: 800; font-size: 1.25rem; }
.obm-card-text .s { opacity: .8; font-size: .95rem; }
.obm-card-arrow { font-size: 1.6rem; color: #e69d45; transition: transform .4s var(--ease-out); }
.obm-card:hover .obm-card-arrow { transform: translateX(-6px); }

/* ---------- Footer ---------- */
.y-footer {
    text-align: center; padding: 3.5rem 1rem calc(2rem + env(safe-area-inset-bottom));
    background: var(--footer-bg); color: var(--footer-text); border-top: 1px solid rgba(232, 191, 168, .15);
}
.y-footer .footer-logo {
    width: 150px; margin: 0 auto 1.4rem; padding: 18px; box-sizing: content-box;
    border-radius: 22px; background: var(--paper) url(brand/paper.jpg) center / cover;
}
.y-footer .footer-logo .fl { inset: 18px; width: calc(100% - 36px); height: calc(100% - 36px); }
.fl { opacity: 0; transition: opacity .6s, transform .9s var(--ease-back), clip-path 1s ease-out; }
.fl-flame { transform: scale(.3, .1); transform-origin: 46% 62%; }
.fl-jeel { transform: translateY(-30%); }
.fl-nahda { clip-path: inset(0 0 0 100%); }
.fl-obm { transform: translateX(-30%); }
.fl-revival { transform: scaleX(1.3); }
.fl-line { clip-path: inset(0 100% 0 0); }
.footer-logo.in .fl { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
.footer-logo.in .fl-jeel { transition-delay: .25s; }
.footer-logo.in .fl-nahda { transition-delay: .5s; }
.footer-logo.in .fl-obm { transition-delay: .6s; }
.footer-logo.in .fl-revival { transition-delay: .75s; }
.footer-logo.in .fl-line { transition-delay: .9s; }
.footer-social { display: flex; justify-content: center; gap: .6rem; margin-bottom: 1rem; }
.footer-social a {
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(232, 191, 168, .18);
    transition: transform .3s var(--ease-back), background .3s;
}
.footer-social a:hover { transform: translateY(-3px); background: var(--maroon); color: #fff; }
.footer-copy { font-size: .9rem; opacity: .7; }
.footer-copy a { color: var(--flame-peach); }
:root[data-theme="light"] .footer-copy a { color: var(--rust); }

/* Reveal on scroll */
[data-reveal] { opacity: 0; transform: translateY(36px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
[data-reveal].in { opacity: 1; transform: none; }
.y-footer .footer-logo[data-reveal] { transform: none; opacity: 1; }
.post { opacity: 0; transform: translateY(40px) scale(.97); }
.post.in { opacity: 1; transform: none; transition: opacity .8s var(--ease-out) var(--d, 0s), transform .8s var(--ease-out) var(--d, 0s), box-shadow .5s; }
.post.in:hover { transform: translateY(-6px) rotate(-.4deg); transition-delay: 0s; }

/* ---------- Phones ---------- */
@media (max-width: 760px) {
    .hero-inner { grid-template-columns: 1fr; justify-items: center; gap: 1.8rem; }
    .hero-copy { text-align: center; }
    .hero-title { justify-content: center; }
    .hero-actions { justify-content: center; }
    .logo-card { width: min(62vw, 260px); }
    .y-hero { padding-top: 5.5rem; }
    .obm-link span { display: none; }
    .obm-link { padding: .3rem; }
    .y-brand-mark { width: 40px; height: 40px; }
    .btn { padding: .8rem 1.25rem; }
    .obm-card { gap: .9rem; padding: 1rem; }
    .obm-card-mark { width: 52px; height: 52px; }
    .obm-card-text .t { font-size: 1.1rem; }
    .obm-card-text .s { font-size: .85rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    html { scroll-behavior: auto; }
}
.sec-sub .handle { color: var(--rust); font-family: 'Poppins', sans-serif; font-weight: 600; text-decoration: none; }
.sec-sub .handle:hover { text-decoration: underline; }

/* ---- Header actions: theme switch + link to the main site ---- */
.y-header-actions { display: flex; align-items: center; gap: .5rem; }
.y-header .theme-toggle { --toggle-bg: var(--chip-bg); --toggle-line: var(--chip-line); border-radius: 999px; }

/* =====================================================
   Light theme (proposal B): paper first. The reel plays faintly behind a
   paper-coloured tint and the logo stands on the paper without a card.
   ===================================================== */
:root[data-theme="light"] .y-hero { color: var(--ink); }
:root[data-theme="light"] .hero-fallback {
    background:
        radial-gradient(40% 45% at 72% 45%, rgba(240, 194, 122, .55), transparent 70%),
        radial-gradient(35% 40% at 30% 70%, rgba(201, 143, 134, .35), transparent 70%),
        var(--paper) url(brand/paper.jpg) center / cover;
    background-size: 160% 160%, 170% 170%, cover;
}
:root[data-theme="light"] .hero-video { mix-blend-mode: multiply; filter: sepia(.55) saturate(1.1) contrast(.9); opacity: .38; }
:root[data-theme="light"] .hero-tint { background: linear-gradient(180deg, rgba(230, 213, 205, .2), rgba(230, 213, 205, 0) 40%, rgba(230, 213, 205, .92) 100%); }
:root[data-theme="light"] .grain { opacity: .06; }
:root[data-theme="light"] .logo-card {
    background: none; box-shadow: none; width: clamp(260px, 36vw, 440px);
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}
:root[data-theme="light"] .logo-glow { background: radial-gradient(circle, rgba(240, 194, 122, .8), transparent 70%); }
:root[data-theme="light"] .hero-title { color: var(--maroon); }
:root[data-theme="light"] .hero-title .accent {
    background-image: linear-gradient(100deg, var(--rust), var(--rust-bright) 40%, var(--flame-pink) 70%, var(--rust));
}
:root[data-theme="light"] .kicker { color: var(--rust); }
:root[data-theme="light"] .hero-sub { color: var(--ink-soft); opacity: 1; font-weight: 500; }
:root[data-theme="light"] .scroll-cue { border-color: rgba(100, 18, 1, .4); }
:root[data-theme="light"] .y-header { color: var(--maroon); }
:root[data-theme="light"] .y-brand-text .en { color: var(--rust); }
:root[data-theme="light"] .y-brand-mark { box-shadow: 0 4px 14px rgba(100, 18, 1, .18); }
:root[data-theme="light"] .y-footer .footer-logo { box-shadow: 0 16px 40px -18px rgba(100, 18, 1, .45); }
:root[data-theme="light"] .footer-social a { border-color: rgba(100, 18, 1, .2); background: rgba(255, 255, 255, .5); color: var(--maroon); }

/* Smooth scrolling on phones and tablets: no live blur behind the fixed header,
   no animated film grain, and no blend mode on the playing reel. */
@media (hover: none), (max-width: 760px) {
    .y-header, .y-header.scrolled { -webkit-backdrop-filter: none; backdrop-filter: none; }
    .y-header.scrolled { background: var(--header-opaque); }
    .grain { display: none; }
    :root[data-theme="light"] .hero-video { mix-blend-mode: normal; }
}

/* Live alerts sheet and buttons (shared/alerts.css) in the youth colours */
:root {
    --al-bg: var(--maroon-deep); --al-text: var(--paper-light); --al-dim: var(--paper); --al-line: var(--chip-line);
    --al-soft: rgba(255, 255, 255, .06); --al-accent: var(--flame-gold); --al-accent-fg: var(--maroon-night); --al-dot-ring: var(--page-bg);
}
:root[data-theme="light"] {
    --al-bg: var(--paper-light); --al-text: var(--ink); --al-dim: var(--ink-soft);
    --al-soft: rgba(255, 255, 255, .5); --al-accent: var(--maroon); --al-accent-fg: #fff;
}
.y-header .alerts-bell { color: var(--page-text); }
