/* ==========================================================================
   Public pages: landing, login, sign-up.
   Self-contained on purpose - the old theme loaded eleven stylesheets, a
   slider, an animation engine and a mega-menu to draw three screens. This is
   the whole design system for the public side, and it speaks the same language
   as the app behind it: Cairo, WhatsApp green, generous white.
   ========================================================================== */

:root {
    --g:        #1daa61;   /* brand green - same as the app bar */
    --g-deep:   #008069;
    --g-soft:   #e7f8ef;
    --ink:      #111b21;
    --ink-soft: #3b4a54;
    --ink-mute: #667781;
    --line:     #e9edef;
    --panel:    #f7f9fa;
    --wall:     #efeae2;   /* the chat wallpaper, reused in the hero */
    --radius:   16px;
    --shadow:   0 4px 20px rgba(11, 20, 26, .07);
    --shadow-lg: 0 18px 46px rgba(11, 20, 26, .12);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Cairo', 'Tajawal', 'Open Sans', 'Segoe UI', Tahoma, sans-serif;
    color: var(--ink);
    background: #fff;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 12px; line-height: 1.35; font-weight: 700; color: var(--ink); }
p  { margin: 0 0 14px; color: var(--ink-soft); }
a  { color: var(--g-deep); text-decoration: none; }
a:hover { text-decoration: none; opacity: .85; }
img { max-width: 100%; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: 20px; }

/* ---------------------------------------------------------------- buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 48px; padding-inline: 26px; border: 0; border-radius: 26px;
    font-family: inherit; font-size: 15.5px; font-weight: 600; cursor: pointer;
    transition: transform .16s cubic-bezier(.22,1,.36,1), box-shadow .16s, background .16s;
    white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn--go    { background: var(--g); color: #fff; box-shadow: 0 6px 18px rgba(29, 170, 97, .28); }
.btn--go:hover { background: #17994f; color: #fff; }
.btn--ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn--ghost:hover { background: var(--panel); color: var(--ink); }
.btn--sm    { height: 40px; padding-inline: 18px; font-size: 14px; }
.btn--block { width: 100%; }

/* ------------------------------------------------------------------- nav */
.nav {
    position: sticky; top: 0; z-index: 30;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.nav__in { display: flex; align-items: center; gap: 18px; height: 68px; }
.nav__logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--ink); }
.nav__logo img { height: 34px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 22px; margin-inline-start: auto; }
.nav__links a { color: var(--ink-soft); font-size: 15px; font-weight: 500; }
.nav__links a:hover { color: var(--g-deep); }
.nav__cta { display: flex; align-items: center; gap: 10px; }
.nav__burger {
    display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px;
    background: #fff; color: var(--ink); font-size: 18px; cursor: pointer;
    align-items: center; justify-content: center; margin-inline-start: auto;
}

