/* ==========================================================
   Darlene Bastos | Consultoria de Enfermagem
   Tokens → base → layout → componentes → seções → responsivo
   ========================================================== */

:root {
  /* Cores */
  --forest: #0E3B2C;        /* verde profundo: hero, footer */
  --forest-deep: #0A2C21;
  --green: #16703C;         /* verde da marca Darlene */
  --mint: #DCEBE1;          /* destaque claro */
  --mist: #F3F5F3;          /* fundo cinza suave */
  --gold: #C9A45C;          /* botões e detalhes */
  --gold-dark: #B08A43;
  --ink: #1B2621;           /* texto */
  --ink-soft: #55625C;
  --line: #E1E6E2;
  --white: #FFFFFF;

  /* Tipografia */
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-h1: clamp(2.1rem, 1.3rem + 3.2vw, 3.6rem);
  --fs-h2: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  --fs-h3: 1.15rem;
  --fs-body: 1.0625rem;
  --fs-small: 0.9rem;

  /* Espaço e forma */
  --container: 1160px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4.5rem, 9vw, 7.5rem);
  --radius-s: 6px;
  --radius-l: 18px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
strong { font-weight: 700; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--gold); color: var(--forest-deep);
  padding: .6rem 1rem; border-radius: var(--radius-s); font-weight: 700;
}
.skip-link:focus { top: 1rem; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: var(--section-y); }

