/* =========================================================
   AyuTech — Soluções Web
   Identidade: grafite + vermelho caligráfico (歩) + Poppins
   ========================================================= */

/* ---------- Fontes (hospedadas no próprio site — licença OFL em assets/fonts) ---------- */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/poppins-300.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins-700.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/poppins-800.woff2") format("woff2"); }
/* só os caracteres japoneses usados no site: 歩一二三四ずつ技匠繋道問話改善み現場方針ポカヨケ */
@font-face { font-family: "Yuji Boku"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/yuji-boku-kanji.woff2") format("woff2"); unicode-range: U+3059-305A, U+3064-3065, U+307F, U+3099-309A, U+30AB-30AC, U+30B1-30B2, U+30DB-30DD, U+30E8, U+4E00, U+4E09, U+4E8C, U+5320, U+554F, U+5584, U+56DB, U+5834, U+6280, U+6539, U+65B9, U+6B69, U+73FE, U+7E4B, U+8A71, U+9053, U+91DD; }

:root {
  color-scheme: dark;
  /* Cores */
  --bg: #121212;
  --bg-2: #181818;
  --surface: #1d1d1d;
  --surface-2: #252525;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f5f5f5;
  --muted: #a8a8a8;
  --muted-2: #7a7a7a;

  --red: #e3120b;          /* vermelho do kanji */
  --red-bright: #ff2b1c;
  --red-deep: #7d0905;
  --red-soft: rgba(227, 18, 11, 0.14);
  --red-glow: rgba(227, 18, 11, 0.45);

  /* cores que mudam entre os modos escuro e claro */
  --strong: #fff;                      /* texto de destaque */
  --tint: rgba(255, 255, 255, 0.03);   /* realce sutil de fundo */
  --sunken: rgba(0, 0, 0, 0.22);       /* campos e áreas "afundadas" */
  --glass: rgba(29, 29, 29, 0.86);     /* cartões translúcidos */
  --glass-strong: rgba(22, 22, 22, 0.96);
  --header-bg: rgba(18, 18, 18, 0.78);
  --nav-solid: rgba(14, 14, 14, 0.97);
  --footer-bg: #0e0e0e;
  --faint: rgba(255, 255, 255, 0.22);
  --shade: 18, 18, 18;                 /* cor das vinhetas sobre o 3D (R, G, B) */
  --core-a: #2a2a2a;
  --core-b: #141414;
  --step-glow: #2a1210;
  --particle-alt: rgba(255, 255, 255, 0.65);

  /* Tipografia */
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-jp: "Yuji Boku", "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;

  /* Layout */
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 18px;
  --radius-lg: 28px;
  --header-h: 76px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem; /* acompanha o tamanho de texto escolhido no painel de acessibilidade */
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* textura de papel (washi) bem sutil */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("../img/noise.svg");
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--red); color: #fff; }

.ico {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

:focus-visible {
  outline: 2px solid var(--red-bright);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Botões ---------- */
.btn {
  --pad-y: 15px;
  --pad-x: 26px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: var(--pad-y) var(--pad-x);
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background-color 0.25s, border-color 0.25s, color 0.25s;
}
.btn .ico { transition: transform 0.35s var(--ease); }
.btn:hover .ico { transform: translateX(4px); }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--red-bright), var(--red) 55%, #b80c06);
  box-shadow: 0 10px 30px -10px var(--red-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -12px var(--red-glow), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-ghost {
  color: var(--text);
  border-color: var(--line-2);
  background: var(--tint);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: var(--red); color: var(--strong); background: var(--red-soft); }

.btn-sm { --pad-y: 11px; --pad-x: 20px; font-size: 0.88rem; }
.btn-block { width: 100%; }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  transition: background-color 0.4s, border-color 0.4s, height 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  --header-h: 66px;
  background: var(--header-bg);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 0 12px rgba(227, 18, 11, 0.35)); }
.brand-divider { width: 1px; height: 34px; background: var(--line-2); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text strong { font-size: 1.15rem; font-weight: 700; letter-spacing: 0.02em; }
.brand-text small { margin-top: 4px; font-size: 0.72rem; font-weight: 300; color: var(--muted); letter-spacing: 0.04em; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav ul { display: flex; gap: 26px; }
.main-nav ul a {
  position: relative;
  padding: 6px 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.25s;
}
.main-nav ul a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.main-nav ul a:hover,
.main-nav ul a.is-active { color: var(--strong); }
.main-nav ul a:hover::after,
.main-nav ul a.is-active::after { transform: scaleX(1); transform-origin: left; }

.nav-toggle {
  display: none;
  position: relative;
  z-index: 60;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--tint);
  cursor: pointer;
}
.nav-toggle span {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 2px;
  border-radius: 2px;
  background: var(--strong);
  transition: transform 0.4s var(--ease), opacity 0.2s, top 0.4s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle span:nth-child(3) { top: 28px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(60% 70% at 72% 45%, rgba(227, 18, 11, 0.12), transparent 70%),
    radial-gradient(50% 60% at 10% 100%, rgba(227, 18, 11, 0.06), transparent 70%),
    var(--bg);
}
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.hero.is-ready .hero-canvas { opacity: 1; }

.hero-fallback {
  position: absolute;
  z-index: -1;
  right: 6%;
  top: 50%;
  width: min(44vw, 600px);
  transform: translateY(-50%);
  opacity: 0;
  filter: drop-shadow(0 0 40px rgba(227, 18, 11, 0.35));
  pointer-events: none;
}
html:not(.js) .hero-fallback,
.no-webgl .hero-fallback { opacity: 0.95; }

.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(var(--shade), 0.85) 0%, rgba(var(--shade), 0.35) 45%, transparent 70%),
    linear-gradient(0deg, var(--bg) 0%, transparent 22%);
}

.hero-inner { padding-top: calc(var(--header-h) + 28px); padding-bottom: 72px; }
.hero-content { max-width: 640px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--tint);
  backdrop-filter: blur(6px);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red-bright);
  box-shadow: 0 0 10px var(--red-bright);
}
.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--red-bright);
  animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse { to { transform: scale(3); opacity: 0; } }

