/* ===========================
   EDUCON 2026 — styles.css
   =========================== */

/* --------- Design tokens --------- */
:root {
  /* Paleta (bordô + cinzas quentes) */
  --brand-bordeaux: #6D1B3B;   /* principal */
  --brand-crimson:  #A13344;   /* hover/acentos */
  --brand-rose-50:  #FDF7F8;   /* fundo rosé muito claro */
  --brand-rose-100: #F9F1F3;   /* bloco suave */
  --brand-gold:     #C9A227;   /* acento premium discreto */

  --ink-900: #231F20; /* texto principal */
  --ink-700: #3A3335; /* texto secundário */
  --ink-500: #5E5657; /* texto sutil */

  --surface:   #FFFFFF; /* cartão */
  --surface-2: #FCFAF9; /* fundo quente */
  --surface-3: #F2ECE9; /* bordas/quebra */
  --line:      #E7E0E2; /* linhas suaves */

  --shadow: 0 8px 28px rgba(109, 27, 59, .10), 0 2px 8px rgba(35, 31, 32, .06);
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --container: 1200px;
}

/* --------- Resets & base --------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html {
  /* Garante fundo claro em qualquer modo (privado/incógnito, dark mode do SO) */
  background: #ffffff;
  color-scheme: light;
}
body {
  margin: 0;
  color: var(--ink-700);
  /* Fundo explícito para evitar dark auto em abas privadas/incógnito */
  background: #ffffff;
  background-image: linear-gradient(180deg, var(--surface-2), #fff 30%);
  font-family: "Merriweather Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
}
:focus-visible {
  outline: 3px solid rgba(109, 27, 59, .35);
  outline-offset: 3px;
  border-radius: 8px;
}

a {
  color: var(--brand-bordeaux);
  text-decoration: none;
}
a:hover {
  color: var(--brand-crimson);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Ensure buttons keep proper text color and no underline on hover */
.btn:hover, .cta:hover { text-decoration: none; }
.btn-primary:hover, .cta:hover { color: #fff; }
.btn-outline:hover { color: var(--brand-bordeaux); }

/* --------- Layout utils --------- */
.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width:1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width:820px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* --------- Header --------- */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: saturate(130%) blur(8px);
  background: rgba(255, 255, 255, .85);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .7rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--ink-900);
}
.brand img {
  height: 38px;
  width: auto;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(109, 27, 59, .12);
  max-width: 100%;
  object-fit: contain;
}
.brand .word {
  font-family: "merriweather", serif;
  font-weight: 800;
}
nav a {
  color: var(--ink-700);
  margin: 0 .35rem;
  font-weight: 600;
  padding: .45rem .6rem;
  border-radius: 10px;
}
nav a:hover { background: var(--brand-rose-100); text-decoration: none; }

/* Hamburger (mobile) */
.hamburger {
  display: none; /* mostrado só em mobile */
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-900);
  border-radius: 10px;
  padding: .5rem .6rem;
  margin-left: auto;
  cursor: pointer;
}
.hamburger .bar {
  display: block;
  width: 18px; height: 2px;
  background: currentColor;
  position: relative;
}
.hamburger .bar::before,
.hamburger .bar::after {
  content: "";
  position: absolute;
  left: 0; width: 18px; height: 2px;
  background: currentColor;
}
.hamburger .bar::before { top: -6px; }
.hamburger .bar::after  { top: 6px; }

/* Estado fechado/aberto do nav no mobile */
#primary-nav {
  transition: transform .2s ease, opacity .2s ease;
  z-index: 1001; /* acima do header */
}