.section-head { max-width: 38rem; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.section-head h2 { font-size: var(--fs-h2); color: var(--forest); }
.section-head p { margin-top: .9rem; color: var(--ink-soft); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: .85rem 1.6rem;
  border: 0; border-radius: var(--radius-s);
  font: 700 1rem/1.2 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-gold  { background: var(--gold);  color: var(--forest-deep); }
.btn-gold:hover  { background: var(--gold-dark); }
.btn-green { background: var(--green); color: var(--white); }
.btn-green:hover { background: var(--forest); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.is-scrolled { background: rgba(10, 44, 33, .94); backdrop-filter: blur(8px); box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand img { width: 72px; height: auto; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a { color: rgba(255,255,255,.85); text-decoration: none; font-weight: 500; font-size: .98rem; }
.nav a:hover { color: var(--white); }
.nav .nav-cta {
  color: var(--white); padding: .55rem 1.1rem;
  border: 1px solid rgba(201,164,92,.7); border-radius: var(--radius-s);
}
.nav .nav-cta:hover { background: var(--gold); border-color: var(--gold); color: var(--forest-deep); }

.nav-toggle { display: none; }

/* ---------- 1. Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(100svh, 820px);
  display: flex; align-items: center;
  padding-block: 140px 96px;
  color: var(--white);
  background: var(--forest-deep);
}
/* Foto da Darlene ocupando a metade direita, fundida no verde pela esquerda */
.hero::before {
  content: ""; position: absolute; z-index: -1;
  top: 0; right: 0; bottom: 0; width: 56%;
  background:
    linear-gradient(90deg, var(--forest-deep) 0%, rgba(10,44,33,.55) 28%, rgba(10,44,33,.1) 60%, rgba(10,44,33,0) 100%),
    url("assets/hero-consultoria.jpg") 60% 0% / cover no-repeat;
}
/* Linha dourada na base: fecha a dobra com um detalhe sutil */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, var(--gold), transparent 70%);
}
.hero-content { max-width: var(--container); }
.hero-content > * { max-width: 36rem; }
.hero-kicker { color: var(--mint); font-weight: 600; margin-bottom: 1.1rem; }
.hero h1 { font-size: var(--fs-h1); font-weight: 800; letter-spacing: -0.03em; }
.hero-sub { margin-top: 1.4rem; font-size: 1.15rem; color: rgba(255,255,255,.86); }
.hero-sub strong { color: var(--white); }
.hero .btn { margin-top: 2.2rem; }

/* Entrada única da página: só o hero */
@media (prefers-reduced-motion: no-preference) {
  .hero-content > * { animation: rise .8s var(--ease) both; }
  .hero-content > :nth-child(2) { animation-delay: .08s; }
  .hero-content > :nth-child(3) { animation-delay: .16s; }
  .hero-content > :nth-child(4) { animation-delay: .24s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- 2. Serviços ---------- */
.services { background: var(--white); }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.service-card {
  padding: 2.2rem 2rem 2.4rem;
  background: var(--mist);
  border-radius: var(--radius-l);
}
.service-card .icon {
  width: 48px; height: 48px; margin-bottom: 1.6rem;
  fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.service-card h3 { font-size: var(--fs-h3); color: var(--forest); margin-bottom: .7rem; }
.service-card p { color: var(--ink-soft); font-size: .98rem; }
.service-card strong { color: var(--ink); }

/* ---------- 3. Sobre ---------- */
.about { background: var(--mist); }
.about-grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(2.5rem, 6vw, 5.5rem); align-items: center; }
.about-photo { margin: 0; position: relative; }
.about-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 45% 20%; border-radius: var(--radius-l); }
/* Bloco verde deslocado atrás da foto: dá profundidade sem ornamento extra */
.about-photo::before {
  content: ""; position: absolute; inset: 1.5rem -1.5rem -1.5rem 1.5rem; z-index: -1;
  background: var(--green); border-radius: var(--radius-l);
}
.about-photo { z-index: 0; isolation: isolate; }
.about-text h2 { font-size: var(--fs-h2); color: var(--forest); }
.about-text .lead { margin-top: 1.2rem; color: var(--ink-soft); max-width: 34rem; }

.checklist { list-style: none; padding: 0; margin: 2rem 0 2.4rem; display: grid; gap: 1rem; }
.checklist li { position: relative; padding-left: 2.4rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .15em;
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23C9A45C' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 70% no-repeat;
}

/* ---------- 4. Clínicas (grid uniforme) ---------- */
.clients { background: var(--white); }
.clients .section-head { margin-bottom: 2.5rem; }
.logo-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem;
}
.logo-grid li {
  display: grid; place-items: center;
  aspect-ratio: 16 / 9;
  padding: 1.5rem 1.75rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}
.logo-grid img {
  width: 100%; height: 100%;
  max-height: 72px;
  object-fit: contain;
}

/* ---------- 5. Formulário ---------- */
.contact { background: linear-gradient(180deg, var(--white) 0%, var(--mint) 100%); }
.form-card {
  max-width: 760px; margin-inline: auto;
  background: var(--white);
  border-radius: var(--radius-l);
  padding: clamp(2rem, 5vw, 3.5rem);
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -30px rgba(14, 59, 44, .35);
}
.form-head { text-align: center; margin-bottom: 2.2rem; }
.form-head h2 { font-size: var(--fs-h2); color: var(--forest); }
.form-head p { margin: .8rem auto 0; color: var(--ink-soft); max-width: 30rem; }

#contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 1.25rem; }
.field { display: grid; gap: .45rem; }
.field-full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .95rem; }
.optional { font-weight: 400; color: var(--ink-soft); }

.field input, .field select, .field textarea {
  width: 100%;
  font: 400 1rem/1.4 var(--font); color: var(--ink);
  background: var(--mist);
  border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: .85rem 1rem;
  transition: border-color .2s, background-color .2s;
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%2316703C' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center; background-size: 1.1rem;
  padding-right: 2.6rem;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green); background-color: var(--white);
  box-shadow: 0 0 0 3px rgba(22, 112, 60, .15);
}
.field.is-invalid input, .field.is-invalid select { border-color: #B3261E; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-actions { margin-top: .6rem; }
.form-status { margin-top: .9rem; text-align: center; font-size: var(--fs-small); min-height: 1.4em; }
.form-status.is-error { color: #B3261E; }
.form-status.is-success { color: var(--green); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest-deep); color: rgba(255,255,255,.78); padding-block: 3.5rem calc(1.75rem + env(safe-area-inset-bottom, 0px)); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 1.1rem; }
.footer-brand img { width: 56px; }
.footer-brand strong { color: var(--white); }
.footer-contact { text-align: right; font-size: .95rem; }
.footer-contact a { color: var(--gold); font-weight: 600; text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; }
.footer-copy { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; color: rgba(255,255,255,.55); }

/* ---------- Responsivo ---------- */
@media (max-width: 960px) {
  .service-grid { grid-template-columns: 1fr; max-width: 560px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 460px; margin-right: 1.5rem; }
  .logo-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: grid; place-content: center; gap: 6px;
    width: 44px; height: 44px; background: none; border: 0; cursor: pointer;
  }
  .nav-toggle span { width: 24px; height: 2px; background: var(--white); transition: transform .25s var(--ease); }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child  { transform: translateY(-4px) rotate(-45deg); }

  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--forest-deep); padding: .5rem var(--gutter) 1.5rem;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: .9rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav .nav-cta { margin-top: 1rem; text-align: center; border-bottom: 1px solid rgba(201,164,92,.7); }
  .site-header:has(.nav.is-open) { background: var(--forest-deep); }

  .hero { align-items: stretch; padding-top: 76px; min-height: auto; flex-direction: column; }
  .hero::before {
    position: relative; display: block; width: 100%; height: 82vw; min-height: 300px;
    background:
      linear-gradient(180deg, rgba(10,44,33,.35) 0%, rgba(10,44,33,0) 35%, rgba(10,44,33,0) 60%, var(--forest-deep) 100%),
      url("assets/hero-consultoria.jpg") 80% 0% / cover no-repeat;
  }
  .hero-content { margin-top: -1.5rem; }
  .hero .btn { width: 100%; }

  #contact-form { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-contact { text-align: left; }
}

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