/*
Theme Name: Escarpas Náutica
Description: Tema institucional one page da Escarpas Náutica, com conteúdo gerenciado pelo ACF Pro.
Version: 1.0.7
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: escarpas-nautica
*/

:root {
  --navy: #112639;
  --ink: #101820;
  --cyan: #3ab5cb;
  --cta: #08758b;
  --card: #dce6ed;
  --green: #238527;
  --container-padding: clamp(18px, 6.88vw, 132px);
  --radius: clamp(14px, 1.65vw, 32px);
  --header-height: clamp(64px, 5.75vw, 110px);
  --header-compact-height: clamp(54px, 4.4vw, 84px);
  font-family: "Montserrat", Arial, sans-serif;
  color: var(--ink);
  background: #fff;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-compact-height) + 14px);
}
body { margin: 0; }
body:has(.contact-dialog[open]) { overflow: hidden; }
button, input, select { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
svg { display: block; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #157fbc; outline-offset: 4px; }

.icon-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: absolute;
  z-index: 7;
  top: 6px;
  left: 6px;
  padding: .75rem;
  color: #fff;
  background: var(--navy);
}

.container {
  width: min(calc(100% - 2 * var(--container-padding)), 1654px);
  margin-inline: auto;
}

.content-inset { padding-inline: clamp(0px, 4.55vw, 87px); }

.site-header {
  position: sticky;
  z-index: 6;
  top: 0;
  height: var(--header-height);
  pointer-events: none;
}

.header-bar {
  pointer-events: auto;
  background: #fff;
  transition: box-shadow 220ms ease;
}

.site-header.is-compact .header-bar { box-shadow: 0 3px 16px #11263917; }

.header-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header-height);
  padding-inline: clamp(0px, 3.15vw, 60px);
  gap: clamp(10px, 2vw, 36px);
  transition: height 220ms ease;
}

.site-header.is-compact .header-inner { height: var(--header-compact-height); }
.header-brand { width: clamp(102px, 13.6vw, 260px); }
.header-volvo { width: clamp(100px, 22vw, 425px); }
.header-brand, .header-volvo { transition: width 220ms ease; }
.site-header.is-compact .header-brand { width: clamp(88px, 11vw, 204px); }
.site-header.is-compact .header-volvo { width: clamp(92px, 18vw, 346px); }
.header-menu { justify-self: end; }

.menu-toggle {
  display: grid;
  place-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #deeaee;
  border-radius: 12px;
  background: transparent;
  color: var(--navy);
  transition: border-color 180ms ease;
}

.menu-toggle:hover, .menu-toggle[aria-expanded="true"] {
  border-color: #bfdce4;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 200ms ease, opacity 150ms ease;
}

.menu-toggle span:nth-child(2) { transform: scaleX(.65); transform-origin: right; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  position: absolute;
  z-index: 3;
  top: calc(100% + 6px);
  right: clamp(0px, 3.15vw, 60px);
  display: grid;
  width: min(236px, calc(100vw - 2 * var(--container-padding)));
  max-height: calc(100dvh - var(--header-height) - 16px);
  overflow: auto;
  padding: .45rem;
  border: 1px solid #deeaee;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 32px #11263924;
}

.site-nav a, .nav-contact {
  padding: .75rem .85rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--navy);
  text-align: left;
  text-decoration: none;
  font-size: .93rem;
  font-weight: 600;
}

