/* ============================================================
   Edson Macuácua — Protótipo de website
   Paleta FRELIMO: vermelho profundo / dourado-amarelo / preto / marfim
   ============================================================ */

:root {
  --red-900: #45090d;   /* vermelho quase-preto (fundos escuros) */
  --red-800: #6e0f15;
  --red-700: #8f141b;
  --red-600: #c1121f;   /* vermelho FRELIMO vivo (acentos) */
  --black: #141010;     /* preto FRELIMO */
  --gold: #d2a93c;      /* dourado-amarelo */
  --gold-soft: #f0c95e;
  --ivory: #f8f3ec;
  --paper: #fffdf9;
  --ink: #201a1a;
  --muted: #6b5d5d;
  --line: #ece1da;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px -22px rgba(74, 12, 16, 0.45);
  --shadow-sm: 0 6px 24px -12px rgba(74, 12, 16, 0.35);
  --container: 1140px;

  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }

/* ---------- Tipografia utilitária ---------- */
.kicker {
  font-size: .78rem; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold);
  margin-bottom: 14px;
}
.kicker--light { color: var(--gold-soft); }

.section__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.08;
  color: var(--red-900);
  letter-spacing: -.01em;
}
.section--alt .section__title { color: var(--red-900); }

.section__sub { color: var(--muted); margin-top: 14px; max-width: 52ch; }
.center { text-align: center; margin-inline: auto; }
.center.section__head { max-width: 640px; margin-bottom: 56px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; padding: .85rem 1.6rem;
  border-radius: 999px; font-weight: 600; font-size: .95rem;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .25s, box-shadow .25s, background .25s, color .25s;
}
.btn--primary { background: var(--gold); color: var(--red-900); box-shadow: var(--shadow-sm); }
.btn--primary:hover { transform: translateY(-2px); background: var(--gold-soft); }
.btn--ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--block { width: 100%; }

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .3s, box-shadow .3s, padding .3s;
  padding: 18px 0;
}
.nav.scrolled {
  background: rgba(69, 9, 13, .94);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 30px -20px rgba(0,0,0,.6);
  padding: 12px 0;
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; }

.nav__brand { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 600; }
.nav__monogram {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--gold); color: var(--red-900);
  font-family: var(--serif); font-weight: 700; font-size: 1.05rem;
}
.nav__name { font-size: 1.02rem; letter-spacing: .01em; }

.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a { color: rgba(255,255,255,.85); font-size: .94rem; font-weight: 500; transition: color .2s; }
.nav__links a:hover { color: #fff; }
.nav__cta {
  border: 1.5px solid var(--gold); color: var(--gold) !important;
  padding: .5rem 1.15rem; border-radius: 999px; transition: all .25s;
}
.nav__cta:hover { background: var(--gold); color: var(--red-900) !important; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: .3s; }
.nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; color: #fff; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(1200px 600px at 82% -10%, rgba(240,201,94,.20), transparent 60%),
    radial-gradient(900px 520px at -10% 115%, rgba(20,16,16,.75), transparent 55%),
    linear-gradient(160deg, var(--red-800), var(--red-900) 55%, var(--black));
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 22px 22px; opacity: .5;
}
.hero__inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 60px; align-items: center;
  padding-block: 120px 80px;
}
.hero__eyebrow {
  display: inline-block; font-size: .8rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-soft); border: 1px solid rgba(240,201,94,.40);
  padding: .4rem 1rem; border-radius: 999px; margin-bottom: 24px;
}
.hero__title {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(3rem, 8vw, 5.6rem); line-height: .98; letter-spacing: -.02em;
}
.hero__lead { margin-top: 24px; max-width: 46ch; color: rgba(255,255,255,.82); font-size: 1.12rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero__stats { display: flex; gap: 38px; margin-top: 56px; flex-wrap: wrap; }
.hero__stats li { display: flex; flex-direction: column; }
.hero__stats strong { font-family: var(--serif); font-size: 1.9rem; color: var(--gold-soft); }
.hero__stats span { font-size: .85rem; color: rgba(255,255,255,.7); }

.hero__portrait { position: relative; justify-self: center; }
.portrait-frame {
  width: clamp(260px, 30vw, 360px); aspect-ratio: 4/5;
  border-radius: 200px 200px var(--radius) var(--radius);
  overflow: hidden; border: 2px solid rgba(240,201,94,.45);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.6);
  background: linear-gradient(160deg, var(--red-600), var(--red-800));
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait-badge {
  position: absolute; bottom: 18px; left: -14px;
  background: var(--gold); color: var(--red-900);
  font-weight: 700; font-size: .82rem; letter-spacing: .04em;
  padding: .55rem 1.1rem; border-radius: 999px; box-shadow: var(--shadow-sm);
}

.hero__scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 3; color: rgba(255,255,255,.7); font-size: 1.4rem;
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob { 0%,100%{ transform: translate(-50%,0);} 50%{ transform: translate(-50%,8px);} }

/* ============================================================
   SECÇÕES GERAIS
   ============================================================ */
.section { padding-block: clamp(72px, 10vw, 120px); }
.section--alt { background: var(--ivory); }

.grid-2 { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 80px); align-items: start; }