/* ------------------------------------------------------------------ hero */
.hero { position: relative; padding: 64px 0 40px; overflow: hidden; }
.hero::before {
    content: ''; position: absolute; inset-inline-end: -180px; top: -220px;
    width: 620px; height: 620px; border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--g-soft), transparent 68%);
    pointer-events: none;
}
.hero__in { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero__tag {
    display: inline-flex; align-items: center; gap: 7px; margin-bottom: 18px;
    padding: 6px 14px; border-radius: 20px; background: var(--g-soft);
    color: var(--g-deep); font-size: 13px; font-weight: 600;
}
.hero h1 { font-size: 44px; line-height: 1.28; letter-spacing: -.5px; }
.hero h1 span { color: var(--g); }
.hero__sub { font-size: 17.5px; color: var(--ink-mute); max-width: 520px; margin-bottom: 26px; }
.hero__btns { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__note { margin-top: 18px; font-size: 13.5px; color: var(--ink-mute); }

/* the phone: drawn, not photographed, so nothing can 404 */
.phone {
    width: 290px; margin-inline: auto; border-radius: 34px; padding: 10px;
    background: #111b21; box-shadow: var(--shadow-lg);
}
.phone__screen { border-radius: 26px; overflow: hidden; background: var(--wall); }
.phone__bar {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px;
    background: #fff; border-bottom: 1px solid var(--line);
}
.phone__ava {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, #25d366, #128c7e);
    display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 14px;
}
.phone__who { font-size: 13.5px; font-weight: 600; }
.phone__who small { display: block; font-size: 11px; font-weight: 400; color: var(--g); }
.phone__chat {
    padding: 14px 12px 16px; min-height: 300px; display: flex; flex-direction: column; gap: 8px;
    background-color: var(--wall);
    background-image: radial-gradient(rgba(11, 20, 26, .05) 1px, transparent 1px);
    background-size: 22px 22px;
}
.bub {
    max-width: 82%; padding: 7px 10px 8px; border-radius: 8px; font-size: 13px; line-height: 1.5;
    background: #fff; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); align-self: flex-start;
    border-start-start-radius: 0;
}
.bub--me { background: #d9fdd3; align-self: flex-end; border-start-start-radius: 8px; border-start-end-radius: 0; }
.bub time { display: block; margin-top: 2px; font-size: 10px; color: var(--ink-mute); text-align: end; }

.plans__hint { display: none; }

/* ---------------------------------------------------------------- strips */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 54px; }
.strip__i { text-align: center; padding: 18px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.strip__i b { display: block; font-size: 24px; color: var(--g-deep); }
.strip__i span { font-size: 13px; color: var(--ink-mute); }

/* -------------------------------------------------------------- sections */
.sec { padding: 72px 0; }
.sec--soft { background: var(--panel); }
.sec__head { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.sec__head h2 { font-size: 32px; }
.sec__head p { font-size: 16px; color: var(--ink-mute); margin: 0; }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px;
    transition: transform .18s cubic-bezier(.22,1,.36,1), box-shadow .18s, border-color .18s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d7e3dc; }
.card__ic {
    width: 48px; height: 48px; border-radius: 14px; background: var(--g-soft); color: var(--g-deep);
    display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 14px;
}
.card h3 { font-size: 17px; margin-bottom: 6px; }
.card p  { font-size: 14.5px; color: var(--ink-mute); margin: 0; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.step { position: relative; padding: 26px 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.step::before {
    counter-increment: s; content: counter(s);
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%; margin-bottom: 12px;
    background: var(--g); color: #fff; font-weight: 700; font-size: 15px;
}
.step h3 { font-size: 16.5px; margin-bottom: 4px; }
.step p { font-size: 14.5px; color: var(--ink-mute); margin: 0; }

/* ------------------------------------------------------------- pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; align-items: start; }
.plan {
    position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 28px 22px; display: flex; flex-direction: column;
}
.plan--best { border-color: var(--g); box-shadow: 0 10px 30px rgba(29, 170, 97, .14); }
.plan__flag {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--g); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 14px; border-radius: 12px;
}
.plan h3 { font-size: 18px; margin-bottom: 2px; }
.plan__price { font-size: 32px; font-weight: 700; color: var(--ink); margin: 10px 0 2px; }
.plan__price small { font-size: 14px; font-weight: 500; color: var(--ink-mute); }
.plan__list { list-style: none; margin: 18px 0 22px; padding: 0; flex: 1; }
.plan__list li { display: flex; align-items: flex-start; gap: 8px; font-size: 14.5px; color: var(--ink-soft); padding: 5px 0; }
.plan__list li::before { content: '✓'; color: var(--g); font-weight: 700; flex-shrink: 0; }

/* ------------------------------------------------------------------ faq */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; overflow: hidden; }
.faq summary {
    cursor: pointer; padding: 16px 20px; font-weight: 600; font-size: 15.5px; list-style: none;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--g); font-size: 20px; font-weight: 400; flex-shrink: 0; }
.faq details[open] summary::after { content: '–'; }
.faq details > div { padding: 0 20px 16px; font-size: 14.5px; color: var(--ink-mute); }

/* ----------------------------------------------------------------- cta */
.cta { text-align: center; padding: 60px 24px; border-radius: 22px; background: linear-gradient(135deg, var(--g-deep), var(--g)); color: #fff; }
.cta h2 { color: #fff; font-size: 30px; }
.cta p  { color: rgba(255, 255, 255, .88); max-width: 520px; margin: 0 auto 22px; }
.cta .btn--ghost { background: #fff; color: var(--g-deep); border: 0; }

/* -------------------------------------------------------------- footer */
.foot { padding: 44px 0 30px; border-top: 1px solid var(--line); background: #fff; }
.foot__in { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.foot__logo { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.foot__logo img { height: 30px; }
.foot__links { display: flex; flex-wrap: wrap; gap: 18px; }
.foot__links a { color: var(--ink-mute); font-size: 14px; }
.foot__copy { width: 100%; text-align: center; margin-top: 24px; font-size: 13px; color: var(--ink-mute); }

/* ------------------------------------------------------ language switch */
.lang { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-mute); }
.lang a { color: var(--ink-mute); }
.lang a.is-on { color: var(--g); font-weight: 700; }

/* ==========================================================================
   Auth: one centred card, nothing else on the screen.
   ========================================================================== */
.auth {
    min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 28px 20px calc(28px + env(safe-area-inset-bottom));
    background: var(--panel);
    background-image: radial-gradient(rgba(11, 20, 26, .035) 1px, transparent 1px);
    background-size: 24px 24px;
}
.auth__card {
    width: 100%; max-width: 420px; background: #fff; border-radius: 22px;
    padding: 30px 26px 26px; box-shadow: var(--shadow-lg);
}
.auth__brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 20px; }
.auth__brand img { height: 44px; width: auto; }
.auth__card h1 { font-size: 22px; text-align: center; margin-bottom: 4px; }
.auth__card .auth__sub { text-align: center; font-size: 14.5px; color: var(--ink-mute); margin-bottom: 22px; }

.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.field input {
    width: 100%; height: 48px; padding-inline: 14px;
    border: 1px solid var(--line); border-radius: 13px; background: var(--panel);
    font-family: inherit; font-size: 15px; color: var(--ink);
    transition: border-color .16s, box-shadow .16s, background .16s;
}
.field input:focus { outline: 0; background: #fff; border-color: var(--g); box-shadow: 0 0 0 3px rgba(29, 170, 97, .15); }
.field input.is-invalid { border-color: #e53935; background: #fff5f5; }
.field__hint { display: block; margin-top: 5px; font-size: 12px; color: var(--ink-mute); }
.field__err  { display: block; margin-top: 5px; font-size: 12.5px; color: #e53935; font-weight: 600; }

.auth__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 18px; font-size: 13.5px; }
.auth__row label { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); cursor: pointer; margin: 0; }
.auth__row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--g); }
.auth__alt { text-align: center; margin-top: 18px; font-size: 14px; color: var(--ink-mute); }
.auth__alt a { font-weight: 600; }
.auth__foot { margin-top: 18px; text-align: center; }
.auth__plan {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin-bottom: 20px; padding: 12px 14px; border-radius: 13px; background: var(--g-soft);
    font-size: 14px; color: var(--g-deep); font-weight: 600;
}
.auth__plan span { font-weight: 400; color: var(--ink-soft); }
.auth__back { display: block; text-align: center; margin-top: 16px; font-size: 13.5px; color: var(--ink-mute); }

/* ==================================================================== small */
@media (max-width: 900px) {
    .hero__in { grid-template-columns: 1fr; gap: 34px; }
    .hero h1 { font-size: 34px; }
    .grid3, .steps { grid-template-columns: 1fr 1fr; }
    .strip { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .nav__links { display: none; }
    .nav__links.is-open {
        display: flex; flex-direction: column; align-items: stretch; gap: 0;
        position: absolute; inset-inline: 0; top: 68px; padding: 8px 16px 14px;
        background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    }
    .nav__links.is-open a { padding: 11px 4px; border-bottom: 1px solid var(--line); }
    .nav__burger { display: flex; }
    .nav__cta .btn--ghost { display: none; }

    .hero { padding-top: 40px; }
    .hero h1 { font-size: 28px; }
    .hero__sub { font-size: 15.5px; }
    .hero__btns .btn { flex: 1 1 100%; }
    .phone { width: 250px; }

    .sec { padding: 44px 0; }
    .sec__head { margin-bottom: 26px; }
    .sec__head h2 { font-size: 24px; }

    /* Two per row on a phone: six stacked cards turned the page into a
       scrolling marathon. */
    .grid3 { grid-template-columns: 1fr 1fr; gap: 12px; }
    .card { padding: 16px 13px; }
    .card__ic { width: 38px; height: 38px; border-radius: 11px; font-size: 16px; margin-bottom: 10px; }
    .card h3 { font-size: 14.5px; margin-bottom: 4px; }
    .card p { font-size: 12.8px; line-height: 1.55; }

    .steps { grid-template-columns: 1fr; gap: 10px; }
    .step { padding: 16px 16px; }
    .step::before { width: 28px; height: 28px; font-size: 13px; margin-bottom: 8px; }
    .step h3 { font-size: 15px; }
    .step p { font-size: 13.5px; }

    .strip { margin-top: 34px; gap: 10px; }
    .strip__i { padding: 13px 8px; }
    .strip__i b { font-size: 20px; }
    .strip__i span { font-size: 12px; }

    /* Four stacked plan cards turned this section into a 1500px wall; on a
       phone they swipe sideways instead, one at a time. */
    .plans {
        display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
        padding: 4px 2px 10px; margin-inline: -2px;
        scrollbar-width: none; -webkit-overflow-scrolling: touch;
    }
    .plans::-webkit-scrollbar { display: none; }
    .plan { flex: 0 0 78%; scroll-snap-align: center; padding: 22px 18px; }
    .plans__hint { display: block; text-align: center; font-size: 12.5px; color: var(--ink-mute); margin-top: 2px; }
    .plan__price { font-size: 27px; }
    .plan__list { margin: 14px 0 18px; }
    .plan__list li { font-size: 13.5px; padding: 4px 0; }
    .cta { padding: 44px 20px; }
    .cta h2 { font-size: 23px; }
    .foot__in { flex-direction: column; text-align: center; }

    .auth__card { padding: 26px 20px 22px; border-radius: 18px; }
}
