/* ==========================================================================
   ZIOagro — Dashboards & Benchmarking
   Design tokens
   ========================================================================== */
:root{
  /* cor: base escura (terra ao entardecer) */
  --ink:        #14170F;
  --ink-soft:   #1B2016;
  /* cor: verde-mata, estrutural (textos de destaque, links, ícones) */
  --forest:     #1F5C3F;
  --forest-dim: #17362A;
  --forest-line:#2E7A52;
  /* cor: trigo/dourado, único acento de conversão */
  --wheat:      #D9A441;
  --wheat-dark: #B9822B;
  /* cor: papel (fundo claro, tom de relatório) */
  --paper:      #F5F3EC;
  --paper-dim:  #ECE8DB;
  --mist:       #DAD9CC;
  /* texto */
  --slate:      #454B41;
  --ink-70:     rgba(20,23,15,.72);
  --paper-70:   rgba(245,243,236,.82);

  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body:    "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  --font-mono:    "IBM Plex Mono", "Courier New", monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --header-h: 76px;
  --shadow-lg: 0 24px 60px -24px rgba(10,14,8,.45);
  --shadow-md: 0 10px 30px -14px rgba(10,14,8,.35);

  --ease: cubic-bezier(.4,0,.2,1);
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
*, *::before, *::after{ box-sizing: border-box; }
html{
  scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px);
  font-size: 109%; /* ~17.5px base — leitura maior no mobile */
}
@media (min-width: 900px){ html{ font-size: 108%; } } /* leve aumento sobre o mobile */
@media (min-width: 1280px){ html{ font-size: 111%; } } /* ~17.8px em telas grandes */
body{
  margin:0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img{ max-width:100%; display:block; }
h1,h2,h3{ font-family: var(--font-display); line-height: 1.1; margin: 0 0 .6em; font-weight: 600; letter-spacing: -.01em; }
p{ margin: 0 0 1em; }
a{ color: inherit; }
ul{ margin:0; padding:0; list-style:none; }
button{ font-family: inherit; }

.wrap{ max-width: 1200px; margin-inline:auto; padding-inline: 1.25rem; }
@media (min-width: 768px){ .wrap{ padding-inline: 2rem; } }

.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

.skip-link{
  position:absolute; left:1rem; top:-3rem; z-index:200;
  background: var(--wheat); color: var(--ink); padding:.6rem 1rem;
  border-radius: var(--radius-sm); font-weight:600; text-decoration:none;
  transition: top .2s var(--ease);
}
.skip-link:focus{ top:1rem; }

:focus-visible{ outline: 2px solid var(--wheat); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *, *::before, *::after{ animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn{
  display:inline-flex; align-items:center; gap:.55rem;
  padding: .85rem 1.4rem; border-radius: 999px;
  font-weight:600; font-size:.98rem; text-decoration:none;
  border: 1.5px solid transparent; white-space: nowrap;
  transition: transform .15s var(--ease), background-color .15s var(--ease), border-color .15s var(--ease);
}
.btn .icon{ width:1.15em; height:1.15em; flex:none; }
.btn:hover{ transform: translateY(-1px); }
.btn-wa{ background: var(--wheat); color: var(--ink); }
.btn-wa:hover{ background: var(--wheat-dark); }
.btn-ghost{ border-color: currentColor; color: inherit; background:transparent; }
.btn-ghost:hover{ background: rgba(127,127,127,.08); }
.btn-sm{ padding:.5rem .9rem; font-size:.85rem; }
.btn-lg{ padding: 1rem 1.75rem; font-size: 1.05rem; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header{
  position: sticky; top:0; z-index: 100;
  background: var(--ink-70);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(245,243,236,.08);
  transition: background-color .25s var(--ease), box-shadow .25s var(--ease);
}
.site-header.is-scrolled{
  background: rgba(20,23,15,.94);
  box-shadow: var(--shadow-md);
}
.header-inner{
  min-height: var(--header-h);
  display:flex; align-items:center; justify-content:space-between; gap:1rem;
}
.brand{ display:flex; align-items:center; gap:.65rem; text-decoration:none; flex:none; }
.brand-logo{ width:38px; height:auto; filter: invert(1); }
.brand-tagline{
  font-family: var(--font-display); font-size:.7rem; line-height:1.2;
  letter-spacing:.02em; color: var(--paper); opacity:.85;
}

.nav-toggle{
  display:flex; align-items:center; justify-content:center;
  width:42px; height:42px; border-radius: var(--radius-sm);
  background:transparent; border:1px solid rgba(245,243,236,.25);
  color: var(--paper); cursor:pointer;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after{
  display:block; width:18px; height:2px; background: currentColor; border-radius:2px; position:relative;
}
.nav-toggle-bar::before{ content:""; position:absolute; top:-6px; }
.nav-toggle-bar::after{ content:""; position:absolute; top:6px; }

.site-nav{
  position:absolute; top: 100%; left:0; right:0;
  background: rgba(20,23,15,.98);
  border-bottom: 1px solid rgba(245,243,236,.08);
  padding: 1rem 1.25rem 1.5rem;
  display:flex; flex-direction:column; gap:1.25rem;
  transform: translateY(-8px); opacity:0; pointer-events:none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.site-nav.is-open{ transform:none; opacity:1; pointer-events:auto; }
.nav-links{ display:flex; flex-direction:column; gap:.9rem; }
.nav-links a{
  color: var(--paper); text-decoration:none; font-weight:500; font-size:1.05rem;
}
.nav-links a.is-active{ color: var(--wheat); }
.site-nav .btn-wa{ align-self:flex-start; }

@media (min-width: 900px){
  .nav-toggle{ display:none; }
  .site-nav{
    position:static; background:transparent; border:0; padding:0;
    flex-direction:row; align-items:center; gap:1.5rem;
    transform:none; opacity:1; pointer-events:auto;
  }
  .nav-links{ flex-direction:row; gap:1.35rem; }
  .nav-links a{ font-size:.92rem; white-space:nowrap; }
}

@media (min-width: 1100px){
  .site-nav{ gap:2rem; }
  .nav-links{ gap:1.75rem; }
  .nav-links a{ font-size:.95rem; }
}

/* ==========================================================================
   Device frame (usado no hero e no carrossel)
   ========================================================================== */
.device-frame{
  position:relative; margin:0; border-radius: var(--radius); overflow:hidden;
  background: var(--ink-soft); box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,.06);
}
.device-frame__bar{
  height: 30px; display:flex; align-items:center; gap:6px; padding: 0 12px;
  background: #10130D;
}
.device-frame__dot{ width:7px; height:7px; border-radius:50%; background: rgba(245,243,236,.22); }
.device-frame img{ width:100%; height:auto; display:block; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero{
  position:relative; color: var(--paper); padding: 3rem 0 3.5rem; overflow:hidden;
  background:
    radial-gradient(ellipse 780px 620px at 88% 6%, rgba(217,164,65,.20), transparent 60%),
    radial-gradient(ellipse 760px 680px at 8% 100%, rgba(46,122,82,.32), transparent 62%),
    linear-gradient(155deg, #0E110B 0%, #171C15 42%, #1C3A2A 100%);
}
.hero::after{
  content:""; position:absolute; inset:0; z-index:0; pointer-events:none; opacity:.5;
  background-image: radial-gradient(rgba(245,243,236,.05) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 90%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 90%);
}
.hero .wrap{ position:relative; z-index:1; }
.hero-grid{ display:flex; flex-direction:column; gap:2.5rem; }
.hero-copy h1{
  font-size: clamp(1.9rem, 5.2vw, 2.35rem);
  color: var(--paper);
  max-width: 18ch;
}
.hero-lead{ font-size: 1.08rem; color: var(--paper-70); max-width: 46ch; }
.cta-row{ display:flex; flex-wrap:wrap; gap:.85rem; margin-top: 1.75rem; }
.hero .btn-ghost{ border-color: rgba(245,243,236,.35); color: var(--paper); }
.hero .btn-ghost:hover{ background: rgba(245,243,236,.08); border-color: rgba(245,243,236,.6); }

.hero-visual{ display:flex; justify-content:center; }
.device-frame--hero{ width:100%; max-width: 500px; }
.device-frame__screen{ position:relative; aspect-ratio: 4/3; overflow:hidden; }
.device-frame__screen::after{
  content:""; position:absolute; inset:0; z-index:1;
  background: linear-gradient(180deg, transparent 55%, rgba(16,19,13,.35));
  pointer-events:none;
}
.device-frame__screen .device-frame__img{
  position:absolute; inset:0; width:100%; height:100%;
  aspect-ratio: auto; object-fit:cover; object-position: top center;
  opacity:0; transition: opacity 1.1s var(--ease);
}
.device-frame__screen .device-frame__img.is-active{ opacity:1; }

@media (min-width: 900px){
  .hero{ padding: 4rem 0 4.5rem; }
  .hero-grid{ flex-direction:row; align-items:center; justify-content:space-between; gap:2.5rem; }
  .hero-copy{ flex: 1 1 48%; }
  .hero-copy h1{ font-size: 2.3rem; max-width: 22ch; }
  .hero-lead{ font-size: 1.02rem; }
  .hero-visual{ flex: 1 1 48%; justify-content:flex-end; }
  .device-frame--hero{ max-width: 480px; transform: rotate(1.4deg); }
}

@media (min-width: 1280px){
  .hero-copy h1{ font-size: 2.6rem; max-width: 24ch; }
  .device-frame--hero{ max-width: 560px; }
}

/* ==========================================================================
   Section shell
   ========================================================================== */
.section{ padding: 4rem 0; }
@media (min-width: 900px){ .section{ padding: 6rem 0; } }

.section-head{ max-width: 62ch; margin-bottom: 2.5rem; }
.section-head h2{ font-size: clamp(1.7rem, 4vw, 2.3rem); color: var(--ink); }
.section-head .lead{ font-size: 1.05rem; color: var(--slate); }
.section-head--light h2{ color: var(--paper); }
.section-head--light .lead{ color: var(--paper-70); margin-bottom:0; }
.section-head--light{
  background: rgba(14,17,10,.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  border-left: 4px solid var(--wheat);
  border-radius: var(--radius-sm);
  padding: 1.85rem 2rem 1.75rem;
}

/* ==========================================================================
   Sessão 1 — Como funciona / Carrossel
   ========================================================================== */
.section--how{ background: var(--paper); }

.carousel{ position:relative; margin-top: 1rem; }
.carousel-viewport{
  overflow-x:auto; scroll-snap-type:x mandatory; scroll-padding-left: 1.25rem;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.carousel-viewport::-webkit-scrollbar{ display:none; }
.carousel-track{
  display:flex; align-items:flex-start; gap: 1.25rem; padding: .25rem 1.25rem 1.5rem;
}
.carousel-card{
  flex: 0 0 82%; scroll-snap-align:start;
  display:flex; flex-direction:column; gap: 1rem;
}
.carousel-card__trigger{
  display:block; width:100%; padding:0; margin:0; border:none; background:none;
  text-align:left; cursor:zoom-in; font:inherit; color:inherit;
}
.carousel-card__trigger .device-frame{ transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.carousel-card__trigger:hover .device-frame,
.carousel-card__trigger:focus-visible .device-frame{
  transform: translateY(-3px); box-shadow: var(--shadow-lg);
}
.zoom-cue{
  position:absolute; right:10px; bottom:10px; width:34px; height:34px; border-radius:50%;
  background: rgba(20,23,15,.55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  color: var(--paper); display:flex; align-items:center; justify-content:center; overflow:hidden;
  transition: background-color .15s var(--ease), transform .15s var(--ease);
}
.zoom-cue svg{ width:16px; height:16px; flex: none; }
.zoom-cue svg *{ vector-effect: non-scaling-stroke; }
.carousel-card__trigger:hover .zoom-cue,
.carousel-card__trigger:focus-visible .zoom-cue{ background: var(--wheat); color: var(--ink); transform: scale(1.08); }
.carousel-card__text h3{
  font-size: 1.08rem; color: var(--ink); margin-bottom:.4em;
}
.carousel-card__text p{ font-size:.95rem; color: var(--slate); margin:0; }

.carousel-controls{
  display:flex; align-items:center; justify-content:center; gap: 1.25rem;
  margin-top: 1.25rem;
}
.carousel-btn{
  width:44px; height:44px; border-radius:50%; flex:none;
  background: var(--paper); border: 1.5px solid var(--mist); color: var(--ink);
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  transition: background-color .15s var(--ease), border-color .15s var(--ease);
}
.carousel-btn svg{ width:20px; height:20px; }
.carousel-btn:hover{ background: var(--forest); border-color: var(--forest); color: var(--paper); }
.carousel-btn:disabled{ opacity:.35; cursor:default; }
.carousel-btn:disabled:hover{ background: var(--paper); border-color: var(--mist); color: var(--ink); }

.carousel-dots{ display:flex; gap:.5rem; }
.carousel-dots button{
  width:8px; height:8px; border-radius:50%; padding:0; border:none;
  background: var(--mist); cursor:pointer;
}
.carousel-dots button[aria-current="true"]{ background: var(--forest); width:22px; border-radius:5px; transition: width .2s var(--ease); }

@media (min-width: 640px){ .carousel-card{ flex-basis: 48%; } }
@media (min-width: 1024px){
  .carousel-track{ padding-inline: max(1.25rem, calc((100vw - 1200px)/2 + 2rem)); }
  .carousel-card{ flex-basis: 30.5%; }
}

/* ==========================================================================
   Sessão 2 — Aplicações (fundo com foto de fazenda + camada escura)
   ========================================================================== */
.section--apps{
  position:relative; color: var(--paper); overflow:hidden;
  background: var(--forest-dim) center / cover no-repeat url('../img/fazenda-background.webp');
}
.section--apps__bg{
  position:absolute; inset:0; pointer-events:none;
  background-image: linear-gradient(150deg, rgba(20,23,15,.55) 4%, rgba(23,54,42,.40) 50%, rgba(20,23,15,.58) 96%);
}
.section--apps .wrap{ position:relative; }

.apps-grid{ display:grid; gap: 1.5rem; margin-top: 2rem; }
.apps-col{
  background: rgba(16,19,13,.58);
  border: 1px solid rgba(245,243,236,.16);
  border-top: 3px solid var(--wheat);
  border-radius: var(--radius);
  padding: 2rem 1.85rem 2.1rem;
  box-shadow: var(--shadow-md);
}
.apps-col__head{ display:flex; align-items:center; gap:.9rem; margin-bottom: 1.5rem; }
.apps-col__icon{
  width:42px; height:42px; border-radius:50%; flex:none; overflow:hidden;
  background: var(--wheat); color: var(--ink);
  display:flex; align-items:center; justify-content:center;
}
.apps-col__icon svg{ width:21px; height:21px; flex:none; }
.apps-col h3{
  font-family: var(--font-display); font-size:1.25rem; color: var(--paper);
  font-weight:600; letter-spacing:-.01em; margin:0;
}

.check-list li{
  position:relative; padding-left: 2.1rem; margin-bottom: .9rem;
  font-size: 1.02rem; line-height: 1.55;
}
.check-list li:last-child{ margin-bottom:0; }
.check-list li::before{
  content:""; position:absolute; left:0; top:.1em; width:22px; height:22px;
  border-radius:50%; background: var(--wheat);
}
.check-list li::after{
  content:""; position:absolute; left:6px; top:.58em; width:10px; height:6px;
  border-left:2px solid var(--ink); border-bottom:2px solid var(--ink);
  transform: rotate(-45deg);
}
.section--apps .check-list li{ color: var(--paper-70); }
.section--about .check-list li{ color: var(--slate); }

@media (min-width: 768px){ .apps-grid{ grid-template-columns: 1fr 1fr; gap: 1.75rem; } }

/* ==========================================================================
   Sessão 3 — Autoridade / ZIOagro
   ========================================================================== */
.section--about{ background: var(--paper); }
.about-grid{ display:grid; gap: 2.5rem; }
.about-main p{ color: var(--slate); font-size: 1.02rem; max-width: 60ch; }

.upsell{
  margin-top: 2.25rem; padding: 1.75rem 1.75rem 2rem;
  background: var(--paper-dim); border: 1px solid var(--mist); border-radius: var(--radius);
}
.upsell h3{
  font-family: var(--font-display); font-size:1.3rem; color: var(--ink);
  margin-bottom:.6rem; font-weight:600; letter-spacing:-.01em;
  display:flex; align-items:center; gap:.65rem;
}
.upsell h3::before{ content:""; width:26px; height:3px; border-radius:2px; background: var(--forest); flex:none; }
.upsell-intro{ color: var(--slate); font-size:1rem; margin-bottom:1.25rem; }

.expert-card{
  background: var(--ink); color: var(--paper); border-radius: var(--radius);
  padding: 2rem; box-shadow: var(--shadow-md); height: fit-content;
}
.expert-avatar{
  width:52px; height:52px; border-radius:50%; background: var(--wheat); color: var(--ink);
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-display); font-weight:700; font-size:1.1rem; margin-bottom:1.1rem;
}
.expert-name{ font-family: var(--font-display); font-size:1.15rem; font-weight:600; margin-bottom:.25em; }
.expert-role{ font-size:.88rem; color: var(--wheat); margin-bottom:1rem; line-height:1.5; }
.expert-desc{ font-size:.94rem; color: var(--paper-70); margin-bottom:1.5rem; }
.expert-link{
  display:inline-flex; align-items:center; gap:.4rem; text-decoration:none;
  color: var(--paper); font-weight:600; font-size:.92rem;
  border-bottom: 1px solid rgba(245,243,236,.4); padding-bottom:.2rem;
}
.expert-link svg{ width:14px; height:14px; }
.expert-link:hover{ border-color: var(--wheat); color: var(--wheat); }

@media (min-width: 900px){
  .about-grid{ grid-template-columns: 1.6fr 1fr; align-items:start; }
}

/* ==========================================================================
   Rodapé / CTA final
   ========================================================================== */
.site-footer{ background: var(--ink); color: var(--paper); }

.footer-cta-band{
  position:relative; overflow:hidden;
  background:
    radial-gradient(ellipse 900px 520px at 50% -18%, rgba(217,164,65,.26), transparent 62%),
    radial-gradient(ellipse 820px 640px at 12% 118%, rgba(46,122,82,.36), transparent 60%),
    linear-gradient(165deg, #0F120C 0%, #171C15 55%, #1B3A2A 100%);
  border-bottom: 1px solid rgba(245,243,236,.10);
}
.footer-cta{
  position:relative; padding: 7rem 0 5.5rem; max-width: 720px; text-align:center;
}
.footer-cta h2{ font-size: clamp(2rem, 5vw, 2.6rem); color: var(--paper); }
.footer-cta p{ color: var(--paper-70); font-size:1.08rem; max-width: 52ch; margin-inline:auto; }
.footer-cta__note{ font-size:.96rem; color: rgba(245,243,236,.6); margin-top:-.4rem; }
.footer-cta .cta-row{ margin-top: 2.75rem; gap: 1.1rem; justify-content:center; }
.footer-cta .btn-ghost{ border-color: rgba(245,243,236,.35); color: var(--paper); }
.footer-cta .btn-ghost:hover{ background: rgba(245,243,236,.08); border-color: rgba(245,243,236,.6); }

.footer-bottom{
  border-top: 1px solid rgba(245,243,236,.12);
  padding: 1.75rem 0 2.25rem;
  display:flex; flex-wrap:wrap; align-items:center; gap: 1.5rem 2rem;
}
.footer-logo img{ width:64px; height:auto; filter: invert(1); opacity:.9; }
.footer-links{ display:flex; flex-wrap:wrap; gap: 1.1rem 1.5rem; }
.footer-links a{ color: var(--paper-70); text-decoration:none; font-size:.9rem; }
.footer-links a:hover{ color: var(--wheat); }
.footer-copy{ margin: 0 0 0 auto; font-size:.82rem; color: rgba(245,243,236,.5); }

@media (max-width: 640px){
  .footer-bottom{ flex-direction:column; align-items:flex-start; }
  .footer-copy{ margin-left:0; }
}

/* ==========================================================================
   Lightbox — visualização ampliada dos dashboards
   ========================================================================== */
body.lightbox-open{ overflow:hidden; }

.lightbox{ position:fixed; inset:0; z-index:1000; }
.lightbox[hidden]{ display:none; }
.lightbox-backdrop{
  position:absolute; inset:0; background: rgba(10,12,8,.94);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.lightbox-dialog{
  position:relative; z-index:1; width:100%; height:100%;
  display:flex; align-items:center; justify-content:center;
  padding: 4.5rem 4rem 3.5rem;
}
.lightbox-figure{
  margin:0; max-width:min(94vw, 1140px); max-height:100%;
  display:flex; flex-direction:column; align-items:center; gap:1rem;
}
.lightbox-figure img{
  display:block; max-width:100%; max-height:74vh; width:auto; height:auto;
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); background:#0c0f0b;
}
.lightbox-figure figcaption{
  color: var(--paper); font-family: var(--font-display); font-weight:600;
  font-size:1rem; text-align:center; max-width:60ch;
}
.lightbox-close,
.lightbox-nav{
  position:absolute; border-radius:50%; flex:none; cursor:pointer;
  background: rgba(245,243,236,.12); border:1px solid rgba(245,243,236,.28); color: var(--paper);
  display:flex; align-items:center; justify-content:center;
  transition: background-color .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.lightbox-close{ top:1rem; right:1rem; width:44px; height:44px; }
.lightbox-close svg{ width:18px; height:18px; }
.lightbox-close:hover{ background: rgba(245,243,236,.24); }
.lightbox-nav{ top:50%; transform:translateY(-50%); width:52px; height:52px; }
.lightbox-nav svg{ width:22px; height:22px; }
.lightbox-nav:hover{ background: var(--wheat); border-color: var(--wheat); color: var(--ink); }
.lightbox-prev{ left:1rem; }
.lightbox-next{ right:1rem; }
.lightbox-counter{
  position:absolute; bottom:1.1rem; left:50%; transform:translateX(-50%);
  margin:0; color: var(--paper-70); font-family: var(--font-mono); font-size:.8rem; letter-spacing:.03em;
}

@media (max-width: 640px){
  .lightbox-dialog{ padding: 4.25rem 1rem 3.25rem; }
  .lightbox-nav{ width:42px; height:42px; }
  .lightbox-nav svg{ width:18px; height:18px; }
  .lightbox-prev{ left:.35rem; }
  .lightbox-next{ right:.35rem; }
  .lightbox-figure img{ max-height:62vh; }
}