@media (max-width: 1100px) {
  .hamburger { display: inline-flex; align-items: center; }
  /* empilha header: brand | hamburger */
  .nav { gap: .75rem; }

  /* nav vira painel deslizante */
  #primary-nav {
    position: fixed;
    inset: 60px 0 0 0; /* abaixo do header */
    background: rgba(255,255,255,.98);
    border-top: 1px solid var(--line);
    padding: .75rem 1rem 1.25rem;
    display: grid;
    gap: .35rem;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(6px) saturate(130%);
    /* Garante lista vertical, sem scroll horizontal e com altura da viewport */
    white-space: normal;
    max-width: none;
    height: calc(100dvh - 60px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.menu-open #primary-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  #primary-nav a { margin: 0; padding: .7rem .75rem; display: block; }
  #primary-nav .cta { width: max-content; }

  /* backdrop clicável */
  .menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.25);
    opacity: 0; pointer-events: none;
    transition: opacity .2s ease;
  }
  body.menu-open .menu-backdrop { opacity: 1; pointer-events: auto; }
  body.menu-open { overflow: hidden; }
}

.cta {
  background: var(--brand-bordeaux);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: 12px;
  font-weight: 800;
  box-shadow: var(--shadow);
  border: 0;
  cursor: pointer;
  transition: transform .15s ease, background-color .2s ease, box-shadow .2s ease;
}
.cta:hover { background: var(--brand-crimson); transform: translateY(-1px); }

/* --------- Hero --------- */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--ink-900);
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(109, 27, 59, .10), transparent 60%),
    radial-gradient(800px 400px at 90% -15%, rgba(193, 149, 162, .15), transparent 60%),
    linear-gradient(180deg, var(--surface-2), #ffffff 65%);
}
.hero:after {
  content: "";
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 200%;
  background: radial-gradient(closest-side, rgba(109, 27, 59, .06), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}
.hero-inner {
  padding: 4.2rem 0 3rem;
  display: grid;
  gap: 1.6rem;
  align-items: center;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  color: var(--ink-500);
  letter-spacing: .5px;
  text-transform: uppercase;
  font-size: .8rem;
}
.kicker .pill {
  background: var(--brand-rose-100);
  border: 1px solid var(--line);
  padding: .22rem .6rem;
  border-radius: 999px;
}
h1 {
  font-family: "Merriweather", serif;
  font-weight: 800;
  margin: 0;
  line-height: 1.12;
  letter-spacing: -.2px;
  font-size: clamp(2rem, 4vw + 1rem, 3.4rem);
}
.lead {
  font-size: clamp(1.06rem, 1.1vw + .6rem, 1.22rem);
  color: var(--ink-700);
  max-width: 65ch;
}
.hero-cta {
  display: flex;
  gap: .75rem;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  padding: .9rem 1.1rem;
  font-weight: 800;
  transition: transform .15s ease, background-color .2s ease, box-shadow .2s ease, color .2s ease;
}
.btn-primary {
  background: var(--brand-bordeaux);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--brand-crimson); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--brand-bordeaux);
  border: 1px solid var(--brand-bordeaux);
}
.btn-outline:hover { background: var(--brand-rose-100); }

/* --------- Section base --------- */
section { padding: 3.2rem 0; }
.section-head h2 {
  /* evita cortes de títulos em telas muito estreitas */
  word-wrap: break-word;
}
/* Compensa cabeçalho fixo ao navegar por âncoras (#id) */
section[id] { scroll-margin-top: 84px; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}
.section-head h2 {
  font-family: "Merriweather", serif;
  font-weight: 800;
  font-size: clamp(1.55rem, 1.4vw + 1rem, 2.15rem);
  color: var(--ink-900);
  margin: 0;
  letter-spacing: -.2px;
}
.section-desc { color: var(--ink-500); max-width: 75ch; }

/* --------- Timeline --------- */
.timeline {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width:1024px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width:700px) {
  .steps { grid-template-columns: 1fr; }
}
.step {
  background: linear-gradient(180deg, #fff, var(--brand-rose-50));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1rem;
  position: relative;
  overflow: hidden;
}
.when {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 800;
  color: var(--ink-900);
}
.when .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-bordeaux);
  box-shadow: 0 0 0 3px rgba(109, 27, 59, .15);
}
.what { color: var(--ink-700); margin-top: .4rem; font-size: .95rem; }