.site-nav a:hover { background: #e9f4f7; }
.site-nav :focus-visible { outline-offset: -3px; }
.nav-contact {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-top: .25rem;
  background: var(--green);
  color: #fff;
  font-weight: 700;
}
.nav-contact:hover { background: #1b7020; }
.nav-contact:focus-visible { outline-color: #fff; }
.nav-contact svg { width: 1.15rem; height: 1.15rem; }

.hero { margin-bottom: clamp(14px, 1.7vw, 33px); }
.hero-track {
  display: grid;
  isolation: isolate;
  border-radius: var(--radius);
  background: var(--navy);
  touch-action: pan-y;
}

.hero-slide {
  display: block;
  grid-area: 1 / 1;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 380ms ease;
}

.hero-slide.is-active { z-index: 1; opacity: 1; pointer-events: auto; }
.hero-slide picture, .hero-slide img { display: block; width: 100%; }

@media (hover: hover) {
  .hero-slide.is-active:hover img { filter: brightness(1.07); }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .hero-slide img { transition: filter 180ms ease-out; }
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: clamp(5px, .55vw, 10px);
}

.hero-dot {
  display: grid;
  place-items: center;
  width: clamp(28px, 2.25vw, 43px);
  height: clamp(26px, 1.9vw, 37px);
  padding: 0;
  border: 0;
  background: transparent;
}

.hero-dot::before {
  content: "";
  width: clamp(8px, .73vw, 14px);
  aspect-ratio: 1;
  border: 2px solid #717778;
  border-radius: 50%;
  background: #a4a9a9;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.hero-dot[aria-current="true"]::before {
  background: #48565b;
  border-color: #48565b;
}

.about {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: clamp(350px, 33.8vw, 650px);
  color: #fff;
  background: var(--navy) var(--about-outline) no-repeat left center / auto 115%;
}

.about::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 0 31%;
  background:
    linear-gradient(90deg, var(--navy) 0%, #112639e8 20%, #11263944 52%, transparent 75%),
    var(--about-photo) center / cover no-repeat;
}

.about-inner { display: flex; align-items: center; }
.about-copy {
  width: min(52%, 680px);
  padding-block: clamp(30px, 3.9vw, 75px);
  font-size: clamp(1rem, 1.04vw, 1.1875rem);
  line-height: 1.55;
}

.about-copy p + p, .highlight-copy p + p { margin-top: .7em; }
.about-copy p { text-wrap: pretty; }
.highlight-copy p { text-wrap: balance; }

.ruled-title {
  font-size: clamp(1.5rem, 1.88vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
}

.ruled-title::after, .highlight h3::after {
  content: "";
  display: block;
  background: var(--cyan);
}

.ruled-title::after {
  width: clamp(64px, 7vw, 128px);
  height: clamp(3px, .27vw, 5px);
  margin-top: .65em;
  margin-bottom: clamp(22px, 1.65vw, 32px);
}

.services { padding-top: clamp(35px, 4.15vw, 80px); }
.services-list, .engines, .footer-social { margin: 0; padding: 0; list-style: none; }

.services-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-inline: clamp(-50px, -2.55vw, -19px);
}

.services-list li {
  display: grid;
  justify-items: center;
  grid-template-rows: auto 1fr;
  gap: .4em;
  padding: clamp(8px, 1vw, 20px) 4px;
  text-align: center;
  font-size: clamp(.875rem, .98vw, 1.125rem);
  font-weight: 600;
  line-height: 1.3;
}

.services-list li + li { border-left: 1px solid #c6c9cc; }
.services-list img { width: clamp(52px, 8.35vw, 160px); }
.services-list span { align-self: center; text-wrap: pretty; overflow-wrap: anywhere; }

.cta-row {
  display: flex;
  justify-content: center;
  margin-top: clamp(18px, 2.2vw, 42px);
}

.cta, .instagram-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .35em;
  color: #fff;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.cta {
  min-height: 44px;
  padding: .64em 1.15em;
  border: 0;
  border-radius: .62em;
  background: var(--cta);
  font-size: clamp(.95rem, 1vw, 1.125rem);
}

.cta:hover, .instagram-link:hover { filter: brightness(.89); }

.highlights { margin-top: clamp(34px, 4vw, 77px); }

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1vw, 19px);
}

.highlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-width: 0;
  overflow: hidden;
  border-radius: clamp(7px, .74vw, 14px);
  background: var(--card);
}

.highlight > img { width: 100%; height: 100%; object-fit: cover; }

.highlight-copy {
  padding: clamp(13px, 1.55vw, 28px);
  font-size: clamp(.875rem, calc(.5rem + .53vw), 1.125rem);
  line-height: 1.45;
}

.highlight h3 {
  font-size: clamp(1rem, calc(.55rem + .72vw), 1.35rem);
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
}

.highlight h3::after {
  width: min(5.5em, 100%);
  height: max(2px, .18em);
  margin-block: .7em .65em;
}

.engines {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .38em;
  margin-top: .4em;
}

