/* Aguiar Automóveis · página Empresa (complementa info.css) */

/* Hero de ecrã quase inteiro com a fachada */
.em-hero { position: relative; min-height: min(calc(92svh - var(--nav-h)), 900px); display: flex; align-items: flex-end; overflow: hidden; background: var(--ink); color: #fff; }
.em-hero__media { position: absolute; inset: 0; }
.em-hero__media picture, .em-hero__media img { width: 100%; height: 100%; }
.em-hero__media img { object-fit: cover; object-position: center 42%; transform: scale(1.06); will-change: transform; }
.em-hero__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,20,31,.55) 0%, rgba(5,20,31,.15) 55%, rgba(5,20,31,0) 75%), linear-gradient(180deg, rgba(5,20,31,0) 30%, rgba(5,20,31,.3) 55%, rgba(5,20,31,.8) 100%); }
.em-hero__content { position: relative; z-index: 1; padding-top: 120px; padding-bottom: clamp(40px, 6vw, 88px); }
.em-hero .eyebrow { color: rgba(255,255,255,.75); margin-bottom: 18px; }
.em-hero .display { max-width: 14ch; text-wrap: balance; text-shadow: 0 1px 24px rgba(5,20,31,.25); }
.em-hero .lead { color: rgba(255,255,255,.85); margin-top: 22px; max-width: 46ch; }
.em-hero__content > * { animation: em-up 1s var(--ease) both; }
.em-hero__content > :nth-child(2) { animation-delay: .1s; }
.em-hero__content > :nth-child(3) { animation-delay: .2s; }
@keyframes em-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* Declaração + números */
.em-statement { font-family: var(--font-display); font-size: clamp(28px, 3.8vw, 56px); line-height: 1.12; letter-spacing: -0.03em; max-width: 24ch; color: var(--muted); text-wrap: balance; }
.em-statement span { color: var(--ink); }
.em-stats { margin: clamp(56px, 8vw, 112px) 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.em-stats > div { padding: 22px 20px 0 0; }
.em-stats > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.em-stats dt { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.em-stats dd { margin: 14px 0 0; font-family: var(--font-display); font-size: clamp(40px, 4.6vw, 72px); font-weight: 500; line-height: 1; letter-spacing: -0.04em; white-space: nowrap; }
.em-stats dd small { font-size: .3em; letter-spacing: 0; color: var(--ink-2); margin-left: 6px; }

/* O espaço */
.em-space { padding-bottom: clamp(64px, 9vw, 128px); }
.em-space__head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(32px, 4vw, 56px); }
.em-space__head .eyebrow { margin-bottom: 14px; }
.em-space__head .h1 { max-width: 14ch; text-wrap: balance; }
.em-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--soft); }
.em-frame picture, .em-frame img { width: 100%; height: 100%; }
.em-frame img { object-fit: cover; object-position: center 40%; transform: scale(1.1); will-change: transform; }
.em-caption { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* Família */
.em-family { border-top: 1px solid var(--line); }
.em-family__inner .eyebrow { margin-bottom: 20px; }
.em-family__title { font-size: clamp(32px, 4.6vw, 68px); line-height: 1.04; letter-spacing: -0.035em; max-width: 18ch; text-wrap: balance; }
.em-values { margin-top: clamp(48px, 6vw, 88px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.em-values > div { border-top: 1px solid var(--line-2); padding-top: 20px; }
.em-values span { display: inline-grid; place-items: center; width: 44px; height: 44px; background: var(--soft); }
.em-values span .icon { width: 22px; height: 22px; stroke-width: 1.4; }
.em-values h3 { margin-top: 28px; font-size: 24px; }
.em-values p { margin-top: 10px; color: var(--ink-2); max-width: 34ch; }
.em-values > div:nth-child(2) { transition-delay: .08s; }
.em-values > div:nth-child(3) { transition-delay: .16s; }

/* Critérios numerados */
.em-criteria { list-style: none; margin: 0; padding: 0; counter-reset: c; }
.em-criteria li { counter-increment: c; display: grid; grid-template-columns: 56px 1fr; column-gap: 16px; padding: 26px 0; border-top: 1px solid var(--line-2); }
.em-criteria li:last-child { border-bottom: 1px solid var(--line-2); }
.em-criteria li::before { content: ''; grid-row: span 2; width: 22px; height: 22px; margin-top: 4px; background: var(--ink); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12.5l3 3 5-6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12.5l3 3 5-6'/%3E%3C/svg%3E") center / contain no-repeat; }
.em-criteria h3 { font-size: clamp(20px, 1.8vw, 24px); line-height: 1.2; }
.em-criteria p { margin-top: 6px; color: var(--ink-2); }

/* Mosaico de viaturas */
.em-mosaic { display: grid; gap: 12px; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); aspect-ratio: 2.1 / 1; }
.em-mosaic--3 { grid-template-columns: 2fr 1fr; }
.em-tile { position: relative; overflow: hidden; background: var(--soft); min-height: 0; }
.em-tile:first-child { grid-row: span 2; }
.em-mosaic--4 .em-tile:last-child { grid-column: span 2; }
.em-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 62%; transition: transform .8s var(--ease); }
.em-tile:hover img { transform: scale(1.04); }
.em-tile__cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 20px 16px; display: flex; flex-direction: column; color: #fff; background: linear-gradient(180deg, rgba(5,20,31,0), rgba(5,20,31,.55)); }
.em-tile__cap strong { font-family: var(--font-display); font-weight: 500; font-size: 18px; letter-spacing: -0.01em; }
.em-tile__cap small { font-size: 13px; color: rgba(255,255,255,.8); }
.em-tile:first-child .em-tile__cap strong { font-size: clamp(20px, 2vw, 28px); }
.em-tile:nth-child(2) { transition-delay: .06s; }
.em-tile:nth-child(3) { transition-delay: .12s; }
.em-tile:nth-child(4) { transition-delay: .18s; }
.em-tiles { background: #fff; }

/* Visita + mapa */
.em-visit__inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px clamp(40px, 6vw, 96px); align-items: stretch; }
.em-visit__info .eyebrow { margin-bottom: 14px; }
.em-visit__info .ip-block__big { display: block; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--ink); }
.em-visit__info .ip-hours { margin-top: 20px; padding-bottom: 8px; }
.em-visit__info .btn-row { margin-top: 28px; }
.em-map { aspect-ratio: auto; min-height: 460px; }

@media (prefers-reduced-motion: reduce) {
  .em-hero__media img, .em-frame img { transform: none !important; }
  .em-hero__content > * { animation: none; }
}

@media (max-width: 1080px) {
  .em-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .em-stats > div, .em-stats > div + div { padding: 20px 16px 20px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .em-stats > div:not(:nth-child(3n+1)) { padding-left: 16px; border-left: 1px solid var(--line); }
  .em-space__head, .em-visit__inner { grid-template-columns: 1fr; }
  .em-values { grid-template-columns: 1fr; gap: 0; }
  .em-values > div { padding: 22px 0 26px; display: grid; grid-template-columns: 56px 1fr; column-gap: 16px; }
  .em-values span { grid-row: span 2; padding-top: 4px; }
  .em-values h3 { margin-top: 0; }
  .em-map { min-height: 0; aspect-ratio: 16 / 9; }
}

@media (max-width: 640px) {
  .em-hero { min-height: calc(86svh - var(--nav-h)); }
  .em-hero__media img { object-position: 30% center; }
  .em-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .em-stats > div:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
  .em-stats > div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
  .em-stats > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .em-frame { aspect-ratio: 4 / 3; margin: 0 calc(var(--gutter) * -1); }
  .em-caption { margin-top: 12px; }
  .em-mosaic, .em-mosaic--3 { aspect-ratio: auto; grid-template-columns: 1fr 1fr; grid-template-rows: none; gap: 8px; }
  .em-tile { aspect-ratio: 4 / 5; }
  .em-tile img { object-position: center 70%; }
  .em-tile:first-child { grid-row: auto; grid-column: 1 / -1; aspect-ratio: 3 / 2; }
  .em-mosaic--4 .em-tile:last-child { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
  .em-tile__cap { padding: 32px 14px 12px; }
  .em-tile__cap strong { font-size: 15px; }
  .em-criteria li { grid-template-columns: 44px 1fr; }

  .em-visit .btn-row .btn { flex: 1 1 100%; }
  .em-map { aspect-ratio: 4 / 5; margin: 0 calc(var(--gutter) * -1); }
}
