/*
Theme Name: TL Núcleo Editorial
Theme URI: https://tlnucleoeditorial.com.br/
Author: TL Núcleo Editorial
Author URI: https://tlnucleoeditorial.com.br/
Description: Tema institucional exclusivo da TL Núcleo Editorial, com catálogo de publicações administrável.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: tl-nucleo-editorial
*/

:root {
  --navy: #17233a;
  --navy-soft: #22304a;
  --ivory: #f5f1e9;
  --brass: #a6864a;
  --white: #ffffff;
  --surface: #f5f5f7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.11);
  --radius-large: 32px;
  --radius-medium: 22px;
  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--white);
}

#inicio,
#manifesto,
#principios,
#acervo {
  scroll-margin-top: 56px;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--white);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

::selection {
  background: var(--navy);
  color: var(--white);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  min-height: 44px;
  padding: 11px 18px;
  transform: translateY(-150%);
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  transition: transform 180ms ease;
}

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

.section-shell,
.nav-shell,
.footer-shell {
  width: min(calc(100% - 48px), 1180px);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(23, 35, 58, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
}

.nav-shell {
  display: grid;
  height: 100%;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 36px;
}

.brand-link {
  display: inline-flex;
  width: 190px;
  overflow: hidden;
  border-radius: 4px;
}

.brand-link img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav-links a,
.site-footer nav a {
  color: rgba(255, 255, 255, 0.74);
  transition: color 180ms ease;
}

.nav-links a:hover,
.site-footer nav a:hover {
  color: var(--white);
}

.nav-cta {
  justify-self: end;
  min-height: 32px;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  font-size: 0.69rem;
  font-weight: 700;
  transition:
    transform 220ms var(--ease),
    background 180ms ease;
}

.nav-cta:hover {
  transform: scale(1.025);
  background: var(--ivory);
}

.hero {
  position: relative;
  display: flex;
  min-height: 900px;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding: 112px 24px 0;
  text-align: center;
  background:
    radial-gradient(circle at 50% 62%, rgba(166, 134, 74, 0.11), transparent 27%),
    linear-gradient(180deg, #fff 0%, #fafafa 74%, #f1f1f3 100%);
}

.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 1010px;
  animation: rise-in 900ms var(--ease) both;
}

.section-kicker {
  margin: 0 0 14px;
  color: var(--brass);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 0 24px;
  color: var(--navy);
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.1vw, 1.8rem);
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.hero-kicker::before,
.hero-kicker::after {
  width: 34px;
  height: 1px;
  content: "";
  background: var(--brass);
}

.hero-kicker span {
  color: var(--brass);
}

.hero h1 {
  max-width: 1000px;
  margin: 0;
  color: var(--navy);
  font-size: clamp(3.2rem, 6.5vw, 6.5rem);
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.hero-copy > p:not(.hero-kicker) {
  max-width: 700px;
  margin: 28px auto 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.6vw, 1.35rem);
  letter-spacing: -0.025em;
}

.hero-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  transition:
    transform 220ms var(--ease),
    box-shadow 220ms ease,
    background 180ms ease;
}

.button:hover {
  transform: scale(1.025);
}

.button-primary {
  background: var(--navy);
  box-shadow: 0 10px 28px rgba(23, 35, 58, 0.18);
  color: var(--white);
}

.button-primary:hover {
  background: var(--navy-soft);
  box-shadow: 0 14px 34px rgba(23, 35, 58, 0.24);
}

.button-secondary {
  border: 1px solid rgba(23, 35, 58, 0.22);
  color: var(--navy);
}

.button-secondary:hover {
  background: rgba(23, 35, 58, 0.05);
}

.hero-stage {
  position: relative;
  z-index: 2;
  width: min(980px, 92vw);
  margin-top: 50px;
  animation: stage-in 1100ms 200ms var(--ease) both;
}

.hero-stage img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 36px 32px rgba(23, 35, 58, 0.16));
  transform: perspective(1200px) rotateX(2deg);
  transition: transform 700ms var(--ease);
}

.hero-stage:hover img {
  transform: perspective(1200px) rotateX(0deg) translateY(-6px) scale(1.01);
}

.manifesto {
  display: flex;
  min-height: 760px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-block: 110px;
  text-align: center;
}

.manifesto h2,
.principles h2,
.catalog-heading h2,
.closing h2 {
  margin: 0;
  letter-spacing: -0.055em;
  line-height: 1.03;
}

.manifesto h2 {
  max-width: 890px;
  color: var(--navy);
  font-size: clamp(3rem, 6vw, 5.8rem);
}

.manifesto > p:not(.section-kicker) {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  letter-spacing: -0.02em;
}

.manifesto .manifesto-lead {
  margin-top: 40px;
  color: var(--text);
  font-size: clamp(1.15rem, 2vw, 1.48rem);
  font-weight: 600;
}

.principles {
  overflow: hidden;
  padding: 120px 0;
  background: var(--navy);
  color: var(--white);
}

.section-kicker-light {
  color: #c7aa70;
}

