/*
 * INSTANTIPE public pages: landing (index.php), login and register.
 *
 * Layered on Bootstrap's grid (row / col-* / g-*) and Boxicons, both loaded
 * from the CDN by each page; everything visual lives here. The rest of the
 * public site (services, contact, password reset) still uses the Tailwind
 * theme in includes/public-ui.php.
 *
 * The brand colour is set once in --primary and its variants below; dark mode
 * redefines tokens only, so switching the page over is a matter of setting
 * data-theme="dark" on <html>.
 */

/* ── Tokens ───────────────────────────────────────────────────────────────── */

:root {
    --primary:        #16a34a;
    --primary-dark:   #15803d;
    --primary-light:  #dcfce7;
    --primary-shadow: rgba(22,163,74,0.35);
    --primary-rgb:    22,163,74;

    --bg-body: #f7f8fb;
    --bg-card: #ffffff;
    --bg-subtle: #fbfbfd;
    --bg-inset: #f1f2f6;
    --bg-elevated: #ffffff;

    --text-heading: #1e2340;
    --text-body: #5a6382;
    --text-muted: #8b93ab;
    --text-inverse: #ffffff;

    --border-color: #e8eaf0;
    --border-strong: #d5d9e4;

    --space-1: .25rem;
    --space-2: .5rem;
    --space-3: .75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --radius-pill: 999px;

    --shadow-xs: 0 1px 2px rgba(21, 25, 50, .04);
    --shadow-sm: 0 1px 3px rgba(21, 25, 50, .05), 0 1px 2px rgba(21, 25, 50, .03);
    --shadow: 0 4px 12px rgba(21, 25, 50, .06), 0 1px 3px rgba(21, 25, 50, .04);
    --shadow-lg: 0 12px 32px rgba(21, 25, 50, .10), 0 4px 8px rgba(21, 25, 50, .04);
    --shadow-primary: 0 6px 18px var(--primary-shadow);

    --font-sans: "Figtree", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --control-height: 52px;
    --control-height-sm: 42px;
    --control-radius: 12px;

    --transition: 160ms cubic-bezier(.4, 0, .2, 1);
}

