/* ============================================================
   styles.css — Smart Agriculture IoT Portal
   ============================================================ */

:root {
  --green-50:  #f0fdf4;
  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;

  --sky-100: #e0f2fe;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;

  --amber-400: #fbbf24;
  --amber-500: #f59e0b;

  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  --ink:       var(--slate-800);
  --ink-soft:  var(--slate-600);
  --ink-mute:  var(--slate-500);
  --line:      #e6ebf0;
  --surface:   #ffffff;
  --canvas:    var(--slate-50);

  --grad:      linear-gradient(120deg, #22c55e 0%, #10b981 40%, #0ea5e9 100%);
  --grad-soft: linear-gradient(120deg, rgba(34,197,94,.12), rgba(14,165,233,.12));

  --r-sm: 10px;
  --r:    14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --shadow-xs: 0 1px 2px rgba(15,23,42,.05);
  --shadow-sm: 0 2px 8px rgba(15,23,42,.06);
  --shadow:    0 10px 30px -12px rgba(15,23,42,.18);
  --shadow-lg: 0 24px 60px -20px rgba(15,23,42,.28);

  --maxw: 1200px;
  --header-h: 68px;

  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
               "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background:
    radial-gradient(1000px 560px at 88% -8%, rgba(14,165,233,.07), transparent 60%),
    radial-gradient(920px 520px at 4% 2%, rgba(34,197,94,.07), transparent 55%),
    var(--surface);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1,h2,h3,h4 { margin: 0; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  --bg: transparent;
  --fg: var(--ink);
  --bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  border: 1px solid var(--bd);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease),
              background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  --bg: var(--grad);
  --fg: #fff;
  box-shadow: 0 8px 22px -8px rgba(22,163,74,.55);
}
.btn--primary:hover { box-shadow: 0 14px 30px -10px rgba(22,163,74,.65); }
.btn--ghost {
  --bd: rgba(255,255,255,.55);
  --fg: #fff;
  backdrop-filter: blur(6px);
  background: rgba(255,255,255,.10);
}
.btn--ghost:hover { background: rgba(255,255,255,.2); }
.btn--outline {
  --bd: var(--slate-300);
  --fg: var(--ink);
  --bg: #fff;
}
.btn--outline:hover { --bd: var(--green-500); --fg: var(--green-700); }
.btn--lg { padding: 14px 28px; font-size: 1rem; }
.btn--sm { padding: 8px 16px; font-size: .86rem; }

/* ---------- Topbar ---------- */
.topbar {
  background: var(--slate-900);
  color: rgba(255,255,255,.82);
  font-size: .8rem;
  letter-spacing: .02em;
}
.topbar__inner { display: flex; align-items: center; gap: 9px; height: 38px; }
.topbar__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green-400);
  box-shadow: 0 0 0 0 rgba(74,222,128,.7);
  animation: pulse 2.2s infinite;
  flex: none;
}
@keyframes pulse {
  70%  { box-shadow: 0 0 0 7px rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px -18px rgba(15,23,42,.5);
}
.header__inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 20px;
}

.logo { display: flex; align-items: center; gap: 11px; flex: none; }
.logo__mark { display: grid; place-items: center; }
.logo__text { display: flex; flex-direction: column; line-height: 1.15; }
.logo__text strong { font-size: 1.05rem; letter-spacing: -.01em; color: var(--slate-900); }
.logo__text small { font-size: .72rem; color: var(--ink-mute); letter-spacing: .06em; }

.nav { display: flex; gap: 4px; flex: 1 1 auto; justify-content: center; margin: 0; }
.nav__link {
  padding: 8px 13px;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 500;
  color: var(--slate-600);
  transition: color .18s var(--ease), background .18s var(--ease);
}
.nav__link:hover { color: var(--green-700); background: var(--green-50); }
.nav__link.is-active { color: var(--green-700); background: var(--green-50); font-weight: 600; }

.header__actions { display: flex; align-items: center; gap: 12px; flex: none; }

/* ---------- Language selector (dropdown) ---------- */
.lang-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: none;
}
.lang-select__icon {
  position: absolute; left: 11px; pointer-events: none;
  color: var(--green-600);
}
.lang-select__chev {
  position: absolute; right: 11px; pointer-events: none;
  color: var(--slate-400);
  transition: transform .2s var(--ease);
}
.lang-select select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  padding: 8px 30px 8px 33px;
  border-radius: 999px;
  font: inherit; font-size: .82rem; font-weight: 600; letter-spacing: .01em;
  color: var(--slate-700);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}