.principles h2 {
  max-width: 840px;
  font-size: clamp(3rem, 6vw, 6rem);
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 60px;
}

.principle-card {
  min-height: 224px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-medium);
  background: rgba(255, 255, 255, 0.055);
  transition:
    transform 300ms var(--ease),
    background 300ms ease;
}

.principle-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.08);
}

.principle-card > span {
  display: block;
  color: #c7aa70;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.principle-card h3 {
  margin: 54px 0 10px;
  font-size: 1.75rem;
  letter-spacing: -0.04em;
}

.principle-card p {
  max-width: 280px;
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.95rem;
}

.principle-card-reveal {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.js .principle-card-reveal {
  opacity: 0;
  transform: translateY(46px) scale(0.985);
  transition:
    opacity 560ms var(--ease),
    transform 680ms var(--ease),
    background 300ms ease;
}

.js .principle-card-reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.catalog-section {
  padding: 120px 0;
  background: var(--surface);
}

.catalog-heading {
  max-width: 940px;
  margin-bottom: 64px;
  text-align: center;
}

.catalog-heading h2 {
  color: var(--navy);
  font-size: clamp(3rem, 6vw, 5.8rem);
}

.catalog-heading > p:last-child {
  max-width: 620px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.product-carousel {
  position: relative;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.carousel-controls > p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.carousel-controls > p i {
  width: 30px;
  height: 1px;
  background: rgba(0, 0, 0, 0.22);
}

.carousel-controls > div {
  display: flex;
  gap: 8px;
}

.carousel-controls button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.07);
  color: var(--text);
  cursor: pointer;
  transition:
    background 180ms ease,
    transform 180ms ease;
}

.carousel-controls button:hover:not(:disabled) {
  transform: scale(1.05);
  background: rgba(0, 0, 0, 0.12);
}

.carousel-controls button:disabled {
  opacity: 0.32;
  cursor: default;
}

.carousel-viewport {
  display: flex;
  width: min(calc(100% - 48px), 1180px);
  margin-inline: auto;
  overflow: hidden;
  border-radius: var(--radius-large);
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
}

.product-slide {
  display: grid;
  min-width: 100%;
  min-height: 650px;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  background: var(--white);
  scroll-snap-align: start;
}

.product-visual {
  position: relative;
  display: grid;
  min-height: 650px;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, #fff 0%, #f4ece5 48%, #e5d9cc 100%);
}

.product-edition {
  position: absolute;
  top: 26px;
  left: 28px;
  color: rgba(29, 29, 31, 0.5);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cover-frame {
  width: min(70%, 430px);
  transform: rotate(-2.5deg);
  box-shadow:
    0 42px 70px rgba(66, 46, 30, 0.22),
    0 8px 20px rgba(66, 46, 30, 0.12);
  transition: transform 600ms var(--ease);
}

.product-slide:hover .cover-frame {
  transform: translateY(-8px) rotate(-1deg);
}

.cover-frame img {
  width: 100%;
  height: auto;
}

.product-stamp {
  display: none;
}

.product-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(48px, 7vw, 100px);
  background: var(--navy);
  color: var(--white);
}

.product-category {
  margin: 0 0 20px;
  color: #c7aa70;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.product-copy h3 {
  max-width: 500px;
  margin: 0;
  font-size: clamp(2.6rem, 5vw, 5rem);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.product-summary {
  max-width: 480px;
  margin: 28px 0 36px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 1.05rem;
}

.preparing-label {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.75rem;
  font-weight: 700;
}

.preparing-label i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c7aa70;
  box-shadow: 0 0 0 5px rgba(199, 170, 112, 0.12);
}

.button-light {
  background: var(--white);
  color: var(--navy);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.carousel-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
}

.carousel-dots button[aria-current="true"] {
  background: var(--navy);
}

.closing {
  display: flex;
  min-height: 650px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-block: 100px;
  text-align: center;
}

.closing h2 {
  max-width: 900px;
  margin-bottom: 42px;
  color: var(--navy);
  font-size: clamp(3rem, 6vw, 5.8rem);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--navy);
  color: var(--white);
}

.footer-shell {
  display: grid;
  min-height: 128px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 30px;
}

.footer-shell > img {
  width: 190px;
  height: auto;
}

.site-footer nav {
  display: flex;
  gap: 26px;
  font-size: 0.7rem;
  font-weight: 600;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  justify-self: end;
}

.footer-contact a {
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 600;
}

.site-footer p {
  justify-self: end;
  margin: 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.66rem;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  visibility: hidden;
  border: 1px solid rgba(166, 134, 74, 0.62);
  border-radius: 50%;
  opacity: 0;
  background: rgba(23, 35, 58, 0.92);
  box-shadow: 0 12px 32px rgba(23, 35, 58, 0.24);
  color: var(--white);
  cursor: pointer;
  transform: translateY(16px) scale(0.9);
  backdrop-filter: blur(16px);
  transition:
    opacity 240ms ease,
    transform 320ms var(--ease),
    visibility 240ms ease,
    background 180ms ease;
}

