/* FroTrack — main landing page styles */

:root {
    /* Escala de tinta — o "azul" agora é neutro/preto (accent tipo Uber) */
    --blue-50:  #f6f6f7;
    --blue-100: #ececee;
    --blue-200: #d8d9dd;
    --blue-300: #a8abb3;
    --blue-400: #4a4d55;
    --blue-500: #1c1d21;
    --blue-600: #101114;
    --blue-700: #000000;

    --ink-900: #101114;
    --ink-700: #35373d;
    --ink-500: #6b6e77;
    --ink-300: #a8abb3;

    --bg: #ffffff;
    --bg-muted: #f6f6f7;
    --border: #e8e8ea;

    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 12px 32px -12px rgba(16, 17, 20, 0.16);
    --shadow-sm: 0 4px 14px -6px rgba(16, 17, 20, 0.12);

    --font: 'Google Sans Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Google Sans Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Superfícies — o que "é branco" hoje; um tema escuro redefine só isto */
    --surface: #ffffff;
    --surface-raised: #ffffff;
    --surface-sunken: #f2f2f4;
    --logo-filter: none;          /* logos de marca (PNGs coloridos, fundo transparente) */
    --on-accent: #ffffff;

    /* Estados semânticos: -bg (fundo suave), -fg (texto/ícone), -solid (barra cheia) */
    --ok-bg: #dcfce7;
    --ok-fg: #15803d;
    --ok-border: #bbf7d0;
    --ok-solid: #22c55e;

    --warn-bg: #fef3c7;
    --warn-fg: #b45309;
    --warn-solid: #f59e0b;

    --danger-bg: #fee2e2;
    --danger-fg: #b91c1c;
    --danger-border: #fecaca;
    --danger-bg-soft: #fef2f2;
    --danger-solid: #dc2626;

    --neutral-bg: #f1f1f3;
    --neutral-fg: #6b6e77;
    --neutral-solid: #a8abb3;

    /* Camadas translúcidas derivadas da tinta */
    --overlay-weak: rgba(16, 17, 20, 0.02);
    --overlay-soft: rgba(16, 17, 20, 0.05);
    --overlay-line: rgba(16, 17, 20, 0.08);

    /* Texto sobre superfícies de destaque (banner preto, CTA) */
    --on-accent-muted: #f2f2f4;
    --on-accent-faint: rgba(242, 242, 244, 0.72);
    --on-accent-fill: rgba(255, 255, 255, 0.10);
    --on-accent-fill-hover: rgba(255, 255, 255, 0.18);
}

/* Tema escuro — aplicado por static/js/tema.js via data-theme no <html>.
   A tinta inverte: o "preto" de destaque vira claro e o texto sobre ele vira escuro. */
:root[data-theme="dark"] {
    color-scheme: dark;

    --blue-50:  #1c1d21;
    --blue-100: #26272c;
    --blue-200: #34363c;
    --blue-300: #5f626b;
    --blue-400: #a8abb3;
    --blue-500: #ececee;
    --blue-600: #f6f6f7;
    --blue-700: #ffffff;

    --ink-900: #ececee;
    --ink-700: #c4c6cc;
    --ink-500: #9a9da6;
    --ink-300: #5f626b;

    --bg: #0e0f11;
    --bg-muted: #131417;
    --border: #2a2b30;

    --shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.6);
    --shadow-sm: 0 4px 14px -6px rgba(0, 0, 0, 0.5);

    --surface: #18191c;
    --surface-raised: #202125;
    --surface-sunken: #232428;
    --logo-filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.85));  /* contorno claro: logos pretos sumiriam no fundo escuro */
    --on-accent: #101114;

    --ok-bg: rgba(34, 197, 94, 0.14);
    --ok-fg: #4ade80;
    --ok-border: rgba(34, 197, 94, 0.3);
    --ok-solid: #22c55e;

    --warn-bg: rgba(245, 158, 11, 0.15);
    --warn-fg: #fbbf24;
    --warn-solid: #f59e0b;

    --danger-bg: rgba(239, 68, 68, 0.15);
    --danger-fg: #f87171;
    --danger-border: rgba(239, 68, 68, 0.3);
    --danger-bg-soft: rgba(239, 68, 68, 0.1);
    --danger-solid: #ef4444;

    --neutral-bg: #26272c;
    --neutral-fg: #a8abb3;
    --neutral-solid: #5f626b;

    --overlay-weak: rgba(255, 255, 255, 0.02);
    --overlay-soft: rgba(255, 255, 255, 0.06);
    --overlay-line: rgba(255, 255, 255, 0.1);

    --on-accent-muted: #26272c;
    --on-accent-faint: rgba(16, 17, 20, 0.72);
    --on-accent-fill: rgba(16, 17, 20, 0.08);
    --on-accent-fill-hover: rgba(16, 17, 20, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink-900);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    line-height: 1.55;
}

