/* Styles for index.html (home page) */

body {
  background: var(--tr-primary-50);
  color: var(--tr-text);
  min-height: 100vh;
}

a { color: inherit; }

/* ---------- top bar ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(16px, 5vw, 64px);
  background: rgba(250, 247, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--tr-primary-100);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--tr-heading);
  text-decoration: none;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--tr-primary-900);
  color: var(--tr-primary-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
}

.nav-links {
  display: flex;
  gap: 22px;
  margin-left: 12px;
}

.nav-links a,
.link-btn {
  text-decoration: none;
  font-size: .9rem;
  color: var(--tr-text-muted);
  font-weight: 500;
}

.nav-links a:hover,
.link-btn:hover { color: var(--tr-link); }

.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.pill-btn {
  text-decoration: none;
  background: var(--tr-primary-900);
  color: #fff;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 600;
}

.pill-btn:hover { background: var(--tr-primary-700); }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(36px, 7vw, 88px) clamp(16px, 5vw, 64px) clamp(40px, 6vw, 72px);
  max-width: 1200px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--tr-link);
  background: var(--tr-primary-100);
  padding: 6px 12px;
  border-radius: 999px;
}

.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  line-height: 1.12;
  color: var(--tr-heading);
  margin: 18px 0 16px;
  letter-spacing: -.02em;
}

.lead {
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  line-height: 1.65;
  color: var(--tr-text-muted);
  max-width: 560px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 22px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  font-size: .98rem;
  transition: transform .15s, box-shadow .15s, background .15s;
}

.cta.primary {
  background: var(--tr-primary-700);
  color: #fff;
  box-shadow: 0 10px 24px rgba(90, 24, 154, .28);
}

.cta.primary:hover { transform: translateY(-2px); background: var(--tr-primary-900); }

.cta.ghost {
  background: var(--tr-surface);
  color: var(--tr-link);
  border: 1px solid var(--tr-primary-200);
}

.cta.ghost:hover { background: var(--tr-primary-100); }

.hero-points {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: .88rem;
  color: var(--tr-text-muted);
}

.hero-points i { color: var(--tr-success); margin-right: 6px; }

/* the example repair card */
.hero-card {
  background: var(--tr-surface);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--tr-shadow-lg);
  border: 1px solid var(--tr-primary-100);
  transform: rotate(1.5deg);
}

.hc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.hc-top strong { display: block; color: var(--tr-heading); font-size: 1.05rem; }
.hc-top span { font-size: .78rem; color: var(--tr-text-soft); }

.hc-status {
  background: var(--tr-primary-100);
  color: var(--tr-link) !important;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.hc-steps {
  list-style: none;
  display: flex;
  margin: 22px 0;
}

.hc-steps li {
  flex: 1;
  text-align: center;
  font-size: .62rem;
  color: var(--tr-text-soft);
  position: relative;
}

.hc-steps li::before {
  content: "";
  position: absolute;
  top: 7px;
  left: -50%;
  width: 100%;
  height: 3px;
  background: var(--tr-border);
}

.hc-steps li:first-child::before { display: none; }
.hc-steps li.done::before,
.hc-steps li.current::before { background: var(--tr-primary-500); }

.hc-steps span {
  position: relative;
  display: block;
  width: 17px;
  height: 17px;
  margin: 0 auto 6px;
  border-radius: 50%;
  background: var(--tr-surface);
  border: 2px solid var(--tr-border);
}

.hc-steps .done span { background: var(--tr-primary-500); border-color: var(--tr-primary-500); }
.hc-steps .current span { background: var(--tr-primary-900); border-color: var(--tr-primary-900); box-shadow: 0 0 0 4px var(--tr-primary-100); }
.hc-steps .current { color: var(--tr-heading); font-weight: 600; }

.hc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: var(--tr-primary-50);
}

.hc-row strong { display: block; font-size: .88rem; color: var(--tr-text); }
.hc-row span { font-size: .78rem; color: var(--tr-text-muted); }
.hc-row span i { color: var(--tr-star); }

.hc-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--tr-primary-700);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.hc-msg {
  margin-top: 12px;
  font-size: .82rem;
  color: var(--tr-text-muted);
  padding: 10px 12px;
  border-radius: 12px 12px 12px 4px;
  border: 1px solid var(--tr-border);
}

