/* MaquinaDigitalIA — dark/gold, responsivo e dinâmico */
:root {
  --bg-deep: #09070c;
  --bg: #141018;
  --bg-elevated: #1f181f;
  --ink: #fffcf0;
  --muted: #d2c6af;
  --muted-dim: #9e9078;
  --gold: #ffc850;
  --gold-soft: #ffd98a;
  --gold-deep: #c9892a;
  --line: rgba(255, 200, 80, 0.2);
  --line-strong: rgba(255, 200, 80, 0.42);
  --font-display: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
  --shell: min(42rem, calc(100% - 2rem));
  --pad-y: clamp(1.5rem, 4vw, 3rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.08rem);
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg-deep);
  overflow-x: hidden;
  position: relative;
}

/* Atmosphere layers */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

body::before {
  background:
    radial-gradient(ellipse 80% 50% at 50% -8%, rgba(255, 180, 80, 0.2), transparent 55%),
    radial-gradient(ellipse 55% 40% at 100% 15%, rgba(120, 70, 30, 0.18), transparent 50%),
    radial-gradient(ellipse 50% 35% at 0% 70%, rgba(50, 30, 40, 0.28), transparent 48%),
    linear-gradient(180deg, #1a1218 0%, var(--bg) 40%, var(--bg-deep) 100%);
}

body::after {
  z-index: -1;
  background:
    radial-gradient(circle at var(--glow-x, 70%) var(--glow-y, 18%), rgba(255, 200, 80, 0.12), transparent 28%),
    radial-gradient(circle at 20% 80%, rgba(255, 160, 60, 0.06), transparent 32%);
  animation: ambience 14s ease-in-out infinite alternate;
  transition: background-position 0.4s linear;
}

a {
  color: var(--gold-soft);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
a:hover { color: var(--gold); }
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.site-shell {
  width: var(--shell);
  margin: 0 auto;
  padding: var(--pad-y) 0 calc(var(--pad-y) + 1rem);
  position: relative;
}

/* —— Home hero —— */
.page-home .site-shell {
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 4vw, 2.75rem);
}

.hero {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1rem, 3vw, 1.75rem) 0 clamp(0.5rem, 2vw, 1rem);
  min-height: min(78vh, 40rem);
  align-content: center;
}

.hero__visual {
  position: relative;
  width: min(11.5rem, 42vw);
  aspect-ratio: 1;
  margin: 0 auto;
}

.hero__visual img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 200, 80, 0.5);
  box-shadow:
    0 0 0 8px rgba(255, 200, 80, 0.06),
    0 0 40px rgba(255, 200, 80, 0.28),
    0 18px 40px rgba(0, 0, 0, 0.45);
  animation: glow 5s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

.hero__ring {
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  border: 1px solid rgba(255, 200, 80, 0.22);
  animation: spin-slow 28s linear infinite;
}

.hero__ring::before {
  content: "";
  position: absolute;
  top: 4%;
  left: 50%;
  width: 0.45rem;
  height: 0.45rem;
  margin-left: -0.22rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
}

.hero__brand {
  text-align: center;
  text-decoration: none;
  color: inherit;
}

.hero__brand:hover { color: inherit; }

.hero__name {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 8vw, 3.4rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.05;
  margin: 0.35rem 0 0.25rem;
}

.hero__name span { color: var(--gold); }

.hero__handle {
  display: block;
  color: var(--muted);
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  letter-spacing: 0.04em;
}

.hero__tagline {
  margin: 0.35rem auto 0;
  max-width: 22rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3.5vw, 1.55rem);
  font-style: italic;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.35;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin-top: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: linear-gradient(160deg, var(--gold-soft), var(--gold-deep));
  color: #1a1008;
  box-shadow: 0 8px 28px rgba(255, 180, 60, 0.28);
}
.btn--primary:hover {
  color: #120c06;
  box-shadow: 0 12px 32px rgba(255, 180, 60, 0.38);
}

.btn--ghost {
  border: 1px solid var(--line-strong);
  color: var(--gold-soft);
  background: rgba(255, 200, 80, 0.05);
}
.btn--ghost:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(255, 200, 80, 0.1);
}

/* Shared header (legal pages) */
.site-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  text-decoration: none;
  color: inherit;
}
.brand:hover { color: inherit; opacity: 0.96; }

.brand__mark {
  width: clamp(3.2rem, 10vw, 3.8rem);
  height: clamp(3.2rem, 10vw, 3.8rem);
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 200, 80, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 200, 80, 0.08), 0 0 22px rgba(255, 200, 80, 0.28);
  animation: glow-sm 4.5s ease-in-out infinite;
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand__name {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4.5vw, 2.1rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.05;
  color: var(--ink);
}
.brand__name span { color: var(--gold); }

.brand__handle {
  font-size: 0.88rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.tagline {
  margin: 0;
  max-width: 28rem;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3vw, 1.3rem);
  font-style: italic;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.35;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.28rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 200, 80, 0.1);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.35rem;
  margin: 0.5rem 0 0;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.site-nav a {
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.01em;
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
}
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"] {
  color: var(--gold);
  text-decoration: underline;
}