.hero-title {
  position: relative;
  margin-top: 26px;
  font-size: clamp(3rem, min(7.4vw, 11.5vh), 6rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.045em;
}
/* brilho vermelho desfocado atrás do "Evolua." — fica no título (fora da linha que
   esconde o excesso da animação), então se espalha suave, sem bordas de caixa */
.hero-title::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.35em;
  bottom: -0.12em;
  width: 4.1em;
  height: 1.25em;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(227, 18, 11, var(--glow-a, 0.62)), rgba(227, 18, 11, calc(var(--glow-a, 0.62) * 0.35)) 55%, transparent 100%);
  filter: blur(22px);
  pointer-events: none;
  opacity: 0;
  animation: glow-in 1.2s var(--ease) 0.5s both, glow-breathe 6s ease-in-out 1.7s infinite;
}
@keyframes glow-in {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: none; }
}
@keyframes glow-breathe {
  0%, 100% { opacity: 1; transform: none; }
  50% { opacity: 0.7; transform: scale(1.06); }
}
html.theme-light .hero-title::after { --glow-a: 0.3; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero-title .line > span { display: inline-block; }
.hero-title .accent > span {
  color: var(--red);
  background: linear-gradient(100deg, var(--red-bright), var(--red) 45%, #ff5a3c 75%, var(--red));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: sheen 6s linear infinite;
}
@keyframes sheen { to { background-position: -200% 0; } }

.js .hero-title .line > span {
  transform: translateY(110%);
  animation: rise 1.1s var(--ease) forwards;
}
.js .hero-title .line:nth-child(2) > span { animation-delay: 0.12s; }
.js .hero-title .line:nth-child(3) > span { animation-delay: 0.24s; }
@keyframes rise { to { transform: translateY(0); } }

.hero-sub {
  margin-top: 24px;
  max-width: 600px;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  color: var(--muted);
}
.hero-sub strong { color: var(--strong); font-weight: 600; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 20px;
  margin-top: 52px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  max-width: 620px;
}
.hero-stats strong { display: block; font-size: 1.7rem; font-weight: 700; color: var(--strong); letter-spacing: -0.02em; }
.hero-stats span { display: block; font-size: 0.8rem; line-height: 1.4; color: var(--muted); }

/* destaque "Método Ayumi" (leva à seção do método) */
.stat-method a { display: block; }
/* mesmo padrão visual de 24/7 e 100%; a coluna é um pouco mais larga para caber numa linha */
.hero-stats .stat-method strong { white-space: nowrap; }
.stat-method span { transition: color 0.25s; }
.stat-method a:hover span { color: var(--text); }

.js .hero .eyebrow,
.js .hero-sub,
.js .hero-actions,
.js .hero-stats { opacity: 0; animation: fade-up 1s var(--ease) forwards; }
.js .hero-sub { animation-delay: 0.45s; }
.js .hero-actions { animation-delay: 0.6s; }
.js .hero-stats { animation-delay: 0.75s; }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}


.hero-vertical {
  position: absolute;
  right: clamp(16px, 2.5vw, 40px);
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--font-jp);
  font-size: 1.5rem;
  letter-spacing: 0.4em;
  color: var(--faint);
  pointer-events: none;
}
.hero-vertical span {
  margin-top: 18px;
  font-family: var(--font);
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 1.5px solid var(--line-2);
  border-radius: 20px;
}
.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 3px;
  height: 8px;
  margin-left: -1.5px;
  border-radius: 3px;
  background: var(--red-bright);
  animation: scroll-dot 1.8s var(--ease) infinite;
}
@keyframes scroll-dot {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ---------- Faixa de plataformas ---------- */
.marquee {
  position: relative;
  overflow: hidden;
  padding: 22px 0;
  border-block: 1px solid var(--line);
  background: var(--bg-2);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; flex: none; }
.marquee li {
  display: flex;
  align-items: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.marquee li::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-inline: 34px;
  background: var(--red);
  transform: rotate(45deg);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Seções ---------- */
.section { position: relative; padding-block: clamp(84px, 11vw, 140px); overflow-x: clip; }
.section-alt { background: var(--bg-2); }
.section-alt::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(227, 18, 11, 0.5), transparent);
}

.section-head { max-width: 720px; margin-bottom: clamp(44px, 6vw, 68px); }
.section-head h2,
.split-text h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); letter-spacing: -0.035em; }
.lead { margin-top: 20px; font-size: clamp(1rem, 1.3vw, 1.1rem); color: var(--muted); }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker .kanji {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--red-soft);
  border: 1px solid rgba(227, 18, 11, 0.3);
  font-family: var(--font-jp);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--red-bright);
}