.lang-select select:hover { border-color: var(--green-400); }
.lang-select select:focus-visible {
  outline: none; border-color: var(--green-500);
  box-shadow: 0 0 0 3px var(--green-100);
}
.lang-select select:active { transform: scale(.98); }
.lang-select:hover .lang-select__chev { transform: translateY(1px); color: var(--slate-600); }

.burger {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  padding: 11px 9px;
  gap: 4px;
  flex-direction: column;
  justify-content: center;
}
.burger span { display: block; height: 2px; background: var(--slate-700); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  padding: clamp(70px, 11vw, 130px) 0 clamp(80px, 10vw, 120px);
  color: #fff;
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.hero__veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(105deg, rgba(6,32,20,.94) 0%, rgba(8,42,32,.86) 38%, rgba(10,48,60,.62) 68%, rgba(12,52,66,.45) 100%),
    radial-gradient(120% 90% at 85% 15%, rgba(14,165,233,.25), transparent 60%);
}
.hero__inner { position: relative; }
.hero__inner::before {
  content: ""; position: absolute; z-index: -1;
  width: min(60vw, 720px); height: min(60vw, 720px);
  left: -14%; top: -22%;
  background: radial-gradient(circle, rgba(34,197,94,.30), transparent 64%);
  filter: blur(8px);
  pointer-events: none;
}
.hero__content { max-width: 720px; }

.pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 16px 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(6px);
  font-size: .84rem; font-weight: 500;
  letter-spacing: .02em;
  color: rgba(255,255,255,.92);
}
.pill__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green-400);
  box-shadow: 0 0 12px var(--green-400);
}

.hero__title {
  margin: 22px 0 20px;
  font-size: clamp(2.1rem, 5.4vw, 3.65rem);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -.03em;
}
.hero__desc {
  font-size: clamp(1.02rem, 1.55vw, 1.14rem);
  line-height: 1.85;
  color: rgba(255,255,255,.82);
  max-width: 640px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px;
  margin: 54px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid rgba(255,255,255,.16);
  max-width: 660px;
}
.hero__stats div { min-width: 0; }
.hero__stats dt {
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.hero__stats dd {
  margin: 5px 0 0;
  font-size: .92rem;
  color: rgba(255,255,255,.62);
  line-height: 1.5;
}

.hero__scroll {
  position: absolute; left: 50%; bottom: 22px;
  transform: translateX(-50%);
  width: 24px; height: 38px;
  border: 2px solid rgba(255,255,255,.35);
  border-radius: 14px;
  display: grid; justify-items: center;
  padding-top: 7px;
}
.hero__scroll span {
  width: 3px; height: 7px; border-radius: 2px;
  background: rgba(255,255,255,.8);
  animation: wheel 1.8s infinite;
}
@keyframes wheel {
  0%   { opacity: 0; transform: translateY(0); }
  35%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(12px); }
}

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 8vw, 104px) 0; }
.section--alt { background: var(--canvas); border-block: 1px solid var(--line); }

.sec-head { max-width: 760px; margin-bottom: clamp(38px, 5vw, 56px); }
.sec-kicker {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: 12px;
}
.sec-kicker::before {
  content: ""; display: inline-block;
  width: 22px; height: 2px; background: var(--green-500);
  vertical-align: middle; margin-right: 10px; border-radius: 2px;
}
.sec-title {
  position: relative;
  font-size: clamp(1.6rem, 3.1vw, 2.35rem);
  letter-spacing: -.025em;
  margin-bottom: 14px;
  padding-bottom: 16px;
}
.sec-title::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 52px; height: 4px; border-radius: 4px;
  background: var(--grad);
}
.sec-desc { color: var(--ink-soft); font-size: 1.05rem; line-height: 1.85; }

