/* =========================================================
   CEFO — direção visual da home
   ========================================================= */

:root {
  --home-ink: #07192d;
  --home-navy: #08243f;
  --home-blue: #0877d1;
  --home-sky: #2aa8f5;
  --home-paper: #f4f7fa;
  --home-line: #dbe3eb;
  --home-radius: 16px;
}

body { background: var(--home-paper); color: var(--home-ink); }
.container { width: min(1220px, calc(100% - 80px)); }

/* Header */
.topbar { min-height: 28px; background: #04101f; font-size: .68rem; }
.topbar__inner { min-height: 28px; }
.site-header { box-shadow: 0 1px 0 rgba(7, 25, 45, .09); }
.header__inner { min-height: 88px; }
.brand { width: 224px; }
.site-nav { gap: 1.8rem; font-size: .74rem; }
.site-nav > a:not(.nav-cta) { padding: 1.55rem 0; }
.nav-cta { border-radius: 6px; padding: .86rem 1.15rem; box-shadow: 0 8px 20px rgba(8, 119, 209, .16); }

/* Shared type and controls */
.eyebrow { margin-bottom: 1rem; color: var(--home-blue); font-size: .7rem; letter-spacing: .1em; }
.eyebrow--blue { color: var(--home-sky); }
.button { min-height: 46px; border-radius: 6px; padding: .8rem 1.25rem; font-size: .72rem; letter-spacing: .06em; }
.button--primary { background: var(--home-blue); box-shadow: 0 10px 22px rgba(8, 119, 209, .2); }
.button--primary:hover { background: var(--home-sky); }

/* Hero */
.hero { min-height: 590px; }
.hero__image { background-position: center center; }
.hero__overlay { background: linear-gradient(90deg, rgba(3, 19, 38, .98) 0%, rgba(3, 19, 38, .91) 31%, rgba(3, 19, 38, .54) 61%, rgba(3, 19, 38, .16) 100%); }
.hero::after { display: none; }
.hero__content { padding-top: 6.4rem; padding-bottom: 6rem; }
.hero__content::before { display: block; width: 48px; height: 3px; margin-bottom: 1.35rem; background: var(--home-sky); content: ""; }
.hero h1 { max-width: 610px; margin-bottom: 1.65rem; font-size: clamp(3.1rem, 5.3vw, 4.9rem); line-height: .91; letter-spacing: -.045em; }
.hero h1 span { color: var(--home-sky); }
.hero h1 small { font-size: .61em; line-height: .98; }
.hero__text { max-width: 430px; margin-bottom: 1.8rem; color: rgba(255, 255, 255, .8); font-size: .92rem; line-height: 1.65; }
.button-row { gap: .75rem; }

/* Benefits — faixa flutuante */
.benefits-strip { position: relative; z-index: 2; background: transparent; }
.benefits-grid { position: relative; margin-top: -42px; border-radius: var(--home-radius) var(--home-radius) 0 0; background: #fff; box-shadow: 0 -1px 0 rgba(255, 255, 255, .2), 0 16px 35px rgba(7, 25, 45, .1); }
.benefit-item { min-height: 92px; padding: .5rem 1.55rem; border-right: 1px solid var(--home-line); }
.benefit-item:first-child { padding-left: 1.55rem; }
.benefit-item > i { width: 42px; color: var(--home-blue); font-size: 2.15rem; }
.benefit-item h2 { margin-bottom: .35rem; color: var(--home-ink); font-size: .78rem; letter-spacing: .04em; }
.benefit-item p { color: #617083; font-size: .68rem; line-height: 1.4; }

/* Sobre */
.about { padding: 6.7rem 0; background: #fff; }
.about__layout { grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr); gap: 5.5rem; }
.about__media { height: 500px; border-radius: 20px; box-shadow: 0 22px 50px rgba(7, 25, 45, .16); }
.about__media img { object-position: center; }
.about__content h2 { margin-bottom: 1.45rem; color: var(--home-ink); font-size: clamp(2.35rem, 4vw, 3.65rem); line-height: .92; letter-spacing: -.055em; }
.about__content > p:not(.eyebrow) { max-width: 560px; color: #52667d; font-size: .94rem; line-height: 1.7; }
.about__facts { margin-top: 2.1rem; border-top-color: var(--home-line); border-bottom-color: var(--home-line); }
.about__facts div { padding: 1.15rem .8rem; border-right-color: var(--home-line); }
.about__facts strong { color: var(--home-blue); font-size: .74rem; letter-spacing: .06em; }

/* Serviços — cards com aparência de catálogo, sem grade rígida */
.services { padding: 6.5rem 0; background: linear-gradient(135deg, #06182c 0%, #082946 100%); }
.services__layout { grid-template-columns: 270px 1fr; gap: 5.2rem; }
.services .section-intro h2 { font-size: clamp(2.8rem, 5vw, 4rem); letter-spacing: -.055em; }
.services .section-intro > p:not(.eyebrow) { max-width: 245px; color: rgba(255, 255, 255, .65); font-size: .87rem; line-height: 1.65; }
.services-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.service-card { position: relative; min-height: 158px; align-items: flex-start; justify-content: space-between; gap: .8rem; padding: 1.35rem 1.25rem; border: 1px solid rgba(255, 255, 255, .13); border-radius: 12px; background: rgba(255, 255, 255, .065); color: #fff; font: inherit; text-align: left; cursor: pointer; transition: background .25s ease, border-color .25s ease, transform .25s ease, box-shadow .25s ease; }
.service-card::after { position: absolute; right: 1.25rem; bottom: 1.15rem; color: rgba(255, 255, 255, .38); content: "↗"; font-size: 1rem; transition: color .25s ease, transform .25s ease; }
.service-card:hover { background: var(--home-blue); border-color: var(--home-blue); box-shadow: 0 15px 28px rgba(0, 0, 0, .2); transform: translateY(-5px); }
.service-card i { color: var(--home-sky); font-size: 1.8rem; }
.service-card:hover i, .service-card:hover::after { color: #fff; }
.service-card:hover::after { transform: translate(3px, -3px); }
.service-card span { font-size: .78rem; line-height: 1.22; letter-spacing: .04em; }
.service-card:focus-visible { outline: 3px solid var(--home-sky); outline-offset: 3px; }

/* Detalhes dos serviços */
body.modal-open { overflow: hidden; }
.service-modal[hidden] { display: none; }
.service-modal { position: fixed; z-index: 120; inset: 0; display: grid; place-items: center; padding: 1.5rem; }
.service-modal__backdrop { position: absolute; inset: 0; background: rgba(1, 11, 23, .86); backdrop-filter: blur(5px); }
.service-modal__dialog { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr); width: min(1050px, 100%); max-height: min(760px, calc(100vh - 48px)); overflow: auto; border-radius: 18px; background: #fff; color: var(--home-ink); box-shadow: 0 34px 90px rgba(0, 0, 0, .46); }
.service-modal__close { position: absolute; z-index: 3; top: 1rem; right: 1rem; display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: var(--home-ink); color: #fff; font-size: 1.05rem; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.service-modal__close:hover { background: var(--home-blue); transform: rotate(90deg); }
.service-modal__close:focus-visible { outline: 3px solid var(--home-sky); outline-offset: 3px; }
.service-modal__gallery { position: relative; display: grid; min-height: 570px; grid-template-rows: minmax(0, 1fr) 185px; gap: 8px; padding: 8px; overflow: hidden; background: var(--home-ink); }
.service-modal__gallery figure { position: relative; margin: 0; overflow: hidden; border-radius: 11px; background: #dfe7ee; }
.service-modal__gallery img { width: 100%; height: 100%; object-fit: cover; }
.service-modal__main-image::after { position: absolute; inset: 52% 0 0; background: linear-gradient(0deg, rgba(3, 19, 38, .48), transparent); content: ""; pointer-events: none; }
.service-modal__secondary-image { width: 55%; justify-self: end; border: 4px solid var(--home-ink); transform: translateY(-36px); }
.service-modal__content { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 4rem 2.6rem 2.6rem; }
.service-modal__content .eyebrow { margin-bottom: .7rem; }
.service-modal__content h2 { margin-bottom: 1rem; font-size: clamp(2.3rem, 4.5vw, 3.7rem); line-height: .9; letter-spacing: -.05em; }
.service-modal__content > p:not(.eyebrow) { margin-bottom: 1.35rem; color: #52667d; font-size: .94rem; line-height: 1.65; }
.service-modal__details { display: grid; width: 100%; gap: .72rem; margin: 0 0 1.7rem; padding: 1.15rem 0; border-top: 1px solid var(--home-line); border-bottom: 1px solid var(--home-line); list-style: none; }
.service-modal__details li { position: relative; padding-left: 1.6rem; color: #31465d; font-size: .82rem; line-height: 1.4; }
.service-modal__details li::before { position: absolute; top: .08rem; left: 0; display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(8, 119, 209, .11); color: var(--home-blue); content: "✓"; font-size: .67rem; font-weight: 800; }
.service-modal__content .button { margin-top: auto; }

/* Portfólio — grade editorial com um projeto principal */
.portfolio { padding: 7.2rem 0 7.4rem; background: var(--home-paper); }
.portfolio__intro { grid-template-columns: minmax(260px, .95fr) minmax(300px, 1.1fr) auto; align-items: end; gap: 3rem; margin-bottom: 3rem; }
.portfolio__intro h2 { max-width: 360px; color: var(--home-ink); font-size: clamp(2.5rem, 4.4vw, 4rem); line-height: .9; letter-spacing: -.06em; }
.portfolio__intro > p { max-width: 420px; color: #5d7084; font-size: .91rem; line-height: 1.65; }
.portfolio__actions { gap: .7rem; }
.portfolio__actions .button { min-height: 44px; }
.portfolio-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.portfolio-card { position: relative; border-radius: var(--home-radius); background: #fff; box-shadow: 0 12px 30px rgba(7, 25, 45, .08); transition: transform .3s ease, box-shadow .3s ease; }
.portfolio-card:hover { box-shadow: 0 20px 40px rgba(7, 25, 45, .15); transform: translateY(-5px); }
.portfolio-card:nth-child(1) { grid-column: span 7; grid-row: span 2; min-height: 484px; }
.portfolio-card:nth-child(2), .portfolio-card:nth-child(3) { grid-column: span 5; }
.portfolio-card:nth-child(n+4) { grid-column: span 4; }
.portfolio-card img { height: 196px; object-fit: cover; }
.portfolio-card:nth-child(1) img { height: 100%; }
.portfolio-card:nth-child(1) .portfolio-card__body { position: absolute; right: 0; bottom: 0; left: 0; min-height: 47%; justify-content: flex-end; padding: 4rem 4.5rem 1.55rem 1.55rem; background: linear-gradient(0deg, rgba(3, 19, 38, .96) 0%, rgba(3, 19, 38, .76) 62%, transparent 100%); }
.portfolio-card__body { min-height: 96px; padding: 1rem 3.7rem 1rem 1.2rem; background: var(--home-navy); }
.portfolio-card--product .portfolio-card__body { background: var(--home-blue); }
.portfolio-card__body span { margin-bottom: .45rem; color: rgba(255, 255, 255, .68); font-size: .61rem; letter-spacing: .1em; }
.portfolio-card__body h3 { font-size: .93rem; line-height: 1.1; letter-spacing: .015em; }
.portfolio-card__body i { right: 1.2rem; width: 31px; height: 31px; border-radius: 50%; }

/* Processo */
.process { padding: 6.5rem 0; background: var(--home-ink); }
.process .section-intro { margin-bottom: 3rem; }
.process .section-intro h2 { max-width: 680px; font-size: clamp(2.5rem, 4.5vw, 4rem); letter-spacing: -.06em; }
.process .section-intro > p:not(.eyebrow) { color: rgba(255, 255, 255, .66); line-height: 1.65; }
.process-grid { gap: 12px; }
.process-grid article { min-height: 236px; padding: 1.55rem; border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; background: rgba(255, 255, 255, .055); }
.process-grid article > span { top: 1.3rem; right: 1.35rem; color: rgba(255, 255, 255, .2); font-size: 2.5rem; }
.process-grid article > i { margin-bottom: 2.3rem; color: var(--home-sky); }
.process-grid h3 { font-size: .9rem; letter-spacing: .04em; }
.process-grid p { max-width: 210px; color: rgba(255, 255, 255, .65); line-height: 1.5; }

/* Diferenciais */
.why { padding: 5.7rem 0 6rem; background: #fff; }
.why > .container > .eyebrow { margin-bottom: 1.6rem; }
.why-grid { gap: 12px; margin-top: 0; }
.why-item { min-height: 150px; gap: .9rem; border: 1px solid var(--home-line); border-radius: 12px; background: var(--home-paper); }
.why-item i { color: var(--home-blue); font-size: 1.75rem; }
.why-item h2 { color: var(--home-ink); font-size: .76rem; line-height: 1.2; letter-spacing: .04em; }

/* CTA e rodapé */
.cta { min-height: 250px; }
.cta__overlay { background: linear-gradient(90deg, rgba(3, 19, 38, .99) 0%, rgba(3, 19, 38, .88) 44%, rgba(3, 19, 38, .24) 100%); }
.cta__inner { min-height: 250px; }
.cta h2 { font-size: clamp(2rem, 3.5vw, 3rem); letter-spacing: -.04em; }
.cta__action p { color: rgba(255, 255, 255, .75); line-height: 1.5; }
.site-footer { background: #fff; }
.footer-main { min-height: 190px; }
.footer-brand img { width: 230px; }
.footer-bottom { background: #04101f; }

@media (max-width: 1060px) {
  .site-nav { gap: 1.1rem; }
  .services__layout { gap: 2.8rem; }
  .about__layout { gap: 3.2rem; }
  .portfolio__intro { gap: 1.6rem; }
}

@media (max-width: 860px) {
  .container { width: min(1220px, calc(100% - 48px)); }
  .brand { width: 200px; }
  .hero { min-height: 565px; }
  .hero__content { padding-top: 5rem; }
  .about { padding: 5rem 0; }
  .about__layout { gap: 2.5rem; }
  .about__media { height: 420px; }
  .services { padding: 5rem 0; }
  .services__layout { gap: 2.5rem; }
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portfolio { padding: 5.5rem 0; }
  .portfolio__intro { grid-template-columns: 1fr auto; }
  .portfolio__intro > p { grid-column: 1 / -1; }
  .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portfolio-card:nth-child(1) { grid-column: span 2; grid-row: auto; min-height: 430px; }
  .portfolio-card:nth-child(2), .portfolio-card:nth-child(3), .portfolio-card:nth-child(n+4) { grid-column: span 1; }
  .process { padding: 5rem 0; }
  .why { padding: 4.5rem 0; }
  .why-grid { grid-template-columns: repeat(3, 1fr); }
  .why-item:nth-child(3) { border-right: 1px solid var(--home-line); }
  .why-item:nth-child(n+4) { border-top: 1px solid var(--home-line); }
  .why-item:nth-child(4) { border-left: 0; }
  .service-modal__dialog { grid-template-columns: minmax(0, .9fr) minmax(330px, 1.1fr); }
  .service-modal__gallery { min-height: 520px; }
  .service-modal__content { padding: 3.5rem 1.8rem 2rem; }
}

@media (max-width: 560px) {
  .container { width: calc(100% - 32px); }
  .topbar__contact { font-size: .58rem; }
  .brand { width: 174px; }
  .hero { min-height: 620px; }
  .hero__image { background-position: 63% center; }
  .hero__overlay { background: linear-gradient(90deg, rgba(3, 19, 38, .98) 0%, rgba(3, 19, 38, .88) 74%, rgba(3, 19, 38, .62) 100%); }
  .hero__content { padding-top: 4.4rem; }
  .hero h1 { font-size: clamp(2.65rem, 13vw, 4rem); }
  .hero__text { max-width: 330px; }
  .benefits-grid { grid-template-columns: 1fr; margin-top: -28px; padding: .4rem 1rem; }
  .benefit-item, .benefit-item:first-child { min-height: 76px; padding: .7rem .25rem; border-right: 0; border-bottom: 1px solid var(--home-line); }
  .benefit-item:last-child { border-bottom: 0; }
  .about, .services, .portfolio, .process, .why { padding: 4.2rem 0; }
  .about__layout { grid-template-columns: 1fr; }
  .about__media { height: 330px; border-radius: 15px; }
  .about__content h2 { font-size: 2.5rem; }
  .about__facts { grid-template-columns: 1fr; }
  .about__facts div, .about__facts div:first-child { padding: .85rem 0; border-right: 0; border-bottom: 1px solid var(--home-line); }
  .about__facts div:last-child { border-bottom: 0; }
  .services__layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .services .section-intro > p:not(.eyebrow) { max-width: 330px; }
  .service-card { min-height: 142px; padding: 1.1rem; }
  .service-card span { font-size: .72rem; }
  .service-modal { padding: .65rem; }
  .service-modal__dialog { display: block; max-height: calc(100vh - 20px); border-radius: 14px; }
  .service-modal__gallery { min-height: 0; height: 280px; grid-template-rows: 1fr; padding: 0; }
  .service-modal__gallery figure { border-radius: 0; }
  .service-modal__secondary-image { position: absolute; right: 12px; bottom: 12px; width: 38%; height: 104px; border: 3px solid #fff; border-radius: 9px !important; transform: none; }
  .service-modal__content { padding: 2rem 1.25rem 1.4rem; }
  .service-modal__content h2 { font-size: 2.25rem; }
  .service-modal__content .button { width: 100%; }
  .portfolio__intro { display: block; margin-bottom: 2rem; }
  .portfolio__intro > p { margin: 1rem 0 1.3rem; }
  .portfolio__actions { justify-content: flex-start; }
  .portfolio__actions .button { width: auto; }
  .portfolio-grid { grid-template-columns: 1fr; gap: 14px; }
  .portfolio-card:nth-child(1), .portfolio-card:nth-child(2), .portfolio-card:nth-child(3), .portfolio-card:nth-child(n+4) { grid-column: auto; }
  .portfolio-card:nth-child(1) { min-height: 360px; }
  .portfolio-card img, .portfolio-card:nth-child(1) img { height: 215px; }
  .portfolio-card:nth-child(1) img { height: 100%; }
  .portfolio-card:nth-child(1) .portfolio-card__body { min-height: 55%; padding: 3rem 3.7rem 1.25rem 1.25rem; }
  .portfolio-card__body h3 { font-size: .88rem; }
  .process-grid { grid-template-columns: 1fr; }
  .process-grid article { min-height: 190px; }
  .process-grid article > i { margin-bottom: 1.5rem; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .why-item { min-height: 130px; }
  .why-item:nth-child(2), .why-item:nth-child(4) { border-right: 0; }
  .why-item:nth-child(3) { border-right: 1px solid var(--home-line); }
  .why-item:nth-child(5) { grid-column: 1 / -1; border-right: 0; }
  .cta { min-height: 390px; }
  .cta__inner { min-height: 390px; }
}
