/* watchfy.store: YafaPlay's website. Same colours and font as the app (src/css/style.css). Motion only
 * through transform and opacity, and calm under prefers-reduced-motion. */

@font-face {
    font-family: "Manrope";
    src: url("../fonts/manrope.woff2") format("woff2");
    font-weight: 200 800;
    font-display: swap;
}

@font-face {
    font-family: "Noto Sans Arabic";
    src: url("../fonts/noto-sans-arabic.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --bg: #0c0a1f;
    --bg-2: #13102b;
    --panel: #1d1934;
    --line: rgba(255, 255, 255, 0.09);
    --fg: #f4f5f7;
    --muted: rgba(244, 245, 247, 0.66);
    --accent: #ff2e88;
    --accent-2: #00d4ff;
    --glow: rgba(255, 46, 136, 0.45);
    --font: "Manrope", "Noto Sans Arabic", "Segoe UI", system-ui, sans-serif;
    --wrap: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font: 17px/1.6 var(--font);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.locked { overflow: hidden; }

img { max-width: 100%; display: block; }

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 16px; letter-spacing: -0.02em; }
h1 { font-size: clamp(40px, 6vw, 76px); font-weight: 800; }
h2 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; }
h3 { font-size: 21px; font-weight: 700; }
p { margin: 0 0 14px; }
code { background: var(--panel); padding: 1px 7px; border-radius: 6px; font-size: 0.9em; }

.grad {
    background: linear-gradient(90deg, var(--accent), #ff7ab8 45%, var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.eyebrow {
    color: var(--accent);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.center { text-align: center; }
.muted { color: var(--muted); font-size: 15px; }

/* ---------- Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: 14px;
    border: 2px solid transparent;
    font: inherit;
    font-weight: 800;
    color: var(--fg);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--accent); box-shadow: 0 12px 34px var(--glow); }
.btn-primary:hover { box-shadow: 0 16px 44px var(--glow); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.04); }
.btn-ghost:hover { border-color: var(--accent-2); }
.btn-small { padding: 9px 18px; font-size: 15px; border-radius: 11px; }
.btn-block { width: 100%; margin-top: 22px; }

/* ---------- Navigation */

.nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px max(24px, calc((100vw - var(--wrap)) / 2));
    transition: background 0.25s, box-shadow 0.25s;
}

.nav.scrolled {
    background: rgba(12, 10, 31, 0.86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--fg);
    font-size: 24px;
    font-weight: 800;
}

.brand:hover { text-decoration: none; }
.brand b { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a:not(.btn) { color: var(--fg); font-weight: 700; font-size: 15px; opacity: 0.85; }
.nav-links a:not(.btn):hover { opacity: 1; text-decoration: none; color: var(--accent-2); }

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    padding: 8px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px 0;
    background: var(--fg);
    transition: transform 0.2s, opacity 0.2s;
}

/* ---------- Hero */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 24px 80px;
    overflow: hidden;
}

.aurora { position: absolute; inset: 0; pointer-events: none; }

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    will-change: transform;
}