.container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-variation-settings: 'wdth' 95, 'ROND' 25;
    line-height: 1.15;
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.02em;
}
p { margin: 0; color: var(--ink-500); }
a { color: inherit; text-decoration: none; }

/* Nav */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--surface) 85%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-variation-settings: 'wdth' 95, 'ROND' 25;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: 1.15rem;
    color: var(--ink-900);
}

.nav__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(145deg, var(--blue-400), var(--blue-600));
    color: var(--on-accent);
}

.nav__links {
    display: flex;
    gap: 32px;
}

.nav__links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ink-700);
    transition: color 0.15s ease;
}

.nav__links a:hover { color: var(--blue-600); }

.nav__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.btn--primary {
    background: var(--blue-500);
    color: var(--on-accent);
    box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--blue-600); transform: translateY(-1px); }

.btn--ghost { color: var(--ink-700); }
.btn--ghost:hover { color: var(--blue-600); }

.btn--outline {
    background: var(--surface);
    color: var(--blue-600);
    border-color: var(--blue-200);
}
.btn--outline:hover { border-color: var(--blue-400); background: var(--blue-50); }

.btn--lg { padding: 14px 28px; font-size: 1rem; }

/* Hero */
.hero {
    background: linear-gradient(180deg, var(--blue-50) 0%, var(--surface) 100%);
    overflow: hidden;
    position: relative;
}

.hero__inner {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 48px;
    padding: 96px 24px 100px;
}

.badge {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 999px;
    background: var(--blue-100);
    color: var(--blue-700);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero__text h1 {
    font-size: clamp(2.4rem, 4.4vw, 3.6rem);
    color: var(--ink-900);
}

.hero__lead {
    margin-top: 20px;
    font-size: 1.1rem;
    max-width: 480px;
    color: var(--ink-500);
}

.hero__cta {
    display: flex;
    gap: 14px;
    margin-top: 32px;
}

.hero__stats {
    display: flex;
    gap: 40px;
    margin-top: 56px;
}

.hero__stats strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ink-900);
}

.hero__stats span {
    font-size: 0.85rem;
    color: var(--ink-500);
}

/* Hero art */
.hero__art {
    position: relative;
    height: 420px;
}

.hero__blob {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 65% 35%, var(--blue-200), transparent 60%);
    filter: blur(10px);
    opacity: 0.8;
    z-index: 0;
}

.hero__card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    padding: 14px 18px;
    z-index: 1;
    animation: float 6s ease-in-out infinite;
}

.hero__card strong { font-size: 0.9rem; color: var(--ink-900); }
.hero__card p { font-size: 0.8rem; margin-top: 2px; }

.hero__card--1 { top: 8%; left: 4%; animation-delay: 0s; }
.hero__card--2 { top: 42%; right: 0%; width: 230px; animation-delay: 1.2s; }
.hero__card--3 { bottom: 6%; left: 12%; width: 220px; animation-delay: 2.4s; }

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

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dot--ok { background: var(--ok-solid); }
.dot--warn { background: var(--warn-solid); }
.dot--info { background: var(--blue-500); }

/* Sections */
.section { padding: 96px 0; }
.section--muted { background: var(--bg-muted); }

.section__head {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 56px;
}

.eyebrow {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--blue-600);
    margin-bottom: 12px;
}

