/* ─── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:       #04060f;
  --card:     #080c18;
  --card-h:   #0d1120;
  --blue:     #0078ff;
  --blue-hi:  #4da6ff;
  --blue-dim: rgba(0,120,255,0.18);
  --text:     #eef2ff;
  --muted:    #6b7db3;
  --border:   rgba(0,120,255,0.15);
  --border-h: rgba(0,120,255,0.35);
  --radius:   20px;
  --font:     'Inter', system-ui, sans-serif;
  color-scheme: dark;
}

html { scroll-behavior: smooth; }

/* ─── Skip Link ─────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 100;
  padding: 8px 16px;
  background: var(--blue);
  color: #fff;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ─── Background breathing glow ─────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  @keyframes breathe {
    from { opacity: 0.6; transform: scale(1);    }
    to   { opacity: 1;   transform: scale(1.2);  }
  }
}

/* ─── Page ──────────────────────────────────────────────────────── */
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 40px 16px max(56px, calc(56px + env(safe-area-inset-bottom)));
  padding-left:  max(16px, calc(16px + env(safe-area-inset-left)));
  padding-right: max(16px, calc(16px + env(safe-area-inset-right)));
  position: relative;
  overflow-x: hidden;

  /* Grade de linhas azuis */
  background-image:
    linear-gradient(rgba(0,80,200,0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,80,200,0.12) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Glow azul animado no canto inferior esquerdo */
body::before {
  content: '';
  position: fixed;
  bottom: -10%;
  left: -10%;
  width: 55%;
  aspect-ratio: 1;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle, rgba(0,120,255,0.28) 0%, transparent 70%);
  border-radius: 50%;
}

@media (prefers-reduced-motion: no-preference) {
  body::before {
    animation: breathe 5s ease-in-out infinite alternate;
  }
}

.page { position: relative; z-index: 1; }

.page {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ─── Header ────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 4px;
  text-align: center;
}

.avatar-wrap {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(0,120,255,0.1);
  border: 1.5px solid var(--border-h);
  overflow: hidden;
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.header-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.header-label {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.header-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
}

/* ─── Grid de cards ─────────────────────────────────────────────── */
.links-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ─── Card ──────────────────────────────────────────────────────── */
.card {
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: 160px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  touch-action: manipulation;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.card:hover {
  border-color: var(--border-h);
  background: var(--card-h);
}

@media (prefers-reduced-motion: no-preference) {
  .card {
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.18s ease;
  }
  .card:hover  { transform: translateY(-2px); }
  .card:active { transform: translateY(0); }
}

.card:focus-visible {
  outline: 2px solid var(--blue-hi);
  outline-offset: 2px;
}

/* Gradiente de texto sobre a foto — da esquerda para direita */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    var(--card) 0%,
    var(--card) 36%,
    rgba(8,12,24,0.88) 52%,
    rgba(8,12,24,0.3)  70%,
    transparent 100%
  );
  z-index: 2;
  pointer-events: none;
}

/* ─── Texto do card ─────────────────────────────────────────────── */
.card-content {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  width: 55%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 24px 0 24px 22px;
}

/* Ícone (mesmo estilo dos cards originais) */
.card-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.card:hover .card-icon { transform: scale(1.08); }

.card-icon svg {
  width: 18px;
  height: 18px;
}