.prose p { margin: 0 0 1.15rem; color: var(--muted); }
.prose strong { color: var(--ink); font-weight: 600; }

.prose h1 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.3rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
}

.prose h2 {
  margin: 2.1rem 0 0.65rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.35rem);
  font-weight: 600;
  color: var(--gold-soft);
}

.prose ul {
  margin: 0 0 1.15rem;
  padding-left: 1.2rem;
  color: var(--muted);
}
.prose li { margin: 0.35rem 0; }
.prose li::marker { color: var(--gold); }

.prose code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.88em;
  padding: 0.12em 0.35em;
  border-radius: 0.3em;
  background: rgba(255, 200, 80, 0.08);
  color: var(--gold-soft);
  word-break: break-all;
}

.about {
  max-width: 38rem;
}

.about p:last-child { margin-bottom: 0; }

/* Channels */
.channels h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 600;
  color: var(--ink);
}

.channels__lead {
  margin: 0 0 1.15rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.channels__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.channels__list a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem 1rem;
  min-height: 3.35rem;
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background:
    linear-gradient(135deg, rgba(255, 200, 80, 0.07), transparent 55%),
    rgba(255, 252, 240, 0.02);
  transition:
    transform 0.3s var(--ease),
    border-color 0.3s var(--ease),
    background 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.channels__list a:hover,
.channels__list a:focus-visible {
  color: inherit;
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 200, 80, 0.12);
  background:
    linear-gradient(135deg, rgba(255, 200, 80, 0.14), transparent 60%),
    rgba(255, 252, 240, 0.035);
}

.channels__name {
  font-weight: 600;
  color: var(--gold-soft);
  letter-spacing: 0.01em;
}
.channels__list a:hover .channels__name { color: var(--gold); }

.channels__handle {
  font-size: 0.88rem;
  color: var(--muted-dim);
  text-align: right;
}

.channels__arrow {
  grid-column: 2;
  grid-row: 1;
  color: var(--gold);
  opacity: 0.55;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
  justify-self: end;
}
.channels__list a:hover .channels__arrow {
  opacity: 1;
  transform: translateX(3px);
}

.channels__list a {
  grid-template-columns: 1fr auto auto;
}
.channels__name { grid-column: 1; }
.channels__handle { grid-column: 2; }
.channels__arrow { grid-column: 3; grid-row: 1; }

@media (max-width: 520px) {
  .channels__list a {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }
  .channels__name { grid-column: 1; grid-row: 1; }
  .channels__arrow { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .channels__handle {
    grid-column: 1;
    grid-row: 2;
    text-align: left;
    font-size: 0.82rem;
  }
}

.url-list {
  margin: 1.75rem 0 0;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: linear-gradient(160deg, rgba(255, 200, 80, 0.07), rgba(255, 200, 80, 0.02));
  font-size: 0.95rem;
  color: var(--muted);
}
.url-list code {
  display: block;
  margin-top: 0.35rem;
  padding: 0;
  background: none;
}

.site-footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted-dim);
}
.site-footer p { margin: 0.35rem 0; }

.crumb {
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
  color: var(--muted-dim);
}
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.4s; }

.channels__list li:nth-child(1) .reveal { transition-delay: 0.05s; }
.channels__list li:nth-child(2) .reveal { transition-delay: 0.1s; }
.channels__list li:nth-child(3) .reveal { transition-delay: 0.15s; }
.channels__list li:nth-child(4) .reveal { transition-delay: 0.2s; }
.channels__list li:nth-child(5) .reveal { transition-delay: 0.25s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes glow {
  0%, 100% {
    box-shadow:
      0 0 0 8px rgba(255, 200, 80, 0.05),
      0 0 28px rgba(255, 200, 80, 0.22),
      0 14px 32px rgba(0, 0, 0, 0.4);
  }
  50% {
    box-shadow:
      0 0 0 10px rgba(255, 200, 80, 0.1),
      0 0 48px rgba(255, 200, 80, 0.4),
      0 18px 40px rgba(0, 0, 0, 0.45);
  }
}

@keyframes glow-sm {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 200, 80, 0.08), 0 0 16px rgba(255, 200, 80, 0.22); }
  50% { box-shadow: 0 0 0 3px rgba(255, 200, 80, 0.14), 0 0 28px rgba(255, 200, 80, 0.42); }
}

@keyframes ambience {
  from { opacity: 0.85; transform: scale(1); }
  to { opacity: 1; transform: scale(1.04); }
}

@keyframes spin-slow {
  to { transform: rotate(360deg); }
}

@media (min-width: 720px) {
  .page-home .site-shell { width: min(46rem, calc(100% - 3rem)); }
  .hero {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "visual brand"
      "visual tagline"
      "visual cta";
    align-items: center;
    column-gap: 2rem;
    text-align: left;
    min-height: min(72vh, 34rem);
  }
  .hero__visual { grid-area: visual; margin: 0; width: 10.5rem; }
  .hero__brand { grid-area: brand; text-align: left; }
  .hero__tagline { grid-area: tagline; text-align: left; margin-left: 0; }
  .hero__cta { grid-area: cta; justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