/* ---------- Cards de serviços (tilt 3D) ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card { perspective: 1000px; }
.card-inner {
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 50%;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 32px 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, var(--surface) 0%, var(--bg-2) 100%);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease), border-color 0.4s, box-shadow 0.6s var(--ease);
}
.card-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(227, 18, 11, 0.16), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.card:hover .card-inner {
  border-color: rgba(227, 18, 11, 0.4);
  box-shadow: 0 30px 60px -30px rgba(227, 18, 11, 0.35), 0 20px 40px -20px rgba(0, 0, 0, 0.6);
}
.card:hover .card-inner::before { opacity: 1; }
.card.is-tilting .card-inner { transition: transform 0.12s linear, border-color 0.4s, box-shadow 0.6s var(--ease); }

.card-num {
  position: absolute;
  top: 26px;
  right: 28px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted-2);
}
.card-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  color: var(--red-bright);
  background: linear-gradient(145deg, rgba(227, 18, 11, 0.22), rgba(227, 18, 11, 0.04));
  border: 1px solid rgba(227, 18, 11, 0.35);
  box-shadow: 0 10px 30px -10px var(--red-glow);
  transform: translateZ(50px);
}
.card-icon .ico { width: 28px; height: 28px; }
.card h3 { margin-top: 26px; font-size: 1.32rem; }
.card p { margin-top: 10px; color: var(--muted); font-size: 0.95rem; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tags li {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 24px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--red-bright);
}
.card-link .ico { transition: transform 0.35s var(--ease); }
.card-link:hover .ico { transform: translateX(5px); }

.more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
  margin-top: 34px;
  padding: 24px 28px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-lg);
}
.more-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.more-title .ico { color: var(--red-bright); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.chips li {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---------- Abas de especialidades ---------- */
.tab-list {
  display: flex;
  gap: 8px;
  padding: 6px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-list::-webkit-scrollbar { display: none; }
.tab {
  flex: none;
  padding: 11px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.25s, background-color 0.25s, box-shadow 0.3s;
}
.tab:hover { color: var(--strong); }
.tab[aria-selected="true"] {
  color: #fff;
  background: linear-gradient(135deg, var(--red-bright), var(--red));
  box-shadow: 0 8px 24px -8px var(--red-glow);
}

.tab-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 4vw, 56px);
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(80% 120% at 0% 0%, rgba(227, 18, 11, 0.09), transparent 60%),
    var(--surface);
  animation: panel-in 0.6s var(--ease);
}
.tab-panel[hidden] { display: none; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.panel-info h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.panel-info p { margin-top: 14px; color: var(--muted); }
.panel-info .tools-label {
  margin-top: 22px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.panel-info .tools-label + .tags { margin-top: 10px; }
.panel-info .tags li { color: var(--text); border-color: rgba(227, 18, 11, 0.35); background: var(--red-soft); }
.ideal {
  margin: 24px 0 28px;
  padding: 16px 18px;
  border-left: 3px solid var(--red);
  border-radius: 0 12px 12px 0;
  background: var(--tint);
  font-size: 0.92rem;
  color: var(--text);
}
.ideal span {
  display: block;
  margin-bottom: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red-bright);
}

.spec-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-content: start;
}
.spec-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--sunken);
  font-size: 0.92rem;
  line-height: 1.45;
  transition: border-color 0.3s, transform 0.4s var(--ease);
}
.spec-list li:hover { border-color: rgba(227, 18, 11, 0.4); transform: translateY(-2px); }
.spec-list .ico,
.check-list .ico {
  width: 20px;
  height: 20px;
  padding: 3px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  stroke-width: 3;
}

/* ---------- Layout em duas colunas ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(40px, 6vw, 90px);
}
.split-reverse .split-text { order: 2; }
.split-text p + p { margin-top: 16px; color: var(--muted); }

.check-list { display: grid; gap: 14px; margin-top: 30px; }
.check-list li { display: flex; align-items: center; gap: 12px; font-weight: 500; }

/* ---------- Órbita 3D de integrações ---------- */
.orbit-wrap {
  --tilt: 58deg;
  --tx: 0deg;
  --ty: 0deg;
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 1;
  margin-inline: auto;
  container-type: inline-size;
  perspective: 1400px;
}
.orbit-scene {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(calc(var(--tilt) + var(--tx))) rotateY(var(--ty));
  transition: transform 0.8s var(--ease);
}
/* brilho vermelho desfocado atrás da órbita — plano (fora da cena 3D), para não
   atravessar o círculo do centro */
