/* ============================================================
   A Trinca Trade — Form Page (clone de form.humanacademy.ai)
   Design tokens, glass effects, animations
   ============================================================ */

:root {
  /* Cores base (dark theme) */
  --background: 0 0% 6%;
  --foreground: 0 0% 92%;
  --card: 0 0% 9%;
  --card-foreground: 0 0% 92%;
  --primary: 0 0% 75%;
  --primary-foreground: 0 0% 6%;
  --secondary: 0 0% 12%;
  --muted: 0 0% 10%;
  --muted-foreground: 0 0% 45%;
  --destructive: 0 60% 50%;
  --destructive-foreground: 0 0% 100%;
  --border: 0 0% 15%;
  --input: 0 0% 10%;
  --ring: 0 0% 30%;
  --radius: 1rem;

  /* Glass tokens (replicando humanacademy) */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-bg-strong: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-inner: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  --glass-shadow-strong: 0 10px 40px rgba(0, 0, 0, 0.4),
                         inset 0 1px 2px rgba(255, 255, 255, 0.1),
                         inset 0 -1px 1px rgba(0, 0, 0, 0.1);
  --glass-blur: 24px;

  /* Brand Trinca Trade */
  --tt-gold: #C9A84C;
  --tt-dark: #0E0E10;
}

/* ============================================================
   Reset + base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html, body { height: 100%; }

html {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: rgb(235, 235, 235);
  background: #0a0a0a;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ============================================================
   Background animado
   ============================================================ */
.animated-gradient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(-45deg, #0a0a0a, #141414, #1a1a1a, #111111, #0d0d0d, #161616);
  background-size: 400% 400%;
  animation: gradientMove 15s ease infinite;
}

@keyframes gradientMove {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ============================================================
   Glass effect
   ============================================================ */
.glass-strong {
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border-inner);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  box-shadow: var(--glass-shadow-strong);
}

.glass-card {
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border-inner);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
              inset 0 1px 1px rgba(255, 255, 255, 0.06);
  border-radius: 24px;
}

/* ============================================================
   Header pill (top)
   ============================================================ */
.tt-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 16px;
  pointer-events: none;
}
.tt-header__inner {
  max-width: 72rem;
  margin: 0 auto;
  pointer-events: auto;
}
.tt-header__pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 9999px;
  padding: 14px 28px;
}
.tt-header__logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}
.tt-header__logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.tt-header__brand {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgb(235, 235, 235);
}
.tt-header__brand-strong { font-weight: 700; letter-spacing: 0.18em; }
.tt-header__brand-soft { font-weight: 400; opacity: 0.7; }

/* ============================================================
   Main area (centered)
   ============================================================ */
.tt-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 16px 80px;
}

/* ============================================================
   Step card
   ============================================================ */
.tt-card {
  width: 100%;
  max-width: 488px;
  padding: 28px 32px 28px;
  position: relative;
  overflow: hidden;
  animation: scaleIn 320ms ease both;
}

.tt-card__progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.tt-card__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,0.85), rgba(255,255,255,0.55));
  border-radius: 0 4px 4px 0;
  transition: width 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

.tt-card__eyebrow {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 24px;
  margin-top: 8px;
}

/* ============================================================
   Form fields
   ============================================================ */
.tt-field { margin-bottom: 20px; animation: fadeIn 420ms ease both; }
.tt-field:last-of-type { margin-bottom: 0; }

.tt-field__label {
  display: block;
  font-size: 14px;
  color: rgb(235, 235, 235);
  margin-bottom: 8px;
  font-weight: 500;
}

.tt-input, .tt-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 14px 16px;
  font-size: 16px;
  color: rgb(255, 255, 255);
  outline: none;
  transition: all 200ms ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.tt-input::placeholder { color: rgba(255, 255, 255, 0.25); }
.tt-input:focus, .tt-select:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Select com chevron */
.tt-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff80' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
  cursor: pointer;
}
.tt-select option { background: #141414; color: #fff; }

/* Erro */
.tt-error {
  margin-top: 8px;
  font-size: 13px;
  color: hsl(0, 60%, 60%);
  display: none;
}
.tt-field.is-error .tt-input,
.tt-field.is-error .tt-select { border-color: hsl(0, 60%, 50%); }
.tt-field.is-error .tt-error { display: block; }

/* Phone input com país */
.tt-phone {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.tt-phone__country {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 14px 14px;
  font-size: 16px;
  color: rgb(255, 255, 255);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 200ms ease;
}
.tt-phone__country:hover { background: rgba(255, 255, 255, 0.1); }

/* ============================================================
   Submit button
   ============================================================ */
.tt-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 28px;
}

.tt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: rgb(15, 23, 42);
  font-weight: 600;
  letter-spacing: 0.025em;
  font-size: 14px;
  padding: 14px 32px;
  border-radius: 24px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
              0 4px 6px -4px rgba(0, 0, 0, 0.1);
  transition: all 200ms ease;
}
.tt-btn:hover { background: rgb(255, 255, 255); transform: translateY(-1px); }
.tt-btn:active { transform: translateY(0); }
.tt-btn--full { width: 100%; }
.tt-btn__arrow { transition: transform 200ms ease; }
.tt-btn:hover .tt-btn__arrow { transform: translateX(2px); }

/* ============================================================
   Success screen
   ============================================================ */
.tt-success { text-align: center; padding: 16px 0; }
.tt-success__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: rgb(34, 197, 94);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 20px;
}
.tt-success__title {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}
.tt-success__desc {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
}

/* ============================================================
   Footer
   ============================================================ */
.tt-footer {
  position: fixed;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 13px;
  color: rgba(235, 235, 235, 0.45);
  z-index: 1;
  pointer-events: none;
}
.tt-footer a { color: rgba(235, 235, 235, 0.65); text-decoration: underline; pointer-events: auto; }

/* ============================================================
   Animations
   ============================================================ */
@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  0% { opacity: 0; transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.tt-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 640px) {
  .tt-header__pill { padding: 12px 18px; }
  .tt-header__brand { font-size: 11px; }
  .tt-header__brand-strong { letter-spacing: 0.16em; }
  .tt-main { padding: 100px 12px 80px; }
  .tt-card { padding: 24px 20px; max-width: 100%; }
  .tt-input, .tt-select { font-size: 16px; padding: 13px 14px; border-radius: 18px; }
  .tt-btn { padding: 13px 24px; font-size: 14px; }
  .tt-footer { font-size: 12px; bottom: 16px; }
}

/* ============================================================
   Utilitários
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.hidden { display: none !important; }