/* --------- Pricing (Modalidades & Pacotes) --------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}
@media (max-width:1100px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width:740px) {
  .cards { grid-template-columns: 1fr; }
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 1.15rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .92rem;
  font-weight: 800;
  color: var(--ink-700);
}
.badge .tag {
  background: var(--brand-rose-100);
  padding: .2rem .55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--brand-bordeaux);
}
.price {
  font-family: "Merriweather", serif;
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--ink-900);
  letter-spacing: -.2px;
}
.price small { font-weight: 600; color: var(--ink-500); font-size: .9rem; }
.desc { color: var(--ink-700); min-height: 3.2rem; }
.actions { margin-top: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 700;
  padding: .28rem .55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--brand-rose-50);
  color: var(--brand-bordeaux);
}
.promo {
  background: linear-gradient(180deg, #FAEEF0, #F6DDE2);
  border: 1px solid #E8C9D1;
  color: var(--brand-bordeaux);
}

/* --------- Tabs --------- */
.tabs {
  display: flex;
  gap: .6rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: .4rem;
  border-radius: 12px;
}
.tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: .6rem .9rem;
  border-radius: 10px;
  font-weight: 800;
  color: var(--ink-500);
  cursor: pointer;
}
.tab[aria-selected="true"] {
  background: var(--brand-rose-50);
  color: var(--ink-900);
  box-shadow: inset 0 0 0 1px var(--line);
}

/* --------- Feature list --------- */
.list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem 1rem;
}
@media (max-width:720px) {
  .list { grid-template-columns: 1fr; }
}
.li { display: flex; align-items: flex-start; gap: .65rem; }
.icon {
  width: 22px; height: 22px; flex: 0 0 22px;
  border-radius: 6px; display: grid; place-items: center;
  background: var(--brand-rose-100);
  border: 1px solid var(--line);
  color: var(--brand-bordeaux);
  font-weight: 900;
}