.orbit-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78cqi;
  height: 46cqi;
  margin: -23cqi 0 0 -39cqi;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(227, 18, 11, 0.34), rgba(227, 18, 11, 0.1) 60%, transparent 100%);
  filter: blur(18px);
  pointer-events: none;
}
.ring {
  --size: 58cqi;
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--size);
  height: var(--size);
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  border-radius: 50%;
  border: 1px solid rgba(227, 18, 11, 0.45);
  box-shadow: 0 0 30px rgba(227, 18, 11, 0.18), inset 0 0 30px rgba(227, 18, 11, 0.12);
  transform-style: preserve-3d;
  animation: spin 36s linear infinite;
}
.ring-2 {
  --size: 88cqi;
  border-style: dashed;
  border-color: var(--line-2);
  animation-duration: 60s;
  animation-direction: reverse;
}
/* --n (quantidade) e --i (posição) são calculados pelo main.js; os valores abaixo são o padrão sem JS */
.ring-1 { --n: 5; }
.ring-2 { --n: 7; }
.arm:nth-child(2) { --i: 1; }
.arm:nth-child(3) { --i: 2; }
.arm:nth-child(4) { --i: 3; }
.arm:nth-child(5) { --i: 4; }
.arm:nth-child(6) { --i: 5; }
.arm:nth-child(7) { --i: 6; }
.arm:nth-child(8) { --i: 7; }
.arm:nth-child(9) { --i: 8; }
.arm:nth-child(10) { --i: 9; }
.arm {
  --i: 0;
  --angle: calc(var(--i) * 360deg / var(--n));
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  transform: rotateZ(var(--angle)) translateX(calc(var(--size) / 2)) rotateZ(calc(var(--angle) * -1));
}
.orbit-item {
  position: absolute;
  left: 0;
  top: 0;
  padding: 0.55em 1.05em;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--glass);
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.7);
  font-size: clamp(10px, 2.5cqi, 14px);
  font-weight: 600;
  white-space: nowrap;
  transform-style: preserve-3d;
  animation: counter-spin 36s linear infinite;
}
.ring-1 .orbit-item { border-color: rgba(227, 18, 11, 0.5); }
/* os itens da órbita são links para as especialidades */
a.orbit-item { color: var(--text); transition: background-color 0.25s, border-color 0.25s, color 0.25s; }
a.orbit-item:hover,
a.orbit-item:focus-visible { background: rgba(227, 18, 11, 0.9); border-color: var(--red-bright); color: #fff; outline: none; }
/* a órbita pausa enquanto o mouse está sobre ela (ou um item tem foco), para facilitar o clique */
.orbit-wrap:hover .ring,
.orbit-wrap:hover .orbit-item,
.orbit-wrap:focus-within .ring,
.orbit-wrap:focus-within .orbit-item { animation-play-state: paused; }
.orbit-hint { margin-top: 24px; font-size: 0.82rem; color: var(--muted-2); }
.ring-2 .orbit-item { animation-duration: 60s; animation-direction: reverse; }
@keyframes spin { to { transform: rotateZ(360deg); } }
@keyframes counter-spin {
  from { transform: translate(-50%, -50%) rotateZ(0deg) rotateX(calc(var(--tilt) * -1)); }
  to { transform: translate(-50%, -50%) rotateZ(-360deg) rotateX(calc(var(--tilt) * -1)); }
}
.orbit-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 25cqi;
  height: 25cqi;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--surface);                       /* círculo liso, de uma cor só */
  box-shadow: 0 0 50px 4px rgba(227, 18, 11, 0.42);  /* fade vermelho só por fora */
  transform: translate(-50%, -50%) translateZ(4cqi) rotateX(calc(var(--tilt) * -1));
}
.orbit-core img { width: 10cqi; height: 10cqi; }
.orbit-core strong { margin-top: 0.3cqi; font-size: 3.2cqi; letter-spacing: 0.06em; line-height: 1.2; }
.orbit-core small { font-size: 2.1cqi; color: var(--muted); }
.nowrap { white-space: nowrap; }
.text-link { color: var(--red-bright); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.text-link:hover { color: var(--strong); }

/* órbita em telas estreitas: anéis menores e etiquetas mais compactas */
@container (max-width: 480px) {
  .ring { --size: 50cqi; }
  .ring-2 { --size: 74cqi; }
  .orbit-item { font-size: 2.6cqi; padding: 0.45em 0.8em; }
  .orbit-core { width: 23cqi; height: 23cqi; }
}

/* ---------- Processo ---------- */
.steps {
  --progress: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.steps::before,
.steps::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 46px;
  height: 2px;
  border-radius: 2px;
  background: var(--line);
}
.steps::after {
  background: linear-gradient(90deg, var(--red-deep), var(--red-bright));
  box-shadow: 0 0 14px var(--red-glow);
  transform: scaleX(var(--progress));
  transform-origin: left;
}
.step {
  position: relative;
  z-index: 1;
  padding: 0 4px;
}
.step-kanji {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 1px solid rgba(227, 18, 11, 0.45);
  background: radial-gradient(circle at 50% 30%, var(--step-glow), var(--bg-2) 70%);
  box-shadow: 0 0 0 8px var(--bg-2), 0 0 40px -6px var(--red-glow);
  font-family: var(--font-jp);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--red-bright);
}
.step-num {
  display: block;
  margin-top: 26px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.step h3 { margin-top: 6px; font-size: 1.3rem; }
.step p { margin-top: 10px; font-size: 0.94rem; color: var(--muted); }
.step .step-concept { margin-top: 6px; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.02em; color: var(--red-bright); }
.step-concept span { display: block; margin-bottom: 2px; font-family: var(--font-jp); font-size: 1.6rem; font-weight: 400; line-height: 1.25; letter-spacing: 0.04em; }

/* ---------- Sobre (animação do nome em camadas 3D) ---------- */
.about-visual {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1;
  margin-inline: auto;
  perspective: 1100px;
}
.about-stack {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.7s var(--ease);
}
.layer { position: absolute; }
.about-stack::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(227, 18, 11, 0.2), transparent 65%);
  transform: translateZ(-100px);
}
/* Animação "do nome à marca": Ayumi → 歩み → AyuTech (cada palavra aparece por 4 s) */
.name-stage {
  inset: 0;
  display: grid;
  place-items: center;
  transform: translateZ(40px);
}
.name-word {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  opacity: 0;
  animation: name-cycle 12s var(--ease) infinite;
}
.name-word.w2 { animation-delay: 4s; }
.name-word.w3 { animation-delay: 8s; }
.name-word strong { font-size: clamp(3rem, 6.5vw, 4.6rem); font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.name-word.w2 strong { font-family: var(--font-jp); font-weight: 400; letter-spacing: 0.06em; color: var(--red-bright); }
.name-word strong em { font-style: normal; color: var(--red-bright); }
.name-word i {
  width: 90px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--red-bright), transparent);
}
.name-word > span { font-size: 0.8rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
@keyframes name-cycle {
  0% { opacity: 0; filter: blur(14px); transform: translateY(16px) scale(0.96); }
  8% { opacity: 1; filter: blur(0); transform: none; }
  28% { opacity: 1; filter: blur(0); transform: none; }
  33%, 100% { opacity: 0; filter: blur(10px); transform: translateY(-14px); }
}
.name-steps {
  position: absolute;
  bottom: 12%;
  display: flex;
  gap: 26px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted-2);
}
.name-steps li { position: relative; animation: name-step 12s var(--ease) infinite; }
.name-steps li:nth-child(2) { animation-delay: 4s; font-family: var(--font-jp); font-weight: 400; }
.name-steps li:nth-child(3) { animation-delay: 8s; }
.name-steps li + li::before { content: "→"; position: absolute; left: -19px; font-family: var(--font); color: var(--muted-2); }
@keyframes name-step {
  0%, 30% { color: var(--red-bright); }
  34%, 100% { color: var(--muted-2); }
}