[data-theme="dark"] {
    --bg-body: #14161f;
    --bg-card: #1c1f2b;
    --bg-subtle: #21242f;
    --bg-inset: #262a37;
    --bg-elevated: #232733;

    --text-heading: #f0f2f8;
    --text-body: #a8b0c8;
    --text-muted: #6f7793;

    --border-color: #2c3040;
    --border-strong: #3b4054;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .35);
    --shadow: 0 4px 12px rgba(0, 0, 0, .4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
}

/* ── Base ─────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: .9375rem;
    line-height: 1.6;
    color: var(--text-body);
    background: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.25;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

::selection { background: var(--primary); color: #fff; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    height: var(--control-height);
    padding: 0 var(--space-5);
    font-family: inherit;
    font-size: .9375rem;
    font-weight: 600;
    letter-spacing: -.01em;
    border: 1.5px solid transparent;
    border-radius: var(--control-radius);
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition), border-color var(--transition),
                box-shadow var(--transition), transform 100ms, opacity var(--transition);
}
.btn:active:not(:disabled) { transform: translateY(1px); }

.btn-sm { height: var(--control-height-sm); padding: 0 var(--space-3); font-size: .8125rem; border-radius: var(--radius-sm); }
.btn-lg { height: 58px; padding: 0 var(--space-6); font-size: 1rem; }

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-primary);
}
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }

.btn-secondary {
    background: var(--bg-card);
    border-color: var(--border-strong);
    color: var(--text-heading);
}
.btn-secondary:hover:not(:disabled) { background: var(--bg-inset); color: var(--text-heading); }

/* White-on-brand buttons used inside the closing CTA panel. */
.cta__btn {
    display: inline-flex; align-items: center; gap: .4375rem;
    padding: .6875rem 1.125rem;
    border-radius: var(--radius);
    background: #fff; color: var(--primary);
    font-size: .875rem; font-weight: 700;
    transition: transform var(--transition), box-shadow var(--transition);
}
.cta__btn:hover { color: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.16); }
.cta__btn--ghost {
    background: rgba(255, 255, 255, .16);
    color: #fff;
    backdrop-filter: blur(4px);
}
.cta__btn--ghost:hover { background: rgba(255, 255, 255, .26); color: #fff; }

/* ── Navigation ───────────────────────────────────────────────────────────── */

.site-nav {
    position: sticky; top: 0; z-index: 100;
    background: color-mix(in srgb, var(--bg-body) 82%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border-color);
}
.site-nav__inner {
    max-width: 1200px; margin: 0 auto;
    padding: 0 var(--space-5);
    height: 72px;
    display: flex; align-items: center; gap: var(--space-5);
}
.site-nav__brand { display: flex; align-items: center; gap: .625rem; font-weight: 800; font-size: 1.0625rem; color: var(--text-heading); letter-spacing: -.03em; }
.site-nav__brand:hover { color: var(--text-heading); }
.site-nav__logo { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; background: #fff; border: 1px solid var(--border-color); padding: 2px; box-shadow: var(--shadow-xs); }
.site-nav__links { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.site-nav__link {
    padding: .5rem .875rem; border-radius: var(--radius-sm);
    font-size: .875rem; font-weight: 600; color: var(--text-body);
}
.site-nav__link:hover { background: var(--bg-inset); color: var(--text-heading); }

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.hero { padding: clamp(3.5rem, 9vw, 7rem) var(--space-5) clamp(3rem, 7vw, 5rem); }
.hero__inner { max-width: 1200px; margin: 0 auto; text-align: center; }
.hero__badge {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .4375rem .875rem;
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    color: var(--primary);
    border-radius: var(--radius-pill);
    font-size: .8125rem; font-weight: 700;
    margin-bottom: var(--space-5);
}
.hero__title {
    font-size: clamp(2.25rem, 6vw, 4rem);
    font-weight: 800; letter-spacing: -.045em; line-height: 1.06;
    margin: 0 0 var(--space-4);
}
.hero__title em {
    font-style: normal;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__desc {
    max-width: 62ch; margin: 0 auto var(--space-6);
    font-size: clamp(1rem, 2vw, 1.125rem); line-height: 1.7; color: var(--text-body);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }

.stat-strip {
    max-width: 900px; margin: clamp(3rem, 6vw, 4.5rem) auto 0;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4);
}
.stat-strip__item {
    padding: var(--space-5) var(--space-3); text-align: center;
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}
.stat-strip__value { font-size: clamp(1.375rem, 3vw, 1.875rem); font-weight: 800; color: var(--text-heading); letter-spacing: -.03em; }
.stat-strip__label { font-size: .78125rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-top: .25rem; }

/* ── Sections ─────────────────────────────────────────────────────────────── */

.section { padding: clamp(3rem, 7vw, 5.5rem) var(--space-5); }
.section--card { background: var(--bg-card); border-block: 1px solid var(--border-color); }
.section--tight { padding-top: 0; }
.section__inner { max-width: 1200px; margin: 0 auto; }
.section__head { text-align: center; max-width: 62ch; margin: 0 auto clamp(2rem, 4vw, 3.5rem); }
.section__eyebrow { font-size: .78125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--primary); margin-bottom: .625rem; }
.section__title { font-size: clamp(1.625rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -.035em; margin: 0 0 .875rem; }
.section__desc { font-size: 1rem; color: var(--text-body); line-height: 1.7; margin: 0; }

.service-card {
    display: block; height: 100%; padding: var(--space-5);
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); color: inherit;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.service-card:hover { color: inherit; border-color: color-mix(in srgb, var(--primary) 40%, transparent); box-shadow: var(--shadow); transform: translateY(-3px); }
.service-card__icon {
    width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius); background: color-mix(in srgb, var(--primary) 10%, transparent);
    color: var(--primary); font-size: 1.5rem; margin-bottom: var(--space-4);
}
.service-card__name { font-size: 1rem; font-weight: 700; color: var(--text-heading); margin-bottom: .375rem; }
.service-card__blurb { font-size: .875rem; color: var(--text-muted); line-height: 1.65; margin-bottom: var(--space-4); }
.service-card__price { font-size: .8125rem; font-weight: 700; color: var(--primary); }

.step { text-align: center; padding: var(--space-4); }
.step__num {
    width: 52px; height: 52px; margin: 0 auto var(--space-4);
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius); background: var(--primary); color: #fff;
    font-size: 1.25rem; font-weight: 800; box-shadow: var(--shadow-primary);
}
.step__title { font-size: 1rem; font-weight: 700; color: var(--text-heading); margin-bottom: .5rem; }
.step__text { font-size: .875rem; color: var(--text-muted); line-height: 1.65; }

.cta {
    max-width: 1100px; margin: 0 auto; padding: clamp(2.5rem, 6vw, 4rem) var(--space-5);
    text-align: center; border-radius: var(--radius-xl);
    background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--primary) 55%, #000) 0%, transparent 55%),
                linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
}
.cta__title { font-size: clamp(1.5rem, 4vw, 2.25rem); font-weight: 800; color: #fff; letter-spacing: -.035em; margin-bottom: .875rem; }
.cta__desc { font-size: 1rem; opacity: .9; max-width: 52ch; margin: 0 auto var(--space-5); line-height: 1.7; }

/* ── Footer ───────────────────────────────────────────────────────────────── */

.site-footer { border-top: 1px solid var(--border-color); padding: var(--space-6) var(--space-5) var(--space-5); }
.site-footer__inner { max-width: 1200px; margin: 0 auto; }
.site-footer__blurb { font-size: .875rem; color: var(--text-muted); max-width: 38ch; line-height: 1.7; }
.site-footer__heading { font-size: .78125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-heading); margin-bottom: .875rem; }
.site-footer__list { font-size: .875rem; line-height: 2.1; }
.site-footer__list a { color: var(--text-muted); }
.site-footer__list a:hover { color: var(--primary); }
.site-footer__bottom {
    margin-top: var(--space-5); padding-top: var(--space-5);
    border-top: 1px solid var(--border-color);
    display: flex; flex-wrap: wrap; gap: var(--space-3);
    align-items: center; justify-content: space-between;
    font-size: .8125rem; color: var(--text-muted);
}

