.ternos-page {
  background: var(--color-page);
}

.ternos-page .container {
  min-width: 0;
}

.ternos-hero {
  overflow: hidden;
  padding-block: clamp(4rem, 8vw, 7rem);
}

.ternos-hero__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: center;
}

.ternos-hero__content {
  grid-column: 1 / span 5;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.ternos-hero__content > * {
  min-width: 0;
  margin: 0;
}

.ternos-hero h1 {
  max-width: 8ch;
  color: var(--color-ivory-50);
  font-size: clamp(3.25rem, 5.2vw, 4rem);
}

.ternos-hero__lead {
  max-width: 31rem;
  color: rgb(245 240 231 / 90%);
  font-size: var(--text-lg);
  line-height: var(--leading-lg);
}

.ternos-hero__actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

.ternos-hero__actions > * {
  min-width: 0;
}

.ternos-hero__process-link {
  color: var(--color-ivory-50);
}

.ternos-hero__note {
  max-width: 29rem;
  border-top: 1px solid var(--color-gold-muted);
  padding-top: var(--space-3);
  color: rgb(245 240 231 / 75%);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

.ternos-hero__media {
  grid-column: 7 / span 6;
  width: 100%;
  min-width: 0;
  aspect-ratio: 4 / 5;
  margin: 0;
}

.ternos-hero__media img {
  width: 100%;
  height: 100%;
  object-position: 58% 42%;
}

.ternos-momentos__header,
.ternos-construcao__header,
.ternos-escolhas__header,
.ternos-metodo__header,
.ternos-galeria__header,
.ternos-prova__header,
.ternos-contato__header {
  min-width: 0;
}

.ternos-momentos__header {
  width: 58.333%;
  max-width: 43rem;
  margin-bottom: var(--space-8);
}

.ternos-momentos__header p {
  max-width: 38.75rem;
}

.ternos-momentos__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
}

.ternos-momento {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  padding-inline: var(--space-5);
}

.ternos-momento:first-child {
  padding-left: 0;
}

.ternos-momento + .ternos-momento {
  border-left: 1px solid var(--color-gold-muted);
}

.ternos-momento > * {
  min-width: 0;
  margin: 0;
}

.ternos-momento__number,
.ternos-decisao__number {
  color: var(--color-gold-muted);
  font-family: var(--font-heading);
  font-size: 2rem;
  line-height: 1;
}

.ternos-momento h3 {
  max-width: 17rem;
}

.ternos-momento p {
  max-width: 21.25rem;
}

.ternos-construcao {
  background: var(--color-ivory-100);
}

.ternos-construcao__header {
  width: 50%;
  max-width: 38.75rem;
  margin-bottom: var(--space-8);
}

.ternos-construcao__header p {
  max-width: 38.75rem;
}

.ternos-construcao__body {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: end;
}

.ternos-construcao__media {
  grid-column: 1 / span 5;
  width: 100%;
  min-width: 0;
  aspect-ratio: 4 / 5;
  margin: 0;
  box-shadow: var(--shadow-soft);
}

.ternos-construcao__media img {
  width: 100%;
  height: 100%;
  object-position: 50% 50%;
}

.ternos-construcao__decisions {
  grid-column: 7 / span 5;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.ternos-decisao {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  border-top: 1px solid var(--color-gold-muted);
  padding-top: var(--space-4);
}

.ternos-decisao > * {
  min-width: 0;
  margin: 0;
}

.ternos-decisao h3,
.ternos-decisao p {
  max-width: 24.375rem;
}

.ternos-escolhas {
  background: var(--color-espresso-900);
}

.ternos-escolhas__header {
  width: 50%;
  max-width: 33.75rem;
  margin-bottom: var(--space-8);
}

.ternos-escolhas__header h2,
.ternos-prova h2 {
  color: var(--color-ivory-50);
}

.ternos-escolhas__header p {
  max-width: 33.75rem;
  color: rgb(245 240 231 / 82%);
}

.ternos-escolhas__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
}

.ternos-escolha {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  padding-inline: var(--space-4);
}

.ternos-escolha:first-child {
  padding-left: 0;
}

.ternos-escolha + .ternos-escolha {
  border-left: 1px solid rgb(177 138 82 / 75%);
}

.ternos-escolha > * {
  min-width: 0;
  margin: 0;
}

.ternos-escolha > span {
  color: var(--color-gold-muted);
  font-family: var(--font-heading);
  font-size: 2.5rem;
  line-height: 1;
}

.ternos-escolha h3 {
  color: var(--color-ivory-50);
  font-size: clamp(1.5rem, 2vw, 1.875rem);
}

.ternos-escolha p {
  max-width: 17.8125rem;
  color: rgb(245 240 231 / 78%);
}

.ternos-escolha .editorial-link {
  color: var(--color-ivory-50);
}

.ternos-metodo__header {
  width: 58.333%;
  max-width: 40rem;
  margin-bottom: var(--space-8);
}

.ternos-metodo__header p {
  max-width: 37.5rem;
}

.ternos-etapas {
  display: grid;
  grid-template-columns: 1fr;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ternos-etapas > li {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) minmax(0, 5fr) minmax(0, 1fr);
  min-width: 0;
  align-items: start;
  gap: var(--space-4);
  border-top: 1px solid var(--color-line-warm);
  padding-block: var(--space-5);
}

.ternos-etapas > li > * {
  min-width: 0;
}

.ternos-etapas__number {
  color: var(--color-gold-muted);
  font-family: var(--font-heading);
  font-size: clamp(2.75rem, 5vw, 4.5rem);
  line-height: 0.8;
}

.ternos-etapas__number--accent {
  color: var(--color-burgundy-700);
}

.ternos-etapas h3,
.ternos-etapas p {
  margin: 0;
}

.ternos-etapas p {
  max-width: 21.25rem;
}

.ternos-metodo__link {
  display: inline-block;
  margin-top: var(--space-4);
}

.ternos-galeria__header {
  width: 33.333%;
  max-width: 27.5rem;
  margin-bottom: var(--space-8);
}

.ternos-galeria__header p {
  max-width: 27.5rem;
}

.ternos-galeria__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  align-items: end;
  gap: 1.5rem;
}

