/* ============================================================================
 * Tutorial de acesso (guia público) — page-local stylesheet.
 *
 * Public route /tutorial-acesso. Consumes design-tokens.v2.css for typography,
 * colors, radii and shadows; this stylesheet declares only the marketing
 * layout (hero split, profile grid, feature grid, practice/faq grids, CTA).
 *
 * Mirror of the privacy.css contract; classes prefixed `.tut-*` to avoid
 * collision with the DS components.
 * ========================================================================= */

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

body {
  margin: 0;
  background: var(--ds-canvas);
  color: var(--ds-text);
  font-size: var(--ds-fs-body);
  line-height: var(--ds-lh-body);
}

a { color: inherit; text-decoration: none; }

.tut-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ds-text);
  color: var(--ds-n-0);
  padding: 8px 14px;
  border-radius: var(--ds-r-md);
  font-size: var(--ds-fs-small);
  font-weight: 600;
  z-index: 100;
}
.tut-skip-link:focus { left: 12px; top: 12px; }

/* ─── Header / hero (dark accent band) ──────────────────────────────────── */

.tut-shell {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(15, 18, 25, 0.92), rgba(35, 38, 46, 0.88)),
    radial-gradient(circle at 20% 10%, rgba(var(--ds-accent-rgb), 0.34), transparent 32%),
    var(--ds-n-900);
  color: var(--ds-n-0);
}

.tut-container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.tut-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
}

.tut-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ds-n-0);
}
.tut-brand:hover { text-decoration: none; }

.tut-brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--ds-r-lg);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  flex: 0 0 auto;
  color: var(--ds-n-0);
}
.tut-brand-mark svg { width: 23px; height: 23px; }

.tut-brand-name {
  display: block;
  font-size: var(--ds-fs-h2);
  font-weight: 700;
  white-space: nowrap;
}
.tut-brand-caption {
  display: block;
  margin-top: 1px;
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--ds-fs-caption);
  white-space: nowrap;
}

.tut-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tut-nav-link {
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--ds-fs-body);
  font-weight: 600;
}
.tut-nav-link:hover { color: var(--ds-n-0); }

/* ─── Buttons (page-scoped) ─────────────────────────────────────────────── */

.tut-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--ds-r-md);
  padding: 0 16px;
  font-size: var(--ds-fs-body);
  font-weight: 700;
  line-height: 1;
  transition: background 160ms ease;
  cursor: pointer;
}
/* Hover changes only background to mirror .ds-btn-* behavior — no translateY
 * or shadow lift (which would diverge from the admin shell pattern). */
.tut-btn:focus-visible {
  outline: 2px solid var(--ds-accent);
  outline-offset: 2px;
}

.tut-btn-primary {
  background: var(--ds-n-0);
  color: var(--ds-n-900);
}
.tut-btn-primary:hover { background: var(--ds-n-50); }

.tut-btn-secondary {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: var(--ds-n-0);
}
.tut-btn-secondary:hover { background: rgba(255, 255, 255, 0.18); }

/* ─── Hero split ────────────────────────────────────────────────────────── */

.tut-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 48px;
  align-items: center;
  padding: 44px 0 64px;
}

.tut-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--ds-r-pill);
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.84);
  font-size: var(--ds-fs-overline);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
/* Lifted toward white so it reads against the dark gradient hero. */
.tut-eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ds-accent) 65%, white);
}

.tut-h1 {
  max-width: 760px;
  margin: 22px 0 18px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: var(--ds-lh-tight);
  letter-spacing: -0.01em;
  font-weight: 700;
  color: var(--ds-n-0);
}

.tut-hero-copy {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--ds-fs-h2);
}

.tut-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.tut-hero-note {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.62);
  font-size: var(--ds-fs-small);
}

/* ─── Login mini-card inside hero ───────────────────────────────────────── */

/* Login mini-card embedded in the dark hero. Border + shadow kept subtle so
 * the panel reads as a "quiet" floating element instead of stamping over
 * the gradient. */
.tut-login-panel {
  background: rgba(255, 255, 255, 0.96);
  color: var(--ds-text);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--ds-r-xl);
  box-shadow: var(--ds-shadow-md);
  overflow: hidden;
}

.tut-login-panel-header {
  padding: 24px 24px 18px;
  background: linear-gradient(180deg, var(--ds-surface), var(--ds-n-25));
  border-bottom: 1px solid var(--ds-border);
}

.tut-login-panel-header h2 {
  margin: 0;
  font-size: var(--ds-fs-h1);
  line-height: var(--ds-lh-snug);
  font-weight: 700;
}
.tut-login-panel-header p {
  margin: 7px 0 0;
  color: var(--ds-text-muted);
  font-size: var(--ds-fs-body);
}

.tut-steps {
  display: grid;
  gap: 14px;
  padding: 22px 24px 24px;
}

.tut-step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: start;
}

/* Step-number is the focal point of each line: solid accent + white text
 * keeps it visible on a white card surface (the previous accent-soft tint
 * dropped contrast against the panel background). Size matches manual.html. */