/* partículas: brasas subindo ao fundo + explosão a cada palavra nova (a cada 4 s, junto com a troca) */
.name-particles { inset: 0; width: 100%; height: 100%; overflow: visible; transform: translateZ(-30px); }
.np-float circle {
  --dx: 8px;
  fill: rgba(227, 18, 11, 0.8);
  opacity: 0;
  animation: np-float 10s linear infinite;
}
.np-float circle.w { fill: var(--particle-alt); }
.np-float .a1 { animation-delay: -1.7s; }
.np-float .a2 { animation-delay: -3.4s; }
.np-float .a3 { animation-delay: -5.1s; }
.np-float .a4 { animation-delay: -6.8s; }
.np-float .a5 { animation-delay: -8.5s; }
.np-float .b1 { animation-duration: 12s; }
.np-float .b2 { animation-duration: 14s; }
.np-float .c1 { --dx: -12px; }
.np-float .c2 { --dx: 18px; }
@keyframes np-float {
  0% { transform: translate(0, 0); opacity: 0; }
  15% { opacity: 0.9; }
  75% { opacity: 0.5; }
  100% { transform: translate(var(--dx), -110px); opacity: 0; }
}
.np-burst circle {
  --dist: -150px;
  transform-box: fill-box;
  transform-origin: center;
  fill: #ff2b1c;
  opacity: 0;
  animation: np-burst 4s cubic-bezier(0.2, 0.7, 0.3, 1) infinite;
}
.np-burst .d1 { --dist: -125px; }
.np-burst .d2 { --dist: -175px; fill: var(--particle-alt); }
@keyframes np-burst {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  5% { opacity: 1; }
  38% { transform: translateY(var(--dist)) scale(1); opacity: 0; }
  100% { transform: translateY(var(--dist)) scale(1); opacity: 0; }
}
.jp-inline { font-family: var(--font-jp); font-weight: 400; color: var(--red-bright); }

.pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 34px;
}
.pillars li {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.3s, transform 0.4s var(--ease);
}
.pillars li:hover { border-color: rgba(227, 18, 11, 0.4); transform: translateY(-3px); }
.pillars h3 { font-size: 1rem; }
.pillars h3::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  vertical-align: middle;
  background: var(--red);
  transform: rotate(45deg);
}
.pillars p { margin-top: 6px; font-size: 0.88rem; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 880px; }
.faq { display: grid; gap: 12px; perspective: 1400px; }
/* mesmo efeito dos cards de serviços: inclinação 3D, brilho que segue o mouse e borda acesa */
.faq details {
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 50%;
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(165deg, var(--surface) 0%, var(--bg-2) 100%);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.6s var(--ease), border-color 0.4s, box-shadow 0.6s var(--ease);
}
.faq details::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(520px circle at var(--mx) var(--my), rgba(227, 18, 11, 0.14), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.faq details:hover {
  border-color: rgba(227, 18, 11, 0.4);
  box-shadow: 0 24px 50px -30px rgba(227, 18, 11, 0.35), 0 16px 30px -20px rgba(0, 0, 0, 0.5);
}
.faq details:hover::before { opacity: 1; }
.faq details.is-tilting { transition: transform 0.12s linear, border-color 0.4s, box-shadow 0.6s var(--ease); }
.faq details[open] { border-color: rgba(227, 18, 11, 0.4); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ico {
  padding: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--red-bright);
  transition: transform 0.4s var(--ease), background-color 0.3s;
}
.faq details[open] summary .ico { transform: rotate(45deg); background: var(--red); color: #fff; }
.faq details p { padding: 0 24px 22px; color: var(--muted); }

/* ---------- Contato ---------- */
.contact { overflow: hidden; }
.grid-floor {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: 0;
  height: 70%;
  background-image:
    linear-gradient(rgba(227, 18, 11, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(227, 18, 11, 0.28) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(500px) rotateX(68deg);
  transform-origin: bottom;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 80%);
  mask-image: linear-gradient(to top, #000 10%, transparent 80%);
  animation: floor 4s linear infinite;
  pointer-events: none;
}
@keyframes floor { to { background-position: 0 64px; } }
.contact-split { position: relative; align-items: start; }

.contact-list { display: grid; gap: 12px; margin-top: 34px; }
.contact-list a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(8px);
  transition: border-color 0.3s, transform 0.4s var(--ease);
}
.contact-list a:hover { border-color: rgba(227, 18, 11, 0.5); transform: translateX(4px); }
.contact-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--red-soft);
  color: var(--red-bright);
}
.contact-list small { display: block; font-size: 0.75rem; color: var(--muted); }
.contact-list strong { display: block; font-weight: 600; word-break: break-word; }

.contact-form {
  display: grid;
  gap: 18px;
  padding: clamp(24px, 3.5vw, 40px);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: var(--glass-strong);
  backdrop-filter: blur(16px);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(227, 18, 11, 0.08);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 0.82rem; font-weight: 500; color: var(--muted); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--sunken);
  font-size: 0.95rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { background: var(--surface); }
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder,
.field textarea::placeholder { color: var(--muted-2); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(227, 18, 11, 0.18);
}
.field.has-error input,
.field.has-error textarea { border-color: var(--red-bright); }
.form-privacy { margin-top: -8px; font-size: 0.75rem; color: var(--muted-2); text-align: center; }
.form-status { font-size: 0.88rem; text-align: center; color: var(--red-bright); min-height: 1em; }
.form-status.is-ok { color: #5fd38d; }

/* ---------- Rodapé ---------- */
.site-footer {
  padding-top: 72px;
  border-top: 1px solid var(--line);
  background: var(--footer-bg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand p { margin-top: 20px; max-width: 340px; font-size: 0.9rem; color: var(--muted); }
.site-footer h4 {
  margin-bottom: 16px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.site-footer ul { display: grid; gap: 10px; }
.site-footer ul a { font-size: 0.92rem; color: var(--muted); transition: color 0.25s; word-break: break-word; }
.site-footer ul a:hover { color: var(--red-bright); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 56px;
  padding-block: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted-2);
}

/* ---------- WhatsApp flutuante ---------- */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--red-bright), var(--red));
  box-shadow: 0 14px 30px -8px var(--red-glow);
  transition: transform 0.35s var(--ease);
}
.wa-float:hover { transform: translateY(-3px) scale(1.05); }
.wa-float .ico { width: 28px; height: 28px; }

/* elementos que dependem de configuração (ver assets/js/config.js) */
[data-config-item].is-unset { display: none !important; }

/* ---------- Página 404 ---------- */
.not-found { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 24px; }
.not-found img { width: min(220px, 50vw); margin: 0 auto 28px; filter: drop-shadow(0 0 40px rgba(227, 18, 11, 0.4)); }
.not-found h1 { font-size: clamp(2.4rem, 7vw, 4rem); }
.not-found p { margin: 14px auto 32px; max-width: 420px; color: var(--muted); }

/* ---------- Animação de entrada ao rolar ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1s var(--ease) var(--d, 0s), transform 1s var(--ease) var(--d, 0s);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.d-1 { --d: 0.1s; }
.d-2 { --d: 0.2s; }
.d-3 { --d: 0.3s; }

/* ---------- Responsivo ---------- */
@media (max-width: 1240px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

/* notebooks com tela baixa: hero mais compacto para os destaques caberem na 1ª tela */
@media (min-width: 761px) and (max-height: 880px) {
  .hero-inner { padding-top: calc(var(--header-h) + 14px); padding-bottom: 40px; }
  .hero-title { margin-top: 16px; font-size: clamp(3rem, min(7vw, 10.2vh), 6rem); }
  .hero-sub { margin-top: 16px; font-size: 1rem; }
  .hero-actions { margin-top: 22px; }
  .hero-stats { margin-top: 30px; padding-top: 18px; }
  .scroll-cue { display: none; }
}

/* telas médias: as abas quebram em duas linhas em vez de esconder à direita */
@media (min-width: 761px) and (max-width: 1240px) {
  .tab-list { flex-wrap: wrap; border-radius: 24px; overflow: visible; }
}

@media (max-width: 1080px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .steps::before, .steps::after { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed;
    inset: 0;
    z-index: 55;
    flex-direction: column;
    justify-content: center;
    gap: 36px;
    padding: 100px 24px 40px;
    background: var(--nav-solid);
    backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease), visibility 0.4s;
  }
  .main-nav.is-open { opacity: 1; visibility: visible; }
  .main-nav ul { flex-direction: column; align-items: center; gap: 18px; }
  .main-nav ul a { font-size: 1.5rem; font-weight: 600; color: var(--strong); }

  .split { grid-template-columns: 1fr; }
  .split-reverse .split-text { order: 0; }
  .tab-panel { grid-template-columns: 1fr; }
  .hero-vertical { display: none; }
}

@media (max-width: 760px) {
  .hero { align-items: flex-end; }
  .hero-inner { padding-top: 46svh; padding-bottom: 80px; }
  .hero-vignette {
    background:
      linear-gradient(0deg, var(--bg) 8%, rgba(var(--shade), 0.75) 45%, transparent 70%);
  }
  .hero-fallback { right: 50%; top: 26%; width: min(78vw, 360px); transform: translate(50%, -50%); }
  .hero-stats { gap: 12px; margin-top: 40px; }
  .hero-stats { grid-template-columns: 1fr 1fr; row-gap: 18px; }
  .hero-stats .stat-method { grid-column: 1 / -1; }
  .hero-stats strong { font-size: 1.35rem; }
  .hero-stats span { font-size: 0.72rem; }
  .scroll-cue { display: none; }

  .cards-grid { grid-template-columns: 1fr; }
  .spec-list { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .more { padding: 22px; }
  .tab-list { border-radius: 18px; }
  .orbit-wrap { aspect-ratio: 5 / 4; }
}

@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .footer-brand,
  .footer-grid > :last-child { grid-column: 1 / -1; }
  .hero-actions .btn { flex: 1 1 100%; }
  .brand-text strong { font-size: 1.05rem; }
}

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .marquee-track, .ring, .orbit-item, .grid-floor,
  .name-word, .name-steps li { animation: none !important; }
  .name-word.w3 { opacity: 1; }
  .np-float circle, .np-burst circle { animation: none !important; }
  .np-float circle { opacity: 0.45; }
  .orbit-item { transform: translate(-50%, -50%) rotateX(calc(var(--tilt) * -1)); }
}