/* ---------- Scenario cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #fff;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease);
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--green-200); }
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  height: 3px; background: var(--grad);
  transform: scaleX(0); transform-origin: left;
  transition: transform .32s var(--ease);
}
.card:hover::before { transform: scaleX(1); }
.card__media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--slate-100); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card__media img { transform: scale(1.06); }
.card__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6,28,20,.5), transparent 55%);
}
.card__no {
  position: absolute; z-index: 2; top: 14px; left: 16px;
  font-size: .72rem; font-weight: 800; letter-spacing: .1em;
  color: rgba(255,255,255,.72);
}
.card__body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card__title { font-size: 1.2rem; margin-bottom: 10px; }
.card__desc { color: var(--ink-soft); font-size: .95rem; line-height: 1.75; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.tag {
  font-size: .76rem; font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--green-50);
  color: var(--green-700);
  border: 1px solid var(--green-100);
}
.card__go {
  margin-top: 18px;
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .9rem; font-weight: 600;
  color: var(--green-600);
  background: none; border: 0; padding: 0; cursor: pointer;
  align-self: flex-start;
}
.card__go svg { transition: transform .22s var(--ease); }
.card__go:hover svg { transform: translateX(4px); }

/* ---------- Architecture ---------- */
.arch { margin-top: 8px; }
.arch__flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 26px;
}
.flow-step {
  position: relative;
  text-align: center;
  padding: 14px 10px;
  border-radius: var(--r);
  background: #fff;
  border: 1px solid var(--line);
  font-size: .86rem; font-weight: 600;
  color: var(--slate-700);
}
.flow-step::after {
  content: ""; position: absolute; right: -9px; top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 7px solid var(--green-400);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  z-index: 2;
}
.flow-step:last-child::after { display: none; }
.flow-step span {
  display: block; font-size: .68rem; font-weight: 500;
  color: var(--ink-mute); letter-spacing: .04em; margin-bottom: 2px;
}