.section__head h2 {
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    color: var(--ink-900);
}

.section__head p {
    margin-top: 14px;
    font-size: 1.02rem;
}

/* Grid / cards */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-sm);
    border-color: var(--blue-200);
}

.card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--blue-100);
    color: var(--blue-600);
    margin-bottom: 18px;
}

.card h3 { font-size: 1.05rem; margin-bottom: 8px; color: var(--ink-900); }
.card p { font-size: 0.92rem; }

/* Steps */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.step {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 26px;
}

.step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--blue-500);
    color: var(--on-accent);
    font-weight: 700;
    margin-bottom: 18px;
}

.step h3 { font-size: 1.05rem; margin-bottom: 8px; color: var(--ink-900); }
.step p { font-size: 0.92rem; }

/* CTA */
.cta {
    background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
    padding: 88px 0;
}

.cta__inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.cta h2 { color: var(--on-accent); font-size: clamp(1.6rem, 3vw, 2.1rem); }
.cta p { color: var(--blue-100); max-width: 480px; }
.cta .btn--primary { background: var(--surface); color: var(--blue-700); margin-top: 18px; }
.cta .btn--primary:hover { background: var(--blue-50); }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 32px 0; }

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--ink-500);
}

.footer__links { display: flex; gap: 24px; }
.footer__links a { color: var(--ink-500); }
.footer__links a:hover { color: var(--blue-600); }

/* Auth / Login */
.auth {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    overflow: hidden;
    background: var(--bg-muted);
}

.auth__card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 44px 40px;
    animation: auth-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes auth-in {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .auth__card { animation: none; }
}

.auth__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-variation-settings: 'wdth' 95, 'ROND' 25;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: 1.1rem;
    color: var(--ink-900);
    margin-bottom: 32px;
}

.auth__head h1 {
    font-size: 1.8rem;
    color: var(--ink-900);
}

.auth__head p {
    margin-top: 10px;
    font-size: 0.98rem;
}

.auth__form {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink-700);
}

.field__input {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    font-family: var(--font);
    font-size: 0.98rem;
    color: var(--ink-900);
    background: var(--surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field__input:focus {
    outline: none;
    border-color: var(--blue-400);
    box-shadow: 0 0 0 4px var(--blue-100);
}

.field__password {
    position: relative;
    display: flex;
    align-items: center;
}

.field__password .field__input { padding-right: 44px; }

.field__toggle {
    position: absolute;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    color: var(--ink-300);
    cursor: pointer;
    border-radius: 6px;
}

.field__toggle:hover { color: var(--blue-600); background: var(--blue-50); }

.field__error {
    font-size: 0.82rem;
    color: var(--danger-solid);
}

.btn--block { width: 100%; padding: 13px; }

.alert {
    margin-top: 24px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
}

.alert--error {
    background: var(--danger-bg-soft);
    border: 1px solid var(--danger-border);
    color: var(--danger-fg);
}

.alert--error p { color: inherit; margin: 0; }

.auth__security {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 28px;
    padding: 14px 16px;
    background: var(--blue-50);
    border-radius: var(--radius-sm);
    color: var(--blue-700);
}

.auth__security svg { flex-shrink: 0; margin-top: 1px; }
.auth__security span { font-size: 0.82rem; line-height: 1.4; }

.auth__back {
    display: inline-block;
    margin-top: 28px;
    font-size: 0.88rem;
    color: var(--ink-500);
}
.auth__back:hover { color: var(--blue-600); }

@media (max-width: 560px) {
    .auth__card { padding: 32px 24px; }
}

/* Responsive */
@media (max-width: 900px) {
    .nav__links { display: none; }
    .hero__inner { grid-template-columns: 1fr; padding: 64px 24px; }
    .hero__art { height: 320px; margin-top: 24px; }
    .grid--3 { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .grid--3 { grid-template-columns: 1fr; }
    .hero__stats { gap: 24px; flex-wrap: wrap; }
    .hero__cta { flex-direction: column; align-items: stretch; }
    .nav__actions .btn--ghost { display: none; }
}