/* =========================================================
   ACESSIBILIDADE — painel e modos (classes aplicadas no <html>)
   ========================================================= */

/* botão fixo e painel */
.a11y-toggle {
  position: fixed;
  left: 0;
  top: 50%;
  z-index: 45;
  display: grid;
  place-items: center;
  width: 48px;
  height: 56px;
  border: 1px solid var(--line-2);
  border-left: 0;
  border-radius: 0 16px 16px 0;
  transform: translateY(-50%);
  background: var(--surface);
  color: var(--strong);
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.8);
  cursor: pointer;
  transition: border-color 0.25s, background-color 0.25s, transform 0.35s var(--ease);
}
.a11y-toggle:hover,
.a11y-toggle[aria-expanded="true"] { border-color: var(--red); background: var(--red-soft); transform: translate(3px, -50%); }
.a11y-toggle .ico { width: 28px; height: 28px; }

.a11y-panel {
  position: fixed;
  left: 60px;
  top: 50%;
  z-index: 46;
  width: min(340px, calc(100vw - 80px));
  max-height: calc(100vh - 40px);
  transform: translateY(-50%);
  overflow-y: auto;
  padding: 18px;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: var(--glass-strong);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.9);
}
.a11y-panel[hidden] { display: none; }
.a11y-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.a11y-head h2 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; }
.a11y-head h2 .ico { color: var(--red-bright); }
.a11y-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: transparent;
  color: var(--strong);
  cursor: pointer;
}
.a11y-close:hover { border-color: var(--red); }
.a11y-font {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.85rem;
}
.a11y-font-ctrl { display: flex; align-items: center; gap: 8px; }
.a11y-font-ctrl button {
  width: 40px;
  height: 36px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: var(--surface);
  color: var(--strong);
  font-weight: 700;
  cursor: pointer;
}
.a11y-font-ctrl button:hover:not(:disabled) { border-color: var(--red); }
.a11y-font-ctrl button:disabled { opacity: 0.4; cursor: not-allowed; }
.a11y-font-value { min-width: 52px; font-size: 0.85rem; font-weight: 600; text-align: center; }
.a11y-theme { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 0.85rem; }
.a11y-theme-ctrl { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; padding: 4px; border-radius: 10px; background: var(--sunken); }
.a11y-theme-ctrl button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.a11y-theme-ctrl .ico { width: 18px; height: 18px; }
.a11y-theme-ctrl button:hover { color: var(--strong); }
.a11y-theme-ctrl button[aria-pressed="true"] { background: var(--red); color: #fff; }
.a11y-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.a11y-opt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.25s, background-color 0.25s;
}
.a11y-opt:hover { border-color: var(--line-2); }
.a11y-opt .ico { width: 22px; height: 22px; color: var(--red-bright); }
.a11y-opt[aria-pressed="true"] { border-color: var(--red); background: var(--red-soft); }
.a11y-opt[aria-pressed="true"] span::after { content: " · ativo"; color: var(--red-bright); font-weight: 600; }
.a11y-reset {
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
}
.a11y-reset:hover { color: var(--strong); border-color: var(--red); }
.a11y-note { margin-top: 10px; font-size: 0.72rem; color: var(--muted-2); }
.footer-a11y { padding: 0; border: 0; background: none; font-size: 0.92rem; color: var(--muted); cursor: pointer; }
.footer-a11y:hover { color: var(--red-bright); }
@media (max-width: 760px) {
  .a11y-toggle { width: 42px; height: 50px; }
  .a11y-toggle .ico { width: 24px; height: 24px; }
  .a11y-panel { left: 16px; width: calc(100vw - 32px); }
}

