/* ==========================================================================
   OPEREN — design tokens
   ========================================================================== */
:root {
  --ink: #0C1818;
  --petrol: #0F5B50;
  --teal: #17A789;
  --orange: #FF6A00;
  --gray-light: #E6E6E6;
  --white: #FFFFFF;

  /* text on light backgrounds: petrol, not teal (teal fails 4.5:1 for body text) */
  --text-on-light: var(--ink);
  --text-on-light-muted: #4B5A58;
  --link-on-light: var(--petrol);
  --text-on-dark: var(--white);
  --text-on-dark-muted: var(--gray-light);

  --font: 'Montserrat', Arial, Helvetica, sans-serif;

  --container-w: 1180px;
  --radius: 10px;
  --radius-sm: 6px;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;

  --dur-fast: 150ms;
  --dur: 400ms;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* clip, not hidden: hidden establishes a scroll container on this axis,
     which breaks position:sticky on the header. clip prevents the mobile
     off-canvas nav from causing horizontal scroll without that side effect. */
  overflow-x: clip;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-on-light);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  width: 100%;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.15;
}

/* visible focus ring everywhere, high contrast on both bg tones */
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  background: var(--orange);
  color: var(--ink);
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus {
  top: 8px;
}

.container {
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--space-3);
}
.container--narrow {
  max-width: 720px;
}

/* ==========================================================================
   Brand logo component
   H (--h) = symbol height = PEREN cap-height. All ratios measured from the
   official brand manual reference art and validated against real Montserrat
   metrics (cap-height = 0.70 x font-size).
   ========================================================================== */
.brand-logo {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
  --h: 26px;
}
.brand-logo__row {
  display: flex;
  align-items: baseline;
  gap: calc(var(--h) * 0.10);
}
.brand-logo__symbol {
  width: var(--h);
  height: var(--h);
  flex-shrink: 0;
  display: block;
}
.brand-logo__word {
  font-family: var(--font);
  font-weight: 500;
  font-size: calc(var(--h) / 0.70);
  color: var(--white);
  white-space: nowrap;
}
.brand-logo__tagline {
  margin-top: calc(var(--h) * 0.233);
  font-family: var(--font);
  font-weight: 600;
  font-size: calc(var(--h) * 0.20 / 0.70);
  letter-spacing: 0.177em;
  text-transform: uppercase;
  color: var(--teal);
  white-space: nowrap;
}
.brand-logo--compact .brand-logo__tagline { display: none; }
.brand-logo--light .brand-logo__word { color: var(--ink); }

.brand-logo--hero { --h: 40px; align-items: flex-start; margin-bottom: var(--space-4); }
.brand-logo--footer { --h: 32px; align-items: flex-start; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
  min-height: 44px;
}
.btn:hover { transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) {
  .btn:hover { transform: none; }
}
.btn-block { width: 100%; }
.btn-sm { padding: 10px 18px; font-size: 0.875rem; min-height: 40px; }

/* primary = orange fill; text is INK, not white — white-on-orange fails contrast (~2.9:1) */
.btn-primary {
  background: var(--orange);
  color: var(--ink);
}
.btn-primary:hover { background: #E65F00; }

/* outline, for dark backgrounds */
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid var(--teal);
}
.btn-outline:hover { background: rgba(23, 167, 137, 0.12); }

/* outline, for light backgrounds */
.btn-outline-ink {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-outline-ink:hover { background: rgba(12, 24, 24, 0.06); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 24, 24, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(230, 230, 230, 0.08);
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-block: 14px;
}
.brand-logo--onheader { flex-shrink: 0; }

.main-nav ul {
  display: flex;
  gap: var(--space-4);
}
.main-nav a {
  color: var(--text-on-dark-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color var(--dur-fast) var(--ease);
}
.main-nav a:hover { color: var(--white); }

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.nav-toggle {
  display: none;
  color: var(--white);
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(320px, 84vw);
    height: 100dvh;
    background: var(--ink);
    padding: 96px var(--space-3) var(--space-3);
    transform: translateX(100%);
    transition: transform var(--dur) var(--ease);
    border-left: 1px solid rgba(230, 230, 230, 0.1);
  }
  .main-nav[data-open="true"] { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: var(--space-3); }
  .main-nav a { font-size: 1.1rem; }
  .site-header__bar .btn-sm { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ==========================================================================
   Sections — generic
   ========================================================================== */
.section {
  padding-block: var(--space-6);
}
.section--alt { background: var(--gray-light); }
.section--dark {
  background: var(--ink);
  color: var(--text-on-dark);
}
.section--dark a:not(.btn) { color: var(--teal); }

.section__title {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  max-width: 18ch;
  margin-bottom: var(--space-2);
}
.section__title--onink { color: var(--white); }
.section__lead {
  font-size: 1.05rem;
  color: var(--text-on-light-muted);
  max-width: 62ch;
  margin-bottom: var(--space-5);
}
.section--dark .section__lead { color: var(--text-on-dark-muted); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--text-on-dark);
  padding-block: var(--space-7) var(--space-6);
  overflow: hidden;
}
.hero__accent {
  position: absolute;
  top: -180px;
  right: -160px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  border: 48px solid var(--teal);
  opacity: 0.07;
  pointer-events: none;
}
.hero__inner {
  position: relative;
  max-width: 760px;
}
.hero__title {
  font-size: clamp(2.1rem, 1.5rem + 3vw, 3.4rem);
  margin-bottom: var(--space-3);
}
.hero__title .reveal { display: block; }
.hero__subtitle {
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  color: var(--text-on-dark-muted);
  max-width: 52ch;
  margin-bottom: var(--space-4);
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ==========================================================================
   O problema — risk grid
   ========================================================================== */
.risk-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}
.risk-card {
  background: var(--white);
  border: 1px solid rgba(12, 24, 24, 0.08);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.risk-card__icon { color: var(--teal); margin-bottom: var(--space-2); }
.risk-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.risk-card p { color: var(--text-on-light-muted); font-size: 0.95rem; }

@media (min-width: 640px) {
  .risk-grid { grid-template-columns: repeat(2, 1fr); }
  .risk-card--wide { grid-column: span 2; }
}
@media (min-width: 960px) {
  .risk-grid { grid-template-columns: repeat(4, 1fr); }
  .risk-card--wide { grid-column: span 2; }
}

/* ==========================================================================
   Como funciona — steps
   ========================================================================== */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  counter-reset: step;
}
.steps__item { position: relative; padding-top: var(--space-2); }
.steps__number {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--teal);
  margin-bottom: var(--space-2);
}
.steps__icon { color: var(--ink); margin-bottom: var(--space-2); }
.steps__item h3 { font-size: 1.2rem; margin-bottom: 8px; }
.steps__item p { color: var(--text-on-light-muted); }

@media (min-width: 780px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps__item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 40px;
    left: calc(100% + 16px);
    width: calc(var(--space-4) - 16px);
    border-top: 2px dashed rgba(12, 24, 24, 0.15);
  }
}

