/* ============================================
   SANJUBA — Coming Soon Landing Page
   Warm · Cozy · Minimalist · Ghibli-esque
   ============================================ */

/* --- Design Tokens --- */
:root {
    --bg-color: #F8F5F0;
    --surface-color: #FFFFFF;
    --primary-color: #4A2C1D;
    --secondary-color: #C87A3F;
    --text-color: #2A1B12;
    --text-muted: #8B7355;
    --amber-glow: rgba(200, 122, 63, 0.35);
    --amber-glow-strong: rgba(200, 122, 63, 0.55);
    --card-shadow: 0 8px 40px rgba(74, 44, 29, 0.08), 0 2px 12px rgba(74, 44, 29, 0.04);
    --card-shadow-hover: 0 12px 56px rgba(74, 44, 29, 0.12), 0 4px 20px rgba(74, 44, 29, 0.06);
    --btn-shadow: 0 4px 16px rgba(200, 122, 63, 0.3);
    --btn-shadow-hover: 0 8px 28px rgba(200, 122, 63, 0.45);
    --radius-lg: 28px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --transition-smooth: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-bounce: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1E1612;
        --surface-color: #2C211B;
        --primary-color: #EADAC1;
        --secondary-color: #DA8B4A;
        --text-color: #F0E8DD;
        --text-muted: #A89880;
        --amber-glow: rgba(218, 139, 74, 0.3);
        --amber-glow-strong: rgba(218, 139, 74, 0.5);
        --card-shadow: 0 8px 40px rgba(0, 0, 0, 0.25), 0 2px 12px rgba(0, 0, 0, 0.15);
        --card-shadow-hover: 0 12px 56px rgba(0, 0, 0, 0.35), 0 4px 20px rgba(0, 0, 0, 0.2);
        --btn-shadow: 0 4px 16px rgba(218, 139, 74, 0.25);
        --btn-shadow-hover: 0 8px 28px rgba(218, 139, 74, 0.4);
    }
}


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

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

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}


/* --- Floating Decorative Particles --- */
.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.12;
    background: var(--secondary-color);
    animation: particleFloat 18s ease-in-out infinite;
}

.particle--1 {
    width: 180px;
    height: 180px;
    top: 8%;
    right: 10%;
    animation-delay: 0s;
    animation-duration: 22s;
}

.particle--2 {
    width: 120px;
    height: 120px;
    bottom: 12%;
    left: 8%;
    animation-delay: -4s;
    animation-duration: 19s;
}

.particle--3 {
    width: 80px;
    height: 80px;
    top: 40%;
    left: 5%;
    animation-delay: -8s;
    animation-duration: 24s;
    opacity: 0.08;
}

.particle--4 {
    width: 60px;
    height: 60px;
    bottom: 25%;
    right: 15%;
    animation-delay: -2s;
    animation-duration: 16s;
    opacity: 0.1;
}

.particle--5 {
    width: 200px;
    height: 200px;
    top: -5%;
    left: 40%;
    animation-delay: -6s;
    animation-duration: 26s;
    opacity: 0.06;
}

.particle--6 {
    width: 100px;
    height: 100px;
    bottom: -3%;
    right: 40%;
    animation-delay: -10s;
    animation-duration: 20s;
    opacity: 0.09;
}

@keyframes particleFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(15px, 35px) scale(1.02); }
}


/* --- Page Layout --- */
.page {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    padding: 2rem 1.25rem;
}