/* Floating WhatsApp button - same convention as the other public pages. */
.wa-float {
    position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 90;
    width: 56px; height: 56px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #25d366; color: #fff; font-size: 1.75rem;
    box-shadow: 0 8px 24px rgba(37, 211, 102, .35);
    transition: transform var(--transition);
}
.wa-float:hover { color: #fff; transform: scale(1.08); }

/* ── Phones ───────────────────────────────────────────────────────────────── */

@media (max-width: 575.98px) {
    /* Drop the in-page anchors on phones, but keep Login + Create Account
       so the primary actions are always one tap away. */
    .site-nav__links .site-nav__link:not(.btn) { display: none; }
    .site-nav__inner { padding: 0 var(--space-4); gap: var(--space-3); height: 64px; }
    .site-nav__links { gap: .375rem; }
    .site-nav__brand { font-size: .9375rem; min-width: 0; white-space: nowrap; }
    .site-nav__logo { width: 34px; height: 34px; }
    .hero__actions .btn, .cta .cta__btn { width: 100%; justify-content: center; }
    .stat-strip { grid-template-columns: 1fr; }
}

/* ── Forms (login / register) ─────────────────────────────────────────────── */

.form-label {
    display: block;
    margin-bottom: .4375rem;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--text-heading);
    letter-spacing: -.01em;
}

.form-control {
    display: block;
    width: 100%;
    height: var(--control-height);
    padding: 0 var(--space-4);
    font-family: inherit;
    font-size: .9375rem;
    font-weight: 500;
    color: var(--text-heading);
    background-color: var(--bg-card);
    background-clip: padding-box;
    border: 1.5px solid var(--border-color);
    border-radius: var(--control-radius);
    transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
    appearance: none;
}
.form-control::placeholder { color: var(--text-muted); font-weight: 400; }
.form-control:hover:not(:disabled):not([readonly]) { border-color: var(--border-strong); }
.form-control:focus {
    outline: 0;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent);
    background-color: var(--bg-card);
}
.form-control.is-invalid { border-color: var(--danger); }

.form-text {
    margin-top: .4375rem;
    font-size: .78125rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.form-label__opt { font-weight: 400; color: var(--text-muted); }

/* Password field with a show/hide eye on the right. */
.pw-wrap { position: relative; }
.pw-wrap .form-control { padding-right: 3rem; }
.pw-toggle {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: 3rem; display: flex; align-items: center; justify-content: center;
    background: none; border: 0; padding: 0; cursor: pointer;
    color: var(--text-muted); font-size: 1.25rem; border-radius: var(--control-radius);
}
.pw-toggle:hover { color: var(--primary); }

.form-check { padding-left: 1.85rem; position: relative; min-height: 1.5rem; }
.form-check-input {
    width: 1.25rem; height: 1.25rem;
    margin-left: -1.85rem;
    margin-top: .125rem;
    border: 1.5px solid var(--border-strong);
    border-radius: 6px;
    background-color: var(--bg-card);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
    appearance: none;
    float: left;
}
.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23fff'%3E%3Cpath d='M16.7 5.3a1 1 0 010 1.4l-7.5 7.5a1 1 0 01-1.4 0l-3.5-3.5a1 1 0 111.4-1.4l2.8 2.8 6.8-6.8a1 1 0 011.4 0z'/%3E%3C/svg%3E");
    background-size: 100%;
    background-position: center;
    background-repeat: no-repeat;
}
.form-check-input:focus-visible { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent); }
.form-check-label { font-size: .875rem; color: var(--text-body); cursor: pointer; }