.arch__layers { display: grid; gap: 16px; }
.layer {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green-500);
  border-radius: var(--r);
  padding: 22px 26px;
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.layer:hover { box-shadow: var(--shadow-sm); }
.layer:nth-child(1) { border-left-color: #22c55e; }
.layer:nth-child(2) { border-left-color: #10b981; }
.layer:nth-child(3) { border-left-color: #06b6d4; }
.layer:nth-child(4) { border-left-color: #0ea5e9; }
.layer__no {
  font-size: 2.1rem; font-weight: 800;
  color: var(--slate-200);
  line-height: 1;
  letter-spacing: -.04em;
}
.layer__title { font-size: 1.12rem; margin-bottom: 7px; }
.layer__desc { color: var(--ink-soft); font-size: .98rem; line-height: 1.78; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  font-size: .82rem;
  padding: 5px 12px;
  border-radius: 8px;
  background: var(--slate-100);
  color: var(--slate-600);
  border: 1px solid var(--slate-200);
}

.arch__protocols {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.proto {
  text-align: center;
  padding: 16px 12px;
  border-radius: var(--r);
  background: linear-gradient(160deg, #fff, var(--slate-50));
  border: 1px solid var(--line);
}
.proto strong { display: block; font-size: 1rem; letter-spacing: .01em; }
.proto span { font-size: .8rem; color: var(--ink-mute); }

/* ---------- Tabs / Solutions ---------- */
.tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 28px;
  padding: 6px;
  background: var(--slate-100);
  border-radius: 999px;
  border: 1px solid var(--line);
  width: fit-content;
  max-width: 100%;
}
.tab {
  border: 0; background: transparent;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: .93rem; font-weight: 600;
  color: var(--slate-500);
  cursor: pointer;
  transition: all .2s var(--ease);
  white-space: nowrap;
}
.tab:hover { color: var(--slate-800); }
.tab.is-active {
  background: #fff; color: var(--green-700);
  box-shadow: var(--shadow-xs);
}

.panel { display: none; }
.panel.is-active { display: block; animation: fade .35s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.panel__head { margin-bottom: 30px; }
.panel__title { font-size: clamp(1.35rem, 2.4vw, 1.85rem); margin-bottom: 12px; letter-spacing: -.02em; }
.panel__lead { color: var(--ink-soft); font-size: 1.05rem; line-height: 1.85; max-width: 860px; }

.panel__figure {
  margin: 0 0 32px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.panel__figures { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 0 0 32px; }
.panel__figures .panel__figure { margin: 0; }
.panel__figure img { width: 100%; }

.blocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.block {
  padding: 24px;
  border-radius: var(--r);
  background: #fff;
  border: 1px solid var(--line);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.block:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.block__ico {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: var(--grad-soft);
  color: var(--green-600);
  margin-bottom: 14px;
}
.block__title { font-size: 1.08rem; margin-bottom: 9px; }
.block__desc { color: var(--ink-soft); font-size: .98rem; line-height: 1.8; }

.benefits { margin-top: 28px; }
.benefits__title { font-size: 1.08rem; margin-bottom: 14px; }
.benefits__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.benefits__list li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: .95rem; color: var(--slate-600);
  line-height: 1.7;
  padding: 11px 15px;
  background: var(--green-50);
  border-radius: 10px;
  border: 1px solid var(--green-100);
}
.benefits__list li::before {
  content: "✓"; flex: none;
  color: var(--green-600); font-weight: 800;
  line-height: 1.65;
}

/* Data tables */
.dtable { margin-top: 28px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.dtable__title {
  padding: 14px 20px;
  background: var(--slate-50);
  border-bottom: 1px solid var(--line);
  font-size: .95rem; font-weight: 700;
}
.dtable table { width: 100%; border-collapse: collapse; }
.dtable th, .dtable td {
  text-align: left; padding: 12px 20px;
  font-size: .91rem;
  border-bottom: 1px solid var(--slate-100);
}
.dtable th {
  background: #fff; color: var(--ink-mute);
  font-size: .78rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
}
.dtable tbody tr:last-child td { border-bottom: 0; }
.dtable tbody tr:hover { background: var(--green-50); }
.dtable td:first-child { font-weight: 600; color: var(--slate-800); width: 34%; }
.dtable td:last-child { color: var(--ink-soft); }

/* Livestock modes */
.modes { display: grid; gap: 16px; }
.mode {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  overflow: hidden;
}
.mode__head {
  width: 100%;
  display: flex; align-items: center; gap: 14px;
  padding: 18px 22px;
  background: none; border: 0; cursor: pointer;
  text-align: left;
  transition: background .2s var(--ease);
}
.mode__head:hover { background: var(--slate-50); }
.mode__idx {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: var(--grad);
  color: #fff; font-size: .82rem; font-weight: 700;
}
.mode__t { font-size: 1.05rem; font-weight: 700; flex: 1; }
.mode__chev { flex: none; color: var(--slate-400); transition: transform .28s var(--ease); }
.mode.is-open .mode__chev { transform: rotate(180deg); }
.mode__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .34s var(--ease); }
.mode.is-open .mode__panel { grid-template-rows: 1fr; }
.mode__inner { overflow: hidden; }
.mode__content { padding: 0 22px 22px 66px; }
.mode__desc { color: var(--ink-soft); font-size: .98rem; line-height: 1.82; }
.mode__specs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.mode__specs span {
  font-size: .82rem; font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
  background: var(--sky-100);
  color: var(--sky-600);
  border: 1px solid #bae6fd;
}

/* ---------- Platform ---------- */
.plat-grid { display: grid; gap: 20px; }
.plat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  transition: box-shadow .28s var(--ease), border-color .28s var(--ease);
}
.plat-card:hover { box-shadow: var(--shadow); border-color: var(--green-200); }
.plat-card--reverse { direction: rtl; }
.plat-card--reverse > * { direction: ltr; }
.plat-card__body { padding: clamp(24px, 3vw, 38px); display: flex; flex-direction: column; justify-content: center; }
.plat-card__title { font-size: 1.24rem; margin-bottom: 12px; letter-spacing: -.015em; }
.plat-card__desc { color: var(--ink-soft); font-size: .95rem; line-height: 1.82; }
.plat-card__media {
  background: transparent;
  display: grid; place-items: center;
  padding: 22px;
  min-height: 240px;
}
.plat-card__media img {
  width: 100%; border-radius: 10px;
  box-shadow: 0 14px 32px -16px rgba(15,23,42,.35);
}
.plat-card--wide { grid-column: 1 / -1; }

.rules { margin-top: 16px; display: grid; gap: 10px; }
.rules li {
  display: flex; gap: 11px; align-items: flex-start;
  font-size: .9rem; color: var(--slate-600); line-height: 1.7;
}
.rules li::before {
  content: ""; flex: none;
  width: 18px; height: 18px; margin-top: 4px;
  border-radius: 50%;
  background: var(--green-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2316a34a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 10.5l4 4 8-9'/%3E%3C/svg%3E") center/12px no-repeat;
}

.phones { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.phones img {
  width: auto; height: 240px;
  border-radius: 14px;
  box-shadow: 0 14px 32px -14px rgba(15,23,42,.45);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  cursor: pointer;
  border: 1px solid var(--slate-200);
}
.phones img:hover { transform: translateY(-8px) scale(1.03); box-shadow: 0 22px 44px -16px rgba(15,23,42,.55); z-index: 2; }
/* phones placed inside a media column (cross layout) */
.plat-card__media .phones { margin-top: 0; justify-content: center; }
.plat-card__media .phones img { height: 210px; }

/* ---------- Hardware ---------- */
.hw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; }
.hw {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 26px;
  transition: transform .26s var(--ease), box-shadow .26s var(--ease);
}
.hw:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.hw__ico {
  width: 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--grad); color: #fff;
  margin-bottom: 16px;
  box-shadow: 0 10px 22px -10px rgba(22,163,74,.6);
}
.hw__title { font-size: 1.12rem; margin-bottom: 14px; }
.hw__list { display: flex; flex-wrap: wrap; gap: 8px; }
.hw__list li {
  font-size: .92rem;
  padding: 7px 13px;
  border-radius: 8px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  color: var(--slate-600);
  transition: all .18s var(--ease);
}
.hw__list li:hover { background: var(--green-50); border-color: var(--green-200); color: var(--green-700); }

/* ---------- Cases ---------- */
.cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 22px; }
.case {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease);
}
.case:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--green-200); }
.case__media { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--slate-100); }
.case__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.case__media--duo { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.case:hover .case__media img { transform: scale(1.05); }
.case__tag {
  position: absolute; top: 14px; left: 14px;
  font-size: .74rem; font-weight: 700;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(255,255,255,.94);
  color: var(--green-700);
  backdrop-filter: blur(4px);
  box-shadow: var(--shadow-xs);
}
.case__body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.case__name { font-size: 1.16rem; margin-bottom: 8px; }
.case__client {
  font-size: .84rem; font-weight: 600;
  color: var(--ink-mute);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--slate-200);
}
.case__points { display: grid; gap: 9px; }
.case__points li {
  display: flex; gap: 10px;
  font-size: .98rem; color: var(--slate-600); line-height: 1.7;
}
.case__points li::before {
  content: ""; flex: none;
  width: 6px; height: 6px; margin-top: 9px;
  border-radius: 50%; background: var(--green-500);
}
.case__metrics {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 10px; margin-top: 18px;
}
.case__metric {
  text-align: center;
  padding: 12px 8px;
  border-radius: 10px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
}
.case__metric strong { display: block; font-size: 1.14rem; color: var(--green-700); letter-spacing: -.01em; }
.case__metric span { font-size: .74rem; color: var(--ink-mute); }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; align-items: start; }
.contact__form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(24px, 3vw, 36px);
  display: grid; gap: 16px;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-size: .92rem; font-weight: 600; color: var(--slate-700); }