/* tamanho do texto: 87,5% · 100% · 112,5% · 125% · 137,5% */
html[data-a11y-font="0"] { font-size: 87.5%; }
html[data-a11y-font="2"] { font-size: 112.5%; }
html[data-a11y-font="3"] { font-size: 125%; }
html[data-a11y-font="4"] { font-size: 137.5%; }
html[data-a11y-font="3"] .hero-stats .stat-method strong,
html[data-a11y-font="4"] .hero-stats .stat-method strong { white-space: normal; }

/* alto contraste */
html.a11y-contrast {
  --bg: #000;
  --bg-2: #000;
  --surface: #0e0e0e;
  --surface-2: #161616;
  --line: rgba(255, 255, 255, 0.45);
  --line-2: rgba(255, 255, 255, 0.75);
  --text: #fff;
  --muted: #f0f0f0;
  --muted-2: #dadada;
  --red: #ff3b30;
  --red-bright: #ff6a60;
  --red-soft: rgba(255, 59, 48, 0.2);
}
html.a11y-contrast body::before { display: none; }
html.a11y-contrast .hero-vignette { background: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.88) 55%, rgba(0, 0, 0, 0.45) 100%); }
html.a11y-contrast .btn-primary,
html.a11y-contrast .tab[aria-selected="true"],
html.a11y-contrast .wa-float { background: #ff3b30; color: #000; }
html.a11y-contrast .btn-ghost { border-color: #fff; }
html.a11y-contrast :focus-visible { outline: 3px solid #ffd60a; outline-offset: 3px; }

/* pausar animações: mesmo resultado do "reduzir movimento" do sistema */
html.a11y-motion { scroll-behavior: auto; }
html.a11y-motion *,
html.a11y-motion *::before,
html.a11y-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}
html.a11y-motion.js [data-reveal] { opacity: 1; transform: none; }
html.a11y-motion .marquee-track,
html.a11y-motion .ring,
html.a11y-motion .orbit-item,
html.a11y-motion .grid-floor,
html.a11y-motion .name-word,
html.a11y-motion .name-steps li,
html.a11y-motion .np-float circle,
html.a11y-motion .np-burst circle { animation: none !important; }
html.a11y-motion .name-word.w3 { opacity: 1; }
html.a11y-motion .np-float circle { opacity: 0.45; }
html.a11y-motion .orbit-item { transform: translate(-50%, -50%) rotateX(calc(var(--tilt) * -1)); }

/* =========================================================
   MODO CLARO (escolhido no painel de acessibilidade)
   ========================================================= */
html.theme-light {
  color-scheme: light;
  --bg: #f4f4f2;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #efefec;
  --line: rgba(0, 0, 0, 0.09);
  --line-2: rgba(0, 0, 0, 0.18);
  --text: #171717;
  --muted: #4f4f4f;
  --muted-2: #6a6a6a;
  --red: #d10f08;
  --red-bright: #d9140c;
  --red-deep: #8f0a05;
  --red-soft: rgba(217, 20, 12, 0.08);
  --red-glow: rgba(217, 20, 12, 0.28);
  --strong: #0d0d0d;
  --tint: rgba(0, 0, 0, 0.03);
  --sunken: rgba(0, 0, 0, 0.04);
  --glass: rgba(255, 255, 255, 0.9);
  --glass-strong: rgba(255, 255, 255, 0.97);
  --header-bg: rgba(244, 244, 242, 0.86);
  --nav-solid: rgba(244, 244, 242, 0.98);
  --footer-bg: #e9e9e6;
  --faint: rgba(0, 0, 0, 0.3);
  --shade: 244, 244, 242;
  --core-a: #ffffff;
  --core-b: #ececea;
  --step-glow: #ffe5e3;
  --particle-alt: rgba(0, 0, 0, 0.35);
}
html.theme-light body::before { opacity: 0.035; }
html.theme-light .card-inner { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); }

/* modo claro + alto contraste */
html.theme-light.a11y-contrast {
  --bg: #ffffff;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f2f2f2;
  --line: rgba(0, 0, 0, 0.55);
  --line-2: rgba(0, 0, 0, 0.85);
  --text: #000;
  --muted: #111;
  --muted-2: #262626;
  --strong: #000;
  --red: #b00b05;
  --red-bright: #b00b05;
  --red-soft: rgba(176, 11, 5, 0.1);
  --shade: 255, 255, 255;
  --faint: rgba(0, 0, 0, 0.55);
}
html.theme-light.a11y-contrast .hero-vignette { background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0.92) 55%, rgba(255, 255, 255, 0.5) 100%); }
html.theme-light.a11y-contrast .btn-primary,
html.theme-light.a11y-contrast .tab[aria-selected="true"],
html.theme-light.a11y-contrast .wa-float { background: #b00b05; color: #fff; }
html.theme-light.a11y-contrast .btn-ghost { border-color: #000; }
html.theme-light.a11y-contrast :focus-visible { outline-color: #0047b3; }
