/*
 * ecl-front.css
 * Styles for public-facing pages: front page, login, reset, signup.
 * Standalone — does not depend on ecl-admin.css.
 */

/* Per-file :root removed in Stage 3 (2026-05-30) — canonical tokens flow
   from ecl-tokens.css (loaded by ECL_Design_Tokens on wp_enqueue_scripts
   priority 1). Token name disposition (note: --ecl-* namespace had INVERTED
   green semantics — --ecl-green-mid was the brighter primary, --ecl-green
   was the darker hover; mapping reflects that):
     --ecl-green       → --green-deep (dark hover, dark gradient endpoint)
     --ecl-green-mid   → --green       (primary brand green for CTAs, links)
     --ecl-green-light → --green-pale
     --ecl-accent      → --green-accent (bright accent, base CTA)
     --ecl-accent-2    → --green-deep   (hover-deepen — aligns with spec:
                                         "primary CTA hover deepens to
                                         --green-deep")
     --ecl-text        → --ink
     --ecl-text-muted  → --ink-mut
     --ecl-border      → --rule
     --ecl-bg          → --paper
     --ecl-white       → --white (extension)
     --ecl-red         → DEFERRED (decline-state pause-and-screenshot per
                         memory design-system-migration-followups #1).
                         Replaced inline with literal #c0392b.
     --ecl-red-light   → DEFERRED. Replaced inline with literal #fdf0f0. */

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

html { scroll-behavior: smooth; }

