/* ========================================
   Estudaí — Landing Page
   Editorial + Human Touch
   ======================================== */

:root {
  --purple: #5600c2;
  --purple-dark: #3d008a;
  --purple-light: #7b2fff;
  --purple-ghost: rgba(86, 0, 194, 0.06);
  --bg: #faf8f5;
  --surface: #ffffff;
  --text: #1a1a2e;
  --text-muted: #6b6b7b;
  --text-subtle: #9a9aab;
  --border: #e8e6e1;
  --border-light: #f0ede8;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --radius-lg: 20px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Crimson Text', 'Times New Roman', serif;
  --font-scribble: 'Shadows Into Light', cursive;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 20%, rgba(86,0,194,0.02) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 60%, rgba(86,0,194,0.02) 0%, transparent 50%);
  background-attachment: fixed;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography */
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-scribble);
  font-size: 1.25rem;
  color: var(--purple);
  margin-bottom: 0.75rem;
  letter-spacing: 0.01em;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.125rem;
  line-height: 1.7;
  max-width: 540px;
}

.text-muted { color: var(--text-muted); }

/* Scribble underline */
.scribble {
  position: relative;
  display: inline-block;
}
.scribble::after {
  content: '';
  position: absolute;
  bottom: -0.1em;
  left: -0.05em;
  right: -0.05em;
  height: 0.3em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12'%3E%3Cpath d='M5,6 Q25,0 50,7 T100,1 T150,9 T195,3' fill='none' stroke='%235600c2' stroke-width='2.5' stroke-linecap='round' opacity='0.5'/%3E%3C/svg%3E") repeat-x bottom;
  background-size: 100px 12px;
  z-index: -1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: 8px;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: 1.5px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--purple);
  color: white;
  border-color: var(--purple);
}
.btn-primary:hover {
  background: var(--purple-dark);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--purple);
  color: var(--purple);
  text-decoration: none;
}

.btn-text {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 0.625rem 0.5rem;
}
.btn-text:hover {
  color: var(--purple);
  text-decoration: none;
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1.0625rem;
  border-radius: 10px;
}

.btn-block {
  display: flex;
  width: 100%;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250,248,245,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: all var(--transition);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.logo:hover { text-decoration: none; }

.logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: color var(--transition);
}
.nav-link:hover { color: var(--text); text-decoration: none; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* Hero */
.hero {
  padding: 140px 0 80px;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-tag {
  display: inline-block;
  font-size: 0.8125rem;
  color: var(--purple);
  background: var(--purple-ghost);
  padding: 0.375rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 3.25rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 460px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.hero-note {
  font-size: 0.8125rem;
  color: var(--text-subtle);
}

/* Hero visual card */
.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 360px;
  overflow: hidden;
  transform: rotate(-2deg);
}

.hero-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.hero-card-dots {
  display: flex;
  gap: 5px;
}
.hero-card-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
}
.hero-card-dots span:first-child { background: #ef4444; }
.hero-card-dots span:nth-child(2) { background: #f59e0b; }
.hero-card-dots span:last-child { background: #10b981; }

.hero-card-title {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.hero-card-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 1.5rem 1.25rem;
}

.hero-stat {
  text-align: center;
}
.hero-stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}
.hero-stat-label {
  font-size: 0.6875rem;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-card-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--purple), var(--purple-light));
  opacity: 0.6;
}

/* Sections */
section {
  padding: 80px 0;
}

.feature { background: var(--bg); }
.feature.alt { background: var(--surface); }

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.feature-grid.reverse { direction: rtl; }
.feature-grid.reverse > * { direction: ltr; }

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.feature-list li {
  font-size: 1rem;
  color: var(--text);
  padding-left: 1.5rem;
  position: relative;
}
.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--purple);
  font-weight: 700;
  font-size: 0.875rem;
}

.feature-stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}
.feature-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--purple);
}

.feature-visual {
  display: flex;
  justify-content: center;
}

/* Drive card */
.drive-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  width: 100%;
  max-width: 320px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.drive-card-icon {
  width: 48px; height: 48px;
  background: var(--purple-ghost);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.drive-card-label {
  font-weight: 600;
  font-size: 0.9375rem;
}
.drive-card-files {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Calendar mock */
.calendar-mock {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-md);
  overflow-x: auto;
}

.cal-header {
  font-size: 0.6875rem;
  color: var(--text-subtle);
  text-align: center;
  margin-bottom: 0.5rem;
  letter-spacing: 0.04em;
}

.cal-row {
  display: flex;
  gap: 3px;
  margin-bottom: 3px;
  align-items: center;
}

.cal-turno {
  font-size: 0.625rem;
  color: var(--text-subtle);
  width: 42px;
  flex-shrink: 0;
  text-align: right;
  padding-right: 6px;
}

.cal-slot {
  flex: 1;
  min-width: 0;
  height: 32px;
  border-radius: 4px;
  background: var(--border-light);
  font-size: 0.5625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-subtle);
}
.cal-slot.filled {
  background: var(--purple);
  color: white;
  font-size: 0.5rem;
  font-weight: 600;
}

/* Questão card */
.questao-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-md);
}

