/* SPEX Engenharia — landing page institucional (formato convencional)
   Cores da marca: navy #1d2630 e cinza #c8cbcf. */

:root {
  --navy: #1d2630;
  --navy-2: #2f3947;
  --navy-3: #4a535e;
  --gray: #c8cbcf;
  --light: #f3f4f6;
  --line: #e3e5e9;
  --white: #ffffff;
  --ink: #1d2630;
  --muted: #4a535e;
  --soft: #d7dadf;

  --font-display: "Red Hat Display", system-ui, sans-serif;
  --font-text: "Red Hat Text", system-ui, sans-serif;

  --container: 1180px;
  --section: clamp(4rem, 8vw, 6.5rem);
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 8px 28px rgba(29, 38, 48, 0.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--white); color: var(--ink); font-family: var(--font-text); font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, figure, ul, ol { margin: 0; }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.section--navy :focus-visible, .footer :focus-visible, .hero :focus-visible { outline-color: #fff; }
:target { scroll-margin-top: 96px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.15; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.25rem; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 0.5rem 1rem; z-index: 100; }
.skip:focus { left: 8px; }

.container { width: min(var(--container), 100% - 3rem); margin-inline: auto; }
.container--narrow { max-width: 820px; }
.eyebrow { font-size: 0.875rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--navy-3); margin-bottom: 0.75rem; }
.eyebrow--light { color: var(--gray); }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 50px; padding: 0 1.5rem; border-radius: var(--radius-sm); font-weight: 500; text-decoration: none; border: 2px solid transparent; white-space: nowrap; transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 140ms var(--ease); }
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-2); }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--gray); }
.btn--outline { border-color: #fff; color: #fff; }
.btn--outline:hover { background: #fff; color: var(--navy); }
.btn--block { width: 100%; }

/* ---------- cabeçalho ---------- */
.header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); transition: box-shadow 200ms ease; }
.header.is-scrolled { box-shadow: var(--shadow); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: 88px; position: relative; }
.brand { display: block; flex: none; }
.brand img { height: 62px; width: auto; }
.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a:not(.btn) { text-decoration: none; font-weight: 500; white-space: nowrap; padding: 0.25rem 0; border-bottom: 2px solid transparent; transition: border-color 180ms ease; }
.nav a:not(.btn):hover { border-bottom-color: var(--navy); }
.nav-toggle { display: none; width: 48px; height: 48px; border-radius: var(--radius-sm); flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--navy); border-radius: 2px; transition: transform 200ms ease, opacity 200ms ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { position: relative; background: var(--navy); color: #fff; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; opacity: 0.28; }
.hero__inner { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 3rem; min-height: 620px; padding: 5rem 0; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.08; max-width: 20ch; margin-bottom: 1.25rem; }
.hero__lead { font-size: 1.125rem; line-height: 1.6; color: var(--soft); max-width: 36rem; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }
.hero__logo { display: flex; justify-content: center; }
.hero__logo img { width: min(100%, 340px); height: auto; }

/* ---------- diferenciais ---------- */
.facts { background: #fff; border-bottom: 1px solid var(--line); }
.facts__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; padding: 1.75rem 0; }
.fact { display: grid; gap: 0.2rem; padding-left: 1rem; border-left: 3px solid var(--navy); }
.fact strong { font-weight: 500; }
.fact span { font-size: 0.925rem; color: var(--muted); line-height: 1.4; }

/* ---------- seções ---------- */
.section { padding-block: var(--section); }
.section--light { background: var(--light); }
.section--navy { background: var(--navy); color: #fff; }
.section__head { max-width: 700px; margin: 0 auto 3rem; text-align: center; }
.section__head p:not(.eyebrow) { color: var(--muted); font-size: 1.0625rem; margin-top: 0.75rem; }
.section__head--light .eyebrow { color: var(--gray); }
.section__head--light p:not(.eyebrow) { color: var(--soft); }

/* ---------- serviços ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; display: flex; flex-direction: column; gap: 0.75rem; transition: transform 200ms var(--ease), box-shadow 200ms ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card svg { width: 44px; height: 44px; fill: none; stroke: var(--navy); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 0.5rem; }
.card p { color: var(--muted); flex: 1; }
.card__link { font-weight: 500; text-decoration: none; color: var(--navy); }
.card__link::after { content: " →"; }
.card__link:hover { text-decoration: underline; }

/* ---------- sobre ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.about__text h2 { margin-bottom: 1.25rem; }
.about__text p + p { margin-top: 1rem; }
.checks { list-style: none; padding: 0; display: grid; gap: 0.65rem; margin: 1.5rem 0 2rem; }
.checks li { display: flex; align-items: flex-start; gap: 0.6rem; font-weight: 500; }
.checks svg { flex: none; width: 22px; height: 22px; margin-top: 0.15rem; fill: none; stroke: var(--navy); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- etapas ---------- */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.step { background: var(--navy-2); border-radius: var(--radius); padding: 2rem 1.75rem; }
.step__num { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--gray); color: var(--navy); font-family: var(--font-display); font-weight: 800; font-size: 1.125rem; margin-bottom: 1.1rem; }
.step h3 { margin-bottom: 0.5rem; color: #fff; }
.step p { color: var(--soft); font-size: 0.975rem; }

/* ---------- galeria ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.gallery figure { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.gallery img, .gallery video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery video { object-position: 50% 0; transform: scale(1.4); transform-origin: 50% 0; }
.gallery figcaption { padding: 0.8rem 1rem; font-size: 0.925rem; color: var(--muted); border-top: 1px solid var(--line); }

/* ---------- perguntas ---------- */
.faq details { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; font-weight: 500; font-size: 1.125rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--navy); stroke-width: 2.2; stroke-linecap: round; transition: transform 200ms var(--ease); }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq details p { margin-top: 0.75rem; color: var(--muted); max-width: 62ch; }

/* ---------- contato ---------- */
.contact { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 4rem; align-items: start; }
.contact__info h2 { margin-bottom: 1rem; }
.contact__info > p { color: var(--muted); }
.contact__list { list-style: none; padding: 0; display: grid; gap: 1.1rem; margin-top: 2rem; }
.contact__list strong { display: block; font-size: 0.85rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.15rem; }
.contact__list a, .contact__list span { font-size: 1.0625rem; }
.contact__list a { text-decoration: none; font-weight: 500; }
.contact__list a:hover { text-decoration: underline; }
.form { background: var(--light); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; display: grid; gap: 1rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { display: block; font-size: 0.9rem; font-weight: 500; margin-bottom: 0.35rem; }
.input { width: 100%; min-height: 48px; padding: 0.6rem 0.9rem; border: 1px solid #cfd3d9; border-radius: var(--radius-sm); background: #fff; color: var(--ink); }
.input::placeholder { color: #8e949c; }
.input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(29, 38, 48, 0.12); }
select.input { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d2630' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 0.9rem center; background-size: 18px; padding-right: 2.6rem; }
textarea.input { min-height: 130px; resize: vertical; }
.form__status { min-height: 1.4em; font-weight: 500; }
.form__status.is-ok { color: #1b6e3a; }
.form__status.is-error { color: #b42318; }
.form__note { font-size: 0.85rem; color: var(--muted); }

/* ---------- rodapé ---------- */
.footer { background: var(--navy); color: var(--gray); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 3rem; padding: 4rem 0 3rem; }
.footer__brand img { width: 170px; height: auto; margin-bottom: 1.25rem; }
.footer__brand p { max-width: 32ch; font-size: 0.95rem; }
.footer__col { display: grid; align-content: start; gap: 0.5rem; font-size: 0.95rem; }
.footer__col strong { color: #fff; font-weight: 500; margin-bottom: 0.4rem; }
.footer__col a { text-decoration: none; transition: color 180ms ease; }
.footer__col a:hover { color: #fff; }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 1.25rem 0 2rem; font-size: 0.85rem; display: grid; gap: 0.4rem; }
.footer__bottom a { text-decoration: underline; text-underline-offset: 0.15em; }

/* ---------- entradas ao rolar (sem script, tudo fica visível) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 600ms var(--ease), transform 700ms var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}

/* ---------- responsivo ---------- */
@media (max-width: 1024px) {
  .cards, .steps { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .hero__inner { grid-template-columns: 1fr; min-height: 0; padding: 4rem 0; }
  .hero__logo { display: none; }
  .hero h1 { max-width: 18ch; }
  .nav-toggle { display: flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 0.5rem 1.5rem 1.25rem; }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
  .nav a:not(.btn):hover { border-bottom-color: var(--line); }
  .nav .btn { margin-top: 1rem; }
}
@media (max-width: 860px) {
  .header__inner { min-height: 72px; }
  .brand img { height: 48px; }
  .facts__grid { grid-template-columns: repeat(2, 1fr); }
  .about, .contact { grid-template-columns: 1fr; gap: 2.5rem; }
  .form__row { grid-template-columns: 1fr; }
  .section__head { margin-bottom: 2.25rem; }
}
@media (max-width: 600px) {
  .container { width: min(var(--container), 100% - 2rem); }
  .cards, .steps, .gallery, .facts__grid, .footer__grid { grid-template-columns: 1fr; }
  .hero__inner { padding: 3.5rem 0; }
  .hero h1 { font-size: clamp(1.9rem, 8vw, 2.4rem); }
  .hero__actions .btn { width: 100%; }
  .form { padding: 1.5rem 1.25rem; }
  .footer__grid { gap: 2rem; padding: 3rem 0 2rem; }
}
