/* Tokens alinhados ao site oficial CERES Machine */
:root {
  --color-bg: #f6f7f9;
  --color-surface: #ffffff;
  --color-text: #082341;
  --color-text-muted: #66717f;
  --color-border: #d4d9df;
  --color-accent: #0b3764;
  --color-accent-2: #7d858c;
  --color-steel-dark: #1f2933;
  --color-metal: #c7ccd1;
  --color-shadow: rgba(8, 35, 65, 0.16);
  --page-padding: clamp(0.75rem, 2vw, 1.75rem);
  --radius-panel: 28px;
  --radius-card: 22px;
  --radius-img: 18px;
  --font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  line-height: 1.5;
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
}

.page {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: var(--page-padding);
  overflow-x: clip;
}

.site-header {
  width: calc(100% + var(--page-padding) * 2);
  max-width: none;
  margin-inline: calc(var(--page-padding) * -1);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 0.35rem clamp(0.9rem, 2.5vw, 1.5rem);
  border-bottom: 1px solid rgba(8, 35, 65, 0.14);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px #ffffff;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  width: auto;
  max-width: min(280px, 42vw);
}

.brand-logo {
  width: clamp(40px, 9vw, 52px);
  height: clamp(40px, 9vw, 52px);
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(8, 35, 65, 0.14);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text strong {
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text);
}

.brand-text span {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 0.75rem;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav a:hover {
  border-color: rgba(11, 55, 100, 0.2);
  background: rgba(11, 55, 100, 0.06);
  color: var(--color-accent);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 1rem;
  border: 1px solid var(--color-accent);
  border-radius: 6px;
  background: var(--color-accent);
  color: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 14px 28px rgba(8, 35, 65, 0.16);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  background: #164c7e;
  box-shadow: 0 18px 34px rgba(8, 35, 65, 0.22);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-accent);
  box-shadow: none;
}

.btn-secondary:hover {
  background: rgba(11, 55, 100, 0.08);
  color: var(--color-accent);
  transform: translateY(-1px);
}

main {
  flex: 1;
  width: min(100%, 1440px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(1.5rem, 2.5vw, 2.25rem) clamp(0.25rem, 2vw, 1rem) clamp(3rem, 6vw, 5rem);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 5rem);
  border-radius: var(--radius-panel);
  background: #fff;
  box-shadow: 0 18px 48px rgba(8, 35, 65, 0.08);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(11, 55, 100, 0.24);
  border-left: 4px solid var(--color-accent);
  background: rgba(255, 255, 255, 0.72);
  color: var(--color-accent);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(2.65rem, 7vw, 5.4rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--color-text);
}

.gradient-text {
  background: linear-gradient(
    120deg,
    var(--color-accent),
    #164c7e 48%,
    var(--color-steel-dark)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0;
  max-width: 62ch;
  color: var(--color-text-muted);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.65;
}

.hero p strong {
  color: var(--color-text);
  font-weight: 700;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.hero-media {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--color-steel-dark);
  box-shadow: 0 18px 42px rgba(8, 35, 65, 0.12);
}

.hero-media.hero-media--slideshow::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(to top, rgba(8, 35, 65, 0.72) 0%, transparent 45%),
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.08), transparent 55%);
  pointer-events: none;
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.85s ease;
  z-index: 0;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-slideshow-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  padding: 1rem;
}

.hero-slideshow-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-slideshow-dot:hover {
  background: rgba(255, 255, 255, 0.65);
  transform: scale(1.15);
}

.hero-slideshow-dot.is-active {
  background: #fff;
  transform: scale(1.2);
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    transition: none;
  }

  .hero-slide:not(.is-active) {
    opacity: 0;
    visibility: hidden;
  }

  .hero-slide.is-active {
    opacity: 1;
    visibility: visible;
  }
}

.technical-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(8, 35, 65, 0.18);
  border-radius: 6px;
  background: rgba(8, 35, 100, 0.18);
  color: var(--color-text-muted);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.technical-bar span {
  padding: 0.55rem 0.75rem;
  background: rgba(246, 247, 249, 0.9);
  text-align: center;
}

.section {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2.4rem);
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: var(--radius-panel);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 40px rgba(8, 35, 65, 0.055);
}

.section-muted {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(231, 236, 241, 0.92)), #edf1f4;
  box-shadow: 0 18px 44px rgba(8, 35, 65, 0.06);
}

.section-header .eyebrow-inline {
  color: var(--color-accent);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}

.section-header h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--color-text);
}