/* ---------- Sobre ---------- */
.prose .lead { font-size: 1.2rem; color: var(--red-800); font-weight: 500; margin-bottom: 20px; }
.prose p { color: var(--muted); margin-bottom: 18px; }
.signature {
  margin-top: 28px; font-family: var(--serif); font-style: italic;
  font-size: 1.5rem; color: var(--red-700);
  border-top: 1px solid var(--line); padding-top: 18px;
}

/* ---------- Timeline ---------- */
.timeline { position: relative; max-width: 820px; margin-inline: auto; padding-left: 20px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px;
  width: 2px; background: linear-gradient(var(--gold), transparent);
}
.timeline__item { position: relative; display: grid; grid-template-columns: 120px 1fr; gap: 24px; padding-block: 14px; }
.timeline__item::before {
  content: ""; position: absolute; left: -19px; top: 26px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold); border: 3px solid var(--paper);
  box-shadow: 0 0 0 2px var(--gold);
}
.section--alt .timeline__item::before { border-color: var(--ivory); }
.timeline__year { font-family: var(--serif); font-weight: 600; color: var(--red-700); padding-top: 18px; }
.timeline__card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 20px 22px; box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
}
.timeline__card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.timeline__card h3 { font-family: var(--serif); font-weight: 600; color: var(--red-900); margin-bottom: 6px; }
.timeline__card p { color: var(--muted); font-size: .96rem; }

/* ---------- Cards (actuação) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px 28px;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--gold-soft); }
.card__icon {
  width: 56px; height: 56px; display: grid; place-items: center;
  font-size: 1.6rem; border-radius: 14px; margin-bottom: 18px;
  background: linear-gradient(160deg, var(--ivory), #fff);
  border: 1px solid var(--line);
}
.card h3 { font-family: var(--serif); font-weight: 600; color: var(--red-900); margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .95rem; }

/* ---------- Educação ---------- */
.edu-list { display: grid; gap: 18px; }
.edu {
  background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm); padding: 22px 26px; box-shadow: var(--shadow-sm);
}
.edu__deg { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--red-900); }
.edu__inst { color: var(--red-700); font-weight: 500; margin: 4px 0 8px; }
.edu__inst span { color: var(--muted); font-weight: 400; }
.edu p { color: var(--muted); font-size: .95rem; }

/* ---------- Citação ---------- */
.quote {
  position: relative; color: #fff; text-align: center;
  padding-block: clamp(80px, 12vw, 140px);
  background:
    radial-gradient(800px 400px at 50% 0%, rgba(240,201,94,.20), transparent 60%),
    linear-gradient(160deg, var(--red-800), var(--red-900));
}
.quote__inner { max-width: 820px; margin-inline: auto; }
.quote blockquote {
  font-family: var(--serif); font-weight: 500; font-style: italic;
  font-size: clamp(1.5rem, 3.6vw, 2.4rem); line-height: 1.35; margin-block: 18px;
}
.quote cite { color: var(--gold-soft); font-style: normal; font-weight: 600; letter-spacing: .04em; }

/* ---------- Factos (sobre) ---------- */
.facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px;
  margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line);
}
.facts li { color: var(--red-800); font-weight: 600; font-size: .98rem; }
.facts span {
  display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); font-weight: 700; margin-bottom: 2px;
}