.back-to-top.is-visible {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  background: var(--navy-soft);
  transform: translateY(-3px) scale(1.04);
}

.back-to-top span {
  font-size: 1.25rem;
  line-height: 1;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes stage-in {
  from {
    opacity: 0;
    transform: translateY(60px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 900px) {
  .nav-shell {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: 860px;
    padding-top: 92px;
  }

  .hero-stage {
    width: 100%;
    margin-top: 66px;
  }

  .principles-grid {
    grid-template-columns: 1fr;
  }

  .principle-card {
    min-height: 196px;
  }

  .principle-card h3 {
    margin-top: 34px;
  }

  .product-slide {
    grid-template-columns: 1fr;
  }

  .product-visual {
    min-height: 560px;
  }

  .product-copy {
    min-height: 480px;
  }

  .footer-shell {
    grid-template-columns: 1fr auto;
  }

  .site-footer nav {
    display: none;
  }
}

@media (max-width: 600px) {
  .section-shell,
  .nav-shell,
  .footer-shell,
  .carousel-viewport,
  .carousel-controls {
    width: min(calc(100% - 32px), 1180px);
  }

  .site-header {
    height: 58px;
  }

  .brand-link {
    width: 158px;
  }

  .nav-cta {
    min-height: 34px;
  }

  .hero {
    min-height: 800px;
    padding: 82px 16px 0;
  }

  .hero h1 {
    font-size: clamp(2.75rem, 13.5vw, 4rem);
  }

  .hero-copy > p:not(.hero-kicker) {
    font-size: 1rem;
  }

  .hero-links {
    flex-direction: column;
    align-items: stretch;
    width: min(100%, 320px);
    margin-inline: auto;
  }

  .hero-stage {
    margin-top: 44px;
  }

  .manifesto {
    min-height: auto;
    padding-block: 110px;
  }

  .manifesto h2,
  .principles h2,
  .catalog-heading h2,
  .closing h2 {
    font-size: clamp(2.75rem, 12vw, 4rem);
  }

  .manifesto .manifesto-lead {
    margin-top: 32px;
  }

  .principles,
  .catalog-section {
    padding-block: 90px;
  }

  .principles-grid {
    margin-top: 48px;
  }

  .principle-card {
    min-height: 184px;
    padding: 24px;
  }

  .catalog-heading {
    margin-bottom: 44px;
  }

  .carousel-viewport {
    border-radius: 24px;
  }

  .product-visual {
    min-height: 410px;
  }

  .cover-frame {
    width: 76%;
  }

  .product-copy {
    min-height: 420px;
    padding: 46px 30px;
  }

  .product-copy h3 {
    font-size: clamp(2.65rem, 12vw, 3.8rem);
  }

  .closing {
    min-height: 560px;
  }

  .footer-shell {
    min-height: 116px;
  }

  .footer-shell > img {
    width: 160px;
  }

  .footer-contact {
    max-width: 170px;
    text-align: right;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 48px;
    height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .principle-card-reveal {
    opacity: 1;
    transform: none;
  }
}

/* WordPress templates */
.tl-standard-page,
.tl-product-page,
.tl-not-found {
  min-height: calc(100vh - 192px);
  padding: clamp(96px, 12vw, 170px) 24px;
  background:
    radial-gradient(circle at 50% 20%, rgba(166, 134, 74, 0.1), transparent 32%),
    var(--white);
}

.tl-standard-page__inner,
.tl-product-page__inner,
.tl-not-found__inner {
  width: min(100%, 1040px);
  margin-inline: auto;
}

.tl-standard-page h1,
.tl-not-found h1 {
  max-width: 900px;
  margin: 0;
  color: var(--navy);
  font-size: clamp(3rem, 7vw, 6rem);
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.tl-standard-page__content {
  max-width: 760px;
  margin-top: 40px;
  color: var(--muted);
  font-size: 1.08rem;
}

.tl-standard-page__content > * + * {
  margin-top: 1.4em;
}

.tl-product-page__grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1.15fr);
  gap: clamp(46px, 8vw, 110px);
  align-items: center;
}

.tl-product-page__cover {
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 42px 70px rgba(66, 46, 30, 0.22);
  transform: rotate(-1.5deg);
}

.tl-product-page__cover img {
  width: 100%;
  height: auto;
}

.tl-product-page h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.tl-product-page__summary {
  max-width: 620px;
  margin: 26px 0 34px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
}

.tl-product-page__content {
  max-width: 680px;
  margin-top: 42px;
}

.tl-not-found {
  display: grid;
  place-items: center;
  text-align: center;
}

.tl-not-found__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tl-not-found p:not(.section-kicker) {
  max-width: 620px;
  margin: 24px 0 34px;
  color: var(--muted);
  font-size: 1.1rem;
}

@media (max-width: 760px) {
  .tl-product-page__grid {
    grid-template-columns: 1fr;
  }

  .tl-product-page__cover {
    width: min(84%, 460px);
    margin-inline: auto;
  }
}
