:root {
  --ink: #f7f4ee;
  --muted: #bcb8ae;
  --night: #090a0c;
  --surface: #111318;
  --surface-2: #171a20;
  --line: rgba(255, 255, 255, 0.11);
  --accent: #ef3340;
  --accent-warm: #ffb547;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 280px;
  background:
    radial-gradient(circle at 12% -10%, rgba(239, 51, 64, 0.22), transparent 32rem),
    radial-gradient(circle at 92% 15%, rgba(255, 181, 71, 0.10), transparent 28rem),
    var(--night);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.035;
  background-image: repeating-linear-gradient(90deg, transparent 0 79px, #fff 80px);
  pointer-events: none;
}

a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent-warm); outline-offset: 4px; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 99;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--night);
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.lendas-home-feature {
    width: 100%;
    max-width: 1200px;
    margin: 32px auto;
}

.lendas-home-link {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    width: 100%;
    overflow: hidden;

    border-radius: 18px;

    text-decoration: none;
    color: inherit;
}

.lendas-home-media {
    display: block;
    width: 100%;
    min-width: 0;
}

.lendas-home-media img {
    display: block;

    width: 100%;
    max-width: 100%;
    height: 100%;

    object-fit: cover;
}

.lendas-home-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;

    min-width: 0;

    padding: 32px;
}


/* CARDS DAS OUTRAS SÉRIES */

.ai-home-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 24px;

    width: 100%;
}

.ai-feature-card {
    min-width: 0;
    overflow: hidden;
}

.ai-feature-media {
    display: block;
    width: 100%;
    overflow: hidden;
}

.ai-feature-media img {
    display: block;
    width: 100%;
    height: auto;
}


/* CELULAR */

@media (max-width: 768px) {

    .lendas-home-link {
        grid-template-columns: 1fr;
    }

    .lendas-home-media img {
        width: 100%;
        height: auto;
    }

    .lendas-home-copy {
        padding: 20px;
    }

    .ai-home-grid {
        grid-template-columns: 1fr;
    }

}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 10, 12, 0.86);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 40px), var(--max-width));
  min-height: 76px;
  margin-inline: auto;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--accent), #9e0f1a);
  box-shadow: 0 10px 28px rgba(239, 51, 64, 0.32);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.09em;
}
.thiago-image-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.img-thiago {
    display: block;
    width: 100%;
    height: auto;
}
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { font-size: 0.98rem; letter-spacing: 0.08em; text-transform: uppercase; }
.brand-copy span { margin-top: 5px; color: var(--muted); font-size: 0.71rem; letter-spacing: 0.15em; text-transform: uppercase; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 10px;
  background: currentColor;
  content: "";
  transition: transform 180ms ease, opacity 180ms ease;
}
.nav-toggle[aria-expanded="true"] span { opacity: 0; }
.nav-toggle[aria-expanded="true"]::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"]::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav ul {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  gap: 4px;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 10px 11px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.79rem;
  font-weight: 750;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.07); color: var(--ink); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px var(--accent); }

.page-hero {
  position: relative;
  overflow: hidden;
  width: min(calc(100% - 40px), var(--max-width));
  margin: 38px auto 24px;
  padding: clamp(34px, 6vw, 72px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(125deg, rgba(23, 26, 32, 0.96), rgba(13, 15, 18, 0.9));
  box-shadow: var(--shadow);
}
.page-hero::after {
  position: absolute;
  right: -12%;
  bottom: -65%;
  width: 420px;
  height: 420px;
  border: 70px solid rgba(239, 51, 64, 0.14);
  border-radius: 50%;
  content: "";
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.32fr);
  align-items: end;
  gap: clamp(28px, 6vw, 70px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 17px;
  color: var(--accent-warm);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.eyebrow::before { width: 28px; height: 2px; background: var(--accent); content: ""; }

h1 {
  max-width: 850px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 7vw, 6.2rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.94;
}

.hero-description { max-width: 700px; margin: 22px 0 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.15rem); }

.hero-art {
  position: relative;
  z-index: 1;
  display: grid;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(239, 51, 64, 0.2), rgba(255, 181, 71, 0.05));
  transform: rotate(1deg);
}
.hero-art img { display: block; max-width: 100%; height: auto; }
.hero-art > img:not(.hero-popcorn) {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 2;
  width: calc(100% - 24px);
  padding: 6px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 10px;
  background: rgba(0,0,0,.76);
  object-fit: contain;
  opacity: .96;
}
.hero-art img.hero-popcorn {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: center;
  opacity: .7;
  filter: saturate(.82) contrast(1.08);
}
.hero-art span { position: absolute; font-family: Georgia, serif; font-size: clamp(2rem, 5vw, 4.2rem); font-style: italic; color: rgba(255,255,255,.1); }