.hc-msg i { color: var(--tr-primary-500); margin-right: 6px; }

/* ---------- sections ---------- */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) clamp(16px, 5vw, 64px);
}

.section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--tr-heading);
  letter-spacing: -.01em;
}

.section-lead {
  color: var(--tr-text-muted);
  margin-top: 8px;
}

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 30px;
  counter-reset: step;
}

.steps li {
  background: var(--tr-surface);
  border-radius: 16px;
  padding: 20px 18px;
  border: 1px solid var(--tr-primary-100);
  position: relative;
  counter-increment: step;
}

.steps li::after {
  content: counter(step);
  position: absolute;
  top: 16px;
  right: 18px;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--tr-primary-100);
}

.step-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--tr-primary-100);
  color: var(--tr-link);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.steps h3 { font-size: .98rem; color: var(--tr-heading); margin-bottom: 6px; }
.steps p { font-size: .84rem; line-height: 1.55; color: var(--tr-text-muted); }

.safe {
  background: var(--tr-primary-900);
  color: #fff;
  max-width: none;
}

.safe h2 { color: #fff; max-width: 1072px; margin: 0 auto; }

.safe-grid {
  max-width: 1072px;
  margin: 30px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.safe-item {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
  padding: 20px;
}

.safe-item i { font-size: 1.3rem; color: var(--tr-primary-200); }
.safe-item h3 { font-size: .98rem; margin: 12px 0 6px; }
.safe-item p { font-size: .85rem; line-height: 1.55; color: rgba(255, 255, 255, .75); }

.join-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 26px;
}

.join-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border-radius: 18px;
  background: var(--tr-surface);
  border: 1px solid var(--tr-primary-100);
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}

.join-card:hover { transform: translateY(-3px); box-shadow: var(--tr-shadow); }
.join-card > i:first-child { font-size: 1.6rem; color: var(--tr-primary-500); width: 32px; text-align: center; }
.join-card div { flex: 1; }
.join-card h3 { color: var(--tr-heading); font-size: 1.05rem; }
.join-card p { font-size: .86rem; color: var(--tr-text-muted); margin-top: 4px; line-height: 1.5; }
.join-card .go { color: var(--tr-primary-400); }

.login-box {
  margin-top: 30px;
  padding: 22px;
  border-radius: 18px;
  border: 1px dashed var(--tr-primary-200);
  text-align: center;
  scroll-margin-top: 90px;
}

.login-box h3 { font-size: 1rem; color: var(--tr-heading); }

.login-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.login-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--tr-surface);
  border: 1px solid var(--tr-border);
  text-decoration: none;
  font-weight: 500;
  font-size: .9rem;
  color: var(--tr-link);
}

.login-links a:hover { border-color: var(--tr-primary-400); }

/* ---------- footer ---------- */
.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 24px clamp(16px, 5vw, 64px);
  border-top: 1px solid var(--tr-primary-100);
  font-size: .85rem;
  color: var(--tr-text-muted);
}

.footer nav { display: flex; gap: 18px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--tr-link); }

/* ---------- smaller screens ---------- */
@media (max-width: 1000px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .safe-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-card { transform: none; max-width: 440px; }
}

@media (max-width: 560px) {
  .nav { gap: 10px; }
  .link-btn { font-size: .85rem; }
  .pill-btn { padding: 8px 14px; font-size: .82rem; }
  .steps, .safe-grid, .join-grid { grid-template-columns: 1fr; }
  .cta { width: 100%; justify-content: center; }
  .hc-steps li { font-size: .55rem; }
}

