/* ============================================================================
   TrackStatus.com.br - Stylesheet (v2)
   Theme: Orange/Yellow energetic (Jadlog/Loggi vibe)
   Fixes: HANNAH (48px tap targets), KENJI (honest progress UI),
          CAMILA (cookie banner + disclaimer), BEATRIZ (author card)
   ========================================================================= */

:root {
  --primary: #FF8A00;
  --primary-hover: #E67A00;
  --primary-light: #FFB552;
  --accent: #FFCB05;
  --bg: #FFFAF2;
  --bg-alt: #FFFFFF;
  --text: #1A1A1A;
  --text-muted: #555;
  --text-light: #888;
  --border: #F0E6D2;
  --border-strong: #E0CFA8;
  --success: #10B981;
  --warning: #F59E0B;
  --info: #2563EB;
  --shadow-sm: 0 2px 8px rgba(255, 138, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(255, 138, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(255, 138, 0, 0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --max-width: 1140px;
  --transition: 0.2s ease;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

img, svg { max-width: 100%; height: auto; display: block; }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--primary-hover); text-decoration: underline; }
a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.6em;
  color: var(--text);
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.625rem; margin-top: 2rem; }
h3 { font-size: 1.25rem; margin-top: 1.5rem; }

p { margin-bottom: 1rem; }
p strong { color: var(--text); }

ul, ol { margin: 1rem 0 1rem 1.5rem; }
li { margin-bottom: 0.4rem; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 0; }

/* ============================================================================
   HEADER
   ========================================================================= */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
  gap: 1rem;
  min-height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text);
  text-decoration: none;
  min-height: 48px;
}
.logo:hover { text-decoration: none; color: var(--primary); }

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
}

.site-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.75rem 0.875rem;
  border-radius: var(--radius-sm);
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}
.site-nav a:hover { color: var(--primary); background: var(--bg); text-decoration: none; }

@media (max-width: 600px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .site-nav { gap: 0.25rem; font-size: 0.9rem; width: 100%; }
  .site-nav a { padding: 0.5rem 0.75rem; }
}

/* ============================================================================
   HERO
   ========================================================================= */
.hero {
  background: linear-gradient(135deg, #FFF6E5 0%, #FFE9C2 100%);
  padding: 3rem 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -50%; right: -10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255, 203, 5, 0.3), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  position: relative;
}
.hero .lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 720px;
  position: relative;
}

.hero-home h1 { font-size: 2.75rem; }

@media (max-width: 600px) {
  .hero { padding: 2rem 0; }
  .hero h1 { font-size: 1.75rem; }
  .hero-home h1 { font-size: 2rem; }
  .hero .lead { font-size: 1rem; }
}

.tldr {
  background: #fff;
  border-left: 4px solid var(--primary);
  padding: 0.875rem 1.125rem;
  border-radius: var(--radius-sm);
  margin: 1.5rem 0;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  position: relative;
}

/* ============================================================================
   TRACK FORM
   ========================================================================= */
.track-form {
  display: flex;
  gap: 0.75rem;
  margin: 2rem 0 0.75rem;
  flex-wrap: wrap;
  position: relative;
}

.track-form input[type="text"] {
  flex: 1 1 300px;
  min-width: 0;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius);
  background: #fff;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
  min-height: 56px;
}
.track-form input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 138, 0, 0.15);
}

.form-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.75rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-md);
  font-family: inherit;
  white-space: nowrap;
  min-height: 48px;
  min-width: 48px;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: #fff;
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 2px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  background: #fff;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  min-height: 48px;
  transition: border-color var(--transition), background var(--transition);
}
.btn-secondary:hover {
  border-color: var(--text);
  background: var(--bg);
  text-decoration: none;
  color: var(--text);
}

.btn-cta {
  width: 100%;
  margin: 1rem 0 0.5rem;
  padding: 1.125rem;
  font-size: 1.1rem;
}

.btn-outline {
  background: #fff;
  border: 2px solid var(--primary);
  color: var(--primary);
  box-shadow: none;
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ============================================================================
   TRACK RESULT (honest progress)
   ========================================================================= */
.track-result {
  background: #fff;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  margin-top: 1.5rem;
}

.result-prep {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.25rem;
  font-style: italic;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 999px;
  transition: width 0.6s ease-out;
}

.status-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  position: relative;
}
.status-steps li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
  transition: color 0.3s;
  margin-bottom: 0;
}
.status-steps .dot {
  display: block;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--border);
  margin-bottom: 0.5rem;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}
.status-steps li.active {
  color: var(--text);
  font-weight: 600;
}
.status-steps li.active .dot {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  transform: scale(1.2);
  box-shadow: 0 0 0 4px rgba(255, 138, 0, 0.2);
}
.status-steps li.done .dot {
  background: var(--success);
}