.engines li { line-height: 1; }
.engines strong { display: block; color: #556367; font-size: 1.3em; font-weight: 800; }
.engines li + li strong { padding-left: .2em; border-left: 1px solid #2498ab; }
.engines small {
  display: block;
  margin-top: .3em;
  font-size: max(.625rem, .67em);
  font-weight: 500;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.instagram { margin-top: clamp(26px, 2.73vw, 53px); text-align: center; }
.instagram h2 { margin-bottom: .7em; font-size: clamp(1.2rem, 1.65vw, 1.875rem); font-weight: 700; text-wrap: balance; }
.instagram-feed { margin-inline: auto; width: min(93.2%, 1550px); }
.instagram-preview { width: 100%; }

.instagram-feed:has(.eapps-instagram-feed-posts-item) .instagram-preview,
.eapps-instagram-feed-posts-grid-load-more-container.eapps-instagram-feed-posts-grid-load-more-enabled {
  display: none !important;
}

.instagram-link {
  min-height: 40px;
  margin-top: clamp(12px, 1.25vw, 24px);
  padding: .65em 1em;
  border-radius: 8px;
  background: #315f9b;
  font-size: clamp(.78rem, .94vw, 1.13rem);
}

.instagram-link svg { width: 1em; height: 1em; }

.reviews { margin-block: clamp(30px, 4.8vw, 92px) clamp(24px, 3vw, 58px); }

.reviews-slot {
  display: grid;
  place-items: center;
  min-height: clamp(78px, 9vw, 173px);
  border: 1px dashed #d3dfe5;
  border-radius: 8px;
  color: #51636f;
  font-size: .875rem;
  text-align: center;
}

.map { background: #e6edf0; }

.map iframe {
  display: block;
  width: 100%;
  height: clamp(240px, 17.8vw, 342px);
  border: 0;
}

.site-footer { color: #fff; background: var(--navy); }

.footer-inner {
  display: grid;
  grid-template-columns: .9fr 1.65fr auto;
  align-items: start;
  gap: clamp(22px, 3.3vw, 64px);
  padding-block: clamp(38px, 4.72vw, 91px) clamp(54px, 7.65vw, 147px);
}

.footer-brand { width: min(100%, 375px); }

.footer-contact {
  min-width: 0;
  padding: 0 0 .6em clamp(18px, 2.7vw, 52px);
  border-left: 1px solid #b9c6ce;
  font-size: clamp(.8125rem, .92vw, 1rem);
  line-height: 1.5;
}

.footer-contact a { text-decoration: none; overflow-wrap: anywhere; }
.footer-contact a:hover { text-decoration: underline; }
.footer-contact address { font-style: normal; }
.footer-email, .footer-policy { display: block; margin-top: 1em; }
.footer-policy { text-transform: uppercase; }
.footer-social { display: flex; gap: clamp(6px, .72vw, 14px); }

.footer-social a, .footer-social button {
  display: grid;
  place-items: center;
  width: clamp(34px, 2.8vw, 54px);
  height: clamp(34px, 2.8vw, 54px);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
}

.footer-social a:hover, .footer-social button:hover { background: #ffffff20; }
.footer-social svg { width: 54%; height: 54%; }

.floating-contact {
  position: fixed;
  z-index: 4;
  inset: 0;
  pointer-events: none;
}

.floating-whatsapp {
  position: absolute;
  right: max(clamp(12px, 1.7vw, 33px), env(safe-area-inset-right));
  bottom: max(clamp(12px, 1.7vw, 33px), env(safe-area-inset-bottom));
  pointer-events: auto;
  display: grid;
  place-items: center;
  width: clamp(58px, 4.1vw, 78px);
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  box-shadow: 0 3px 10px #11263932;
}

.floating-whatsapp:hover, .contact-submit:hover { filter: brightness(1.14); }
.floating-whatsapp svg { width: 58%; height: 58%; }

.floating-whatsapp-message {
  position: absolute;
  inset-inline-end: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  width: max-content;
  max-width: min(224px, calc(100vw - 100px));
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff;
  color: var(--navy);
  box-shadow: 0 3px 16px #11263928;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: start;
  pointer-events: none;
  visibility: hidden;
}

.floating-whatsapp-message::after {
  content: "";
  position: absolute;
  inset-inline-start: calc(100% - 4px);
  top: calc(50% - 5px);
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  background: #fff;
}

.floating-whatsapp:focus-visible .floating-whatsapp-message { visibility: visible; }
@media (hover: hover) {
  .floating-whatsapp:hover .floating-whatsapp-message { visibility: visible; }
}

.contact-dialog {
  position: fixed;
  inset: auto max(12px, 2vw, env(safe-area-inset-right)) max(12px, 2vw, env(safe-area-inset-bottom)) auto;
  width: min(390px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100% - 24px);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  color: var(--ink);
  background: #f8f8f8;
  box-shadow: 0 12px 44px #0a1c2b60;
}

.contact-dialog::backdrop { background: #11263966; }
.contact-panel { position: relative; }

.contact-header {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: 14px 46px 14px 16px;
  background: var(--green);
  color: #fff;
}

.contact-header h2 { font-size: clamp(.9rem, 4vw, 1rem); font-weight: 700; }
.contact-header svg { flex: 0 0 25px; height: 25px; }

.contact-close {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 1.65rem;
  line-height: 1;
}

.contact-close:hover { background: #ffffff23; }
.contact-close:focus-visible { outline-color: #fff; outline-offset: -3px; }
.contact-form { padding: 6px 14px 13px; }
.contact-form label { display: block; }

.contact-form input, .contact-form select {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: .4rem .55rem;
  border: 0;
  border-bottom: 1px solid #c6c6c6;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
}

.contact-form input::placeholder { color: #525252; opacity: 1; }

.contact-submit {
  display: block;
  width: 100%;
  min-height: 46px;
  margin-top: 15px;
  padding: .52em .75em;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
}

@media (prefers-reduced-motion: no-preference) {
  [data-reveal] { transition: opacity 480ms ease, transform 480ms ease; }
  [data-reveal].is-awaiting-reveal:not(:focus-within) {
    opacity: 0;
    transform: translateY(12px);
  }
}

@media (max-width: 900px) {
  :root { --container-padding: clamp(18px, 5vw, 45px); }
  .content-inset { padding-inline: 0; }
  .header-inner { padding-inline: 0; }
  .site-nav { right: 0; }
  .services-list { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 15px; margin-inline: 0; }
  .services-list li:nth-child(3n + 1) { border-left: 0; }
}

@media (min-width: 641px) and (max-width: 800px) {
  .highlights-grid { grid-template-columns: 1fr; }
  .highlight { grid-template-columns: 42% 58%; }
}

@media (max-width: 640px) {
  :root { --container-padding: 16px; --header-height: 62px; }
  html, body { overflow-x: clip; }
  html { overscroll-behavior-x: none; }
  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto auto;
    column-gap: clamp(10px, 3vw, 18px);
  }
  .header-brand, .site-header.is-compact .header-brand { width: min(100%, 150px); }
  .header-volvo, .site-header.is-compact .header-volvo { width: clamp(104px, 30vw, 124px); }
  .hero {
    padding-block-start: 12px;
    margin-block-end: 28px;
  }
  .hero-dot { width: 42px; height: 38px; }
  .about { min-height: auto; background-size: auto 85%; }
  .about::before {
    inset: 0 0 auto;
    height: clamp(168px, 43vw, 258px);
    background:
      linear-gradient(0deg, var(--navy), #11263908 68%),
      var(--about-photo) center 53% / cover no-repeat;
  }
  .about-copy { width: 100%; padding: clamp(155px, 41vw, 246px) 0 30px; }
  .ruled-title::after { margin-bottom: 22px; }
  .services-list li { font-size: clamp(.75rem, 3vw, .875rem); }
  .services-list span { text-wrap: balance; }
  .services-list span br { display: none; }
  .highlights-grid { grid-template-columns: 1fr; gap: 12px; }
  .highlight { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .highlight-copy {
    padding: clamp(12px, 3.55vw, 20px);
    font-size: clamp(.875rem, 3.2vw, .95rem);
  }
  .engines small { font-size: clamp(.57rem, 2.35vw, .68rem); }
  .instagram-feed { width: 100%; }
  .footer-inner { grid-template-columns: 1fr; gap: 18px; }
  .footer-brand { width: 175px; }
  .footer-contact { padding: 0; border: 0; font-size: .8rem; }
  .footer-social { margin-left: -6px; }
  .floating-contact { z-index: 7; }
  .floating-whatsapp { bottom: max(18px, env(safe-area-inset-bottom)); }
}

@supports (height: 100dvh) {
  @media (max-width: 640px) {
    .floating-contact { bottom: auto; height: 100dvh; }
  }
}

@media (max-width: 350px) {
  .header-inner { width: calc(100% - 24px); }
  .services-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services-list li + li { border-left: 0; }
  .engines { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: .65rem; }
  .engines li:nth-child(odd) strong { padding-left: 0; border-left: 0; }
  .engines small { font-size: .625rem; }
  .contact-header { padding-inline-start: 11px; gap: .4rem; }
  .contact-header svg { flex-basis: 20px; height: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .header-bar, .header-inner, .header-brand, .header-volvo,
  .menu-toggle, .menu-toggle span, .hero-slide, .hero-dot::before { transition: none; }
}

body.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) { body.admin-bar .site-header { top: 0; } }
.contact-submit:disabled { cursor: wait; opacity: .75; }
.single-content { padding-block: 2rem 4rem; }
.single-content h1 { margin-bottom: 1rem; }

.hero-track { aspect-ratio: 1654 / 705; grid-template-rows: minmax(0, 1fr); }
.hero-slide picture, .hero-slide img { height: 100%; object-fit: cover; }
.highlight:not(:has(> img)) { grid-template-columns: 1fr; }
.contact-fallback { display: inline-block; margin-top: .5rem; font-weight: 700; }
@media (max-width: 640px) { .hero-track { aspect-ratio: 1080 / 1350; } }