.ternos-galeria__item {
  min-width: 0;
  margin: 0;
}

.ternos-galeria__item .media-frame {
  width: 100%;
  min-width: 0;
}

.ternos-galeria__item--one .media-frame,
.ternos-galeria__item--two .media-frame {
  aspect-ratio: 4 / 5;
}

.ternos-galeria__item--three .media-frame {
  aspect-ratio: 3 / 2;
}

.ternos-galeria__item--two {
  transform: translateY(4rem);
}

.ternos-galeria__item img {
  width: 100%;
  height: 100%;
}

.ternos-galeria__item--one img {
  object-position: center;
}

.ternos-galeria__item--two img {
  object-position: 50% 38%;
}

.ternos-galeria__item--three img {
  object-position: center;
}

.ternos-galeria figcaption {
  max-width: 16.25rem;
}

.ternos-galeria figcaption span {
  margin-right: var(--space-2);
  color: var(--color-gold-muted);
  font-family: var(--font-heading);
  font-size: var(--text-lg);
}

.ternos-galeria__link {
  display: inline-block;
  margin-top: var(--space-8);
}

.ternos-prova {
  background: var(--color-burgundy-900);
  color: var(--color-ivory-50);
}

.ternos-prova .eyebrow {
  color: var(--color-gold-muted);
}

.ternos-prova__header {
  width: 50%;
  max-width: 35rem;
  margin-bottom: var(--space-8);
}

.ternos-prova__header p {
  max-width: 35rem;
  color: rgb(245 240 231 / 86%);
}

.ternos-prova__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
}

.ternos-prova__answer {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  border-top: 1px solid var(--color-gold-muted);
  padding: var(--space-4) var(--space-5) 0;
}

.ternos-prova__answer:first-child {
  padding-left: 0;
}

.ternos-prova__answer > * {
  min-width: 0;
  margin: 0;
}

.ternos-prova__answer h3 {
  max-width: 21.875rem;
  color: var(--color-ivory-50);
}

.ternos-prova__answer p {
  max-width: 21.875rem;
  color: rgb(245 240 231 / 84%);
}

.ternos-contato {
  background: var(--color-ivory-100);
}

.ternos-contato__header {
  width: 58.333%;
  max-width: 31.25rem;
  margin-bottom: var(--space-7);
}

.ternos-contato__header p {
  max-width: 31.25rem;
}

