/* ==========================================================================
   Suindá — espaço educacional do Coletivo Pindorama
   Estilos das páginas públicas e autenticadas (landing, login, painel).
   Identidade: pergaminho + teal + dourado, com a coruja Suindá.
   ========================================================================== */

:root {
  --bg: #f6f1e8;
  --bg-deep: #eee6d6;
  --surface: #ffffff;
  --primary: #1f4d5c;
  --primary-dark: #163944;
  --primary-soft: #e4eef0;
  --accent: #d9a441;
  --accent-dark: #b9852a;
  --leaf: #4f7a52;
  --text: #20302f;
  --text-soft: #5d6b6a;
  --border: #e3ddd0;
  --danger: #b23b3b;
  --danger-soft: #f6e3e0;
  --ok: #2f7d54;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(22, 57, 68, 0.10);
  --shadow-sm: 0 4px 14px rgba(22, 57, 68, 0.08);
  --maxw: 1120px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 80% -10%, #fff8ec 0, rgba(255, 248, 236, 0) 60%),
    var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); }

.container {
  width: min(100% - 2.4rem, var(--maxw));
  margin-inline: auto;
}

.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;
}

/* ----- Skip link / acessibilidade ----- */
.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 100;
  background: var(--primary); color: #fff; padding: 10px 16px;
  border-radius: 8px; transition: top .2s;
}
.skip-link:focus { top: 8px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ----- Cabeçalho ----- */
.suinda-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(246, 241, 232, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.suinda-header__inner {
  display: flex; align-items: center; gap: 1rem;
  justify-content: space-between; padding: 0.7rem 0;
}
.suinda-brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  text-decoration: none; color: var(--text);
}
.suinda-brand__mark {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center; font-size: 1.4rem;
  background: var(--primary); color: #fff; border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.suinda-brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.suinda-brand__name { font-weight: 700; font-size: 1.15rem; }
.suinda-brand__tag { font-size: 0.78rem; color: var(--text-soft); }

.suinda-nav { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.suinda-nav a {
  text-decoration: none; color: var(--text-soft);
  padding: 0.45rem 0.7rem; border-radius: 999px; font-weight: 600; font-size: 0.92rem;
}
.suinda-nav a:hover { color: var(--primary); background: var(--primary-soft); }
.suinda-nav .back-link { color: var(--primary); }
.suinda-nav .back-link::before { content: "← "; }

/* ----- Botões ----- */
.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--primary);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.3rem; border-radius: 999px; border: 1.5px solid var(--border);
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
  min-height: 44px;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn--primary { --btn-bg: var(--primary); --btn-fg: #fff; border-color: var(--primary); }
.btn--primary:hover { background: var(--primary-dark); }
.btn--accent { --btn-bg: var(--accent); --btn-fg: #3a2c08; border-color: var(--accent); }
.btn--accent:hover { background: var(--accent-dark); }
.btn--ghost { --btn-bg: transparent; }
.btn--block { width: 100%; }
.btn--lg { padding: 0.95rem 1.8rem; font-size: 1.08rem; }

/* ----- Hero ----- */
.hero {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
}
.hero__grid {
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 2rem; align-items: center;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--primary-soft); color: var(--primary);
  padding: .35rem .8rem; border-radius: 999px; font-weight: 700; font-size: .82rem;
  text-transform: uppercase; letter-spacing: .04em;
}
.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.1rem); line-height: 1.08; margin: 1rem 0 .8rem;
  color: var(--primary-dark);
}
.hero p.lead { font-size: 1.15rem; color: var(--text-soft); max-width: 46ch; }
.hero__cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.6rem; }
.hero__art {
  background:
    radial-gradient(circle at 50% 35%, #fff 0, rgba(255,255,255,0) 70%),
    linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 28px; aspect-ratio: 1 / 1; display: grid; place-items: center;
  box-shadow: var(--shadow); color: #fff; text-align: center; padding: 2rem;
}
.hero__owl { font-size: clamp(4rem, 12vw, 7rem); filter: drop-shadow(0 8px 16px rgba(0,0,0,.25)); }
.hero__art p { color: #d8e6e9; margin-top: .5rem; }

/* ----- Seções ----- */
.section { padding: clamp(2.2rem, 5vw, 3.5rem) 0; }
.section--alt { background: var(--bg-deep); }
.section__head { max-width: 60ch; margin-bottom: 1.8rem; }
.section__eyebrow { color: var(--accent-dark); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .8rem; }
.section h2 { font-size: clamp(1.6rem, 3.2vw, 2.1rem); color: var(--primary-dark); margin: .3rem 0 .4rem; }
.section__head p { color: var(--text-soft); margin: 0; }

/* ----- Grids de cards ----- */
.cards {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.4rem; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: .6rem; height: 100%;
}
.card__icon { font-size: 1.8rem; }
.card h3 { margin: 0; font-size: 1.2rem; color: var(--primary-dark); }
.card p { margin: 0; color: var(--text-soft); flex: 1; }
.card__foot { margin-top: .4rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .76rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
  padding: .28rem .6rem; border-radius: 999px;
}
.badge--soon { background: #f2e7cf; color: #8a6a1c; }
.badge--open { background: #dcefe2; color: var(--ok); }
.badge--level { background: var(--primary-soft); color: var(--primary); }

/* ----- Passos (como funciona) ----- */
.steps { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; }
.step__num {
  width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #3a2c08;
  display: grid; place-items: center; font-weight: 800; margin-bottom: .6rem;
}
.step h3 { margin: 0 0 .3rem; color: var(--primary-dark); font-size: 1.05rem; }
.step p { margin: 0; color: var(--text-soft); font-size: .96rem; }

/* ----- CTA final ----- */
.cta-band {
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff; border-radius: 24px; padding: clamp(2rem, 5vw, 3rem); text-align: center;
  box-shadow: var(--shadow);
}
.cta-band h2 { color: #fff; margin: 0 0 .6rem; font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.cta-band p { color: #d8e6e9; margin: 0 auto 1.5rem; max-width: 50ch; }

/* ----- Rodapé ----- */
.suinda-footer { background: var(--primary-dark); color: #cfe0e3; margin-top: 2rem; }
.suinda-footer__inner { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; padding: 1.6rem 0; }
.suinda-footer a { color: #fff; text-decoration: none; }
.suinda-footer a:hover { text-decoration: underline; }
.suinda-footer nav { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ----- Login ----- */
.auth-wrap { min-height: calc(100vh - 70px); display: grid; place-items: center; padding: 2rem 0; }
.auth-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  box-shadow: var(--shadow); padding: clamp(1.6rem, 4vw, 2.4rem); width: min(100% - 2rem, 420px);
}
.auth-card__head { text-align: center; margin-bottom: 1.4rem; }
.auth-card__owl { font-size: 2.6rem; }
.auth-card h1 { margin: .3rem 0 .2rem; color: var(--primary-dark); }
.auth-card__head p { margin: 0; color: var(--text-soft); }

.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 700; margin-bottom: .35rem; font-size: .95rem; }
.field input {
  width: 100%; padding: .8rem .9rem; border: 1.5px solid var(--border); border-radius: 12px;
  font-size: 1rem; font-family: inherit; background: #fff; color: var(--text); min-height: 46px;
}
.field input:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

.form-msg { margin: .4rem 0 0; font-size: .95rem; min-height: 1.2em; }
.form-msg--error { color: var(--danger); }
.form-msg--ok { color: var(--ok); }

.alert {
  border-radius: 12px; padding: .8rem 1rem; margin-bottom: 1rem; font-size: .95rem;
  border: 1px solid transparent;
}
.alert--error { background: var(--danger-soft); border-color: #e7c3bd; color: #8a2f2f; }
.alert--info { background: var(--primary-soft); border-color: #cfe0e3; color: var(--primary-dark); }
.alert--soon { background: #f6ecd4; border-color: #e7d6a8; color: #7a5d16; }

.auth-meta { margin-top: 1.1rem; text-align: center; font-size: .88rem; color: var(--text-soft); }
.auth-demo {
  margin-top: 1rem; padding: .7rem .9rem; background: var(--bg-deep);
  border-radius: 12px; font-size: .85rem; color: var(--text-soft); text-align: center;
}
.link-button { background: none; border: none; color: var(--primary); font: inherit; cursor: pointer; text-decoration: underline; padding: 0; }

/* ----- Painel (estudar) ----- */
.dash { padding: 2rem 0 3rem; }
.dash__greeting { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-end; margin-bottom: 1.4rem; }
.dash__greeting h1 { margin: 0; color: var(--primary-dark); font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
.dash__greeting p { margin: .2rem 0 0; color: var(--text-soft); }

.stat-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 1.8rem; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm);
}
.stat strong { display: block; font-size: 1.9rem; color: var(--primary); line-height: 1; }
.stat span { color: var(--text-soft); font-size: .9rem; }

.course { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm); margin-bottom: 1.1rem; }
.course__head { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: space-between; align-items: center; }
.course__head h3 { margin: 0; color: var(--primary-dark); }
.course__desc { color: var(--text-soft); margin: .4rem 0 1rem; }

.progress { background: var(--bg-deep); border-radius: 999px; height: 12px; overflow: hidden; margin: .3rem 0 .5rem; }
.progress__bar { height: 100%; background: linear-gradient(90deg, var(--leaf), var(--primary)); border-radius: 999px; }
.progress__label { font-size: .85rem; color: var(--text-soft); }

.deck-row { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: space-between; align-items: center; padding: .7rem 0; border-top: 1px dashed var(--border); }
.deck-row__meta { font-size: .85rem; color: var(--text-soft); }
.deck-row__meta b { color: var(--primary); }
.chip { display: inline-block; font-size: .78rem; padding: .15rem .5rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary); margin-right: .3rem; }
.chip--new { background: #dcefe2; color: var(--ok); }
.chip--due { background: #f6ecd4; color: var(--accent-dark); }

.empty-state { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 2.2rem; text-align: center; color: var(--text-soft); }
.empty-state__owl { font-size: 2.6rem; }
.empty-state h2 { color: var(--primary-dark); margin: .4rem 0; }

.dash__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }

.loading { text-align: center; color: var(--text-soft); padding: 3rem 0; }

/* ----- Responsivo ----- */
@media (max-width: 820px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { order: -1; aspect-ratio: 16 / 9; }
  .suinda-nav .hide-sm { display: none; }
}

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