.tut-step-number {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: var(--ds-r-md);
  background: var(--ds-accent);
  color: var(--ds-n-0);
  font-size: var(--ds-fs-body);
  font-weight: 700;
}

.tut-step strong {
  display: block;
  font-size: var(--ds-fs-body);
  line-height: 1.35;
  color: var(--ds-text);
}
.tut-step span {
  display: block;
  margin-top: 2px;
  color: var(--ds-text-muted);
  font-size: var(--ds-fs-small);
}

/* ─── Main content (light canvas) ───────────────────────────────────────── */

.tut-main {
  background: var(--ds-canvas);
  padding: 68px 0 88px;
}

.tut-section { margin-top: 60px; }
.tut-section:first-child { margin-top: 0; }

.tut-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.tut-section-kicker {
  color: var(--ds-accent);
  font-size: var(--ds-fs-overline);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tut-section-head h2 {
  margin: 4px 0 0;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: 0;
  font-weight: 700;
  color: var(--ds-text);
}

.tut-section-copy {
  max-width: 520px;
  margin: 0;
  color: var(--ds-text-muted);
  font-size: var(--ds-fs-h2);
}

/* ─── Cards (profiles / features / faq / practice) ──────────────────────── */

.tut-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tut-card {
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-r-lg);
  box-shadow: var(--ds-shadow-xs);
}

.tut-profile-card { padding: 22px; }

.tut-profile-label {
  display: inline-flex;
  margin-bottom: 12px;
  border-radius: var(--ds-r-pill);
  padding: 5px 9px;
  background: var(--ds-accent-soft);
  color: var(--ds-accent-fg);
  font-size: var(--ds-fs-caption);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* "Admin" profile uses the info palette (blue) — neutral semantic for a
 * role/category indicator. Warning (amber) would imply caution/risk, which
 * does not fit "user profile". */
.tut-profile-card.tut-is-admin .tut-profile-label {
  background: var(--ds-info-bg);
  color: var(--ds-info-fg);
}

.tut-card h3 {
  margin: 0;
  font-size: var(--ds-fs-h1);
  line-height: var(--ds-lh-snug);
  font-weight: 700;
  color: var(--ds-text);
}

.tut-card p {
  margin: 9px 0 0;
  color: var(--ds-text-muted);
  font-size: var(--ds-fs-body);
}

.tut-features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tut-feature-card {
  display: flex;
  flex-direction: column;
  min-height: 194px;
  padding: 20px;
}

.tut-feature-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.tut-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--ds-r-lg);
  background: var(--ds-n-100);
  color: var(--ds-text);
}
.tut-icon svg {
  width: 21px;
  height: 21px;
  stroke-width: 2.1;
}

.tut-tag {
  border-radius: var(--ds-r-pill);
  padding: 4px 8px;
  background: var(--ds-n-100);
  color: var(--ds-text-muted);
  font-size: var(--ds-fs-caption);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.tut-tag.tut-tag-admin {
  background: var(--ds-info-bg);
  color: var(--ds-info-fg);
}

.tut-practice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.tut-practice-card { padding: 18px; }

.tut-faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.tut-faq-card { padding: 20px; }

/* ─── CTA band ──────────────────────────────────────────────────────────── */

.tut-cta-band {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: center;
  margin-top: 64px;
  border-radius: var(--ds-r-xl);
  padding: 28px;
  background: var(--ds-n-900);
  color: var(--ds-n-0);
  box-shadow: var(--ds-shadow-lg);
}
.tut-cta-band h2 {
  margin: 0;
  font-size: var(--ds-fs-display);
  line-height: var(--ds-lh-tight);
  font-weight: 700;
  color: var(--ds-n-0);
}
.tut-cta-band p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: var(--ds-fs-h2);
}

/* ─── Footer ────────────────────────────────────────────────────────────── */

.tut-footer {
  border-top: 1px solid var(--ds-border);
  background: var(--ds-surface);
  padding: 24px 0;
  color: var(--ds-text-muted);
  font-size: var(--ds-fs-small);
}

.tut-footer-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
.tut-footer-row a {
  color: var(--ds-text);
  font-weight: 700;
}
.tut-footer-row a:hover { color: var(--ds-accent); }

.tut-footer-links {
  display: flex;
  align-items: center;
  gap: var(--ds-space-5);
}

/* ─── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .tut-hero {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 42px 0 64px;
  }
  .tut-section-head { display: block; }
  .tut-section-copy { margin-top: 10px; }
  .tut-features-grid,
  .tut-practice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tut-cta-band { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .tut-container { width: min(100% - 28px, 1120px); }
  .tut-topbar { align-items: flex-start; }
  .tut-topbar-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }
  /* Keep secondary nav reachable on mobile (mirrors privacy.css behavior). */
  .tut-nav-link { font-size: var(--ds-fs-small); }
  .tut-h1 { font-size: var(--ds-fs-display); }
  .tut-profile-grid,
  .tut-features-grid,
  .tut-practice-grid,
  .tut-faq-grid { grid-template-columns: 1fr; }
  .tut-feature-card { min-height: auto; }
  .tut-footer-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tut-btn { transition: none; }
}