.ternos-contato__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.ternos-form {
  grid-column: 1 / span 8;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  margin: 0;
}

.ternos-form > * {
  min-width: 0;
  margin: 0;
}

.ternos-form__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  column-gap: var(--space-4);
}

.ternos-form__fields > * {
  min-width: 0;
}

.ternos-form__message {
  grid-column: 1 / -1;
}

.ternos-form .field-group {
  margin-bottom: var(--space-5);
}

.ternos-form .field-group:nth-last-child(-n + 2) {
  margin-bottom: var(--space-4);
}

.ternos-form .button {
  min-width: 12.5rem;
}

.ternos-form__feedback {
  min-height: 1.5rem;
  color: var(--color-espresso-700);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

.ternos-form__feedback.is-error {
  color: var(--color-burgundy-900);
}

.ternos-contato__details {
  grid-column: 9 / span 4;
  min-width: 0;
  border-left: 3px solid var(--color-burgundy-700);
  padding-left: var(--space-5);
}

.ternos-contato__details h3 {
  max-width: 17rem;
}

.ternos-contato__details > p {
  max-width: 21.25rem;
}

.ternos-contato__details address {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin: 0;
}

.ternos-contato__details address p {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: var(--space-1);
  margin: 0;
}

.ternos-contato__details address strong {
  color: var(--color-espresso-700);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ternos-contato__details address a,
.ternos-contato__details address span {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 1079px) {
  .ternos-hero__content {
    grid-column: 1 / span 6;
  }

  .ternos-hero__media {
    grid-column: 8 / span 5;
  }

  .ternos-hero h1 {
    font-size: clamp(3rem, 5.5vw, 3.75rem);
  }
}

@media (max-width: 1049px) {
  .ternos-construcao__header {
    width: 66.666%;
  }

  .ternos-construcao__body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ternos-construcao__media {
    grid-column: 1 / -1;
    max-width: 38rem;
  }

  .ternos-construcao__decisions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-5) 1.5rem;
  }

  .ternos-decisao {
    width: 100%;
  }

  .ternos-decisao:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1019px) {
  .ternos-escolhas__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-6) 0;
  }

  .ternos-escolha {
    padding-inline: var(--space-5);
  }

  .ternos-escolha:nth-child(odd) {
    padding-left: 0;
  }

  .ternos-escolha:nth-child(3) {
    border-left: 0;
  }
}

@media (max-width: 899px) {
  .ternos-hero__grid,
  .ternos-construcao__body,
  .ternos-contato__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .ternos-hero__content {
    grid-column: 1 / span 3;
  }

  .ternos-hero__media {
    grid-column: 4 / span 3;
  }

  .ternos-momentos__header,
  .ternos-metodo__header,
  .ternos-contato__header {
    width: 100%;
  }

  .ternos-momentos__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-6) 0;
  }

  .ternos-momento:nth-child(odd) {
    padding-left: 0;
  }

  .ternos-momento:nth-child(3) {
    grid-column: 1 / -1;
    border-left: 0;
    padding-left: 0;
  }

  .ternos-etapas {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
  }

  .ternos-etapas > li {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-4) 0 0;
  }

  .ternos-etapas > li:nth-child(5) {
    grid-column: 1 / -1;
  }

  .ternos-etapas p {
    max-width: 23rem;
  }

  .ternos-galeria__header {
    width: 50%;
  }

  .ternos-galeria__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ternos-galeria__item--two {
    transform: none;
  }

  .ternos-galeria__item--three {
    grid-column: 1 / -1;
  }

  .ternos-galeria__item--three figcaption {
    max-width: 24rem;
  }

  .ternos-prova__header {
    width: 100%;
  }

  .ternos-prova__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-6) 0;
  }

  .ternos-prova__answer:nth-child(odd) {
    padding-left: 0;
  }

  .ternos-prova__answer:last-child {
    grid-column: 1 / -1;
    padding-left: 0;
  }

  .ternos-form {
    grid-column: 1 / -1;
  }

  .ternos-contato__details {
    grid-column: 1 / -1;
    max-width: 31.25rem;
  }
}