.content-shell {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto 70px;
  padding: clamp(24px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 19, 24, 0.88);
  box-shadow: var(--shadow);
}

.legacy-content { color: #dedbd4; }
.legacy-content > br:first-child, .legacy-content > br + br { display: none; }
.legacy-content p { max-width: 78ch; }
.legacy-content b, .legacy-content strong { color: var(--ink); }
.legacy-content a:not(:has(img)) { color: #ffd28c; text-underline-offset: 3px; }
.legacy-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 20px auto;
  border-radius: 16px;
}
.legacy-content img.heritage-banner {
  max-height: 110px;
  margin: 0 auto 30px;
  object-fit: contain;
  border-radius: 0;
}
.legacy-content img.is-missing, .hero-art img.is-missing { display: none; }

.video-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #000;
  box-shadow: 0 20px 55px rgba(0,0,0,.42);
  aspect-ratio: 16 / 9;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.content-table {
  width: 100%;
  margin: 24px 0;
  border-spacing: 0;
  border-collapse: separate;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.025);
}
.content-table th, .content-table td {
  padding: 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #dedbd4;
  font-size: 0.92rem;
  text-align: left;
  vertical-align: top;
}
.content-table th { background: rgba(255,255,255,.07); color: var(--ink); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.content-table tr:last-child > * { border-bottom: 0; }
.content-table tr > *:last-child { border-right: 0; }
.content-table img { min-width: 88px; margin: 0; }

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border: 0;
  background: transparent;
  gap: 18px;
}
.portfolio-grid tbody { display: contents; }
.portfolio-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  overflow: hidden;
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-2);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.portfolio-card:hover { border-color: rgba(255, 181, 71, 0.45); box-shadow: 0 18px 38px rgba(0,0,0,.25); transform: translateY(-3px); }
.portfolio-card > * { display: block; min-width: 0; padding: 20px; border: 0 !important; color: #d8d4cc; }
.portfolio-card > *:first-child { padding: 0; background: #0d0f12; }
.portfolio-card a { display: grid; min-height: 100%; padding: 10px; place-items: center; }
.portfolio-card img {
  width: 100%;
  height: auto;
  max-height: 168px;
  margin: 0;
  border-radius: 8px;
  object-fit: contain;
  object-position: center;
}

/* Feitos com apoio de IA */
.section-kicker {
  margin: 0 0 10px;
  color: var(--accent-warm);
  font-size: .74rem;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}
.section-heading-row h2, .ai-series h2, .episode-copy h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.7rem);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.03;
}
.section-heading-row p { max-width: 720px; margin: 14px 0 0; color: var(--muted); }
.text-link { color: var(--accent-warm); font-size: .9rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.text-link:hover { color: var(--ink); }

.ai-home-section { margin-top: 48px; padding-top: 42px; border-top: 1px solid var(--line); }
.ai-home-grid, .episode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 30px;
}
.ai-feature-card, .episode-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-2);
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.ai-feature-card:hover, .episode-card:hover { border-color: rgba(255,181,71,.48); box-shadow: 0 18px 38px rgba(0,0,0,.26); transform: translateY(-3px); }
.ai-feature-media, .episode-card-media {
  display: grid;
  overflow: hidden;
  min-height: 220px;
  place-items: center;
  background: #08090b;
}
.ai-feature-media img, .episode-card-media img { display: block; width: 100%; height: 100%; max-height: 310px; object-fit: contain; }
.ai-feature-copy, .episode-card-copy { display: grid; padding: 22px; gap: 8px; }
.ai-feature-copy small, .episode-card-copy small { color: var(--accent-warm); font-size: .72rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.ai-feature-copy strong, .episode-card-copy strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.5rem; line-height: 1.12; }
.ai-feature-copy span, .episode-card-copy span { color: var(--muted); font-size: .91rem; }