.field input, .field select, .field textarea {
  font: inherit; font-size: .95rem;
  padding: 11px 14px;
  border: 1px solid var(--slate-300);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
  width: 100%;
}
.field textarea { resize: vertical; min-height: 108px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(34,197,94,.16);
}
.form-msg {
  display: none;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--green-50);
  border: 1px solid var(--green-200);
  color: var(--green-700);
  font-size: .9rem; font-weight: 600;
}
.form-msg.is-shown { display: block; animation: fade .3s var(--ease); }
.form-msg.is-error { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }

/* honeypot — hidden from humans, visible to bots */
.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* LGPD consent + privacy note */
.consent {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: .87rem; line-height: 1.55; color: var(--slate-600);
  padding: 12px 14px; border: 1px solid var(--slate-200);
  border-radius: var(--r-md); background: var(--slate-50);
}
.consent input[type="checkbox"] { margin-top: 3px; width: 16px; height: 16px; flex: 0 0 auto; accent-color: var(--green-600); }
.consent__link { color: var(--green-700); text-decoration: underline; }
.consent__link:hover { color: var(--green-800); }
.form-note {
  font-size: .84rem; line-height: 1.7; color: var(--slate-500);
  margin: 14px 0 0; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--slate-50); border-left: 3px solid var(--green-400);
}
.form-route { font-size: .8rem; color: var(--slate-400); margin: 8px 0 0; }