@media (max-width: 600px) {
  .status-steps { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .status-steps li { font-size: 0.78rem; }
}

.result-card {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  animation: fadeUp 0.5s ease-out;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-title {
  color: var(--primary-hover);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  margin-top: 0;
}
.result-meta {
  background: var(--bg);
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  margin: 1rem 0;
}
.result-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
}

/* ============================================================================
   DISCLAIMER BOX (CAMILA fix)
   ========================================================================= */
.disclaimer-box {
  margin: 1.5rem 0 0;
  padding: 1rem 1.25rem;
  background: #FFF8E1;
  border: 1px solid #FFE082;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: #5D4037;
}
.disclaimer-box p { margin: 0; }
.disclaimer-box strong { color: #4E342E; }

/* ============================================================================
   AUTHOR CARD (BEATRIZ fix)
   ========================================================================= */
.author-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-top: 2.5rem;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.author-avatar {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.author-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.author-bio {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  line-height: 1.55;
}
.author-links {
  font-size: 0.875rem;
  margin: 0;
  color: var(--text-light);
}
.author-links a { font-weight: 500; }

@media (max-width: 480px) {
  .author-card { flex-direction: column; }
}

/* ============================================================================
   CONTENT SECTIONS
   ========================================================================= */
.content-section {
  padding: 2rem 1.25rem;
  max-width: 880px;
}
.content-section h2 { margin-top: 2.25rem; }
.content-section h2:first-child { margin-top: 1rem; }

.numbered-list {
  list-style: decimal;
  padding-left: 1.5rem;
}
.numbered-list li { margin-bottom: 0.75rem; }

.benefit-list {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}
.benefit-list li {
  padding: 0.5rem 0 0.5rem 2rem;
  position: relative;
}
.benefit-list li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 0.5rem;
  width: 22px; height: 22px;
  background: var(--success);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

/* FAQ accordion */
.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.faq-item:hover { box-shadow: var(--shadow-sm); }
.faq-item summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 3rem;
  min-height: 48px;
  display: flex;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--primary);
  transition: transform var(--transition);
}
.faq-item[open] summary::after {
  content: "−";
}
.faq-item p {
  padding: 0 1.25rem 1.25rem;
  margin: 0;
  color: var(--text-muted);
}

/* Breadcrumb */
.breadcrumb {
  padding: 1rem 1.25rem 0;
  font-size: 0.875rem;
  color: var(--text-light);
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--text-light);
}

/* ============================================================================
   HOMEPAGE
   ========================================================================= */
.search-box {
  position: relative;
  margin: 1.5rem 0;
  max-width: 640px;
}
.search-box input {
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius);
  background: #fff;
  font-family: inherit;
  min-height: 56px;
}
.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 138, 0, 0.15);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 320px;
  overflow-y: auto;
  z-index: 50;
  margin-top: 0.25rem;
}
.search-results a {
  display: block;
  padding: 0.875rem 1rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  min-height: 48px;
  display: flex;
  align-items: center;
}
.search-results a:hover { background: var(--bg); color: var(--primary); }
.search-results a:last-child { border-bottom: none; }
.search-results .no-results {
  padding: 1rem;
  color: var(--text-muted);
  text-align: center;
}

.featured-section { padding: 3rem 1.25rem; }
.featured-section h2 { text-align: center; margin-bottom: 2rem; }

.company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.company-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  min-height: 100px;
}
.company-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  text-decoration: none;
}
.company-name {
  font-weight: 700;
  font-size: 1rem;
}
.company-cta {
  font-size: 0.875rem;
  color: var(--primary);
  font-weight: 600;
}

.see-all {
  text-align: center;
  margin-top: 2rem;
}

/* ============================================================================
   COMPANIES INDEX (HANNAH fix: 48x48 alpha-nav)
   ========================================================================= */
.alpha-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.alpha-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
}
.alpha-nav a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  text-decoration: none;
}
.alpha-nav a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.companies-list { padding: 2rem 1.25rem; }

.letter-section { margin-bottom: 2.5rem; scroll-margin-top: 80px; }
.letter-heading {
  font-size: 2rem;
  color: var(--primary);
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}
.letter-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.5rem 1rem;
}
.letter-list li { margin: 0; }
.letter-list a {
  display: block;
  padding: 0.75rem 0.875rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  transition: background var(--transition), color var(--transition);
  min-height: 48px;
  display: flex;
  align-items: center;
}
.letter-list a:hover {
  background: var(--bg);
  color: var(--primary);
  text-decoration: none;
}

.letter-list li.hidden { display: none; }

/* ============================================================================
   RELATED
   ========================================================================= */
.related-section {
  padding: 2rem 1.25rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.related-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.5rem 1rem;
  margin: 1rem 0;
}
.related-list li { margin: 0; }
.related-list a {
  display: block;
  padding: 0.75rem 0.875rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  min-height: 48px;
  display: flex;
  align-items: center;
}
.related-list a:hover { background: #fff; color: var(--primary); text-decoration: none; }

.text-link {
  font-weight: 600;
}

/* ============================================================================
   COOKIE BANNER (CAMILA fix)
   ========================================================================= */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  background: #fff;
  border-top: 3px solid var(--primary);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  z-index: 200;
  padding: 1rem 0;
  animation: slideUp 0.4s ease-out;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.cookie-inner {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.cookie-inner > div:first-child { flex: 1 1 320px; min-width: 0; }
.cookie-inner strong { display: block; margin-bottom: 0.25rem; font-size: 1rem; }
.cookie-inner p { margin: 0; font-size: 0.9rem; color: var(--text-muted); }
.cookie-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .cookie-actions { width: 100%; }
  .cookie-actions button { flex: 1; }
}

/* ============================================================================
   FOOTER
   ========================================================================= */
.site-footer {
  background: #1A1A1A;
  color: #ccc;
  padding: 3rem 0 1rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding-bottom: 2rem;
}

.footer-title {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li { margin-bottom: 0.4rem; }
.footer-links a {
  color: #aaa;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-block;
  padding: 0.25rem 0;
  min-height: 32px;
}
.footer-links a:hover { color: var(--primary-light); text-decoration: underline; }

.footer-disclaimer {
  font-size: 0.85rem !important;
  color: #888 !important;
  margin-top: 0.5rem;
  font-style: italic;
}

.site-footer p { color: #aaa; font-size: 0.9rem; }

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 1.25rem;
  text-align: center;
}
.footer-bottom p { font-size: 0.825rem; color: #888; margin-bottom: 0.25rem; }
.trademark-notice { font-size: 0.78rem !important; color: #666 !important; }