/* --- Main Card --- */
.card {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    max-width: 520px;
    width: 100%;
    padding: 3rem 2.5rem 2.5rem;
    text-align: center;
    position: relative;
    border: 1px solid rgba(200, 122, 63, 0.08);

    /* Entrance animation */
    animation: fadeInUp 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(200, 122, 63, 0.15),
        transparent 40%,
        transparent 60%,
        rgba(200, 122, 63, 0.08)
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* --- Logo --- */
.card__logo {
    margin-bottom: 1.5rem;
    animation: logoFloat 5s ease-in-out infinite;
}

.card__logo-img {
    width: 140px;
    height: auto;
    filter: drop-shadow(0 2px 8px rgba(74, 44, 29, 0.08));
    transition: transform var(--transition-smooth);
}

.card__logo-img:hover {
    transform: scale(1.05);
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}


/* --- Coffee Cup (Pure CSS) --- */
.coffee {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.75rem;
    position: relative;
}

.coffee__cup {
    width: 56px;
    height: 44px;
    background: linear-gradient(135deg, var(--secondary-color), #A0622F);
    border-radius: 0 0 18px 18px;
    position: relative;
    box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.1);
}

.coffee__liquid {
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    height: 14px;
    background: linear-gradient(180deg, #5C341F 0%, #3E2211 100%);
    border-radius: 50%;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

.coffee__handle {
    position: absolute;
    top: 6px;
    left: -14px;
    width: 14px;
    height: 24px;
    border: 3.5px solid var(--secondary-color);
    border-right: none;
    border-radius: 12px 0 0 12px;
}

[dir="rtl"] .coffee__handle {
    left: auto;
    right: -14px;
    border: 3.5px solid var(--secondary-color);
    border-left: none;
    border-radius: 0 12px 12px 0;
}

.coffee__saucer {
    width: 76px;
    height: 8px;
    background: linear-gradient(180deg, #D49557 0%, var(--secondary-color) 100%);
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
    margin-top: -1px;
    box-shadow: 0 2px 6px rgba(200, 122, 63, 0.15);
}

/* Steam */
.coffee__steam {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.coffee__steam-line {
    display: block;
    width: 2.5px;
    height: 22px;
    background: var(--text-muted);
    border-radius: 2px;
    opacity: 0.3;
    animation: steamRise 2.2s ease-in-out infinite;
}

.coffee__steam-line--1 {
    animation-delay: 0s;
    height: 18px;
}

.coffee__steam-line--2 {
    animation-delay: 0.4s;
    height: 24px;
}

.coffee__steam-line--3 {
    animation-delay: 0.8s;
    height: 16px;
}

@keyframes steamRise {
    0% {
        transform: translateY(0) scaleX(1);
        opacity: 0.35;
    }
    50% {
        transform: translateY(-12px) scaleX(1.5) rotate(4deg);
        opacity: 0.18;
    }
    100% {
        transform: translateY(-24px) scaleX(2);
        opacity: 0;
    }
}


/* --- Typography --- */
.card__heading {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1.5;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.card__desc {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.85;
    margin-bottom: 2rem;
    max-width: 380px;
    margin-inline: auto;
}


/* --- Subscription Form --- */
.subscribe {
    margin-bottom: 1.25rem;
}

.subscribe__row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.subscribe__input {
    flex: 1;
    padding: 0.85rem 1.2rem;
    border: 2px solid rgba(200, 122, 63, 0.15);
    border-radius: var(--radius-md);
    background: var(--bg-color);
    color: var(--text-color);
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    outline: none;
    transition:
        border-color var(--transition-smooth),
        box-shadow var(--transition-smooth),
        background-color var(--transition-smooth);
}

.subscribe__input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.subscribe__input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px var(--amber-glow);
    background: var(--surface-color);
}

.subscribe__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.85rem 1.5rem;
    background: linear-gradient(135deg, var(--secondary-color), #B56E35);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--btn-shadow);
    transition:
        transform var(--transition-bounce),
        box-shadow var(--transition-smooth),
        background var(--transition-smooth);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.subscribe__btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.subscribe__btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--btn-shadow-hover);
}

.subscribe__btn:hover::before {
    opacity: 1;
}

.subscribe__btn:active {
    transform: translateY(-1px);
}

.subscribe__btn-icon {
    display: inline-flex;
    align-items: center;
    transition: transform var(--transition-smooth);
}

[dir="rtl"] .subscribe__btn-icon {
    transform: scaleX(-1);
}

.subscribe__btn:hover .subscribe__btn-icon {
    transform: translateX(-3px);
}

[dir="rtl"] .subscribe__btn:hover .subscribe__btn-icon {
    transform: scaleX(-1) translateX(-3px);
}

/* Loading state */
.subscribe__btn--loading {
    pointer-events: none;
    opacity: 0.7;
}

.subscribe__btn--loading .subscribe__btn-text,
.subscribe__btn--loading .subscribe__btn-icon {
    opacity: 0;
}

.subscribe__btn--loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success message */
.subscribe__success {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--secondary-color);
    padding: 1rem 0;
    opacity: 0;
    transform: translateY(8px);
    transition:
        opacity 0.5s ease,
        transform 0.5s ease;
}

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


/* --- Hint --- */
.card__hint {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--text-muted);
    opacity: 0.75;
    line-height: 1.7;
    padding-top: 0.25rem;
    border-top: 1px solid rgba(200, 122, 63, 0.08);
    padding-top: 1rem;
}

.card__hint strong {
    color: var(--secondary-color);
    font-weight: 700;
}


/* --- Responsive --- */
@media (max-width: 560px) {
    .card {
        padding: 2.25rem 1.5rem 1.75rem;
        border-radius: 22px;
    }

    .card__logo-img {
        width: 110px;
    }

    .card__heading {
        font-size: 1.35rem;
    }

    .card__desc {
        font-size: 0.88rem;
    }

    .subscribe__row {
        flex-direction: column;
    }

    .subscribe__btn {
        justify-content: center;
        padding: 0.9rem;
    }

    .particle--1 { width: 100px; height: 100px; }
    .particle--2 { width: 70px; height: 70px; }
    .particle--5 { width: 120px; height: 120px; }
}

@media (max-width: 380px) {
    .card {
        padding: 1.75rem 1.15rem 1.5rem;
        border-radius: 18px;
    }

    .card__heading {
        font-size: 1.2rem;
    }

    .card__desc {
        font-size: 0.82rem;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}