.contact__info {
  background: linear-gradient(155deg, var(--slate-900), #123c33 60%, #0b4a3f);
  color: #fff;
  border-radius: var(--r-lg);
  padding: clamp(26px, 3vw, 36px);
  display: grid; gap: 22px;
}
.contact__info h3 { font-size: 1.2rem; }
.contact__info p.ci-lead { color: rgba(255,255,255,.7); font-size: .95rem; line-height: 1.75; }
.ci-item { display: grid; gap: 4px; }
.ci-item dt {
  font-size: .74rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--green-400);
}
.ci-item dd { margin: 0; font-size: 1rem; color: rgba(255,255,255,.92); }
.ci-item a { border-bottom: 1px dashed rgba(255,255,255,.35); }
.ci-item a:hover { color: var(--green-400); border-bottom-color: var(--green-400); }

/* ---------- Footer ---------- */
.footer {
  background: var(--slate-900);
  color: rgba(255,255,255,.72);
  padding: clamp(48px, 6vw, 72px) 0 24px;
  margin-top: 0;
}
.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer__logo strong { color: #fff; font-size: 1.15rem; }
.footer__logo small { color: rgba(255,255,255,.5); }
.footer__about { margin-top: 16px; font-size: .92rem; line-height: 1.8; color: rgba(255,255,255,.6); max-width: 380px; }
.footer__col h4 { color: #fff; font-size: 1rem; letter-spacing: .04em; margin-bottom: 16px; }
.footer__col ul { display: grid; gap: 10px; }
.footer__col a, .footer__col li { font-size: .92rem; color: rgba(255,255,255,.6); }
.footer__col a { transition: color .18s var(--ease); }
.footer__col a:hover, .footer__col li:hover { color: var(--green-400); }
.footer__note { margin-top: 14px; font-size: .82rem; color: rgba(255,255,255,.4); }
.footer__bottom {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: space-between; align-items: center;
  padding-top: 22px;
  font-size: .82rem;
  color: rgba(255,255,255,.45);
}
.footer__meta { letter-spacing: .06em; }
.footer__icp { color: rgba(255,255,255,.45); text-decoration: none; margin-left: 2px; }
.footer__icp:hover { color: var(--green-400); text-decoration: underline; }

/* ---------- Back to top ---------- */
.totop {
  position: fixed; right: 24px; bottom: 24px; z-index: 70;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--grad);
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: 0 12px 28px -10px rgba(22,163,74,.7);
  opacity: 0; pointer-events: none;
  transform: translateY(12px);
  transition: all .28s var(--ease);
}
.totop.is-shown { opacity: 1; pointer-events: auto; transform: none; }
.totop:hover { transform: translateY(-3px); }

/* ---------- Cookie consent bar ---------- */
.cookie {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: var(--slate-900);
  color: #fff;
  padding: 16px 0;
  box-shadow: 0 -10px 30px -12px rgba(15,23,42,.5);
  animation: slideUp .4s var(--ease);
}
.cookie[hidden] { display: none; }
.cookie__inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.cookie__text { flex: 1 1 420px; margin: 0; font-size: .9rem; line-height: 1.6; color: rgba(255,255,255,.82); }
.cookie__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cookie__policy { color: var(--green-400); text-decoration: underline; font-size: .87rem; }
.cookie__policy:hover { color: var(--green-300); }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Mobile nav ---------- */
@media (max-width: 980px) {
  .nav {
    position: fixed; inset: calc(var(--header-h) + 38px) 0 auto 0;
    flex-direction: column; gap: 2px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 14px 20px 22px;
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    opacity: 0; pointer-events: none;
    transition: all .25s var(--ease);
    margin-left: 0;
  }
  .nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__link { padding: 12px 14px; font-size: 1rem; border-radius: 10px; }
  .burger { display: flex; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
  .arch__flow { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .flow-step::after { display: none; }
  .layer { grid-template-columns: 1fr; gap: 10px; padding: 20px; }
  .layer__no { font-size: 1.4rem; }
  .plat-card { grid-template-columns: 1fr; }
  .plat-card--reverse { direction: ltr; }
  .contact { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 620px) {
  .container { width: calc(100% - 32px); }
  .header__inner { gap: 10px; }
  .logo__text small { display: none; }
  .header__actions { gap: 8px; }
  .hero { padding: 56px 0 70px; }
  .hero__actions .btn { flex: 1 1 auto; }
  .form-row { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .phone-deck, .panel__figures { grid-template-columns: 1fr; }
  .mode__content { padding-left: 22px; }
  .phones img { height: 190px; }
  .card__body, .case__body { padding: 20px; }
  .tabs { width: 100%; overflow-x: auto; border-radius: var(--r); }
}

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