/* ==========================================================================
   Planos — pricing cards
   ========================================================================== */
.plans-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
.plan-card {
  background: var(--white);
  border: 1px solid rgba(12, 24, 24, 0.1);
  border-radius: var(--radius);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
}
.plan-card--highlight {
  border-color: var(--teal);
  border-width: 2px;
  box-shadow: 0 12px 32px -12px rgba(23, 167, 137, 0.35);
  position: relative;
}
.plan-card__badge {
  align-self: flex-start;
  background: var(--teal);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: var(--space-2);
}
.plan-card__name { font-size: 1.15rem; margin-bottom: 6px; }
.plan-card__price {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--space-3);
}
.plan-card__price span {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-on-light-muted);
}
.plan-card__features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: var(--space-3);
  flex-grow: 1;
}
.plan-card__features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--text-on-light-muted);
}
.plan-card__features svg { color: var(--teal); flex-shrink: 0; margin-top: 2px; }
.plan-card__note {
  font-size: 0.82rem;
  color: var(--text-on-light-muted);
  margin-bottom: var(--space-2);
}
.plans-note {
  text-align: center;
  color: var(--text-on-light-muted);
  font-size: 0.88rem;
  margin-top: var(--space-4);
}

@media (min-width: 720px) {
  .plans-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1080px) {
  .plans-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ==========================================================================
   Por que OPEREN — pillars
   ========================================================================== */
.pillars-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
.pillar__icon { color: var(--teal); margin-bottom: var(--space-2); }
.pillar h3 { font-size: 1.15rem; margin-bottom: 6px; color: var(--white); }
.pillar p { color: var(--text-on-dark-muted); }

@media (min-width: 640px) {
  .pillars-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .pillars-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ==========================================================================
   Para quem
   ========================================================================== */
.audience-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.audience-list li {
  background: var(--gray-light);
  color: var(--ink);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 10px 18px;
  border-radius: 999px;
}

/* ==========================================================================
   Quem conduz
   ========================================================================== */
.authority { text-align: left; }
.authority__mark { width: 48px; height: 48px; margin-bottom: var(--space-3); }
.authority h2 { margin-bottom: var(--space-3); }
.authority p {
  color: var(--text-on-light-muted);
  font-size: 1.05rem;
  margin-bottom: var(--space-2);
  max-width: 62ch;
}

/* ==========================================================================
   CTA final
   ========================================================================== */
.cta-final {
  position: relative;
  text-align: center;
  overflow: hidden;
}
.cta-final .container { position: relative; }
.cta-final__accent {
  position: absolute;
  bottom: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 640px;
  height: 640px;
  border-radius: 50%;
  border: 56px solid var(--teal);
  opacity: 0.06;
  pointer-events: none;
}
.cta-final .section__title { margin-inline: auto; max-width: 20ch; }
.cta-final__lead {
  color: var(--text-on-dark-muted);
  font-size: 1.05rem;
  margin-bottom: var(--space-4);
  max-width: 46ch;
  margin-inline: auto;
}
.cta-final__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--ink);
  color: var(--text-on-dark-muted);
  padding-block: var(--space-6) var(--space-4);
}
.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  transition: color var(--dur-fast) var(--ease);
}
.footer-links a:hover { color: var(--white); }
.footer-links svg { color: var(--teal); }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  padding-top: var(--space-3);
  border-top: 1px solid rgba(230, 230, 230, 0.1);
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