.questao-badge {
  font-size: 0.6875rem;
  color: var(--purple);
  background: var(--purple-ghost);
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.questao-text {
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.questao-opcoes {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.questao-op {
  flex: 1;
  text-align: center;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
}
.questao-op.selected {
  border-color: var(--purple);
  color: var(--purple);
}

.questao-result {
  font-size: 0.8125rem;
  padding: 0.625rem;
  border-radius: 6px;
  text-align: center;
}
.questao-result.correct { background: rgba(16,185,129,0.1); color: var(--success); }

/* Editor mock */
.editor-mock {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.editor-toolbar {
  display: flex;
  gap: 2px;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: #fafafa;
}
.editor-toolbar span {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-radius: 3px;
  cursor: default;
}

.editor-content {
  padding: 1.25rem;
}
.editor-h1 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}
.editor-p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}
.editor-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8125rem;
}

/* Editais mock */
.editais-mock {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 320px;
}

.edital-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9375rem;
}

.edital-item.verified { border-color: var(--purple); }

.edital-selo {
  font-size: 0.6875rem;
  background: var(--purple-ghost);
  color: var(--purple);
  padding: 0.125rem 0.5rem;
  border-radius: 100px;
}

/* Stats grid mock */
.stats-grid-mock {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  width: 100%;
  max-width: 280px;
}
.stat-mini {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-mini-val {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
}
.stat-mini-lbl {
  font-size: 0.6875rem;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Medals mock */
.medals-mock {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  width: 100%;
  max-width: 260px;
}
.medal {
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  font-size: 0.875rem;
  box-shadow: var(--shadow-sm);
}
.medal.gold {
  border-color: #f59e0b;
  background: rgba(245,158,11,0.05);
}

/* Problema */
.problema {
  padding: 60px 0 100px;
  text-align: center;
}
.problema-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1rem;
  margin-top: 2rem;
  font-size: 1.0625rem;
}
.problema-item {
  padding: 0.375rem 0.75rem;
  color: var(--text);
  font-weight: 600;
}
.problema-sep {
  color: var(--border);
  font-size: 1.5rem;
}

/* Steps */
.steps {
  padding: 80px 0;
  background: var(--surface);
  text-align: center;
}

.steps-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
  text-align: left;
}

.step {
  padding: 1.5rem;
  border-left: 2px solid var(--border);
  transition: border-color var(--transition);
}
.step:hover { border-left-color: var(--purple); }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: var(--purple-ghost);
  color: var(--purple);
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: 0.75rem;
}
.step strong {
  display: block;
  font-size: 1.0625rem;
  margin-bottom: 0.25rem;
}
.step p {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* Social proof */
.social-proof {
  background: var(--bg);
  text-align: center;
  padding: 80px 0;
}

.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.testimonial {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: left;
  font-style: normal;
}
.testimonial p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.testimonial cite {
  font-size: 0.8125rem;
  color: var(--text-subtle);
  font-style: normal;
}

/* Planos */
.planos {
  background: var(--surface);
  text-align: center;
  padding: 80px 0;
}

.planos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
  align-items: start;
}

.plano-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: left;
  position: relative;
}

.plano-card.destaque {
  border-color: var(--purple);
  border-width: 2px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: scale(1.03);
}

.plano-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--purple);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 1rem;
  border-radius: 100px;
  white-space: nowrap;
}

.plano-header {
  margin-bottom: 1.5rem;
}
.plano-header h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.plano-preco {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
}
.plano-periodo {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}

.plano-desc {
  font-size: 0.8125rem;
  color: var(--text-subtle);
  margin-top: 0.25rem;
}

.plano-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 0.75rem;
  background: var(--border-light);
  border-radius: 6px;
  padding: 2px;
}
.plano-tab {
  flex: 1;
  padding: 0.375rem;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: all var(--transition);
}
.plano-tab.active {
  background: var(--surface);
  color: var(--purple);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.plano-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.plano-features li {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding-left: 1.25rem;
  position: relative;
}
.plano-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
  font-size: 0.75rem;
}

/* Garantia */
.garantia {
  padding: 60px 0;
  text-align: center;
}
.garantia-card {
  background: var(--purple-ghost);
  border: 1px solid rgba(86,0,194,0.12);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  max-width: 560px;
  margin: 0 auto;
}
.garantia-card h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.garantia-card p {
  color: var(--text-muted);
}

/* CTA Final */
.cta-final {
  text-align: center;
  padding: 80px 0 100px;
}
.cta-sub {
  color: var(--text-muted);
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

/* Footer */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-top: 0.25rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-decoration: none;
}
.footer-links a:hover { color: var(--purple); }

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-subtle);
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

/* Loader */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s, visibility 0.4s;
}
.loader.hidden {
  opacity: 0;
  visibility: hidden;
}
.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.loader-scribble {
  width: 80px;
  height: 80px;
}
.loader-scribble path {
  animation: draw 1s ease forwards;
}
.loader-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--purple);
  font-weight: 700;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile */
@media (max-width: 768px) {
  html { font-size: 15px; }

  .section-title { font-size: 1.75rem; }

  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    gap: 0.25rem;
    box-shadow: var(--shadow-lg);
  }
  .menu-toggle { display: flex; }

  .hero { padding: 100px 0 60px; }
  .hero .container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-title { font-size: 2.25rem; }
  .hero-visual { order: -1; }

  .feature-grid,
  .feature-grid.reverse {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .feature-grid.reverse { direction: ltr; }

  .steps-list { grid-template-columns: 1fr; }
  .testimonials { grid-template-columns: 1fr; }
  .planos-grid { grid-template-columns: 1fr; }
  .plano-card.destaque { transform: none; }

  .problema-grid { font-size: 0.9375rem; }

  .footer-grid { flex-direction: column; gap: 1.5rem; }
  .footer-links { flex-direction: column; gap: 0.5rem; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.75rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .feature-stats { flex-direction: column; gap: 0.5rem; }
}