.b1 { width: 620px; height: 620px; background: #ff2e88; top: -180px; left: -160px; animation: drift1 18s ease-in-out infinite alternate; }
.b2 { width: 560px; height: 560px; background: #6b3cff; bottom: -220px; right: -120px; animation: drift2 22s ease-in-out infinite alternate; }
.b3 { width: 420px; height: 420px; background: #00d4ff; top: 35%; left: 45%; opacity: 0.32; animation: drift3 26s ease-in-out infinite alternate; }

@keyframes drift1 { to { transform: translate(180px, 120px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-160px, -90px) scale(1.1); } }
@keyframes drift3 { to { transform: translate(-200px, 80px) scale(0.85); } }

.hero-inner {
    position: relative;
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 56px;
    align-items: center;
}

.hero-lead { font-size: 19px; color: var(--muted); max-width: 520px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 22px; }
.hero-note { font-size: 14px; color: var(--muted); }

.hero-visual { position: relative; perspective: 1400px; }

.tv {
    transform: rotateY(-14deg) rotateX(4deg);
    animation: float 7s ease-in-out infinite;
    will-change: transform;
}

@keyframes float {
    0%, 100% { transform: rotateY(-14deg) rotateX(4deg) translateY(0); }
    50% { transform: rotateY(-10deg) rotateX(2deg) translateY(-14px); }
}

.tv-screen {
    padding: 10px;
    border-radius: 20px;
    background: linear-gradient(145deg, #2a2448, #0b0a18);
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6), 0 0 80px rgba(255, 46, 136, 0.25);
}

.tv-screen img { border-radius: 12px; width: 100%; }

.tv-stand {
    width: 34%;
    height: 14px;
    margin: 10px auto 0;
    border-radius: 0 0 14px 14px;
    background: linear-gradient(#211c3c, #0f0d22);
}

.chip {
    position: absolute;
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(29, 25, 52, 0.9);
    border: 1px solid var(--line);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
    animation: bob 6s ease-in-out infinite;
}

.chip-a { top: -6%; left: 8%; color: var(--accent-2); }
.chip-b { bottom: 10%; left: -6%; color: #ffd166; animation-delay: -2s; }
.chip-c { top: 18%; right: -4%; color: var(--accent); animation-delay: -4s; }

@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.scroll-hint {
    position: absolute;
    left: 50%;
    bottom: 26px;
    width: 26px;
    height: 42px;
    margin-left: -13px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 14px;
}

.scroll-hint span {
    position: absolute;
    left: 50%;
    top: 8px;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 2px;
    background: var(--fg);
    animation: wheel 1.8s ease-in-out infinite;
}

@keyframes wheel {
    0% { transform: translateY(0); opacity: 1; }
    70% { transform: translateY(14px); opacity: 0; }
    100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Sections */

.section { padding: 110px 24px; max-width: calc(var(--wrap) + 48px); margin: 0 auto; }
.section-alt { max-width: none; background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
.section-alt > * { max-width: var(--wrap); margin-left: auto; margin-right: auto; }

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 46px;
}

.card {
    padding: 28px;
    border-radius: 20px;
    background: var(--panel);
    border: 1px solid var(--line);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover { transform: translateY(-6px); border-color: rgba(255, 46, 136, 0.45); box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35); }
.card p { color: var(--muted); margin: 0; }

.card-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 18px;
    border-radius: 14px;
    font-size: 24px;
    background: linear-gradient(135deg, rgba(255, 46, 136, 0.25), rgba(0, 212, 255, 0.2));
}

.steps {
    list-style: none;
    padding: 0;
    margin-top: 46px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    counter-reset: none;
}

.step { position: relative; padding: 30px 28px 26px; border-radius: 20px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.step p { color: var(--muted); margin: 0; }

.step-num {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: var(--accent);
    font-weight: 800;
    box-shadow: 0 10px 26px var(--glow);
}

.manage {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
    align-items: center;
    padding: 48px;
    border-radius: 28px;
    background: radial-gradient(circle at 0% 0%, rgba(255, 46, 136, 0.22), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(0, 212, 255, 0.16), transparent 50%), var(--panel);
    border: 1px solid var(--line);
}

.manage-text p { color: var(--muted); }
.manage-text strong { color: var(--fg); }

.login {
    padding: 30px;
    border-radius: 20px;
    background: rgba(12, 10, 31, 0.6);
    border: 1px solid var(--line);
}

.login label { display: block; margin: 14px 0 6px; font-size: 14px; font-weight: 700; color: var(--muted); }
.login label:first-child { margin-top: 0; }

.login input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 2px solid transparent;
    background: #262143;
    color: var(--fg);
    font: inherit;
    font-size: 18px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login input::placeholder { color: rgba(244, 245, 247, 0.35); letter-spacing: 0.02em; text-transform: none; }
.login input:focus { outline: none; border-color: var(--accent-2); }

.platforms {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 46px;
}

.platform {
    padding: 30px;
    border-radius: 20px;
    background: var(--panel);
    border: 1px solid var(--line);
    text-align: center;
}

.platform p { color: var(--muted); min-height: 54px; }

.platform-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: rgba(0, 212, 255, 0.12);
    color: var(--accent-2);
    font-size: 26px;
}

.badge {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.terms { max-width: 860px; }
.terms-body p { color: var(--muted); }
.terms-body strong { color: var(--fg); }

.footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 30px max(24px, calc((100vw - var(--wrap)) / 2));
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

.footer p { margin: 0; }
.footer .brand { font-size: 19px; }

/* ---------- Legal notice */

.legal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(6, 5, 16, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.legal[hidden] { display: none; }
.legal.open { opacity: 1; }

.legal-card {
    position: relative;
    width: 100%;
    max-width: 620px;
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 38px 38px 30px;
    border-radius: 26px;
    background: var(--bg-2);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    transform: translateY(30px) scale(0.94);
    transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.25, 1.2);
}

.legal.open .legal-card { transform: none; }

.legal-glow {
    position: absolute;
    inset: -2px;
    border-radius: 27px;
    padding: 2px;
    background: conic-gradient(from var(--angle, 0deg), var(--accent), var(--accent-2), #6b3cff, var(--accent));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.85;
    pointer-events: none;
}

.legal-logo { width: 64px; height: 64px; margin-bottom: 14px; animation: pop 0.6s 0.15s both cubic-bezier(0.2, 0.9, 0.25, 1.3); }

@keyframes pop {
    from { transform: scale(0.4) rotate(-20deg); opacity: 0; }
    to { transform: none; opacity: 1; }
}

.legal h2 { font-size: 30px; }
.legal p, .legal li { color: var(--muted); font-size: 16px; }
.legal strong { color: var(--fg); }
.legal-lead { font-size: 18px !important; color: var(--fg) !important; }
.legal ul { margin: 0 0 14px; padding-left: 22px; }
.legal li { margin: 3px 0; }
.legal li::marker { color: var(--accent); }

.legal-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 22px;
}

.legal-more { font-size: 15px; font-weight: 700; }

/* ---------- Reveal on scroll (site.js adds .in) */

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Small screens */

@media (max-width: 960px) {
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero-lead { margin: 0 auto; }
    .hero-cta { justify-content: center; }
    .hero-visual { max-width: 620px; margin: 10px auto 0; }
    .cards, .steps, .platforms { grid-template-columns: 1fr 1fr; }
    .manage { grid-template-columns: 1fr; padding: 32px; }
}

@media (max-width: 760px) {
    .nav-toggle { display: block; }
    .nav-links {
        position: fixed;
        inset: 68px 16px auto;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 16px;
        border-radius: 18px;
        background: rgba(19, 16, 43, 0.97);
        border: 1px solid var(--line);
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
        transition: opacity 0.2s, transform 0.2s;
    }
    .nav-links a:not(.btn) { padding: 10px 6px; font-size: 17px; }
    .nav.open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
    .nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
    .nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .cards, .steps, .platforms { grid-template-columns: 1fr; }
    .chip { font-size: 12px; padding: 6px 11px; }
    .chip-b { left: 2%; }
    .chip-c { right: 2%; }
    .section { padding: 80px 20px; }
    .legal-card { padding: 30px 22px 24px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .blob, .tv, .chip, .scroll-hint span, .legal-logo { animation: none !important; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .legal, .legal-card { transition: none; }
}