@media (max-width: 767px) {
  .ternos-hero {
    padding-block: var(--section-space-compact);
  }

  .ternos-hero__grid,
  .ternos-construcao__body,
  .ternos-contato__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
  }

  .ternos-hero__content,
  .ternos-hero__media,
  .ternos-construcao__media,
  .ternos-construcao__decisions,
  .ternos-form,
  .ternos-contato__details {
    grid-column: 1 / -1;
  }

  .ternos-hero__content {
    gap: var(--space-4);
  }

  .ternos-hero h1 {
    max-width: 11ch;
    font-size: clamp(1.875rem, 9vw, 2.25rem);
    line-height: 1.06;
  }

  .ternos-hero__lead {
    max-width: none;
    font-size: var(--text-base);
    line-height: var(--leading-base);
  }

  .ternos-hero__actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .ternos-hero__actions .button {
    width: 100%;
  }

  .ternos-hero__process-link {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
  }

  .ternos-hero__note {
    max-width: none;
  }

  .ternos-momentos__header,
  .ternos-construcao__header,
  .ternos-escolhas__header,
  .ternos-metodo__header,
  .ternos-galeria__header,
  .ternos-prova__header,
  .ternos-contato__header {
    width: 100%;
    max-width: none;
    margin-bottom: var(--space-7);
  }

  .ternos-momentos__grid,
  .ternos-escolhas__grid,
  .ternos-galeria__grid,
  .ternos-prova__grid,
  .ternos-etapas,
  .ternos-construcao__decisions,
  .ternos-form__fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .ternos-momentos__grid,
  .ternos-escolhas__grid,
  .ternos-prova__grid {
    gap: 0;
  }

  .ternos-momento,
  .ternos-escolha,
  .ternos-prova__answer {
    width: 100%;
    padding: var(--space-5) 0;
    border-left: 0;
    border-top: 1px solid var(--color-line-warm);
  }

  .ternos-momento:first-child,
  .ternos-escolha:first-child,
  .ternos-prova__answer:first-child {
    padding-top: 0;
    border-top: 0;
  }

  .ternos-momento:nth-child(3),
  .ternos-prova__answer:last-child {
    grid-column: auto;
  }

  .ternos-momento p,
  .ternos-decisao h3,
  .ternos-decisao p,
  .ternos-escolha p,
  .ternos-prova__answer h3,
  .ternos-prova__answer p {
    max-width: none;
  }

  .ternos-construcao__body {
    gap: var(--space-6);
  }

  .ternos-construcao__media {
    max-width: none;
  }

  .ternos-construcao__decisions {
    display: flex;
    gap: var(--space-5);
  }

  .ternos-decisao:last-child {
    grid-column: auto;
  }

  .ternos-escolha + .ternos-escolha,
  .ternos-escolha:nth-child(3) {
    border-left: 0;
  }

  .ternos-escolha + .ternos-escolha {
    border-top-color: rgb(177 138 82 / 75%);
  }

  .ternos-etapas {
    gap: 0;
  }

  .ternos-etapas > li,
  .ternos-etapas > li:nth-child(5) {
    grid-column: auto;
    padding-block: var(--space-5);
  }

  .ternos-etapas > li:first-child {
    padding-top: 0;
  }

  .ternos-etapas__number {
    font-size: 3.25rem;
  }

  .ternos-galeria__grid {
    gap: var(--space-7);
  }

  .ternos-galeria__item--three {
    grid-column: auto;
  }

  .ternos-galeria figcaption,
  .ternos-galeria__item--three figcaption {
    max-width: none;
  }

  .ternos-galeria__link {
    margin-top: var(--space-7);
  }

  .ternos-prova__answer {
    border-top-color: var(--color-gold-muted);
  }

  .ternos-form {
    padding: var(--space-4);
  }

  .ternos-form__fields {
    gap: 0;
  }

  .ternos-form .field-group,
  .ternos-form .field-group:nth-last-child(-n + 2) {
    margin-bottom: var(--space-4);
  }

  .ternos-form .button {
    width: 100%;
  }

  .ternos-contato__details {
    max-width: none;
    padding-left: var(--space-4);
  }
}

@media (hover: hover) {
  .ternos-hero__media:hover img,
  .ternos-construcao__media:hover img,
  .ternos-galeria__item .media-frame:hover img {
    filter: contrast(1.03);
    transform: scale(1.025);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ternos-galeria__item--two {
    transform: none;
  }
}