/* ---------- Imagem académica ---------- */
.academico__media {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--line); align-self: stretch; min-height: 320px;
  background: linear-gradient(160deg, var(--red-600), var(--red-800));
}
.academico__media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Publicações ---------- */
.books {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
  margin-bottom: 48px;
}
.book {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; text-align: center;
  box-shadow: var(--shadow-sm); transition: transform .3s, box-shadow .3s;
}
.book:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.book img {
  width: 100%; height: 300px; object-fit: contain; margin-bottom: 18px;
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 16px 28px rgba(74,12,16,.28));
}
.book figcaption strong { display: block; font-family: var(--serif); color: var(--red-900); font-size: 1.05rem; margin-bottom: 6px; }
.book figcaption span { color: var(--muted); font-size: .88rem; }

.pub-list {
  max-width: 860px; margin-inline: auto;
  display: grid; gap: 2px;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.pub-list li {
  display: grid; grid-template-columns: 70px 1fr; gap: 18px; align-items: baseline;
  padding: 16px 22px; background: var(--paper); border-bottom: 1px solid var(--line);
}
.pub-list li:last-child { border-bottom: 0; }
.pub-list li:hover { background: var(--ivory); }
.pub-list span { font-family: var(--serif); font-weight: 600; color: var(--gold); }
.pub-list em { color: var(--muted); font-style: normal; font-size: .9rem; }

/* ---------- Galeria ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.gallery__item {
  aspect-ratio: 1; border-radius: var(--radius-sm);
  background: linear-gradient(160deg, var(--red-600), var(--red-800));
  position: relative; overflow: hidden; transition: transform .3s; margin: 0;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery__item:hover { transform: scale(1.02); }
.gallery__item:hover img { transform: scale(1.08); }

/* ---------- Contacto ---------- */
.contact-list { display: grid; gap: 14px; margin: 26px 0; }
.contact-list li { display: flex; align-items: center; gap: 14px; color: var(--red-800); font-weight: 500; }
.contact-list__ic {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 10px; background: var(--paper); border: 1px solid var(--line);
}
.socials { display: flex; flex-wrap: wrap; gap: 12px; }
.socials a {
  font-size: .88rem; font-weight: 600; padding: .5rem 1rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--red-700); transition: all .25s;
}
.socials a:hover { background: var(--red-900); color: #fff; border-color: var(--red-900); }

.form {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm);
  display: grid; gap: 16px;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 7px; font-size: .88rem; font-weight: 600; color: var(--red-800); }
.form input, .form textarea {
  font-family: inherit; font-size: .95rem; color: var(--ink);
  padding: .8rem .95rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; transition: border-color .2s, box-shadow .2s; resize: vertical;
}
.form input:focus, .form textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(240,201,94,.20);
}
.form__note { font-size: .8rem; color: var(--muted); text-align: center; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--red-900); color: rgba(255,255,255,.75); padding-block: 48px; }
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.footer__brand { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 600; font-size: 1.05rem; }
.footer__copy { font-size: .9rem; }
.footer__credit { font-size: .8rem; color: rgba(255,255,255,.45); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; padding-top: 130px; }
  .hero__lead { margin-inline: auto; }
  .hero__actions, .hero__stats { justify-content: center; }
  .hero__portrait { order: -1; }
  .grid-2 { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .books { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto 48px; }
  .academico__media { min-height: 360px; max-height: 480px; }
}

@media (max-width: 720px) {
  .nav__links {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px);
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 26px; padding: 40px;
    background: var(--red-900);
    transform: translateX(100%); transition: transform .35s ease;
    box-shadow: -20px 0 60px -20px rgba(0,0,0,.6);
  }
  .nav__links.open { transform: translateX(0); }
  .nav__links a { font-size: 1.1rem; }
  .nav__toggle { display: flex; z-index: 60; }
  .nav.scrolled .nav__toggle span { background: #fff; }
}

@media (max-width: 560px) {
  .cards, .gallery { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .pub-list li { grid-template-columns: 1fr; gap: 2px; }
  .form__row { grid-template-columns: 1fr; }
  .timeline__item { grid-template-columns: 1fr; gap: 8px; }
  .timeline__year { padding-top: 0; }
  .nav__name { display: none; }
}

/* ---------- Animação de entrada (reveal) ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll { animation: none; }
  html { scroll-behavior: auto; }
}