.ai-intro { max-width: 84ch; color: #d8d4cc; font-size: 1.02rem; }
.ai-intro p:first-child { font-size: 1.18rem; color: var(--ink); }
.ai-signature { margin: 28px 0 0; padding: 18px 22px; border-left: 3px solid var(--accent); background: rgba(239,51,64,.07); font-family: Georgia, serif; font-size: 1.16rem; font-style: italic; }
.ai-series { margin-top: 62px; padding-top: 48px; border-top: 1px solid var(--line); scroll-margin-top: 100px; }
.series-cover { overflow: hidden; margin: 26px 0; border: 1px solid var(--line); border-radius: 22px; background: #08090b; }
.series-cover img { display: block; width: 100%; max-height: 520px; object-fit: contain; }
.series-description { max-width: 88ch; color: #d8d4cc; }
.tech-list { display: flex; flex-wrap: wrap; margin: 22px 0 0; padding: 0; gap: 8px; list-style: none; }
.tech-list li { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.035); color: #dedbd4; font-size: .76rem; }

.episode-card { display: grid; grid-template-rows: 260px 1fr; }
.episode-card-media { position: relative; min-height: 0; }
.episode-card-media img { max-height: none; }
.status-badge { display: inline-flex; width: max-content; align-items: center; padding: 6px 10px; border-radius: 999px; background: rgba(255,181,71,.12); color: var(--accent-warm); font-size: .71rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.status-badge.available { background: rgba(92,213,145,.12); color: #8cf0b6; }

.breadcrumb { display: flex; flex-wrap: wrap; margin: 0 0 22px; gap: 8px; color: var(--muted); font-size: .82rem; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); }
.episode-header {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr);
  align-items: center;
  gap: clamp(28px, 6vw, 70px);
}
.episode-header h1 { font-size: clamp(2.5rem, 6vw, 5.4rem); }
.episode-poster { display: grid; overflow: hidden; min-height: 360px; place-items: center; border: 1px solid var(--line); border-radius: 22px; background: #08090b; }
.episode-poster img { display: block; width: 100%; height: 100%; max-height: 600px; object-fit: contain; }
.episode-copy { max-width: 82ch; margin: 30px auto 0; }
.episode-copy > p { color: #d8d4cc; font-size: 1.03rem; }
.production-notice { display: grid; margin: 0 0 30px; padding: 28px; border: 1px solid rgba(255,181,71,.28); border-radius: 18px; background: rgba(255,181,71,.07); gap: 8px; }
.production-notice strong { font-size: 1.15rem; }
.production-notice span { color: var(--muted); }
.back-link { display: inline-flex; margin-top: 32px; color: var(--accent-warm); font-weight: 800; text-decoration: none; }

@media (max-width: 980px) {
  .episode-header { grid-template-columns: 1fr; }
  .episode-poster { min-height: 280px; }
}

.site-footer { border-top: 1px solid var(--line); background: #08090b; }
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: min(calc(100% - 40px), var(--max-width));
  min-height: 150px;
  margin-inline: auto;
  gap: 30px;
}
.footer-inner p { margin: 0; color: var(--muted); font-size: 0.86rem; }
.footer-inner strong { display: block; margin-bottom: 8px; color: var(--ink); font-size: 1rem; }
.footer-inner a { color: var(--ink); text-underline-offset: 3px; }
.footer-film { width: 38px; height: 112px; object-fit: contain; border-radius: 0; opacity: .78; }
.footer-film.is-missing { display: none; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 500ms ease, transform 500ms ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 20px;
    left: 20px;
    display: none;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 0 0 18px 18px;
    background: rgba(13, 15, 18, 0.98);
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { display: grid; grid-template-columns: repeat(2, 1fr); }
  .site-nav a { padding: 13px; }
  .portfolio-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .header-inner, .page-hero, .content-shell, .footer-inner { width: min(calc(100% - 24px), var(--max-width)); }
  .header-inner { min-height: 68px; }
  .brand-copy span { display: none; }
  .page-hero { margin-top: 18px; padding: 30px 24px; border-radius: 22px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .content-shell { padding: 22px 16px; }
  .portfolio-card { grid-template-columns: 112px minmax(0, 1fr); min-height: 140px; }
  .portfolio-card img { max-height: 136px; }
  .portfolio-card > * { padding: 15px; font-size: .9rem; }
  .content-table { display: block; overflow-x: auto; }
  .content-table th, .content-table td { min-width: 130px; padding: 12px; }
  .footer-inner { grid-template-columns: 1fr; padding: 34px 0; }
  .footer-film { display: none; }
  .section-heading-row { display: grid; }
  .ai-home-grid, .episode-grid { grid-template-columns: 1fr; }
  .ai-feature-media { min-height: 170px; }
  .episode-card { grid-template-rows: 220px 1fr; }
  .episode-poster { min-height: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