body.ecl-front {
    /* PM.c103 — fallback chain (the token's own) so a missing --body can never silently
       fall to the browser default serif again; with ecl-tokens.css loaded this resolves to Inter. */
    font-family: var(--body, 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ── NAV ── */
.ecl-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    /* Match the footer (var(--primary-deep, #1F5A41)) so the auth nav + footer read as one system (2026-07-04). */
    background: var(--primary-deep, #1F5A41);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 0 40px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ecl-nav-logo {
    display: flex; align-items: center; gap: 8px;
    text-decoration: none;
}
.ecl-nav-logo-text { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; display: inline-flex; align-items: center; }
.ecl-nav-logo-text .eco  { color: var(--green-accent); }
.ecl-nav-logo-text .lease{ color: #fff; }
.ecl-nav-tagline {
    font-size: 9px; color: rgba(255,255,255,0.3);
    text-transform: uppercase; letter-spacing: 1px;
    border-left: 1px solid rgba(255,255,255,0.15);
    padding-left: 10px; margin-left: 6px;
}
.ecl-nav-actions {
    display: flex; align-items: center; gap: 10px;
}
.ecl-nav-link {
    color: rgba(255,255,255,0.65); text-decoration: none;
    font-size: 13px; font-weight: 500; padding: 6px 12px;
    border-radius: 7px; transition: color 0.15s, background 0.15s;
}
.ecl-nav-link:hover { color: #fff; background: rgba(255,255,255,0.08); }
.ecl-nav-btn {
    background: var(--green-accent);
    color: #fff !important; text-decoration: none;
    font-size: 13px; font-weight: 600;
    padding: 7px 18px; border-radius: 8px;
    border: none; cursor: pointer;
    transition: background 0.15s;
    display: inline-block;
}
.ecl-nav-btn:hover { background: var(--green-deep); }

/* ── HERO ── */
.ecl-hero {
    min-height: 100vh;
    background: linear-gradient(155deg, var(--green-deep) 0%, #2d5a2d 55%, #1a3d1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 32px 80px;
    position: relative;
    overflow: hidden;
}
.ecl-hero::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}
.ecl-hero-inner { position: relative; z-index: 1; max-width: 720px; }
.ecl-hero-eyebrow {
    display: inline-block;
    background: rgba(92,184,92,0.15);
    border: 1px solid rgba(92,184,92,0.35);
    color: var(--green-accent);
    font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
    text-transform: uppercase; padding: 5px 14px; border-radius: 20px;
    margin-bottom: 24px;
}
.ecl-hero-heading {
    font-size: 52px; font-weight: 800; color: #fff;
    letter-spacing: -1.5px; line-height: 1.1; margin-bottom: 20px;
}
.ecl-hero-heading em { color: var(--green-accent); font-style: normal; }
.ecl-hero-sub {
    font-size: 18px; color: rgba(255,255,255,0.7);
    line-height: 1.65; max-width: 580px; margin: 0 auto 36px;
    font-weight: 400;
}
.ecl-hero-actions {
    display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
.ecl-btn-hero-primary {
    background: var(--green-accent); color: #fff;
    padding: 14px 32px; border-radius: 10px; font-size: 15px; font-weight: 700;
    text-decoration: none; border: none; cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    display: inline-block;
}
.ecl-btn-hero-primary:hover { background: var(--green-deep); transform: translateY(-1px); }
.ecl-btn-hero-secondary {
    background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.9);
    padding: 14px 32px; border-radius: 10px; font-size: 15px; font-weight: 600;
    text-decoration: none; border: 1.5px solid rgba(255,255,255,0.25); cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    display: inline-block;
}
.ecl-btn-hero-secondary:hover { background: rgba(255,255,255,0.18); transform: translateY(-1px); }

/* ── FEATURES SECTION ── */
.ecl-features {
    padding: 80px 40px;
    background: var(--white);
}
.ecl-features-inner {
    max-width: 1000px; margin: 0 auto;
}
.ecl-features-heading {
    text-align: center; font-size: 13px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.5px; color: var(--ink-mut);
    margin-bottom: 40px;
}
.ecl-features-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.ecl-feature-card {
    background: var(--paper);
    border: 1.5px solid var(--rule);
    border-radius: 14px; padding: 28px 24px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ecl-feature-card:hover {
    border-color: var(--green-deep);
    box-shadow: 0 4px 20px rgba(27,107,58,0.10);
}
.ecl-feature-icon {
    font-size: 28px; margin-bottom: 14px; display: block;
}
.ecl-feature-title {
    font-size: 15px; font-weight: 700; color: var(--green-deep);
    margin-bottom: 10px;
}
.ecl-feature-desc {
    font-size: 13px; color: var(--ink-mut); line-height: 1.65;
}
.ecl-feature-list {
    margin-top: 12px; padding: 0; list-style: none;
}
.ecl-feature-list li {
    font-size: 12px; color: var(--ink-mut);
    padding: 4px 0; padding-left: 16px; position: relative;
}
.ecl-feature-list li::before {
    content: '→'; position: absolute; left: 0; color: var(--green-accent);
    font-size: 11px;
}

/* ── LOGIN SECTION (home page) ── */
.ecl-home-login {
    padding: 72px 40px;
    background: var(--paper);
}
.ecl-home-login-inner {
    max-width: 420px; margin: 0 auto; text-align: center;
}
.ecl-section-heading {
    font-size: 22px; font-weight: 700; color: var(--green-deep);
    margin-bottom: 6px;
}
.ecl-section-sub {
    font-size: 14px; color: var(--ink-mut); margin-bottom: 28px;
}

/* ── FORM CARD ── */
.ecl-form-card {
    background: var(--white);
    border: 1.5px solid var(--rule);
    border-radius: 16px;
    padding: 32px 32px;
    box-shadow: 0 2px 20px rgba(27,107,58,0.07);
}
.ecl-form-card-title {
    /* PM.c103 — the display heading in Fraunces (600 = the platform's display weight everywhere;
       the URL loads 400/500/600, so 700 would faux-bold). Body, labels, buttons and fields stay Inter. */
    font-family: var(--display, 'Fraunces', Georgia, serif);
    font-size: 18px; font-weight: 600; color: var(--green-deep);
    margin-bottom: 4px;
}
.ecl-form-card-sub {
    font-size: 13px; color: var(--ink-mut); margin-bottom: 24px;
}
.ecl-form-field {
    margin-bottom: 16px;
}
.ecl-form-field label {
    display: block; font-size: 12px; font-weight: 600; color: var(--ink);
    margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.4px;
}
.ecl-form-field input,
.ecl-form-field select,
.ecl-form-field textarea {
    width: 100%; padding: 10px 13px;
    border: 1.5px solid var(--rule);
    border-radius: 8px; font-size: 14px;
    color: var(--ink); background: #fff;
    outline: none; transition: border-color 0.15s;
    font-family: inherit;
}
.ecl-form-field input:focus,
.ecl-form-field select:focus,
.ecl-form-field textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(27,107,58,0.08);
}
.ecl-form-field textarea { resize: vertical; min-height: 100px; }
.ecl-form-field select { appearance: auto; }
.ecl-form-check {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--ink-mut); margin: 4px 0 16px;
}
.ecl-form-check input[type="checkbox"] { width: auto; }
.ecl-form-hint {
    font-size: 11px; color: var(--ink-mut); margin-top: 4px;
}
.ecl-form-divider {
    border: none; border-top: 1px solid var(--rule);
    margin: 20px 0;
}
.ecl-form-links {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12px; margin-top: 14px;
}
.ecl-form-link {
    color: var(--green); text-decoration: none;
    font-size: 12px; font-weight: 500;
    transition: color 0.15s;
}
.ecl-form-link:hover { color: var(--green-deep); text-decoration: underline; }

/* ── BUTTONS ── */
.ecl-btn-primary {
    width: 100%; padding: 12px 20px;
    background: var(--green); color: #fff;
    border: none; border-radius: 9px; font-size: 14px; font-weight: 700;
    cursor: pointer; transition: background 0.15s;
    font-family: inherit; letter-spacing: 0.2px;
}
.ecl-btn-primary:hover { background: var(--green-deep); }
.ecl-btn-primary:disabled {
    background: #9aaba0; cursor: not-allowed;
}
.ecl-btn-outline {
    width: 100%; padding: 11px 20px;
    background: transparent; color: var(--green);
    border: 1.5px solid var(--green); border-radius: 9px;
    font-size: 14px; font-weight: 600;
    cursor: pointer; transition: background 0.15s, color 0.15s;
    font-family: inherit; text-decoration: none; text-align: center;
    display: inline-block;
}
.ecl-btn-outline:hover { background: var(--green-pale); }

/* ── NOTICES ── */
.ecl-notice {
    padding: 10px 14px; border-radius: 8px;
    font-size: 13px; margin-bottom: 16px; display: none;
}
.ecl-notice-error {
    background: #fdf0f0; color: #c0392b;
    border: 1px solid #f5c0c0;
}
.ecl-notice-success {
    background: var(--green-pale); color: var(--green-deep);
    border: 1px solid #b8ddb8;
}

/* ── STANDALONE PAGE (login, reset, signup) ── */
.ecl-page-wrap {
    min-height: 100vh;
    display: flex; flex-direction: column;
    padding-top: 58px; /* nav height */
}
.ecl-page-center {
    flex: 1;
    display: flex; align-items: center; justify-content: center;
    padding: 40px 20px;
}
.ecl-page-card {
    background: var(--white);
    border: 1.5px solid var(--rule);
    border-radius: 16px; padding: 40px 36px;
    width: 100%; max-width: 440px;
    box-shadow: 0 4px 28px rgba(27,107,58,0.09);
}
.ecl-page-logo {
    text-align: center; margin-bottom: 28px;
}
.ecl-page-logo-text { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; }
.ecl-page-logo-text .eco  { color: var(--green-accent); }
.ecl-page-logo-text .lease{ color: var(--green-deep); }
.ecl-page-logo-tagline {
    font-size: 10px; color: var(--ink-mut);
    text-transform: uppercase; letter-spacing: 1px; margin-top: 3px;
}

/* Signup page needs more width */
.ecl-signup-card { max-width: 560px; }

/* ── FOOTER ── */
.ecl-front-footer {
    background: var(--green-deep);
    padding: 28px 40px;
    text-align: center;
}
.ecl-front-footer p {
    color: rgba(255,255,255,0.45); font-size: 11px;
    margin: 0 0 4px;
    line-height: 1.7;
}
.ecl-front-footer a {
    color: rgba(255,255,255,0.5); text-decoration: none;
}
.ecl-front-footer a:hover { color: rgba(255,255,255,0.8); }

/* ── SUCCESS STATE ── */
.ecl-success-state {
    text-align: center; padding: 16px 0;
}
.ecl-success-state .ecl-success-icon {
    /* PM.c103 — the check glyph (&check;), not an emoji, in brand green: the system's tick
       convention (admin, deal drawer, AI assistant all use plain '✓', never the emoji badge). */
    font-size: 44px; line-height: 1; color: var(--green, #2E7D5C);
    margin-bottom: 16px; display: block;
}
.ecl-success-state h3 {
    /* PM.c103 — the success-state heading, same Fraunces 600 as the card title. */
    font-family: var(--display, 'Fraunces', Georgia, serif);
    font-size: 18px; font-weight: 600; color: var(--green-deep); margin-bottom: 8px;
}
.ecl-success-state p {
    font-size: 14px; color: var(--ink-mut); line-height: 1.6;
}

/* ── ADMIN: ACCOUNT REQUESTS PAGE ── */
.ecl-requests-tabs {
    display: flex; gap: 0; border-bottom: 2px solid var(--rule);
    margin-bottom: 24px;
}
.ecl-req-tab {
    padding: 10px 20px; font-size: 13px; font-weight: 600;
    color: var(--ink-mut); cursor: pointer;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    text-decoration: none; transition: color 0.15s;
}
.ecl-req-tab._active {
    color: var(--green-deep); border-bottom-color: var(--green);
}
.ecl-req-tab:hover { color: var(--green-deep); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .ecl-nav { padding: 0 20px; }
    .ecl-nav-tagline { display: none; }

    .ecl-hero { padding: 100px 24px 60px; }
    .ecl-hero-heading { font-size: 34px; }
    .ecl-hero-sub { font-size: 16px; }

    .ecl-features { padding: 56px 24px; }
    .ecl-features-grid { grid-template-columns: 1fr; gap: 16px; }

    .ecl-home-login { padding: 48px 20px; }

    .ecl-page-card { padding: 28px 20px; }
    .ecl-signup-card { max-width: 100%; }

    .ecl-front-footer { padding: 24px 20px; }
}

@media (max-width: 480px) {
    .ecl-hero-heading { font-size: 28px; }
    .ecl-hero-actions { flex-direction: column; align-items: stretch; }
    .ecl-btn-hero-primary,
    .ecl-btn-hero-secondary { text-align: center; }
    .ecl-nav-actions .ecl-nav-link { display: none; }
}