.section-header p {
  margin: 0;
  max-width: 900px;
  color: var(--color-text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.section-header p a {
  color: var(--color-accent);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(11, 55, 100, 0.35);
}

.section-header p a:hover {
  text-decoration-color: var(--color-accent);
}

.segment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.segment-card {
  display: grid;
  gap: 1.05rem;
  overflow: hidden;
  padding: 0.9rem;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 34px rgba(8, 35, 65, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 0;
}

.segment-card:hover {
  box-shadow: 0 18px 42px rgba(8, 35, 65, 0.12);
  transform: translateY(-2px);
}

.segment-card .num {
  color: var(--color-accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.segment-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-img);
  object-fit: cover;
  background: linear-gradient(135deg, #dee5ec, #e8edf2);
}

.segment-card h3 {
  margin: 0 0 0.55rem;
  color: var(--color-text);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.segment-card p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

.segment-card .card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.25rem;
  min-height: 38px;
  padding: 0 0.95rem;
  border: 1px solid var(--color-accent);
  border-radius: 6px;
  background: transparent;
  color: var(--color-accent);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.segment-card .card-cta:hover {
  background: var(--color-accent);
  color: #fff;
  transform: translateY(-1px);
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.info-card {
  display: grid;
  gap: 0.85rem;
  padding: clamp(1.25rem, 2vw, 1.6rem);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 34px rgba(8, 35, 65, 0.06);
}

.benefit-icon {
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(11, 55, 100, 0.12), rgba(11, 55, 100, 0.04)), #fff;
  color: var(--color-accent);
}

.benefit-icon svg {
  width: 28px;
  height: 28px;
}

.info-card h3 {
  margin: 0 0 0.4rem;
  color: var(--color-text);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.info-card p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.55;
}

.section-blue {
  border-radius: var(--radius-panel);
  padding: clamp(2rem, 5vw, 4rem);
  background: radial-gradient(circle at 88% 10%, rgba(255, 255, 255, 0.18), transparent 24rem),
    linear-gradient(135deg, var(--color-accent) 0%, #0f4778 52%, var(--color-steel-dark) 100%);
  box-shadow: 0 22px 56px rgba(8, 35, 65, 0.16);
  color: #fff;
}

.section-blue .section-header h2,
.section-blue .section-header p,
.section-blue .eyebrow-inline {
  color: #fff;
}

.section-blue .eyebrow-inline {
  opacity: 0.78;
}

.section-blue .btn {
  border-color: #fff;
  background: #fff;
  color: var(--color-accent);
}

.section-blue .btn:hover {
  background: #eef3f7;
}

.site-footer {
  width: calc(100% + var(--page-padding) * 2);
  max-width: none;
  margin-inline: calc(var(--page-padding) * -1);
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(2rem, 4vw, 3rem) clamp(1rem, 3vw, 2.5rem);
  border-top: 1px solid rgba(8, 35, 65, 0.1);
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.site-footer h2 {
  margin: 0 0 0.8rem;
  color: var(--color-text);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-footer ul {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--color-accent);
}

.footer-brand p {
  margin: 0.5rem 0 0;
  line-height: 1.6;
  max-width: 36ch;
}

.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(8, 35, 65, 0.14);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.modal-open {
  overflow: hidden;
}

.segment-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: clamp(0.75rem, 3vw, 1.5rem);
}

.segment-modal[hidden] {
  display: none;
}

.segment-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 35, 65, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.segment-modal__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2vw, 1.35rem);
  width: min(100%, 680px);
  max-height: min(90dvh, 820px);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border-radius: var(--radius-panel);
  background: #fff;
  box-shadow: 0 28px 64px rgba(8, 35, 65, 0.22);
  overflow: hidden;
}

.segment-modal__close {
  position: absolute;
  top: clamp(0.75rem, 2vw, 1rem);
  right: clamp(0.75rem, 2vw, 1rem);
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(8, 35, 65, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.segment-modal__close svg {
  width: 18px;
  height: 18px;
}

.segment-modal__close:hover {
  border-color: rgba(11, 55, 100, 0.28);
  background: #fff;
  color: var(--color-accent);
}

.segment-modal__header {
  flex-shrink: 0;
  padding-right: 2.5rem;
}

.segment-modal__header .num {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--color-accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.segment-modal__header h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--color-text);
}

.segment-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  gap: 1.15rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.35rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(11, 55, 100, 0.35) rgba(8, 35, 65, 0.06);
}

.segment-modal__body::-webkit-scrollbar {
  width: 6px;
}

.segment-modal__body::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(8, 35, 65, 0.06);
}

.segment-modal__body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(11, 55, 100, 0.35);
}

.segment-modal__body::-webkit-scrollbar-thumb:hover {
  background: rgba(11, 55, 100, 0.55);
}

.segment-modal__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-img);
  object-fit: cover;
  background: linear-gradient(135deg, #dee5ec, #e8edf2);
}

.segment-modal__benefits {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.segment-modal__benefits li {
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: rgba(246, 247, 249, 0.95);
  border: 1px solid rgba(8, 35, 65, 0.08);
}

.segment-modal__benefits strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--color-text);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.segment-modal__benefits p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.segment-modal__footer {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(8, 35, 65, 0.1);
}

.segment-modal__footer .btn {
  flex: 1 1 180px;
}

@media (max-width: 560px) {
  .segment-modal__footer .btn {
    flex: 1 1 100%;
  }
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .nav {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }

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

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

@media (max-width: 560px) {
  :root {
    --page-padding: 0.6rem;
  }

  .site-header {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .brand {
    justify-self: center;
  }

  .nav {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .header-actions {
    width: 100%;
    justify-content: center;
  }

  .header-actions .btn {
    flex: 1;
    justify-content: center;
  }

  .actions {
    width: 100%;
  }

  .actions .btn {
    width: 100%;
    justify-content: center;
  }

  .technical-bar {
    grid-template-columns: 1fr;
  }

  .technical-bar span {
    text-align: left;
  }

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

  .footer-bottom {
    justify-content: flex-start;
  }
}