.card-icon--blue   { background: rgba(0,120,255,0.16);  color: var(--blue-hi); border: 1px solid rgba(0,120,255,0.35); }
.card-icon--purple { background: rgba(0,120,255,0.12);  color: #8ab4ff;        border: 1px solid rgba(0,120,255,0.28); }
.card-icon--cyan   { background: rgba(0,120,255,0.10);  color: #a0c4ff;        border: 1px solid rgba(0,120,255,0.22); }
.card-icon--orange { background: rgba(0,120,255,0.14);  color: #c0d8ff;        border: 1px solid rgba(0,120,255,0.30); }

.card-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
}

.card-sub {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ─── Visual (foto + mockup) ────────────────────────────────────── */
.card-visual {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 68%;
  z-index: 1;
  overflow: hidden;
}

.card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
  mix-blend-mode: luminosity;
  filter: brightness(0.75) contrast(1.05);
  transition: transform 0.35s ease, filter 0.25s ease;
}

.card:hover .card-photo {
  transform: scale(1.03);
  filter: brightness(0.85) contrast(1.05);
}

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

.card-photo-tint {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  pointer-events: none;
}

.card-photo-tint--blue   { background: radial-gradient(circle at 70% 40%, rgba(0,120,255,0.35), transparent 65%); }
.card-photo-tint--purple { background: radial-gradient(circle at 70% 40%, rgba(0,90,255,0.30),  transparent 65%); }
.card-photo-tint--cyan   { background: radial-gradient(circle at 70% 40%, rgba(0,150,255,0.28), transparent 65%); }
.card-photo-tint--orange { background: radial-gradient(circle at 70% 40%, rgba(0,100,255,0.32), transparent 65%); }

/* ─── Mockups flutuando sobre a foto ────────────────────────────── */
.mock {
  position: absolute;
  z-index: 4;
  /* glassmorphism: fundo translúcido com blur */
  background: rgba(10, 10, 16, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 10px 12px;
}

/* ── Analytics (card 1) ────── */
.mock-analytics {
  bottom: 16px;
  right: 12px;
  width: 118px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.mock-bar-top {
  height: 5px;
  width: 55%;
  background: rgba(255,255,255,0.12);
  border-radius: 4px;
}

.mock-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 46px;
}

.bar {
  flex: 1;
  height: var(--h);
  background: rgba(0,120,255,0.4);
  border-radius: 3px 3px 0 0;
}

.bar--hi {
  background: var(--blue);
  box-shadow: 0 0 10px rgba(0,120,255,0.8);
}

.mock-stat {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.stat-val {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--blue-hi);
}

.stat-lbl {
  font-size: 0.6rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Fluxo (card 2) ────────── */
.mock-flow {
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.flow-node {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 7px;
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.flow-node svg { width: 11px; height: 11px; flex-shrink: 0; }
.flow-node--start { border-color: rgba(0,120,255,0.5); color: var(--blue-hi); }
.flow-node--end   { border-color: rgba(0,180,255,0.5); color: #a0d8ff; }

.flow-arrow {
  font-size: 0.6rem;
  color: var(--muted);
  padding: 2px 0;
  opacity: 0.5;
  line-height: 1;
}

/* ── Roadmap (card 3) ──────── */
.mock-roadmap {
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.road-step {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.625rem;
  color: var(--muted);
  font-weight: 500;
}

.road-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  flex-shrink: 0;
}

.road-line {
  width: 2px;
  height: 14px;
  background: rgba(255,255,255,0.1);
  margin-left: 3px;
}

.road-step--done .road-dot  { background: var(--blue); border-color: var(--blue); }
.road-step--done            { color: var(--blue-hi); }
.road-step--active .road-dot { background: #4da6ff; border-color: #4da6ff; box-shadow: 0 0 8px rgba(0,120,255,0.8); }
.road-step--active          { color: #fff; font-weight: 700; }

/* ── Módulos (card 4) ──────── */
.mock-modules {
  bottom: 16px;
  right: 12px;
  width: 110px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.module {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mod-check {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.45rem;
  color: var(--muted);
}

.mod-check--active { background: rgba(0,120,255,0.25); border-color: rgba(0,120,255,0.6); color: var(--blue-hi); }
.mod-check--locked { opacity: 0.3; }
.module--done .mod-check { background: rgba(0,120,255,0.15); border-color: rgba(0,120,255,0.4); color: #a0c8ff; }

.mod-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
}

.mod-bar--progress { background: linear-gradient(90deg, var(--blue), rgba(0,120,255,0.2)); }
.mod-bar--locked   { opacity: 0.2; }
.module--done .mod-bar { background: rgba(0,120,255,0.45); }

/* ─── Card YouTube ──────────────────────────────────────────────── */
.card--yt { min-height: 160px; }

.card-photo--yt {
  width: 65%;
  object-position: left 10%;
  filter: brightness(0.7) contrast(1.05);
}

.card--yt:hover .card-photo--yt {
  transform: scale(1.03);
  filter: brightness(0.85) contrast(1.05);
}

.card-photo-tint--yt {
  background: radial-gradient(circle at 80% 50%, rgba(255,0,0,0.2), transparent 65%);
}

.card--yt .card-visual {
  background: #000;
}

.card-icon--yt {
  background: rgba(255,0,0,0.15);
  color: #ff4444;
  border: 1px solid rgba(255,0,0,0.3);
}

.card--yt:hover { border-color: rgba(255,60,60,0.35); }
.card--yt:focus-visible { outline-color: #ff4444; }

/* Mockup mini-player */
.mock-yt {
  position: absolute;
  z-index: 5;
  bottom: 14px;
  right: 12px;
  width: 120px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: rgba(10, 10, 16, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 10px 12px;
}

.yt-thumb {
  width: 100%;
  height: 52px;
  border-radius: 6px;
  /* tom escuro neutro combinando com o fundo preto da foto */
  background: linear-gradient(135deg, rgba(255,0,0,0.25), rgba(0,0,0,0.4));
  border: 1px solid rgba(255,60,60,0.18);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.yt-thumb::after {
  content: '▶';
  font-size: 1.1rem;
  color: rgba(255,255,255,0.8);
}

.yt-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.yt-bar {
  height: 5px;
  background: rgba(255,255,255,0.12);
  border-radius: 3px;
}

.yt-stats {
  display: flex;
  gap: 8px;
}

.yt-stat {
  font-size: 0.6rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 3px;
}

.yt-num { color: #ff6666; }

/* ─── Footer ────────────────────────────────────────────────────── */
.footer {
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.45;
  text-align: center;
}

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 380px) {
  .card-title   { font-size: 1.125rem; }
  .card-content { padding: 20px 0 20px 16px; }
  .header-title { font-size: 1.25rem; }
  .card         { min-height: 140px; }
}