/* ── Alerts ───────────────────────────────────────────────────────────────── */

.alert {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4);
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: .875rem;
    margin-bottom: var(--space-4);
}
.alert i { font-size: 1.25rem; flex-shrink: 0; line-height: 1.3; }
.alert ul { margin: 0; padding-left: 1.1rem; }
.alert li + li { margin-top: .25rem; }
.alert-success { background: #e7f8f0; color: #05784a; border-color: rgba(18, 183, 106, .22); }
.alert-danger  { background: #feeceb; color: #b42318; border-color: rgba(240, 68, 56, .22); }
.alert-warning { background: #fff6e6; color: #b54708; border-color: rgba(247, 144, 9, .22); }
.alert-info    { background: #e8f2fe; color: #175cd3; border-color: rgba(46, 144, 250, .22); }
[data-theme="dark"] .alert-success { background: rgba(18, 183, 106, .14); color: #4ade9a; }
[data-theme="dark"] .alert-danger  { background: rgba(240, 68, 56, .14);  color: #ff8577; }
[data-theme="dark"] .alert-warning { background: rgba(247, 144, 9, .14);  color: #fdb457; }
[data-theme="dark"] .alert-info    { background: rgba(46, 144, 250, .14); color: #6cb2fb; }

/* ── Auth shell (login / register) ────────────────────────────────────────── */

.auth-shell { display: flex; min-height: 100vh; }

.auth-main {
    flex: 1;
    display: flex; align-items: center; justify-content: center;
    padding: var(--space-6) var(--space-5);
}

.auth-card { width: 100%; max-width: 440px; }
.auth-card--wide { max-width: 520px; }

.auth-brand {
    display: inline-flex; align-items: center; gap: .625rem;
    font-weight: 800; font-size: 1.125rem; color: var(--text-heading);
    letter-spacing: -.03em; margin-bottom: var(--space-6);
}
.auth-brand:hover { color: var(--text-heading); }

.auth-title { font-size: 1.75rem; font-weight: 800; letter-spacing: -.035em; margin-bottom: .5rem; }
.auth-sub { font-size: .9375rem; color: var(--text-muted); margin-bottom: var(--space-6); }
.auth-foot { text-align: center; margin-top: var(--space-7); font-size: .875rem; color: var(--text-muted); }
.auth-foot a { font-weight: 700; }
.auth-links {
    display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem var(--space-4);
    margin-top: var(--space-5); font-size: .8125rem; font-weight: 600;
}
.auth-links a { color: var(--text-muted); }
.auth-links a:hover { color: var(--primary); }
.auth-icon {
    width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-lg); background: #fff6e6; color: #b54708;
    font-size: 1.5rem; margin-bottom: var(--space-4);
}

.auth-aside {
    width: 46%; max-width: 620px;
    padding: var(--space-7);
    display: flex; flex-direction: column; justify-content: center;
    position: relative; overflow: hidden;
    background: radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--primary) 55%, #000) 0%, transparent 55%),
                linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
}
.auth-aside::after {
    content: ""; position: absolute;
    bottom: -30%; left: -15%;
    width: 460px; height: 460px; border-radius: 50%;
    background: rgba(255,255,255,.07);
}
.auth-aside__title {
    font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 800;
    color: #fff; letter-spacing: -.04em; line-height: 1.15; margin-bottom: var(--space-4);
    position: relative; z-index: 1;
}
.auth-aside__text { font-size: 1rem; opacity: .9; line-height: 1.7; max-width: 44ch; position: relative; z-index: 1; }
.auth-aside__list { list-style: none; padding: 0; margin: var(--space-6) 0 0; position: relative; z-index: 1; }
.auth-aside__list li { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: var(--space-4); font-size: .9375rem; }
.auth-aside__list i { font-size: 1.25rem; flex-shrink: 0; margin-top: 1px; }

@media (max-width: 991.98px) { .auth-aside { display: none; } }
@media (max-width: 575.98px) {
    input.form-control { font-size: 16px; }   /* stop iOS zoom-on-focus */
}
