/*
Theme Name: Grupo HP Engenharia
Theme URI: https://hpengenhariagrupo.online/
Author: Grupo HP
Author URI: https://hpengenhariagrupo.online/
Description: Tema institucional premium para o Grupo HP Engenharia.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: grupo-hp
*/

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --ink: #142b31;
  --ink-deep: #0c1d21;
  --paper: #f3efe7;
  --paper-soft: #ebe5da;
  --white: #f7f4ed;
  --muted: #7b8987;
  --line: rgba(20, 43, 49, .18);
  --amber: #f5b426;
  --amber-deep: #d99508;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Manrope, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; height: auto; }
.hp-container { width: min(var(--max), calc(100% - 64px)); margin: 0 auto; }
.hp-mono { font-family: 'DM Mono', monospace; text-transform: uppercase; letter-spacing: .13em; font-size: 10px; }
.hp-site { overflow: hidden; }

.hp-utility { background: var(--ink-deep); color: rgba(247,244,237,.65); border-bottom: 1px solid rgba(247,244,237,.16); }
.hp-utility-inner { width: min(var(--max), calc(100% - 64px)); min-height: 34px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.hp-utility-group { display: flex; gap: 22px; }
.hp-utility a:hover, .hp-footer a:hover { color: var(--amber); }
.hp-nav { background: var(--ink); color: var(--white); border-bottom: 1px solid rgba(247,244,237,.16); }
.hp-nav-inner { width: min(var(--max), calc(100% - 64px)); min-height: 84px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.hp-logo { display: inline-flex; align-items: center; gap: 10px; }
.hp-logo-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 2px solid var(--amber); color: var(--amber); font: 700 16px 'Space Grotesk', sans-serif; transform: skew(-9deg); }
.hp-logo-copy { display: grid; gap: 2px; }
.hp-logo-copy strong { font: 700 18px 'Space Grotesk', sans-serif; letter-spacing: -.04em; }
.hp-logo-copy span { color: var(--amber); font: 500 9px 'DM Mono', monospace; text-transform: uppercase; letter-spacing: .2em; }
.hp-nav-links { display: flex; align-items: center; gap: 34px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.hp-nav-links > a:not(.hp-btn) { opacity: .76; transition: opacity .2s, color .2s; }
.hp-nav-links > a:not(.hp-btn):hover { opacity: 1; color: var(--amber); }
.hp-btn { min-height: 49px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 21px; border: 1px solid var(--line); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; transition: transform .2s, background .2s, color .2s, border-color .2s; }
.hp-btn:hover { transform: translateY(-2px); }
.hp-btn-primary { background: var(--amber); border-color: var(--amber); color: var(--ink-deep); }
.hp-btn-primary:hover { background: #ffc43d; border-color: #ffc43d; }
.hp-btn-ghost { color: var(--white); border-color: rgba(247,244,237,.35); }
.hp-btn-ghost:hover { border-color: var(--amber); color: var(--amber); }
.hp-menu-toggle { display: none; background: transparent; color: var(--white); border: 0; padding: 8px; }

.hp-hero { position: relative; min-height: 641px; padding: 91px 0 62px; color: var(--white); background: var(--ink); isolation: isolate; }
.hp-hero::before, .hp-hero::after { content: ''; position: absolute; z-index: -1; width: 1px; height: 580px; background: rgba(245,180,38,.34); bottom: -164px; transform: rotate(44deg); }
.hp-hero::before { left: 43%; }
.hp-hero::after { left: 51%; }
.hp-hero-inner { width: min(var(--max), calc(100% - 64px)); margin: 0 auto; }
.hp-hero-grid { display: grid; grid-template-columns: 1fr 260px; gap: 100px; align-items: end; }
.hp-kicker, .hp-eyebrow { color: var(--amber); }
.hp-kicker::before { content: ''; display: inline-block; width: 34px; height: 2px; margin: 0 12px 3px 0; background: var(--amber); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; }
.hp-hero h1 { max-width: 720px; margin: 30px 0 26px; font-size: clamp(54px, 7vw, 92px); line-height: .92; letter-spacing: -.085em; }
.hp-hero h1 em { color: var(--amber); font-style: normal; }
.hp-hero-lede { max-width: 575px; margin-bottom: 35px; color: rgba(247,244,237,.65); font-size: 16px; line-height: 1.7; }
.hp-hero-actions { display: flex; gap: 13px; }
.hp-hero-aside { padding: 14px 0 8px 24px; border-left: 1px solid rgba(247,244,237,.3); display: grid; gap: 10px; }
.hp-hero-aside p { color: rgba(247,244,237,.48); margin-bottom: 9px; }
.hp-hero-aside strong { font: 600 15px/1.2 Manrope, sans-serif; }
.hp-scroll-cue { position: absolute; bottom: 24px; left: 50%; display: flex; align-items: center; gap: 14px; color: rgba(247,244,237,.5); }
.hp-scroll-line { display: inline-block; width: 60px; height: 1px; background: var(--amber); }

.hp-stats { background: var(--amber); }
.hp-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.hp-stat { padding: 28px 26px 30px; border-right: 1px solid rgba(20,43,49,.18); }
.hp-stat:first-child { padding-left: 0; }
.hp-stat:last-child { border: 0; }
.hp-stat strong { display: block; margin-bottom: 8px; font: 700 50px/.9 'Space Grotesk', sans-serif; letter-spacing: -.08em; }
.hp-stat span { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.hp-sector-strip { overflow: hidden; background: var(--paper-soft); border-bottom: 1px solid var(--line); }
.hp-sector-track { width: max-content; display: flex; gap: 30px; padding: 20px 0; animation: hp-marquee 36s linear infinite; }
.hp-sector-track span { display: inline-flex; align-items: center; gap: 12px; color: #71817f; font: 500 10px 'DM Mono', monospace; text-transform: uppercase; letter-spacing: .09em; }
.hp-sector-track i { width: 4px; height: 4px; background: var(--amber); }
@keyframes hp-marquee { to { transform: translateX(-50%); } }

.hp-section { padding: 122px 0; }
.hp-section-header { display: grid; grid-template-columns: 1fr 360px; gap: 80px; align-items: end; margin-bottom: 75px; }
.hp-eyebrow { margin-bottom: 23px; }
.hp-section h2 { max-width: 650px; margin-bottom: 0; font-size: clamp(40px, 5vw, 65px); line-height: .97; letter-spacing: -.075em; }
.hp-section-intro { margin: 0; color: #6e7b79; line-height: 1.8; font-size: 15px; }
.hp-services { background: var(--paper); }
.hp-services-grid { display: grid; grid-template-columns: 1.14fr .86fr; gap: 80px; }
.hp-service-item { border-top: 1px solid var(--line); }
.hp-service-item:last-child { border-bottom: 1px solid var(--line); }
.hp-service-button { width: 100%; padding: 25px 0; border: 0; background: transparent; color: var(--ink); display: flex; align-items: center; justify-content: space-between; text-align: left; }
.hp-service-button > span { display: flex; gap: 25px; align-items: center; }
.hp-service-number { color: #83908c; }
.hp-service-title { font: 600 20px 'Space Grotesk', sans-serif; }
.hp-service-icon { color: var(--amber-deep); transition: transform .25s; }
.hp-service-icon.is-open { transform: rotate(45deg); }
.hp-service-copy { padding: 0 50px 26px 53px; color: #6e7b79; font-size: 14px; line-height: 1.7; }
.hp-service-card { min-height: 340px; padding: 37px; background: var(--ink); color: var(--white); display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; }
.hp-service-card > div { color: var(--amber); }
.hp-service-card h3 { max-width: 290px; margin: 34px 0 12px; font-size: 33px; line-height: 1; letter-spacing: -.07em; }
.hp-service-card p { max-width: 280px; margin-bottom: 27px; color: rgba(247,244,237,.55); font-size: 13px; line-height: 1.65; }
.hp-service-card .hp-btn { color: var(--white); border-color: rgba(247,244,237,.28); }

.hp-process { padding-top: 0; }
.hp-process-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.hp-process-step { min-height: 220px; padding: 27px 25px 20px 0; border-right: 1px solid var(--line); }
.hp-process-step:not(:first-child) { padding-left: 25px; }
.hp-process-step:last-child { border: 0; }
.hp-process-step strong { color: var(--amber-deep); font: 500 11px 'DM Mono', monospace; }
.hp-process-step h3 { margin: 50px 0 11px; font-size: 24px; letter-spacing: -.05em; }
.hp-process-step p { max-width: 210px; color: #71817f; font-size: 13px; line-height: 1.6; }

.hp-section-dark { background: var(--ink); color: var(--white); }
.hp-section-dark .hp-section-intro, .hp-section-dark .hp-eyebrow { color: rgba(247,244,237,.5); }
.hp-projects .hp-eyebrow { color: var(--amber); }
.hp-project-list { border-top: 1px solid rgba(247,244,237,.2); }
.hp-project-card { display: grid; grid-template-columns: 180px 1fr 40px; gap: 28px; align-items: center; padding: 34px 0; border-bottom: 1px solid rgba(247,244,237,.2); transition: padding .25s, color .25s; }
.hp-project-card:hover { padding-left: 12px; color: var(--amber); }
.hp-project-tag { color: var(--amber); }
.hp-project-card h3 { max-width: 480px; margin: 0 0 8px; font-size: 25px; letter-spacing: -.06em; }
.hp-project-card p { margin: 0; color: rgba(247,244,237,.55); font-size: 13px; }
.hp-project-arrow { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(247,244,237,.25); }

.hp-trust-grid { display: grid; grid-template-columns: .88fr 1.12fr; gap: 120px; }
.hp-trust-lede { max-width: 360px; margin-top: 30px; color: #71817f; line-height: 1.75; font-size: 14px; }
.hp-testimonial { min-height: 245px; padding: 34px; background: var(--paper-soft); }
.hp-testimonial blockquote { max-width: 530px; margin: 0 0 30px; font: 500 25px/1.25 'Space Grotesk', sans-serif; letter-spacing: -.045em; }
.hp-testimonial footer { display: flex; align-items: end; justify-content: space-between; color: #71817f; font-size: 12px; line-height: 1.5; }
.hp-testimonial footer strong { color: var(--ink); }
.hp-testimonial-controls { display: flex; gap: 8px; }
.hp-icon-btn { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid var(--line); background: transparent; color: var(--ink); }
.hp-icon-btn:hover { background: var(--amber); border-color: var(--amber); }
.hp-credentials { display: flex; align-items: center; gap: 20px; margin-top: 22px; }
.hp-credentials-badge { display: inline-flex; align-items: center; gap: 8px; padding: 12px 15px; background: var(--ink); color: var(--amber); font-size: 12px; font-weight: 800; }
.hp-credentials p { margin: 0; color: #71817f; font-size: 11px; line-height: 1.6; }

.hp-contact { padding-bottom: 110px; }
.hp-contact-grid { display: grid; grid-template-columns: .82fr 1.18fr; gap: 100px; }
.hp-contact-copy { max-width: 420px; margin: 28px 0 37px; color: #71817f; font-size: 15px; line-height: 1.75; }
.hp-contact-details { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 35px; }
.hp-contact-detail { display: flex; gap: 12px; color: var(--amber-deep); font-size: 12px; }
.hp-contact-detail span { display: grid; gap: 4px; color: #71817f; }
.hp-contact-detail a { color: var(--ink); font-size: 12px; }
.hp-contact-detail a:hover { color: var(--amber-deep); }
.hp-form { padding: 34px; background: var(--paper-soft); }
.hp-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.hp-field { display: grid; gap: 8px; margin-bottom: 20px; }
.hp-field label { color: #71817f; font: 500 10px 'DM Mono', monospace; text-transform: uppercase; letter-spacing: .1em; }
.hp-field input, .hp-field select, .hp-field textarea { width: 100%; padding: 13px 0; border: 0; border-bottom: 1px solid var(--line); outline: 0; background: transparent; color: var(--ink); }
.hp-field input:focus, .hp-field select:focus, .hp-field textarea:focus { border-color: var(--amber-deep); }
.hp-field textarea { min-height: 90px; resize: vertical; }
.hp-field input::placeholder, .hp-field textarea::placeholder { color: #9aa5a2; }
.hp-success { display: flex; gap: 13px; padding: 20px; background: rgba(245,180,38,.25); color: var(--ink); font-size: 14px; line-height: 1.6; }
.hp-success svg { color: var(--amber-deep); flex: 0 0 auto; }
.hp-success strong { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 18px; }

.hp-footer { padding: 28px 0; background: var(--ink-deep); color: var(--white); }
.hp-footer-inner { display: flex; align-items: center; justify-content: space-between; }
.hp-footer-note, .hp-footer-back { color: rgba(247,244,237,.48); font: 10px 'DM Mono', monospace; text-transform: uppercase; letter-spacing: .09em; }
.hp-footer-back { color: var(--amber); }

@media (max-width: 800px) {
  .hp-container, .hp-utility-inner, .hp-nav-inner, .hp-hero-inner { width: min(100% - 36px, var(--max)); }
  .hp-utility-inner { gap: 12px; }
  .hp-utility-group:last-child { display: none; }
  .hp-nav-inner { min-height: 72px; }
  .hp-menu-toggle { display: block; }
  .hp-nav-links { position: absolute; z-index: 5; top: 106px; left: 0; right: 0; display: none; padding: 22px 18px; background: var(--ink-deep); flex-direction: column; align-items: stretch; gap: 0; }
  .hp-nav-links.is-open { display: flex; }
  .hp-nav-links > a { padding: 14px 0; }
  .hp-nav-links .hp-btn { margin-top: 10px; }
  .hp-hero { min-height: 650px; padding-top: 80px; }
  .hp-hero-grid, .hp-section-header, .hp-services-grid, .hp-trust-grid, .hp-contact-grid { grid-template-columns: 1fr; gap: 42px; }
  .hp-hero h1 { font-size: clamp(54px, 15vw, 80px); }
  .hp-hero-aside { max-width: 300px; }
  .hp-scroll-cue { display: none; }
  .hp-section { padding: 82px 0; }
  .hp-section-header { margin-bottom: 45px; }
  .hp-process { padding-top: 0; }
  .hp-process-grid { grid-template-columns: 1fr 1fr; }
  .hp-process-step { min-height: 190px; }
  .hp-process-step:nth-child(2) { border-right: 0; }
  .hp-process-step:nth-child(n+3) { border-top: 1px solid var(--line); }
  .hp-project-card { grid-template-columns: 1fr 32px; gap: 13px; }
  .hp-project-tag { grid-column: 1 / -1; }
  .hp-contact { padding-bottom: 80px; }
  .hp-footer-inner { align-items: flex-start; flex-direction: column; gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
/* Full-width safety and Portfolio page */
html, body, .hp-site { width: 100%; max-width: 100%; min-width: 0; }
.hp-portfolio-page { min-height: 70vh; background: var(--paper); color: var(--ink); }
.hp-portfolio-hero { padding: 86px 0 72px; background: var(--ink); color: var(--white); }
.hp-portfolio-hero h1 { max-width: 760px; margin: 12px 0 0; font-size: clamp(44px, 7vw, 88px); line-height: .95; letter-spacing: -.07em; }
.hp-portfolio-hero p { max-width: 560px; margin: 26px 0 0; color: rgba(247,244,237,.65); line-height: 1.7; }
.hp-portfolio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; padding-top: 72px; padding-bottom: 90px; }
.hp-portfolio-card { overflow: hidden; background: var(--white); border: 1px solid var(--line); }
.hp-portfolio-image { display: block; aspect-ratio: 16/10; overflow: hidden; background: var(--paper-soft); }
.hp-portfolio-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.hp-portfolio-image:hover img { transform: scale(1.03); }
.hp-portfolio-content { padding: 26px; }
.hp-portfolio-content h2 { margin: 0 0 14px; font-size: 28px; letter-spacing: -.04em; }
.hp-portfolio-content p { color: #71817f; line-height: 1.7; }
.hp-portfolio-content .hp-btn { margin-top: 12px; }
.hp-portfolio-empty { grid-column: 1 / -1; padding: 50px 0; color: #71817f; }
@media (max-width: 700px) { .hp-portfolio-grid { grid-template-columns: 1fr; padding-top: 42px; } .hp-portfolio-hero { padding: 60px 0; } }
/* Final viewport and portfolio gallery correction */
html, body { width: 100%; max-width: 100%; margin: 0; padding: 0; overflow-x: hidden; }
.hp-site, .hp-portfolio-page { width: 100%; max-width: none; margin-left: 0; margin-right: 0; }
.hp-utility, .hp-nav, .hp-hero, .hp-stats, .hp-sector-strip, .hp-section, .hp-footer { width: 100%; }
.hp-portfolio-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 22px 0; }
.hp-portfolio-gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
@media (max-width: 700px) { .hp-portfolio-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }


/* Portfolio detail and responsive corrections */
.hp-portfolio-detail-hero .hp-back-link { display: inline-block; margin-bottom: 34px; color: var(--amber); }
.hp-portfolio-detail-hero .hp-back-link:hover { color: var(--white); }
.hp-portfolio-detail { padding-top: 72px; padding-bottom: 110px; }
.hp-portfolio-featured { margin: 0 0 58px; background: var(--paper-soft); }
.hp-portfolio-featured img { display: block; width: 100%; max-height: 620px; object-fit: cover; }
.hp-portfolio-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 90px; align-items: start; }
.hp-portfolio-entry { max-width: 760px; color: #5f706d; font-size: 16px; line-height: 1.85; }
.hp-portfolio-entry > :last-child { margin-bottom: 0; }
.hp-portfolio-entry h2, .hp-portfolio-entry h3 { color: var(--ink); margin-top: 1.8em; }
.hp-portfolio-entry img { display: block; height: auto; }
.hp-portfolio-detail-aside { display: grid; gap: 22px; padding: 26px; background: var(--paper-soft); color: #71817f; }
.hp-portfolio-detail-aside .hp-btn { color: var(--ink); border-color: var(--line); }
.hp-portfolio-detail-gallery { margin-top: 72px; }
.hp-portfolio-detail-gallery .hp-portfolio-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hp-portfolio-detail-gallery .hp-portfolio-gallery a { display: block; }
.hp-portfolio-detail-gallery .hp-portfolio-gallery img { transition: opacity .2s, transform .2s; }
.hp-portfolio-detail-gallery .hp-portfolio-gallery a:hover img { opacity: .82; transform: scale(1.02); }
.hp-portfolio-content h2 a:hover { color: var(--amber-deep); }
@media (max-width: 800px) {
  .hp-portfolio-detail { padding-top: 44px; padding-bottom: 75px; }
  .hp-portfolio-detail-layout { grid-template-columns: 1fr; gap: 38px; }
  .hp-portfolio-detail-aside { max-width: none; }
  .hp-portfolio-detail-gallery { margin-top: 50px; }
}
@media (max-width: 540px) {
  .hp-portfolio-detail-gallery .hp-portfolio-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .hp-portfolio-content { padding: 22px; }
  .hp-portfolio-content h2 { font-size: 24px; }
}

/* Portfolio proportion pass */
.hp-portfolio-hero { padding: 58px 0 52px; }
.hp-portfolio-hero h1 { font-size: clamp(42px, 6vw, 72px); }
.hp-portfolio-hero p { margin-top: 18px; }
.hp-portfolio-grid { max-width: 1080px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding-top: 48px; padding-bottom: 72px; }
.hp-portfolio-card { min-width: 0; }
.hp-portfolio-image { aspect-ratio: 16/9; }
.hp-portfolio-content { padding: 22px; }
.hp-portfolio-content h2 { font-size: 23px; line-height: 1.05; }
.hp-portfolio-content p { margin-bottom: 0; font-size: 13px; line-height: 1.6; }
.hp-portfolio-gallery { gap: 7px; margin: 18px 0 4px; }
.hp-portfolio-gallery img { aspect-ratio: 4/3; }
.hp-portfolio-content .hp-btn { min-height: 43px; padding: 0 15px; font-size: 9px; }
.hp-portfolio-detail-hero { padding: 48px 0 46px; }
.hp-portfolio-detail { max-width: 1080px; padding-top: 52px; padding-bottom: 82px; }
.hp-portfolio-featured { margin-bottom: 42px; }
.hp-portfolio-featured img { max-height: 500px; }
@media (max-width: 900px) {
  .hp-portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .hp-portfolio-hero { padding: 44px 0 40px; }
  .hp-portfolio-grid { width: min(100% - 36px, var(--max)); grid-template-columns: 1fr; gap: 18px; padding-top: 32px; padding-bottom: 54px; }
  .hp-portfolio-content { padding: 20px; }
}