/* --------- Callout --------- */
.callout {
  background: linear-gradient(180deg, #ffffff, var(--brand-rose-50));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

/* --------- Eixos & Diretrizes (Accordion) --------- */
.eixos-list, .guides-list {
  display: grid;
  gap: .8rem;
}
.eixo, .guide {
  background: #fff; /* força claro */
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.eixo summary, .guide summary {
  list-style: none;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .8rem;
  padding: .95rem 1.1rem;
  cursor: pointer;
  font-weight: 800;
  color: var(--ink-900);
}
.eixo summary::-webkit-details-marker, .guide summary::-webkit-details-marker { display: none; }
.eixo .num, .guide .num {
  font-variant-numeric: tabular-nums;
  background: var(--brand-rose-100);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .18rem .5rem;
  color: var(--brand-bordeaux);
  min-width: 2.2rem;
  text-align: center;
}
.eixo .title, .guide .title { letter-spacing: .1px; }
.eixo .chev, .guide .chev {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--brand-rose-100);
  display: grid; place-items: center;
  position: relative;
}
.eixo .chev:before, .guide .chev:before {
  content: "";
  width: 8px; height: 8px;
  border: 2px solid var(--brand-bordeaux);
  border-top: 0; border-left: 0;
  transform: rotate(45deg);
  transition: transform .2s ease;
}
.eixo[open] .chev:before, .guide[open] .chev:before { transform: rotate(-135deg); }
.eixo[open] summary, .guide[open] summary { background: linear-gradient(180deg, #fff, var(--brand-rose-50)); }
.eixo .ementa, .guide .ementa {
  padding: .2rem 1.1rem 1.1rem;
  color: var(--ink-700);
}
.eixo .ementa p, .guide .ementa p { margin: 0; }
.eixo summary:hover, .guide summary:hover { background: var(--brand-rose-50); }

/* --------- Footer & Sticky CTA --------- */
footer { padding: 2rem 0 4.5rem; color: var(--ink-500); }

.sticky-cta {
  position: fixed;
  right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 999;
  display: flex; gap: .5rem; align-items: center;
  background: linear-gradient(180deg, var(--brand-bordeaux), #8E2B40);
  color: #fff; padding: .7rem .95rem; border-radius: 999px;
  box-shadow: var(--shadow); font-weight: 900;
  transition: transform .15s ease, background-color .2s ease, box-shadow .2s ease;
}
.sticky-cta:hover { transform: translateY(-1px); }
.sticky-cta:hover { color: #fff; text-decoration: none; }
.sticky-cta .blink {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--brand-gold);
  box-shadow: 0 0 0 6px rgba(201, 122, 17, .18);
  animation: pulse 1.8s infinite ease-in-out;
}
@keyframes pulse {
  0% { transform: scale(.9);  opacity: .85; }
  50%{ transform: scale(1.12); opacity: 1; }
  100%{ transform: scale(.9);  opacity: .85; }
}

/* --------- Small helpers --------- */
.subtle { color: #8f7f82; }
.muted  { color: var(--ink-500); }
.sep    { height: 1px; background: var(--line); margin: .6rem 0 0; }
.note   { font-size: .92rem; color: var(--ink-500); }

/* --------- Força tema claro mesmo se o SO estiver em dark --------- */
@media (prefers-color-scheme: dark) {
  :root { color-scheme: light; }
  body { background: #ffffff; background-image: linear-gradient(180deg, var(--surface-2), #fff 30%); }
  header { background: rgba(255, 255, 255, .85); border-bottom-color: var(--line); }
  .hero { color: var(--ink-900); }
  .card, .timeline, .callout { background: #ffffff; }
  .btn-outline { color: var(--brand-bordeaux); border-color: var(--brand-bordeaux); }
  /* Força claro também nos acordeões em modo escuro do SO/aba privada */
  .eixo, .guide { background: #ffffff; }
  .eixo summary:hover, .guide summary:hover { background: var(--brand-rose-50); }
  .eixo[open] summary, .guide[open] summary { background: linear-gradient(180deg, #fff, var(--brand-rose-50)); }
}

/* --------- Acessibilidade (movimento reduzido) --------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cta, .btn, .sticky-cta { transition: none; animation: none; }
}

/* --------- Mobile tweaks --------- */
@media (max-width: 720px) {
  /* Header e navegação */
  .nav { padding: .5rem 0; }
  .brand img { height: 32px; }
  header nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    max-width: 100%;
    padding-bottom: .25rem;
  }
  header nav a { display: inline-block; }

  /* Quando o painel móvel estiver ativo, anulamos o scroller horizontal */
  #primary-nav {
    overflow-x: visible;
    white-space: normal;
    max-width: none;
  }

  /* Espaçamentos */
  .hero-inner { padding: 3rem 0 2.2rem; }
  section { padding: 2.2rem 0; }
  .cards { gap: .9rem; }
  .card { padding: 1rem; }
  .eixo summary, .guide summary { padding: .8rem .9rem; }

  /* Tabs roláveis no mobile */
  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: .4rem;
  }
  .tab { min-width: max-content; }

  /* 30% menor para títulos no mobile */
  h1 { font-size: clamp(1.4rem, 2.8vw + 0.7rem, 2.38rem); }
  .section-head h2 { font-size: clamp(1.085rem, 0.98vw + 0.7rem, 1.505rem); }
}

/* --------- Extra small phones (<=360px) --------- */
@media (max-width: 360px) {
  .lead { font-size: 1rem; }
  header .cta { padding: .5rem .8rem; }
  .sticky-cta { right: .7rem; bottom: calc(.7rem + env(safe-area-inset-bottom)); }
}
