/* Bruno Rodrigues — hand-written port of the Tailwind design.
   Light theme only, no animations, responsive at 768px / 1024px. */

:root {
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-900: #111827;
  --red-400: #f87171;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --blue-600: #2563eb;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-card: 1.5rem;
  --radius-big: 2.5rem;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: #fff;
  color: var(--gray-900);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

img { max-width: 100%; }

.container { max-width: 80rem; margin: 0 auto; }

.icon { width: 18px; height: 18px; flex-shrink: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 500; font-size: .875rem; border: 0; cursor: pointer;
  border-radius: 9999px; padding: .625rem 1.5rem; height: 2.5rem;
  text-decoration: none; line-height: 1; font-family: inherit;
}
.btn .icon { width: 16px; height: 16px; }
.btn-dark { background: var(--gray-900); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-ghost { background: transparent; color: var(--gray-900); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-light { background: #fff; color: var(--gray-900); }
.btn-light:hover { background: var(--gray-100); }
.btn-soft { background: var(--gray-100); color: var(--gray-600); border: 1px solid var(--gray-200); }
.btn-soft:hover { background: var(--gray-200); }
.btn-lg { height: 3.5rem; padding: 0 2.5rem; font-size: 1.125rem; }
.btn-block { width: 100%; }
.btn-disabled, .btn:disabled { background: var(--gray-200); color: var(--gray-400); cursor: not-allowed; box-shadow: none; }

/* ---------- navbar ---------- */

.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255, 255, 255, .7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem; gap: 1rem;
}
.navbar-left { display: flex; align-items: center; gap: 2rem; min-width: 0; }
.nav-logo {
  display: flex; flex-direction: column; line-height: .7;
  font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em;
  color: var(--gray-900); text-decoration: none; text-transform: lowercase;
}
.nav-links { display: none; }
.nav-links a {
  font-size: .875rem; font-weight: 500; color: var(--gray-600);
  text-decoration: none;
}
.nav-links a:hover { color: var(--gray-900); }
.nav-links.open {
  display: flex; flex-direction: column; gap: 1rem;
  position: absolute; top: 100%; left: 0; right: 0;
  background: #fff; border-bottom: 1px solid var(--gray-100);
  padding: 1rem 1.5rem;
}
.navbar-right { display: flex; align-items: center; gap: .25rem; }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; cursor: pointer; color: var(--gray-900);
  padding: .5rem;
}
.nav-toggle .icon { width: 24px; height: 24px; }
.nav-login {
  font-size: .875rem; font-weight: 500; color: var(--gray-500);
  text-decoration: none; padding: .5rem 1rem; border-radius: 9999px;
}
.nav-login:hover { color: var(--gray-900); background: var(--gray-50); }
.nav-logout-form { display: inline; margin: 0; }
.nav-logout {
  font-size: .875rem; font-weight: 500; color: var(--red-500);
  background: transparent; border: 0; cursor: pointer;
  padding: .5rem 1rem; border-radius: 9999px; font-family: inherit;
}
.nav-logout:hover { color: #b91c1c; background: #fef2f2; }
.nav-cta { display: none; }

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .nav-links { display: flex; align-items: center; gap: 1.5rem; }
  .nav-cta { display: inline-flex; }
}

/* ---------- public pages ---------- */

.main-public { padding-top: 4.5rem; }

.section { padding: 6rem 1.5rem; }
.section-alt { background: #fafafa; }
.section-head { text-align: center; margin-bottom: 4rem; }
.section-title {
  font-size: 1.875rem; font-weight: 700; letter-spacing: -.02em;
  color: var(--gray-900); text-transform: lowercase; margin: 0 0 1rem;
}
.section-sub { color: var(--gray-500); max-width: 42rem; margin: 0 auto; font-weight: 300; }

@media (min-width: 768px) {
  .section-title { font-size: 3rem; }
}

/* hero */

.hero {
  min-height: 90vh; display: flex; align-items: center;
  padding: 0 1.5rem; overflow: hidden;
}
.hero-inner {
  max-width: 80rem; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center;
}
.hero-title {
  font-size: 3rem; font-weight: 700; letter-spacing: -.02em;
  text-transform: lowercase; line-height: .6; margin: 0 0 1.5rem;
}
.hero-subtitle {
  font-size: 1.25rem; color: var(--gray-500); margin: 0 0 2.5rem;
  max-width: 36rem; font-weight: 300; line-height: 1.6;
}
.hero-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.hero-media {
  aspect-ratio: 4 / 5; border-radius: 3rem; overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (min-width: 640px) { .hero-actions { flex-direction: row; } }
@media (min-width: 768px) { .hero-title { font-size: 4.5rem; } .hero-subtitle { font-size: 1.5rem; } }
@media (min-width: 1024px) { .hero-inner { grid-template-columns: 1fr 1fr; } }

/* services */

.services-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.5rem;
}
.service-card-wrap { height: 100%; }
.service-card {
  display: flex; flex-direction: column; justify-content: space-between;
  background: #fff; border-radius: var(--radius-card); padding: 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05); text-decoration: none;
  color: inherit; height: 100%; overflow: hidden;
}
.service-card:hover { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .1); }
.service-card-body { padding: 1.5rem; display: flex; flex-direction: column; justify-content: space-between; height: 100%; }
.service-icon {
  width: 3rem; height: 3rem; background: var(--gray-50); border-radius: 1rem;
  display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem;
  color: var(--gray-900);
}
.service-icon .icon { width: 24px; height: 24px; transform: rotate(-45deg); }
.service-card:hover .service-icon { background: #000; color: #fff; }
.service-card h3 {
  font-size: 1.5rem; font-weight: 600; letter-spacing: -.01em;
  color: var(--gray-900); margin: 0 0 1rem;
}
.service-desc { color: var(--gray-500); font-weight: 300; line-height: 1.6; }
.service-desc p { margin: 0; }
.service-more {
  margin-top: 2rem; padding: 0 1.5rem 1.5rem;
  display: flex; align-items: center; gap: .5rem;
  font-size: .875rem; font-weight: 500; color: var(--gray-900); opacity: 0;
}
.service-more .icon { width: 16px; height: 16px; }
.service-card:hover .service-more { opacity: 1; }

@media (min-width: 768px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(4, 1fr); } }

/* about */

.about-grid { display: grid; grid-template-columns: 1fr; gap: 4rem; align-items: center; }
.about-paragraphs { display: flex; flex-direction: column; gap: 1.5rem; color: var(--gray-600); font-weight: 300; font-size: 1.125rem; line-height: 1.6; }
.about-paragraphs p { margin: 0; }
.about-cards { display: grid; grid-template-columns: 1fr; gap: 1.5rem; padding-top: 2rem; }
.about-card { padding: 1.5rem; background: #fff; border-radius: var(--radius-card); box-shadow: 0 1px 2px rgba(0, 0, 0, .05); border: 1px solid var(--gray-100); }
.about-card h4 {
  font-size: .75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; color: var(--gray-400); margin: 0 0 .5rem;
}
.about-card p { font-size: .875rem; color: var(--gray-500); margin: 0; }
.about-media {
  aspect-ratio: 1 / 1; border-radius: 3rem; overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);
}
.about-media img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(1); }
.about-media:hover img { filter: grayscale(0); }

@media (min-width: 640px) { .about-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .about-grid { grid-template-columns: repeat(2, 1fr); } }

/* escola */

.escola {
  background: var(--gray-900); border-radius: 3rem; padding: 3rem;
  color: #fff; position: relative; overflow: hidden;
}
.escola::after {
  content: ""; position: absolute; top: 0; right: 0; width: 50%; height: 100%;
  background: radial-gradient(circle at center, #fff, transparent 70%);
  opacity: .1; pointer-events: none;
}
.escola-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
.escola-title {
  font-size: 2.25rem; font-weight: 700; letter-spacing: -.02em;
  text-transform: lowercase; margin: 0 0 2rem;
}
.escola-list { list-style: none; margin: 0 0 2.5rem; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.escola-list li { display: flex; align-items: center; gap: .75rem; color: #d1d5db; font-weight: 300; font-size: 1.125rem; }
.escola-list .dot { width: 6px; height: 6px; border-radius: 9999px; background: #fff; flex-shrink: 0; }

@media (min-width: 768px) { .escola { padding: 5rem; } .escola-title { font-size: 3.75rem; } }
@media (min-width: 1024px) { .escola-inner { grid-template-columns: repeat(2, 1fr); } }

/* books */

.books-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.book-card {
  background: var(--gray-50); border-radius: var(--radius-big); padding: 2rem;
  display: flex; flex-direction: column; gap: 2rem; align-items: center;
}
.book-cover {
  width: 12rem; height: 16rem; background: #fff; border-radius: .75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1); flex-shrink: 0; overflow: hidden;
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.book-cover-empty {
  width: 100%; height: 100%; background: var(--gray-100);
  display: flex; align-items: center; justify-content: center; color: var(--gray-400);
}
.book-info { flex: 1; text-align: center; }
.book-info h3 { font-size: 1.5rem; font-weight: 600; letter-spacing: -.01em; margin: 0 0 1rem; }
.book-desc { color: var(--gray-500); font-weight: 300; line-height: 1.6; margin-bottom: 2rem; }
.book-desc p { margin: 0; }

@media (min-width: 768px) {
  .book-card { flex-direction: row; align-items: flex-start; }
  .book-info { text-align: left; }
}

@media (min-width: 1024px) { .books-grid { grid-template-columns: repeat(2, 1fr); } }

/* videos */

.videos-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.video-card h3 {
  font-weight: 500; text-transform: lowercase; margin: 0;
  font-size: 1rem; color: var(--gray-900);
}
.video-card:hover h3 { color: var(--blue-600); }
.video-frame {
  aspect-ratio: 16 / 9; border-radius: var(--radius-card); overflow: hidden;
  margin-bottom: 1rem; box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

@media (min-width: 768px) { .videos-grid { grid-template-columns: repeat(3, 1fr); } }

/* site footer */

.site-footer {
  background: var(--gray-900); color: #fff;
  border-top-left-radius: 4rem; border-top-right-radius: 4rem;
  padding: 6rem 1.5rem;
}
.footer-inner { text-align: center; display: flex; flex-direction: column; gap: 3rem; }
.site-footer h2 {
  font-size: 2.25rem; font-weight: 700; letter-spacing: -.02em;
  text-transform: lowercase; margin: 0;
}
.footer-sub { color: var(--gray-400); font-size: 1.25rem; font-weight: 300; max-width: 42rem; margin: 0 auto; }
.footer-contact {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2rem; font-size: 1.125rem; font-weight: 300;
}
.footer-contact a { color: inherit; text-decoration: none; }
.footer-contact a:hover { color: var(--gray-400); }
.footer-sep { display: none; color: #374151; }
.footer-bottom {
  padding-top: 3rem; border-top: 1px solid #1f2937;
  font-size: .875rem; color: var(--gray-500);
  display: flex; flex-direction: column; justify-content: space-between; align-items: center; gap: 1rem;
}
.footer-bottom p { margin: 0; }
.footer-links a { color: var(--gray-500); text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-credit a { color: inherit; font-weight: 700; text-decoration: none; }
.footer-credit a:hover { color: var(--gray-400); }

@media (min-width: 768px) {
  .site-footer h2 { font-size: 3.75rem; }
  .footer-contact { flex-direction: row; }
  .footer-sep { display: inline; }
  .footer-bottom { flex-direction: row; }
}

/* privacy */

.page-hero { padding: 8rem 1.5rem 6rem; }
.container-narrow { max-width: 56rem; margin: 0 auto; }
.privacy-body { display: flex; flex-direction: column; gap: 3rem; font-size: 1.125rem; color: var(--gray-600); font-weight: 300; line-height: 1.6; }
.privacy-block { display: flex; flex-direction: column; gap: 1rem; }
.privacy-block h2 { font-size: 1.5rem; font-weight: 600; color: var(--gray-900); text-transform: lowercase; margin: 0; }
.privacy-block p { margin: 0; }
.privacy-block a { color: var(--gray-900); }
.privacy-block a:hover { text-decoration: underline; }

/* login */

.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--gray-50); padding: 1.5rem;
}
.login-card { width: 100%; max-width: 28rem; background: #fff; border-radius: var(--radius-big); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25); padding: 2rem; }
.login-head { text-align: center; padding-bottom: 2rem; }
.login-head h1 { font-size: 1.875rem; font-weight: 700; letter-spacing: -.02em; text-transform: lowercase; margin: 0; }
.login-head span { font-weight: 300; color: var(--gray-400); }
.login-form { display: flex; flex-direction: column; gap: 1.5rem; }
.login-error { color: var(--red-500); font-size: .875rem; text-align: center; margin: 0; }

/* ---------- forms ---------- */

.field { display: flex; flex-direction: column; gap: .5rem; }
.field > label { font-size: .875rem; font-weight: 500; color: var(--gray-700); }
.field input, .field textarea, .field select {
  width: 100%; padding: .5rem .75rem; border: 1px solid var(--gray-200);
  border-radius: .75rem; background: #fff; font-size: .875rem; font-family: inherit;
  color: var(--gray-900);
}
.field textarea { min-height: 2.5rem; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--gray-900); outline-offset: -1px; border-color: var(--gray-900);
}
.login-form input { height: 3rem; border-radius: 1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
.stack { display: flex; flex-direction: column; gap: 1.5rem; }

.input-wrap { position: relative; }
.input-wrap .icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--gray-400); width: 16px; height: 16px; }
.input-wrap input { padding-left: 2.5rem; }

/* ---------- admin ---------- */

.admin-body { background: var(--gray-50); }
.admin-shell { min-height: 100vh; display: flex; }
.admin-sidebar {
  width: 16rem; background: #fff; border-right: 1px solid var(--gray-100);
  display: flex; flex-direction: column; position: fixed; height: 100vh; top: 0; left: 0;
}
.admin-brand { padding: 2rem; }
.admin-brand h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; text-transform: lowercase; margin: 0; }
.admin-brand span { font-weight: 300; color: var(--gray-400); }
.admin-nav { flex: 1; padding: 0 1rem; display: flex; flex-direction: column; gap: .25rem; }
.admin-nav a {
  display: block; padding: .75rem 1rem; font-size: .875rem; font-weight: 500;
  border-radius: .75rem; color: var(--gray-600); text-decoration: none;
}
.admin-nav a:hover { background: var(--gray-50); color: var(--gray-900); }
.admin-nav a.active { background: var(--gray-900); color: #fff; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1); }
.admin-sidebar-footer { padding: 1rem; border-top: 1px solid var(--gray-100); }
.admin-logout {
  display: flex; align-items: center; gap: .5rem; width: 100%;
  justify-content: flex-start; padding: .75rem 1rem; border-radius: .75rem;
  font-size: .875rem; font-weight: 500; color: var(--gray-500);
  background: transparent; border: 0; cursor: pointer; font-family: inherit;
}
.admin-logout:hover { color: var(--red-600); background: #fef2f2; }
.admin-logout .icon { width: 16px; height: 16px; }

.admin-main { flex: 1; margin-left: 16rem; padding: 2rem; }
.admin-content { max-width: 64rem; margin: 0 auto; }

.admin-header {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; margin-bottom: 2rem;
}
.admin-header h2 { font-size: 1.875rem; font-weight: 700; letter-spacing: -.02em; text-transform: lowercase; margin: 0; }
.admin-header h2 span { font-weight: 300; color: var(--gray-400); }

.admin-card { background: #fff; border-radius: var(--radius-big); box-shadow: 0 1px 2px rgba(0, 0, 0, .05); overflow: hidden; }
.admin-card-head { background: #fff; border-bottom: 1px solid var(--gray-100); padding: 2rem; }
.admin-card-head-row { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 1rem; }
.admin-card-head h3 { font-size: 1.25rem; font-weight: 600; margin: 0; }
.admin-card-title { display: flex; align-items: center; gap: 1rem; color: var(--gray-300); }
.admin-card-title h3 { color: var(--gray-900); }
.admin-card-title .icon { width: 20px; height: 20px; }
.admin-card-body { padding: 2rem; display: flex; flex-direction: column; gap: 1.5rem; }

.row-actions { display: flex; align-items: center; gap: .5rem; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 9999px; border: 0;
  background: transparent; cursor: pointer; color: var(--gray-400); padding: 0;
}
.icon-btn .icon { width: 16px; height: 16px; }
.icon-btn:hover { color: var(--gray-900); }
.icon-btn.danger:hover { color: var(--red-500); }
.icon-btn:disabled { opacity: .3; cursor: default; }

.save-bar { position: fixed; bottom: 2rem; right: 2rem; z-index: 50; }

.empty-state {
  text-align: center; padding: 5rem 0; background: #fff;
  border-radius: var(--radius-big); border: 1px dashed var(--gray-200);
}
.empty-state p { color: var(--gray-400); margin: 0; }

.upload-row { display: flex; align-items: flex-start; gap: 1rem; }
.book-thumb {
  width: 6rem; height: 8rem; border-radius: .5rem; overflow: hidden;
  border: 1px solid var(--gray-100); flex-shrink: 0;
}
.book-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.upload-controls { flex: 1; display: flex; flex-direction: column; gap: .75rem; }
.mini-label {
  font-size: .625rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--gray-400); font-weight: 700; margin-left: .25rem;
}

.thumb-preview {
  aspect-ratio: 16 / 9; border-radius: 1rem; overflow: hidden;
  background: var(--gray-100); border: 1px solid var(--gray-100);
}
.thumb-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-placeholder {
  aspect-ratio: 16 / 9; border-radius: 1rem; border: 2px dashed var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-400); font-size: .875rem;
}

/* dialog */

.admin-dialog {
  border: 0; border-radius: var(--radius-card); padding: 0;
  max-width: 32rem; width: calc(100% - 2rem);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);
}
.admin-dialog::backdrop { background: rgba(0, 0, 0, .4); }
.dialog-inner { padding: 0 0 2rem; }
.dialog-inner .admin-card-head { padding: 1.5rem 2rem; }
.dialog-inner .create-form { padding: 1.5rem 2rem 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .75rem; margin-top: .5rem; }
