/* ==========================================================
   Oukebdane Family — private access gate
   ========================================================== */

:root {
    --bg:        #f2efe9;
    --surface:   #fffefb;
    --line:      rgba(124, 34, 51, 0.26);
    --line-soft: rgba(124, 34, 51, 0.13);
    --wine:      #7c2233;
    --wine-2:    #9c3546;
    --wine-deep: #5a1622;
    --ink:       #25211a;
    --muted:     #8c8271;
    --danger:    #b5343f;
    --whatsapp:  #1f7a4d;
    --serif:   'Cormorant Garamond', 'Amiri', Georgia, serif;
    --display: 'Playfair Display', 'Amiri', Georgia, serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

body {
    background:
        radial-gradient(120% 80% at 10% 0%, rgba(255, 255, 255, 0.92), transparent 40%),
        radial-gradient(120% 90% at 90% 100%, rgba(214, 201, 178, 0.5), transparent 45%),
        linear-gradient(115deg, transparent 0 38%, rgba(124, 34, 51, 0.05) 38.4% 39%, transparent 39.4%),
        var(--bg);
    background-attachment: fixed;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 17px;
    min-height: 100vh;
}

[dir="rtl"] body { font-family: 'Amiri', var(--serif); }

/* Language switcher */
.lang-switch {
    position: absolute;
    top: 1rem;
    inset-inline-end: 1.2rem;
    display: flex;
    gap: 0.35rem;
    z-index: 5;
}

.lang-switch a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    padding: 0.3rem 0.6rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: var(--display);
    transition: all 0.25s ease;
}

.lang-switch a:hover { color: var(--wine); }

.lang-switch a.active {
    color: var(--wine);
    border-color: var(--line);
    background: rgba(124, 34, 51, 0.08);
}

/* Card */
.gate {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3.4rem 1.1rem 1.4rem;
}

.gate-card {
    width: min(460px, 100%);
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    padding: 2rem 1.8rem 1.7rem;
    text-align: center;
    box-shadow: 0 22px 60px rgba(90, 22, 34, 0.13);
    position: relative;
}

.gate-card::before {
    content: '';
    position: absolute;
    inset: 7px;
    border: 1px solid rgba(124, 34, 51, 0.1);
    border-radius: 14px;
    pointer-events: none;
}

.gate-lock {
    width: 60px;
    height: 60px;
    margin: 0 auto 0.9rem;
    border-radius: 50%;
    background: rgba(124, 34, 51, 0.08);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gate-lock svg { width: 28px; height: 28px; fill: var(--wine); }

.gate-kicker {
    font-size: 0.66rem;
    letter-spacing: 0.42em;
    text-indent: 0.42em;
    text-transform: uppercase;
    color: var(--wine);
}

[dir="rtl"] .gate-kicker { letter-spacing: 0.18em; text-indent: 0.18em; }

.gate-name {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(1.8rem, 7vw, 2.4rem);
    letter-spacing: 0.07em;
    margin-top: 0.15rem;
    background: linear-gradient(180deg, var(--wine-2), var(--wine) 58%, var(--wine-deep));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gate-orn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    max-width: 260px;
    margin: 0.8rem auto 1.1rem;
}

.gate-orn span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line)); }
.gate-orn span:last-child { background: linear-gradient(90deg, var(--line), transparent); }
.gate-orn i { width: 7px; height: 7px; background: var(--wine); transform: rotate(45deg); }

.gate-title {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--wine);
    margin-bottom: 0.5rem;
}

.gate-lead {
    color: var(--ink);
    line-height: 1.6;
    font-size: 0.98rem;
}

.gate-error {
    margin-top: 1rem;
    background: rgba(181, 52, 63, 0.09);
    border: 1px solid rgba(181, 52, 63, 0.35);
    color: var(--danger);
    border-radius: 10px;
    padding: 0.65rem 0.9rem;
    font-size: 0.93rem;
}

/* Form */
.gate-form { margin-top: 1.4rem; text-align: start; }

.gate-field span {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.gate-field input {
    width: 100%;
    background: #fff;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    color: var(--ink);
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 1.02rem;
    letter-spacing: 0.04em;
    padding: 0.75rem 0.85rem;
    text-align: center;
    transition: border-color 0.2s ease;
}

.gate-field input:focus {
    outline: none;
    border-color: var(--wine);
    box-shadow: 0 0 0 3px rgba(124, 34, 51, 0.1);
}

.gate-field input:disabled { background: #f4f1ec; color: var(--muted); }

.gate-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.8rem;
    font-size: 0.9rem;
    color: var(--muted);
    cursor: pointer;
}

.gate-remember input { accent-color: var(--wine); width: 16px; height: 16px; }

.gate-btn {
    width: 100%;
    margin-top: 1.1rem;
    padding: 0.8rem 1.4rem;
    border: none;
    border-radius: 999px;
    background: linear-gradient(160deg, var(--wine-2), var(--wine) 60%, var(--wine-deep));
    color: #fff;
    font-family: var(--display);
    font-size: 1rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gate-btn:hover:not(:disabled) {
    box-shadow: 0 10px 24px rgba(124, 34, 51, 0.3);
    transform: translateY(-1px);
}

.gate-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Help / WhatsApp */
.gate-help {
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line-soft);
}

.gate-help p {
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.55;
    margin-bottom: 0.8rem;
}

.gate-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    border: 1px solid var(--whatsapp);
    color: var(--whatsapp);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    direction: ltr;
    transition: all 0.2s ease;
}

.gate-whatsapp svg { width: 20px; height: 20px; fill: currentColor; }

.gate-whatsapp:hover { background: var(--whatsapp); color: #fff; }

.gate-foot {
    margin-top: 1.4rem;
    color: var(--muted);
    font-size: 0.82rem;
    text-align: center;
}

.gate-foot strong {
    font-family: var(--display);
    font-weight: 600;
    color: var(--wine);
}

@media (max-width: 480px) {
    .gate { padding-top: 3.8rem; }
    .gate-card { padding: 1.6rem 1.2rem 1.4rem; }
}
