/* =========================================================
   Dr. Ivanildo - Portfolio (v3)
   - Clean light base + vinho (accent)
   - Optional dark sections
   - Gallery + lightbox
   - Subtle interactions (reveal)
   ========================================================= */

:root{
  /* Light */
  --bg: #ffffff;
  --bg-2: #f6f7fb;
  --text: #121318;
  --muted: #5a5f6a;
  --line: rgba(18,19,24,.10);

  /* Accent */
  --accent: #8B1E24;       /* vinho/bordô */
  --accent-weak: rgba(139,30,36,.10);
  --accent-line: rgba(139,30,36,.22);

  /* Complement */
  --ink: #0b0e13;
  --ink-2: #101722;

  /* Dark tokens */
  --dark-bg: #0b0e13;
  --dark-bg-2: #0f141b;
  --dark-text: #f3f6ff;
  --dark-muted: rgba(243,246,255,.72);
  --dark-line: rgba(243,246,255,.14);

  --shadow: 0 10px 28px rgba(17, 24, 39, .08);
  --shadow-2: 0 18px 44px rgba(0,0,0,.25);
  --radius: 18px;

  --container: 1120px;
  --gap: 18px;

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
ul{ margin: 0; padding: 0; list-style: none; }
p{ margin: 0 0 12px; }

.container{
  width: min(100% - 40px, var(--container));
  margin: 0 auto;
}

.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

.muted{ color: var(--muted); }
.small{ font-size: 0.92rem; }
.mt{ margin-top: 16px; }
.w100{ width: 100%; text-align: center; }

.stack{ display:grid; gap: 10px; }

/* Topbar */
.topbar{
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner{
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0;
  gap: 12px;
}
.brand{ display:flex; align-items:center; gap: 12px; }
.brand__logo{ width: 40px; height: 40px; }
.brand__text strong{ display:block; font-size: 1.02rem; }
.brand__text small{ display:block; font-size: .82rem; color: var(--muted); margin-top: -2px; }

.nav{ display:flex; align-items:center; gap: 14px; position: relative; }
.nav__toggle{
  display:none;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}
.nav__toggleLines{
  display:block;
  width: 18px; height: 2px;
  margin: 0 auto;
  background: var(--text);
  position: relative;
}
.nav__toggleLines::before,
.nav__toggleLines::after{
  content:""; position:absolute; left:0; right:0;
  height:2px; background: var(--text);
}
.nav__toggleLines::before{ top: -6px; }
.nav__toggleLines::after{ top: 6px; }

.nav__links{
  display:flex; align-items:center; gap: 14px;
}
.nav__links a{ color: var(--muted); font-weight: 600; font-size: .95rem; }
.nav__links a:hover{ color: var(--text); }
.nav__cta{ margin-left: 6px; }

/* Hero */
.hero{
  position: relative;
  padding: 34px 0 18px;
  overflow: clip;
}
.hero__grid{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 28px;
  align-items: start;
}
.hero__copy h1{
  font-size: clamp(2rem, 3vw, 3.05rem);
  line-height: 1.08;
  margin: 10px 0 12px;
  letter-spacing: -0.02em;
}
.lead{
  font-size: 1.06rem;
  color: var(--muted);
  max-width: 58ch;
}
.pill{
  display:inline-flex; align-items:center; gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.78);
  width: fit-content;
  font-weight: 600;
  font-size: .92rem;
}
.hero__actions{ display:flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }

.hero__trust{
  display:flex; gap: 18px; flex-wrap: wrap;
  margin-top: 16px;
}
.kpi{
  display:block;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.kpi__label{ display:block; color: var(--muted); font-size: .92rem; }

.note{
  margin-top: 10px;
  color: var(--muted);
  font-size: .92rem;
}

.hero__media{
  display:grid;
  gap: 12px;
}
.portrait{
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(139,30,36,.14), rgba(16,23,34,.10));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 10px;
}
.portrait img{
  border-radius: calc(var(--radius) - 8px);
}

.hero__bg{
  position:absolute; inset: -120px -100px auto -100px;
  height: 480px;
  background:
    radial-gradient(circle at 20% 20%, rgba(139,30,36,.16), transparent 45%),
    radial-gradient(circle at 70% 0%, rgba(16,23,34,.18), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(139,30,36,.10), transparent 50%);
  pointer-events:none;
}

/* Sections */
.section{ padding: 54px 0; }
.section--alt{ background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Dark section variants */
.section--dark{
  background: radial-gradient(circle at 20% 20%, rgba(139,30,36,.18), transparent 45%),
              radial-gradient(circle at 70% 0%, rgba(16,23,34,.45), transparent 50%),
              linear-gradient(180deg, var(--dark-bg), var(--dark-bg-2));
  color: var(--dark-text);
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.section--dark .muted{ color: var(--dark-muted); }
.section--dark .link{ color: #ffb4b8; }
.section--dark .section__head h2{ color: var(--dark-text); }
.section--darkSoft{ background: linear-gradient(180deg, #0c1016, #0b0e13); }

.section__head{
  margin-bottom: 16px;
}
.section__head h2{
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  letter-spacing: -0.02em;
}

.grid{ display:grid; gap: var(--gap); }
.grid.two{ grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.three{ grid-template-columns: repeat(3, minmax(0,1fr)); }

.card{
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 18px;
}

.card--soft{
  background: linear-gradient(180deg, rgba(139,30,36,.06), rgba(255,255,255,1));
  border-color: rgba(139,30,36,.14);
}

.card--accent{
  border-color: var(--accent-line);
  box-shadow: 0 14px 34px rgba(139,30,36,.10);
}

.card--dark{
  background: rgba(255,255,255,.06);
  border: 1px solid var(--dark-line);
  box-shadow: var(--shadow-2);
  color: var(--dark-text);
}
.card--dark p, .card--dark li{ color: var(--dark-muted); }

.card h3{ margin: 0 0 10px; letter-spacing: -0.01em; }
.divider{ height: 1px; background: var(--line); margin: 14px 0; }
.divider--dark{ background: var(--dark-line); }

.list{ display:grid; gap: 8px; }
.tags{ display:flex; gap: 8px; flex-wrap: wrap; }
.tags li{
  font-size: .90rem;
  padding: 7px 10px;
  background: var(--accent-weak);
  border: 1px solid rgba(139,30,36,.18);
  border-radius: 999px;
}

/* Checklist */
.checklist{ display:grid; gap: 10px; margin-top: 10px; }
.checklist li{
  color: var(--muted);
  padding-left: 18px;
  position: relative;
}
.checklist li::before{
  content:"";
  position:absolute;
  left: 0; top: 10px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* Badge */
.badge{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(16,23,34,.08);
  border: 1px solid rgba(16,23,34,.16);
  font-weight: 800;
  font-size: .84rem;
  color: #101722;
}
.badge--dark{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.16);
  color: rgba(255,255,255,.92);
}

.bullets{ margin-top: 10px; display:grid; gap: 8px; }
.bullets li{
  color: var(--muted);
  padding-left: 18px;
  position: relative;
}
.bullets li::before{
  content:"";
  position:absolute;
  left: 0; top: 10px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* Project */
.project__top{ display:flex; align-items:flex-start; justify-content: space-between; gap: 10px; }
.project__top h3{ margin: 0; }
.meta{ margin-top: 10px; display:grid; gap: 8px; color: var(--muted); font-size: .95rem; }
.section--dark .meta{ color: var(--dark-muted); }

.steps{ margin: 0; padding-left: 18px; display:grid; gap: 10px; }
.steps li{ color: var(--muted); }
.section--dark .steps li{ color: var(--dark-muted); }

.link{ display:inline-flex; margin-top: 12px; color: var(--accent); font-weight: 900; }
.link:hover{ text-decoration: underline; }

.quote blockquote{
  margin: 0 0 10px;
  color: inherit;
  font-weight: 700;
}
.quote figcaption{ color: var(--muted); font-size: .92rem; }
.section--dark .quote figcaption{ color: var(--dark-muted); }

/* CTA band */
.ctaBand{
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(139,30,36,.18);
  background: linear-gradient(135deg, rgba(139,30,36,.08), rgba(16,23,34,.06));
  display:flex; align-items:center; justify-content: space-between; gap: 14px;
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 900;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
  user-select: none;
}
.btn:active{ transform: translateY(1px); }
.btn--primary{
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 22px rgba(139,30,36,.22);
}
.btn--primary:hover{ filter: brightness(1.03); }
.btn--ghost{
  background: #fff;
  border-color: var(--line);
  color: var(--text);
}
.btn--ghost:hover{ border-color: rgba(139,30,36,.35); }

.btn--ghostDark{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.16);
  color: rgba(255,255,255,.94);
}
.btn--ghostDark:hover{
  border-color: rgba(255,255,255,.30);
  background: rgba(255,255,255,.10);
}

/* Forms */
.form{ display:grid; gap: 12px; }
.field label{ display:block; font-weight: 900; font-size: .92rem; margin-bottom: 6px; }
.field input, .field select, .field textarea{
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 12px 12px;
  font: inherit;
  outline: none;
  background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus{
  border-color: rgba(139,30,36,.35);
  box-shadow: 0 0 0 4px rgba(139,30,36,.12);
}
.hp{ display:none; }

.consent{
  display:flex; align-items:flex-start; gap: 10px;
  color: var(--muted);
  font-size: .92rem;
}
.consent a{ color: var(--accent); font-weight: 900; }
.form__status{ min-height: 20px; color: var(--muted); font-size: .92rem; }

.miniMap{
  margin-top: 14px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.miniMap img{ width: 100%; height: 200px; object-fit: cover; }

/* Accordion */
.accordion details{ padding: 14px 18px; }
.accordion summary{ cursor: pointer; font-weight: 950; }
.accordion p{ margin-top: 10px; color: var(--muted); }

/* Gallery */
.gallery{
  display:grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap: 12px;
}
.gallery__item{
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease;
}
.gallery__item:hover{
  transform: translateY(-2px);
  border-color: rgba(139,30,36,.26);
  box-shadow: 0 14px 34px rgba(17, 24, 39, .12);
}
.gallery__item img{ width: 100%; height: 140px; object-fit: cover; }

/* Lightbox */
.lightbox{
  position: fixed;
  inset: 0;
  display:none;
  z-index: 120;
}
.lightbox.is-open{ display:block; }
.lightbox__backdrop{
  position:absolute; inset:0;
  background: rgba(0,0,0,.72);
}
.lightbox__dialog{
  position: relative;
  width: min(980px, calc(100% - 28px));
  margin: 56px auto 0;
  background: rgba(15,20,27,.92);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  padding: 14px;
  overflow:hidden;
}
.lightbox__img{
  width: 100%;
  max-height: min(72vh, 700px);
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255,255,255,.03);
}
.lightbox__close{
  position:absolute; top: 8px; right: 12px;
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.92);
  font-size: 22px;
  cursor: pointer;
}
.lightbox__nav{
  position:absolute; top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.92);
  font-size: 30px;
  cursor: pointer;
  display:flex; align-items:center; justify-content:center;
}
.lightbox__nav--prev{ left: 10px; }
.lightbox__nav--next{ right: 10px; }
.lightbox__hint{
  padding: 10px 6px 2px;
  text-align: center;
  color: rgba(243,246,255,.70);
}

/* Footer */
.footer{
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 26px 0 18px;
}
.footer__grid{
  display:grid;
  grid-template-columns: 1.3fr .7fr .7fr;
  gap: 18px;
  align-items: start;
}
.footer__links{ display:grid; gap: 10px; margin-top: 8px; }
.footer__links a{ color: var(--muted); font-weight: 800; }
.footer__links a:hover{ color: var(--text); }
.footer__bottom{
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display:flex; justify-content: space-between; gap: 12px;
}

/* Floating WhatsApp */
.floatWa{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  background: var(--accent);
  color: #fff;
  padding: 12px 14px;
  border-radius: 999px;
  box-shadow: 0 16px 34px rgba(139,30,36,.26);
  font-weight: 950;
}
.floatWa:hover{ filter: brightness(1.03); }

/* Mobile bar */
.mobileBar{
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display:none;
  gap: 10px;
  z-index: 70;
}
.mobileBar__btn{
  flex: 1;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 14px 30px rgba(17,24,39,.12);
  text-align:center;
  font-weight: 950;
}
.mobileBar__btn--wa{
  border-color: rgba(139,30,36,.22);
  background: rgba(139,30,36,.10);
  color: var(--text);
}

/* Prose page */
.prose{ max-width: 860px; margin: 0 auto; }

/* Reveal (subtle) */
.reveal{
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .45s ease, transform .45s ease;
}
.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity: 1; transform: none; transition: none; }
  .gallery__item{ transition: none; }
  .btn{ transition: none; }
}

/* Responsive */
@media (max-width: 1100px){
  .gallery{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 960px){
  .hero__grid{ grid-template-columns: 1fr; }
  .footer__grid{ grid-template-columns: 1fr; }
  .grid.three{ grid-template-columns: 1fr; }
  .grid.two{ grid-template-columns: 1fr; }
  .ctaBand{ flex-direction: column; align-items: flex-start; }
  .gallery__item img{ height: 180px; }
}
@media (max-width: 820px){
  .nav__toggle{ display:inline-flex; align-items:center; justify-content:center; }
  .nav__links{
    display:none;
    position:absolute;
    right: 20px;
    top: 64px;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: 18px;
    padding: 14px;
    min-width: 220px;
    align-items: stretch;
  }
  .nav__links.is-open{ display:flex; }
  .nav__links a{ padding: 10px 10px; border-radius: 12px; }
  .nav__links a:hover{ background: rgba(139,30,36,.06); }
  .nav__cta{ margin-left: 0; }

  .mobileBar{ display:flex; }
  .floatWa{ bottom: 78px; }
}
@media (max-width: 520px){
  .gallery{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .gallery__item img{ height: 140px; }
  .lightbox__dialog{ margin-top: 18px; }
}


/* Perfil (Dr. Ivanildo) */
.profileSplit{
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 18px;
  align-items: center;
}
.profilePhoto{
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #fff;
}
.profilePhoto img{
  width: 100%;
  height: 520px;
  object-fit: cover;
}
.profilePoints{
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}
.profileActions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}
@media (max-width: 960px){
  .profileSplit{ grid-template-columns: 1fr; }
  .profilePhoto img{ height: 420px; }
}
@media (max-width: 520px){
  .profilePhoto img{ height: 320px; }
}
