/* ────────────────────────────────────────────────────────────
   Gabriel Pedrozo — Bio
   Direção B (revisada): warm, friendly, inspirado em Zapier.
   Light default · auto dark via prefers-color-scheme · toggle.
   ──────────────────────────────────────────────────────────── */

/* ════════════════════════════════════════════════════════════
   TOKENS — paleta Zapier
   ════════════════════════════════════════════════════════════ */

:root,
[data-theme="light"] {
  color-scheme: light;

  --bg: #fffefb;              /* cream — nunca branco puro */
  --bg-soft: #fffdf9;
  --surface: #fffefb;
  --surface-2: #eceae3;       /* light sand */
  --surface-3: #f5f3ec;

  --ink: #201515;             /* zapier black, warm near-black */
  --ink-2: #36342e;           /* dark charcoal */
  --ink-muted: #939084;       /* warm gray */

  --line: #c5c0b1;            /* sand — borda estrutural */
  --line-strong: #36342e;

  --accent: #ff4f00;          /* zapier orange */
  --accent-ink: #fffefb;
  --accent-soft: rgba(255, 79, 0, 0.06);

  --shadow-soft: 0 1px 0 rgba(32, 21, 21, 0.04);
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg: #1a1413;              /* warm near-black */
  --bg-soft: #221b19;
  --surface: #221b19;
  --surface-2: #2a2220;
  --surface-3: #312826;

  --ink: #f7f3ea;
  --ink-2: #d8d0c1;
  --ink-muted: #8a8278;

  --line: #3a302d;
  --line-strong: #5a4d47;

  --accent: #ff6a3d;          /* laranja levemente clareada pra contrast */
  --accent-ink: #1a1413;
  --accent-soft: rgba(255, 106, 61, 0.10);

  --shadow-soft: 0 1px 0 rgba(0, 0, 0, 0.25);
}

/* ════════════════════════════════════════════════════════════
   BASE
   ════════════════════════════════════════════════════════════ */

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

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  font-family: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background 0.25s ease, color 0.25s ease;
}

main { position: relative; z-index: 1; }

.wrap {
  width: min(94vw, 480px);
  padding: clamp(40px, 8vw, 80px) 22px clamp(40px, 6vw, 64px);
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 5vw, 44px);
}

/* ════════════════════════════════════════════════════════════
   PROFILE
   ════════════════════════════════════════════════════════════ */

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  animation: fade-up 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.avatar-frame {
  width: 96px;
  height: 96px;
  margin: 0;
  position: relative;
}

.avatar {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.display {
  margin: 6px 0 0;
  font-family: "Bricolage Grotesque", "Inter", "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: clamp(34px, 7vw, 44px);
  line-height: 0.92;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-variation-settings: "opsz" 96;
}

.kicker {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.4;
  color: var(--ink-2);
  max-width: 30ch;
  letter-spacing: -0.011em;
}

/* ════════════════════════════════════════════════════════════
   LINKS — cards friendly
   ════════════════════════════════════════════════════════════ */

.links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition:
    transform 0.18s cubic-bezier(0.22, 0.61, 0.36, 1),
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
  opacity: 0;
  animation: fade-up 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.card:nth-of-type(1) { animation-delay: 0.10s; }
.card:nth-of-type(2) { animation-delay: 0.16s; }
.card:nth-of-type(3) { animation-delay: 0.22s; }
.card:nth-of-type(4) { animation-delay: 0.28s; }
.card:nth-of-type(5) { animation-delay: 0.34s; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .card, .profile { animation: none; opacity: 1; transform: none; }
}

.card:not(.closed):hover {
  border-color: var(--line-strong);
  background: var(--bg-soft);
  transform: translateY(-1px);
}

.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}

/* card sem ícone à esquerda → grid colapsa */
.card:not(:has(.card-icon)) { grid-template-columns: 1fr auto; }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: #25d366;
  color: #fff;
  flex-shrink: 0;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  text-align: left;
}

.card-eyebrow {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1;
}

.card-eyebrow.muted { color: var(--ink-muted); }

.card-title {
  font-family: "Inter", sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
}

.card-sub {
  font-family: "Inter", sans-serif;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--ink-2);
  letter-spacing: -0.005em;
  line-height: 1.4;
  text-wrap: balance;
}

.card-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  flex-shrink: 0;
  transition: transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1), color 0.18s ease;
}

.card:not(.closed):hover .card-arrow {
  transform: translateX(3px);
  color: var(--ink);
}

.card-tag {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--ink-muted);
  border: 1px solid var(--line);
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── CTA principal — Curso (laranja Zapier) ── */
.card.cta {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  padding: 22px 24px;
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(255, 79, 0, 0.18);
}

.card.cta .card-eyebrow,
.card.cta .card-title,
.card.cta .card-sub,
.card.cta .card-arrow { color: var(--accent-ink); }

.card.cta .card-eyebrow { opacity: 0.85; }

.card.cta .card-title {
  font-family: "Bricolage Grotesque", "Inter", sans-serif;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.025em;
  line-height: 1;
  font-variation-settings: "opsz" 24;
}

.card.cta:hover {
  background: #e84600;
  border-color: #e84600;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 79, 0, 0.18);
}

[data-theme="dark"] .card.cta:hover {
  background: #ff7a52;
  border-color: #ff7a52;
}

/* ── Saber Ampliado — encerrado ── */
.card.closed {
  cursor: not-allowed;
  background: var(--bg);
  opacity: 0.78;
  animation: none;
  opacity: 1;
}

.card.closed .card-title {
  color: var(--ink-muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--ink-muted);
}

.card.closed .card-sub { color: var(--ink-muted); }

.card.closed:hover {
  transform: none;
  background: var(--bg);
  border-color: var(--line);
}

/* ════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════ */

.bio-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  animation: fade-up 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) 0.5s both;
}

.socials {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 6px;
}

.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 14px;
  border: 1px solid var(--line);
  color: var(--ink-2);
  background: var(--surface);
  text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.socials a:hover {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.socials a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.legal {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0;
}

/* ════════════════════════════════════════════════════════════
   THEME TOGGLE — top-right
   ════════════════════════════════════════════════════════════ */

.theme-toggle {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: 18px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  z-index: 5;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-toggle .i-sun { display: none; }
.theme-toggle .i-moon { display: block; }

[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* ════════════════════════════════════════════════════════════
   MOBILE
   ════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
  .wrap { padding-top: 56px; gap: 28px; }
  .avatar-frame { width: 88px; height: 88px; }
  .display { font-size: 32px; }
  .kicker { font-size: 14.5px; }
  .card { padding: 16px 18px; }
  .card.cta { padding: 20px 22px; }
  .card.cta .card-title { font-size: 18px; }
  .theme-toggle { width: 34px; height: 34px; top: 12px; right: 12px; }
}

@media (max-width: 360px) {
  .card-icon { width: 32px; height: 32px; }
  .card-arrow { display: none; }
  .card { grid-template-columns: auto 1fr; }
  .card:not(:has(.card-icon)) { grid-template-columns: 1fr; }
}