/* ---------- footer contacts ---------- */
.footer-brand { display: flex; flex-direction: column; gap: 6px; }
.footer-contact { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-contact i { margin-right: 4px; color: var(--tr-primary-500); }
.footer-contact .fa-whatsapp { color: #25d366; }
.hc-msg strong { color: var(--tr-heading); font-weight: 600; }

/* ---------- animations (only when html has .motion) ---------- */
.nav { transition: box-shadow .25s ease, background .25s ease; }
.nav.scrolled { box-shadow: 0 6px 20px rgba(36, 0, 70, .08); }

@keyframes trUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes trDown { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes trCardIn { from { opacity: 0; transform: translateY(30px) rotate(4deg) scale(.96); } to { opacity: 1; transform: rotate(1.5deg); } }
@keyframes trFloat { 0%, 100% { transform: rotate(1.5deg) translateY(0); } 50% { transform: rotate(1.5deg) translateY(-8px); } }
@keyframes trFill { from { transform: scale(.4); background: var(--tr-surface); border-color: var(--tr-border); } }
@keyframes trLine { from { transform: scaleX(0); } }
@keyframes trPulse { 0%, 100% { box-shadow: 0 0 0 4px var(--tr-primary-100); } 50% { box-shadow: 0 0 0 8px rgba(243, 232, 255, .5); } }

/* page load: top bar, then the hero text line by line, then the card */
.motion .nav { animation: trDown .6s ease-out both; }
.motion .hero-text > * { animation: trUp .7s cubic-bezier(.2, .7, .2, 1) both; }
.motion .hero-text > :nth-child(1) { animation-delay: .10s; }
.motion .hero-text > :nth-child(2) { animation-delay: .20s; }
.motion .hero-text > :nth-child(3) { animation-delay: .32s; }
.motion .hero-text > :nth-child(4) { animation-delay: .44s; }
.motion .hero-text > :nth-child(5) { animation-delay: .56s; }

.motion .hero-card {
  animation: trCardIn .9s cubic-bezier(.2, .7, .2, 1) .35s both, trFloat 6s ease-in-out 1.6s infinite;
}

/* the example progress bar fills step by step */
.motion .hc-steps li.done::before,
.motion .hc-steps li.current::before { transform-origin: left; animation: trLine .35s ease-out both; }
.motion .hc-steps li.done span,
.motion .hc-steps li.current span { animation: trFill .35s ease-out both; }
.motion .hc-steps li:nth-child(1) span { animation-delay: .9s; }
.motion .hc-steps li:nth-child(2)::before, .motion .hc-steps li:nth-child(2) span { animation-delay: 1.05s; }
.motion .hc-steps li:nth-child(3)::before, .motion .hc-steps li:nth-child(3) span { animation-delay: 1.2s; }
.motion .hc-steps li:nth-child(4)::before, .motion .hc-steps li:nth-child(4) span { animation-delay: 1.35s; }
.motion .hc-steps li:nth-child(5)::before, .motion .hc-steps li:nth-child(5) span { animation-delay: 1.5s; }
.motion .hc-steps li.current span { animation: trFill .35s ease-out 1.5s both, trPulse 2s ease-in-out 2s infinite; }
.motion .hc-row, .motion .hc-msg { animation: trUp .6s ease-out both; }
.motion .hc-row { animation-delay: 1.7s; }
.motion .hc-msg { animation-delay: 1.9s; }

/* scroll reveals (classes added by js/pages/index.js) */
.motion .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease-out, transform .7s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--delay, 0ms);
}
.motion .reveal.in { opacity: 1; transform: none; }

/* cards lift a little more when they arrive, and on hover */
.motion .steps li.reveal { transform: translateY(36px) scale(.97); }
.motion .steps li.reveal.in { transform: none; }
.steps li, .safe-item { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.steps li:hover { transform: translateY(-4px); box-shadow: var(--tr-shadow); border-color: var(--tr-primary-200); }
.safe-item:hover { transform: translateY(-4px); border-color: rgba(224, 170, 255, .4); }
.motion .steps li.reveal.in:hover { transform: translateY(-4px); }

.step-icon { transition: transform .3s ease; }
.steps li:hover .step-icon { transform: rotate(-8deg) scale(1.08); }

@media (max-width: 800px) {
  .motion .hero-card { animation: trUp .8s ease-out .35s both; }
  @keyframes trFloat { 0%, 100% { transform: none; } }
}

/* ---------- dark mode ---------- */
html[data-theme="dark"] .nav { background: rgba(17, 13, 24, .9); border-bottom-color: var(--tr-border); }
html[data-theme="dark"] .nav.scrolled { box-shadow: 0 6px 20px rgba(0, 0, 0, .4); }
html[data-theme="dark"] .brand-icon { background: var(--tr-primary-700); }
html[data-theme="dark"] .pill-btn { background: var(--tr-primary-700); }
html[data-theme="dark"] .safe { background: #0b0812; }
html[data-theme="dark"] .zoneTag.island { background: rgba(14, 165, 233, .15); color: #7dd3fc; }
.nav-actions .tr-theme-toggle { width: 34px; height: 34px; }
