/* ==========================================================
   Educa Santos — site público
   Cores tiradas da logo: azul-marinho + dourado
   ========================================================== */
:root {
  --navy:       #013370;
  --navy-deep:  #011233;
  --navy-soft:  #e8eef8;
  --gold:       #fdd036;
  --gold-deep:  #e0a410;
  --paper:      #f4f6fa;
  --ink:        #0d1b33;
  --muted:      #56627a;
  --line:       #dbe2ee;
  --wa:         #138a47;
  --wa-hover:   #0f743b;
  --white:      #ffffff;

  --f-display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --f-body:    "Source Sans 3", "Segoe UI", Roboto, Arial, sans-serif;

  --wrap: 1180px;
  --r-sm: 6px;
  --r-md: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--f-display);
  font-stretch: 112%;
  line-height: 1.1;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 2px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 700 .98rem/1 var(--f-body);
  padding: .9rem 1.4rem;
  border-radius: var(--r-sm);
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn svg { width: 1.15em; height: 1.15em; }
.btn-sm { padding: .6rem 1rem; font-size: .92rem; }
.btn-block { width: 100%; }
.btn-gold { background: var(--gold); color: var(--navy-deep); }
.btn-gold:hover { background: var(--gold-deep); }
.btn-wa { background: var(--wa); color: var(--white); }
.btn-wa:hover { background: var(--wa-hover); }
.btn-ghost { border-color: rgba(255,255,255,.45); color: var(--white); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-line { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-line:hover { background: var(--navy); color: var(--white); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand img { width: 48px; height: 48px; border-radius: 50%; }
.brand span { font: 800 1.25rem/1 var(--f-display); font-stretch: 115%; color: var(--navy); }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a:not(.btn) { text-decoration: none; font-weight: 600; color: var(--muted); }
.nav a:not(.btn):hover { color: var(--navy); }
.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: transform .2s, opacity .2s; }

/* ---------- Hero ---------- */
.hero {
  background: var(--navy-deep);
  color: var(--white);
  padding: clamp(3rem, 7vw, 5.5rem) 0 0;
  border-bottom: 6px solid var(--gold);
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 3rem; align-items: end; }
.hero-grid > * { min-width: 0; }
.hero-copy { padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 850;
  max-width: 18ch;
  color: var(--white);
}
.hero .lead { font-size: 1.18rem; color: #c7d3e8; max-width: 52ch; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Estante de categorias — o elemento de destaque do site */
.shelf { align-self: stretch; display: flex; flex-direction: column; justify-content: flex-end; }
.shelf-books {
  display: flex; align-items: flex-end; justify-content: center; gap: 6px;
  height: 300px; padding: 0 .5rem;
}
.spine {
  --c: var(--navy);
  flex: 0 1 58px;
  height: var(--h, 90%);
  background: var(--c);
  border-radius: 4px 4px 0 0;
  box-shadow: inset -6px 0 0 rgba(0,0,0,.18), inset 4px 0 0 rgba(255,255,255,.12);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0 0 1.1rem;
  text-decoration: none;
  position: relative;
  transition: transform .2s ease;
}
.spine::before, .spine::after {
  content: ""; position: absolute; left: 8px; right: 8px; height: 3px; background: var(--gold); opacity: .85;
}
.spine::before { top: 14px; }
.spine::after  { top: 22px; }
.spine span {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font: 800 1rem/1 var(--f-display); font-stretch: 118%;
  color: var(--white); letter-spacing: .02em; white-space: nowrap;
}
a.spine:hover, a.spine:focus-visible { transform: translateY(-12px); }
.spine-deco { flex-basis: 40px; opacity: .9; }
.shelf-logo {
  width: 170px; height: 170px; flex-shrink: 0;
  border-radius: 50%; align-self: flex-end;
  margin-left: .6rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.shelf-board { height: 16px; background: var(--gold); border-radius: 3px 3px 0 0; box-shadow: 0 -2px 0 var(--gold-deep) inset; }
.shelf-note { text-align: right; font-size: .9rem; color: #9fb0cf; margin: .6rem 0 .9rem; }

/* ---------- Informações ---------- */
.infos { background: var(--paper); padding: 3rem 0; border-bottom: 1px solid var(--line); }
.infos-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.info svg { width: 28px; height: 28px; fill: none; stroke: var(--navy); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: .8rem; }
.info h3 { font-size: 1.08rem; margin-bottom: .35em; color: var(--navy); }
.info p { font-size: .96rem; color: var(--muted); margin: 0; }

/* ---------- Cabeçalho de seção ---------- */
.section-head { max-width: 640px; margin-bottom: 2.2rem; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); font-weight: 800; color: var(--navy); }
.section-head p { color: var(--muted); margin: 0; }

/* ---------- Catálogo ---------- */
.catalog { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.toolbar { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.search {
  display: flex; align-items: center; gap: .6rem;
  max-width: 460px; padding: 0 1rem;
  border: 2px solid var(--line); border-radius: var(--r-sm); background: var(--white);
}
.search:focus-within { border-color: var(--navy); }
.search svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; flex-shrink: 0; }
.search input { border: 0; outline: 0; font: inherit; padding: .85rem 0; width: 100%; background: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  font: 600 .92rem/1 var(--f-body);
  padding: .6rem 1rem; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--white); color: var(--ink);
  cursor: pointer;
}
.chip:hover { border-color: var(--navy); }
.chip.is-active { background: var(--navy); border-color: var(--navy); color: var(--white); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 1.6rem; }
.card {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.card[hidden] { display: none; }
.card-cover { aspect-ratio: 3 / 4; background: var(--paper); border-bottom: 1px solid var(--line); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-fallback {
  --c: var(--navy);
  height: 100%; padding: 1.4rem;
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--c); color: var(--white);
  border-left: 10px solid rgba(0,0,0,.2);
}
.cover-fallback small { font-weight: 700; color: var(--gold); }
.cover-fallback strong { font: 800 1.45rem/1.15 var(--f-display); font-stretch: 112%; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 1.2rem; }
.tag {
  --c: var(--navy);
  align-self: flex-start;
  font-size: .8rem; font-weight: 700;
  color: var(--c); background: color-mix(in srgb, var(--c) 10%, white);
  padding: .25rem .6rem; border-radius: 4px; margin-bottom: .7rem;
}
.card h3 { font-size: 1.12rem; margin-bottom: .45em; }
.desc { font-size: .94rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.price { font: 800 1.5rem/1 var(--f-display); color: var(--navy); margin: auto 0 1rem; padding-top: .4rem; }
.card-actions { display: grid; gap: .5rem; }

.empty { text-align: center; padding: 3rem 1rem; border: 2px dashed var(--line); border-radius: var(--r-md); }
.empty h3 { color: var(--navy); }
.empty p { color: var(--muted); max-width: 46ch; margin: 0 auto 1.4rem; }

/* ---------- Como funciona ---------- */
.steps { background: var(--paper); padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; counter-reset: s; }
.steps-list li { background: var(--white); border-top: 4px solid var(--gold); padding: 1.6rem; border-radius: 0 0 var(--r-md) var(--r-md); }
.step-n {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy); color: var(--white);
  font: 800 1.1rem/1 var(--f-display); margin-bottom: 1rem;
}
.steps-list h3 { font-size: 1.2rem; color: var(--navy); }
.steps-list p { color: var(--muted); margin: 0; }

/* ---------- Quem sou ---------- */
.about { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.about-grid { display: grid; grid-template-columns: 380px 1fr; gap: 4rem; align-items: center; }
.about-photo { margin: 0; position: relative; }
.about-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-md); position: relative; z-index: 1; }
.about-photo::after {
  content: ""; position: absolute; inset: 18px -18px -18px 18px;
  border: 3px solid var(--gold); border-radius: var(--r-md);
}
.about-text h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); color: var(--navy); }
.about-name { font-weight: 700; color: var(--navy); font-size: 1.15rem; }
.about-text p { max-width: 62ch; color: #33405a; }

/* ---------- FAQ ---------- */
.faq { padding: clamp(3.5rem, 7vw, 5.5rem) 0; border-top: 1px solid var(--line); }
.faq-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 3rem; align-items: start; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list details:first-child { border-top: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.15rem 0; font-weight: 700; font-size: 1.05rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; flex-shrink: 0; width: 12px; height: 12px;
  border-right: 2.5px solid var(--navy); border-bottom: 2.5px solid var(--navy);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s;
}
.faq-list details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq-list details p { color: var(--muted); padding-bottom: 1.2rem; margin: 0; max-width: 62ch; }

/* ---------- CTA ---------- */
.cta { background: var(--navy); color: var(--white); padding: clamp(3rem, 6vw, 4.5rem) 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.cta h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); color: var(--gold); }
.cta p { color: #c7d3e8; max-width: 52ch; margin: 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .8rem; flex-shrink: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #b8c5dd; padding: 3rem 0 1.5rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-brand { display: flex; gap: 1rem; max-width: 480px; }
.footer-brand img { border-radius: 50%; flex-shrink: 0; }
.footer-brand strong { color: var(--white); font: 800 1.15rem/1.2 var(--f-display); font-stretch: 112%; }
.footer-brand p { font-size: .95rem; margin: .4rem 0 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.4rem; align-items: center; }
.footer-nav a { text-decoration: none; font-weight: 600; }
.footer-nav a:hover { color: var(--gold); }
.footer-bottom { padding-top: 1.3rem; font-size: .88rem; color: #7f8fae; }

/* ---------- WhatsApp flutuante ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--wa); color: var(--white);
  box-shadow: 0 6px 18px rgba(1,18,51,.3);
}
.wa-float svg { width: 28px; height: 28px; }
.wa-float:hover { background: var(--wa-hover); }

/* ==========================================================
   Responsivo
   ========================================================== */
@media (max-width: 1000px) {
  .infos-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 300px 1fr; gap: 3rem; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: .5rem 1.25rem 1.25rem;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: .85rem 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 1rem; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hero-copy { padding-bottom: 2.5rem; }
  .shelf-books { height: 210px; justify-content: flex-start; overflow-x: auto; overflow-y: hidden; padding-top: 14px; }
  .spine { flex: 0 0 50px; }
  .spine-deco { flex-basis: 34px; }
  .shelf-logo { width: 130px; height: 130px; }
  .spine span { font-size: .9rem; }

  .steps-list { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; gap: 1rem; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 700px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-photo { max-width: 320px; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .infos-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: .8rem; }
  .card-body { padding: .85rem; }
  .card h3 { font-size: 1rem; }
  .desc { display: none; }
  .price { font-size: 1.25rem; }
  .card-actions .btn { font-size: .85rem; padding: .7rem .5rem; }
  .cover-fallback { padding: .9rem; }
  .cover-fallback strong { font-size: 1.05rem; }
  .hero-actions .btn { flex: 1; white-space: nowrap; padding-inline: .8rem; }
  .spine-deco:nth-of-type(n+3) { display: none; }
  .shelf-logo { width: 104px; height: 104px; }
  .brand span { font-size: 1.1rem; }
}

@media (max-width: 360px) {
  .grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
