/* =========================================================
   PicHost — Sistema visual "Cloud Solutions"
   Base escura, gradiente de marca (ciano → royal → violeta)
   extraído do logo, tipografia em 3 papéis e movimento.
   ========================================================= */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin.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: 'JetBrains Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url('../fonts/jetbrains-mono.woff2') format('woff2'); }

:root {
  /* fundo — azul-noite profundo, não preto puro */
  --ph-void:      #04070F;
  --ph-abyss:     #070C18;
  --ph-surface:   #0B1220;
  --ph-elevated:  #101A2E;

  /* gradiente de marca (do logo) + extensão violeta para profundidade */
  --ph-cyan:      #0DEBFF;
  --ph-royal:     #5680FF;
  --ph-violet:    #7B5CFF;
  --ph-grad:      linear-gradient(120deg, #0DEBFF 0%, #5680FF 52%, #7B5CFF 100%);
  --ph-grad-soft: linear-gradient(120deg, rgba(13,235,255,.16), rgba(123,92,255,.16));

  /* texto */
  --ph-text:      #E9F0FF;
  --ph-text-soft: #90A2C6;
  --ph-text-dim:  #55658A;

  /* linhas e brilhos */
  --ph-line:      rgba(120,160,255,.13);
  --ph-line-hi:   rgba(120,180,255,.28);

  /* semântico */
  --ph-ok:        #2BE59B;
  --ph-warn:      #FFC24B;
  --ph-err:       #FF6B6B;

  --ph-container: 1560px;
  --ph-gutter:    clamp(20px, 3.6vw, 60px);
  --ph-f-display: 'Poppins', ui-sans-serif, system-ui, sans-serif;
  --ph-f-body:    'Inter', ui-sans-serif, system-ui, sans-serif;
  --ph-f-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ph-void);
  color: var(--ph-text);
  font-family: var(--ph-f-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* malha de fundo global — grade técnica sutil, fixa */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(120,160,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,160,255,.045) 1px, transparent 1px);
  background-size: 74px 74px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 78%);
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }

h1, h2, h3, h4 {
  font-family: var(--ph-f-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
  text-wrap: balance;
  color: var(--ph-text);
}
p { margin: 0 0 1em; max-width: 64ch; color: var(--ph-text-soft); }

.ph-container { max-width: var(--ph-container); margin: 0 auto; padding: 0 var(--ph-gutter); position: relative; z-index: 1; }
.ph-section { padding: clamp(56px, 6vw, 86px) 0; position: relative; }

/* rótulo mono — voz "console de engenharia" */
.ph-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--ph-f-mono);
  font-size: 11.5px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--ph-cyan);
  margin-bottom: 14px;
}
.ph-eyebrow::before {
  content: ""; width: 22px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--ph-cyan));
}

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

.ph-section-head { max-width: 760px; margin-bottom: 42px; }
.ph-section-head h2 { font-size: clamp(28px, 3.4vw, 44px); }
.ph-section-head p { font-size: 17px; margin-bottom: 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--ph-royal); color: #fff; padding: 12px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------------- botões ---------------- */
.ph-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--ph-f-display); font-weight: 600; font-size: 14.5px;
  padding: 14px 28px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease, border-color .2s ease, color .2s ease;
  overflow: hidden; isolation: isolate;
}
.ph-btn:focus-visible { outline: 2px solid var(--ph-cyan); outline-offset: 3px; }

.ph-btn-primary { background: var(--ph-grad); color: #04070F; box-shadow: 0 8px 30px -10px rgba(86,128,255,.7); }
.ph-btn-primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(120deg, #7B5CFF, #0DEBFF);
  opacity: 0; transition: opacity .3s ease;
}
.ph-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -10px rgba(86,128,255,.85); }
.ph-btn-primary:hover::after { opacity: 1; }

.ph-btn-ghost { background: rgba(255,255,255,.03); border-color: var(--ph-line-hi); color: var(--ph-text); backdrop-filter: blur(6px); }
.ph-btn-ghost:hover { border-color: var(--ph-cyan); color: var(--ph-cyan); transform: translateY(-2px); }
.ph-btn-sm { padding: 10px 20px; font-size: 13.5px; border-radius: 8px; }

/* ---------------- header ---------------- */
.ph-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  transition: background .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.ph-header.is-stuck {
  background: rgba(4,7,15,.82);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom-color: var(--ph-line);
}
/* padding-block (e não o atalho `padding`): este elemento também
   carrega .ph-container, e o atalho zeraria o gutter lateral dele,
   colando logo e botão na borda da tela. */
.ph-header-inner { display: flex; align-items: center; gap: 28px; padding-block: 16px; }
.ph-logo { display: flex; align-items: center; flex: none; }
/* o logo é arte escura sem versão branca — invertido por filtro para o fundo escuro */
.ph-logo img { height: 30px; width: auto; filter: brightness(0) invert(1); }

.ph-header-collapse { display: flex; align-items: center; gap: 28px; flex: 1; min-width: 0; }
.ph-nav { display: flex; align-items: center; gap: 28px; }
.ph-nav a {
  position: relative; text-decoration: none; font-size: 14.5px; font-weight: 500;
  color: var(--ph-text-soft); transition: color .2s ease; white-space: nowrap;
}
.ph-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 1.5px;
  background: var(--ph-grad); transition: width .25s ease;
}
.ph-nav a:hover { color: var(--ph-text); }
.ph-nav a:hover::after { width: 100%; }

.ph-header-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; flex: none; }
.ph-lang-switch { display: flex; gap: 2px; font-family: var(--ph-f-mono); font-size: 11.5px; }
.ph-lang-switch a { padding: 6px 9px; text-decoration: none; color: var(--ph-text-dim); border-radius: 6px; transition: all .2s ease; }
.ph-lang-switch a[aria-current="true"] { color: var(--ph-cyan); background: rgba(13,235,255,.09); }

.ph-menu-toggle {
  display: none; margin-left: auto; flex: none;
  background: rgba(255,255,255,.03); border: 1px solid var(--ph-line-hi);
  border-radius: 10px; width: 42px; height: 42px; cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
}
.ph-menu-toggle span { display: block; width: 17px; height: 1.6px; background: var(--ph-text); border-radius: 2px; position: relative; transition: background .2s ease; }
.ph-menu-toggle span::before, .ph-menu-toggle span::after {
  content: ""; position: absolute; left: 0; width: 17px; height: 1.6px; background: var(--ph-text); border-radius: 2px;
  transition: transform .25s cubic-bezier(.2,.8,.2,1);
}
.ph-menu-toggle span::before { top: -5.5px; }
.ph-menu-toggle span::after { top: 5.5px; }
.ph-header.is-open .ph-menu-toggle span { background: transparent; }
.ph-header.is-open .ph-menu-toggle span::before { transform: translateY(5.5px) rotate(45deg); }
.ph-header.is-open .ph-menu-toggle span::after { transform: translateY(-5.5px) rotate(-45deg); }

/* ---------------- HERO ---------------- */
.ph-hero { position: relative; padding: clamp(120px, 13vw, 160px) 0 clamp(48px, 6vw, 76px); overflow: hidden; }
#ph-hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .85; }
.ph-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 520px at 78% 18%, rgba(123,92,255,.20), transparent 62%),
    radial-gradient(760px 460px at 12% 42%, rgba(13,235,255,.14), transparent 62%),
    linear-gradient(180deg, transparent 55%, var(--ph-void) 100%);
}
.ph-hero .ph-container { z-index: 2; }
.ph-hero-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,.75fr); gap: clamp(36px, 5vw, 76px); align-items: center; }

.ph-hero h1 {
  font-size: clamp(38px, 5.6vw, 78px);
  font-weight: 700; line-height: 1.02; letter-spacing: -0.035em;
  margin: 0 0 22px; max-width: 15ch;
}
.ph-hero .ph-lede { font-size: clamp(16px, 1.4vw, 19px); color: var(--ph-text-soft); max-width: 54ch; margin-bottom: 34px; }
.ph-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* selo de status "ao vivo" */
.ph-status-badge {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ph-f-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ph-text-soft);
  background: rgba(43,229,155,.07); border: 1px solid rgba(43,229,155,.25);
  padding: 8px 15px; border-radius: 999px; margin-bottom: 24px;
}
.ph-pulse { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--ph-ok); flex: none; }
.ph-pulse::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 1px solid var(--ph-ok); opacity: .6;
  animation: ph-ping 2.2s cubic-bezier(0,0,.2,1) infinite;
}
@keyframes ph-ping { 0% { transform: scale(.5); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } }

/* painel de telemetria flutuante */
.ph-telemetry {
  position: relative; max-width: 460px; margin-left: auto; width: 100%;
  background: linear-gradient(160deg, rgba(16,26,46,.92), rgba(8,13,26,.92));
  border: 1px solid var(--ph-line-hi);
  border-radius: 18px; padding: 22px;
  backdrop-filter: blur(14px);
  box-shadow: 0 40px 90px -40px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.06);
  animation: ph-float 7s ease-in-out infinite;
}
@keyframes ph-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.ph-telemetry::before {
  content: ""; position: absolute; inset: -1px; border-radius: 18px; padding: 1px; pointer-events: none;
  background: linear-gradient(160deg, rgba(13,235,255,.5), transparent 45%, rgba(123,92,255,.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.ph-telemetry-head {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--ph-f-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ph-text-dim); padding-bottom: 13px; border-bottom: 1px solid var(--ph-line); margin-bottom: 14px;
}
.ph-telemetry-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; }
.ph-telemetry-row + .ph-telemetry-row { border-top: 1px solid rgba(120,160,255,.07); }
.ph-telemetry-label { font-size: 13px; color: var(--ph-text-soft); display: flex; align-items: center; gap: 10px; }
.ph-telemetry-label svg { width: 15px; height: 15px; color: var(--ph-royal); flex: none; }
.ph-telemetry-value { font-family: var(--ph-f-mono); font-size: 13px; color: var(--ph-text); font-variant-numeric: tabular-nums; }
.ph-telemetry-value.is-ok { color: var(--ph-ok); }
.ph-spark { display: flex; align-items: flex-end; gap: 3px; height: 24px; }
.ph-spark i { width: 4px; border-radius: 2px; background: var(--ph-grad); opacity: .75; animation: ph-bar 2.4s ease-in-out infinite; }
@keyframes ph-bar { 0%,100% { height: 30%; } 50% { height: 100%; } }

/* ticker de infraestrutura */
.ph-ticker {
  margin-top: clamp(40px, 5vw, 60px); padding: 16px 0;
  border-top: 1px solid var(--ph-line); border-bottom: 1px solid var(--ph-line);
  overflow: hidden; position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.ph-ticker-track { display: flex; gap: 56px; width: max-content; animation: ph-scroll 38s linear infinite; }
.ph-ticker:hover .ph-ticker-track { animation-play-state: paused; }
@keyframes ph-scroll { to { transform: translateX(-50%); } }
.ph-ticker-item {
  display: flex; align-items: center; gap: 11px; flex: none;
  font-family: var(--ph-f-mono); font-size: 12.5px; letter-spacing: .06em;
  color: var(--ph-text-dim); text-transform: uppercase; white-space: nowrap;
}
.ph-ticker-item b { color: var(--ph-text-soft); font-weight: 500; }
.ph-ticker-item::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ph-royal); flex: none; }

/* ---------------- reveal on scroll ---------------- */
.ph-reveal { opacity: 0; transform: translateY(24px); transition: opacity .75s cubic-bezier(.2,.8,.2,1), transform .75s cubic-bezier(.2,.8,.2,1); }
.ph-reveal.is-visible { opacity: 1; transform: none; }

/* ---------------- serviços ---------------- */
.ph-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); gap: 18px; }
.ph-card {
  position: relative;
  background: linear-gradient(165deg, rgba(16,26,46,.78), rgba(8,13,26,.78));
  border: 1px solid var(--ph-line);
  border-radius: 18px; padding: 30px 28px 28px;
  overflow: hidden;
  transition: border-color .3s ease, transform .3s cubic-bezier(.2,.8,.2,1);
}
.ph-card:hover { border-color: var(--ph-line-hi); transform: translateY(-4px); }
.ph-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(86,128,255,.14), transparent 42%);
  opacity: 0; transition: opacity .35s ease;
}
.ph-card:hover::before { opacity: 1; }
.ph-card-num { position: absolute; top: 24px; right: 26px; font-family: var(--ph-f-mono); font-size: 11.5px; color: var(--ph-text-dim); letter-spacing: .1em; }
.ph-card-icon {
  width: 48px; height: 48px; border-radius: 14px; margin-bottom: 18px;
  display: flex; align-items: center; justify-content: center;
  background: var(--ph-grad-soft); border: 1px solid var(--ph-line-hi); color: var(--ph-cyan);
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.ph-card:hover .ph-card-icon { transform: scale(1.08) rotate(-4deg); }
.ph-card-icon svg { width: 23px; height: 23px; }
.ph-card h3 { font-size: 19px; margin-bottom: 9px; }
.ph-card p { font-size: 14.5px; margin-bottom: 0; }
.ph-card-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.ph-tag {
  font-family: var(--ph-f-mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ph-text-dim); border: 1px solid var(--ph-line); border-radius: 6px; padding: 4px 9px;
}

/* ---------------- STATUS DA INFRA ---------------- */
.ph-section--status { background: linear-gradient(180deg, var(--ph-void), var(--ph-abyss) 50%, var(--ph-void)); }
.ph-status-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; flex-wrap: wrap; margin-bottom: 32px; }
.ph-status-head .ph-section-head { margin-bottom: 0; }
.ph-status-stamp {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--ph-f-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ph-ok);
  background: rgba(43,229,155,.06); border: 1px solid rgba(43,229,155,.26);
  border-radius: 999px; padding: 9px 17px;
}

.ph-status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 24px; }
.ph-status-item {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; border: 1px solid var(--ph-line); border-radius: 14px;
  background: rgba(11,18,32,.55);
  transition: border-color .3s ease, background .3s ease, transform .3s cubic-bezier(.2,.8,.2,1);
}
.ph-status-item:hover { border-color: rgba(43,229,155,.34); background: rgba(16,26,46,.7); transform: translateY(-2px); }
.ph-status-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--ph-ok); flex: none; box-shadow: 0 0 12px rgba(43,229,155,.8); }
.ph-status-dot::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--ph-ok);
  animation: ph-ping 2.6s cubic-bezier(0,0,.2,1) infinite;
}
.ph-status-item:nth-child(2) .ph-status-dot::after { animation-delay: .35s; }
.ph-status-item:nth-child(3) .ph-status-dot::after { animation-delay: .7s; }
.ph-status-item:nth-child(4) .ph-status-dot::after { animation-delay: 1.05s; }
.ph-status-item:nth-child(5) .ph-status-dot::after { animation-delay: 1.4s; }
.ph-status-item:nth-child(6) .ph-status-dot::after { animation-delay: 1.75s; }
.ph-status-name { font-family: var(--ph-f-display); font-weight: 600; font-size: 15px; flex: 1; }
.ph-status-state { font-family: var(--ph-f-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ph-ok); }

/* painel de desempenho */
.ph-perf {
  border: 1px solid var(--ph-line); border-radius: 18px; padding: 26px 28px;
  background: linear-gradient(150deg, rgba(16,26,46,.8), rgba(6,10,20,.8));
}
.ph-perf-top { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 16px; flex-wrap: wrap; }
.ph-perf-label { font-family: var(--ph-f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ph-text-dim); }
.ph-perf-value {
  font-family: var(--ph-f-display); font-weight: 700; font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1;
}
.ph-perf-bar { height: 10px; border-radius: 999px; background: rgba(120,160,255,.1); overflow: hidden; position: relative; }
.ph-perf-fill {
  height: 100%; border-radius: 999px; width: 98.5%;
  background: linear-gradient(90deg, #2BE59B, #0DEBFF 55%, #5680FF);
  box-shadow: 0 0 22px rgba(13,235,255,.5);
  /* a largura é interpolada quadro a quadro no JS — sem transição CSS
     para não sobrepor duas curvas de easing */
}
.ph-perf-fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent);
  animation: ph-shimmer 2.8s linear infinite;
}
@keyframes ph-shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* histograma de janelas recentes — fluxo contínuo da direita para a esquerda */
.ph-perf-history {
  height: 44px; margin-top: 20px; overflow: hidden; position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 100%);
}
.ph-perf-history-track {
  display: flex; align-items: flex-end; gap: 4px; height: 100%;
  width: max-content; will-change: transform;
}
.ph-perf-history-track i {
  width: 3px; flex: none; border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, rgba(43,229,155,.85), rgba(43,229,155,.18));
}
.ph-perf-history-track i.is-dip { background: linear-gradient(180deg, rgba(255,194,75,.85), rgba(255,194,75,.18)); }
.ph-perf-foot { display: flex; justify-content: space-between; margin-top: 10px; font-family: var(--ph-f-mono); font-size: 10.5px; color: var(--ph-text-dim); letter-spacing: .08em; }

/* ---------------- infraestrutura / números ---------------- */
.ph-section--infra { background: linear-gradient(180deg, var(--ph-void), var(--ph-abyss) 45%, var(--ph-void)); }
.ph-metrics {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px;
  background: var(--ph-line); border: 1px solid var(--ph-line); border-radius: 18px; overflow: hidden; margin-bottom: 52px;
}
.ph-metric { background: var(--ph-abyss); padding: 28px 26px; transition: background .3s ease; }
.ph-metric:hover { background: var(--ph-elevated); }
.ph-metric-value {
  font-family: var(--ph-f-display); font-weight: 700; font-size: clamp(28px, 3.2vw, 42px);
  letter-spacing: -.03em; line-height: 1; margin-bottom: 9px; font-variant-numeric: tabular-nums;
}
.ph-metric-label { font-family: var(--ph-f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ph-text-dim); }

.ph-diff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.ph-diff-item {
  display: flex; gap: 18px; padding: 26px;
  border: 1px solid var(--ph-line); border-radius: 16px;
  background: rgba(11,18,32,.5);
  transition: border-color .3s ease, background .3s ease;
}
.ph-diff-item:hover { border-color: var(--ph-line-hi); background: rgba(16,26,46,.7); }
.ph-diff-icon {
  width: 44px; height: 44px; flex: none; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(13,235,255,.07); border: 1px solid rgba(13,235,255,.22); color: var(--ph-cyan);
}
.ph-diff-icon svg { width: 21px; height: 21px; }
.ph-diff-item h3 { font-size: 17px; margin-bottom: 6px; }
.ph-diff-item p { font-size: 14px; margin-bottom: 0; }

/* ---------------- sobre ---------------- */
.ph-about { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(36px, 5vw, 80px); align-items: center; }
.ph-about-visual { position: relative; aspect-ratio: 1/1; max-width: 560px; width: 100%; margin: 0 auto; }
#ph-orbit-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ph-about-core {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 2; width: 21%;
  filter: brightness(0) invert(1) drop-shadow(0 0 22px rgba(86,128,255,.65));
  opacity: .95;
}

/* ---------------- blocos de ação (webmail / chamados) ---------------- */
.ph-panel {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(32px, 4vw, 60px); align-items: center;
  border: 1px solid var(--ph-line-hi); border-radius: 24px; padding: clamp(30px, 4vw, 54px);
  background: linear-gradient(150deg, rgba(16,26,46,.85), rgba(6,10,20,.85));
}
.ph-panel::before {
  content: ""; position: absolute; top: -55%; right: -18%; width: 62%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(86,128,255,.2), transparent 66%); filter: blur(46px); pointer-events: none;
}
.ph-panel h2 { font-size: clamp(25px, 2.8vw, 35px); }
.ph-panel p { margin-bottom: 26px; }

/* mock de caixa de entrada */
.ph-mail-mock { border: 1px solid var(--ph-line); border-radius: 16px; overflow: hidden; background: rgba(4,7,15,.75); backdrop-filter: blur(8px); }
.ph-mail-mock-bar { display: flex; align-items: center; gap: 7px; padding: 13px 17px; border-bottom: 1px solid var(--ph-line); }
.ph-mail-mock-bar span { width: 9px; height: 9px; border-radius: 50%; background: rgba(120,160,255,.22); }
.ph-mail-mock-bar em { margin-left: auto; font-style: normal; font-family: var(--ph-f-mono); font-size: 10.5px; color: var(--ph-text-dim); letter-spacing: .08em; }
.ph-mail-row { display: flex; align-items: center; gap: 14px; padding: 15px 17px; }
.ph-mail-row + .ph-mail-row { border-top: 1px solid rgba(120,160,255,.07); }
.ph-mail-avatar { width: 32px; height: 32px; border-radius: 10px; background: var(--ph-grad); flex: none; opacity: .85; }
.ph-mail-lines { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.ph-mail-lines span { display: block; height: 7px; border-radius: 4px; background: rgba(120,160,255,.16); }
.ph-mail-lines span:last-child { width: 58%; background: rgba(120,160,255,.09); }

/* trilha de etapas do chamado */
.ph-flow { display: flex; flex-direction: column; gap: 2px; }
.ph-flow-step {
  display: flex; align-items: center; gap: 16px; padding: 14px 18px;
  border: 1px solid var(--ph-line); border-radius: 12px; background: rgba(4,7,15,.5);
  font-size: 14px; color: var(--ph-text-soft);
  transition: border-color .3s ease, color .3s ease, transform .3s ease;
}
.ph-flow-step:hover { border-color: var(--ph-line-hi); color: var(--ph-text); transform: translateX(5px); }
.ph-flow-num {
  width: 26px; height: 26px; flex: none; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ph-f-mono); font-size: 11.5px; color: var(--ph-cyan);
  background: rgba(13,235,255,.08); border: 1px solid rgba(13,235,255,.22);
}

/* ---------------- FAQ (acordeão com animação suave) ---------------- */
.ph-faq { max-width: 900px; }
.ph-faq-item {
  border: 1px solid var(--ph-line); border-radius: 14px; margin-bottom: 10px;
  background: rgba(11,18,32,.5); overflow: hidden;
  transition: border-color .4s ease, background .4s ease;
}
.ph-faq-item.is-open { border-color: var(--ph-line-hi); background: rgba(16,26,46,.62); }
.ph-faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%;
  padding: 20px 24px; cursor: pointer; text-align: left;
  background: none; border: none; color: var(--ph-text);
  font-family: var(--ph-f-display); font-weight: 600; font-size: 16.5px;
  transition: color .25s ease;
}
.ph-faq-q:hover { color: var(--ph-cyan); }
.ph-faq-q:focus-visible { outline: 2px solid var(--ph-cyan); outline-offset: -3px; border-radius: 12px; }
.ph-chevron {
  flex: none; width: 10px; height: 10px;
  border-right: 1.8px solid var(--ph-cyan); border-bottom: 1.8px solid var(--ph-cyan);
  transform: rotate(45deg) translateY(-2px);
  transition: transform .45s cubic-bezier(.34,1.3,.5,1);
}
.ph-faq-item.is-open .ph-chevron { transform: rotate(-135deg) translateY(-2px); }
/* animação de altura via grid-template-rows (transicionável) */
.ph-faq-panel {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .5s cubic-bezier(.25,1,.35,1);
}
.ph-faq-item.is-open .ph-faq-panel { grid-template-rows: 1fr; }
.ph-faq-panel > div { overflow: hidden; }
.ph-faq-a { padding: 0 24px 22px; opacity: 0; transform: translateY(-6px); transition: opacity .45s ease .08s, transform .45s ease .08s; }
.ph-faq-item.is-open .ph-faq-a { opacity: 1; transform: none; }
.ph-faq-a p { font-size: 15px; margin-bottom: 0; }

/* ---------------- footer ---------------- */
.ph-footer { border-top: 1px solid var(--ph-line); padding: clamp(48px, 5vw, 68px) 0 30px; position: relative; background: var(--ph-abyss); }
.ph-footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: clamp(28px, 4vw, 56px); }
.ph-footer-brand img { height: 28px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.ph-footer-brand p { font-size: 14px; max-width: 36ch; }
.ph-footer h4 {
  font-family: var(--ph-f-mono); font-size: 10.5px; font-weight: 500; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ph-text-dim); margin-bottom: 16px;
}
.ph-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.ph-footer a, .ph-footer button {
  text-decoration: none; color: var(--ph-text-soft); font-size: 14.5px;
  background: none; border: none; padding: 0; cursor: pointer; text-align: left; font-family: inherit;
  transition: color .2s ease;
}
.ph-footer a:hover, .ph-footer button:hover { color: var(--ph-cyan); }
.ph-footer-bottom {
  margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--ph-line);
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  font-size: 13px; color: var(--ph-text-dim);
}

/* ---------------- modais ---------------- */
.ph-modal-overlay {
  position: fixed; inset: 0; z-index: 200; padding: 24px;
  background: rgba(2,4,10,.82); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
}
.ph-modal-overlay.is-open { display: flex; animation: ph-fade .25s ease; }
@keyframes ph-fade { from { opacity: 0; } to { opacity: 1; } }
.ph-modal {
  position: relative; width: 100%; max-width: 470px; max-height: 90vh; overflow-y: auto;
  background: linear-gradient(165deg, #101A2E, #070C18);
  border: 1px solid var(--ph-line-hi); border-radius: 22px; padding: 38px;
  box-shadow: 0 50px 100px -40px rgba(0,0,0,.95);
  animation: ph-rise .35s cubic-bezier(.2,.8,.2,1);
}
@keyframes ph-rise { from { opacity: 0; transform: translateY(22px) scale(.98); } to { opacity: 1; transform: none; } }
.ph-modal--wide { max-width: 680px; }
.ph-modal-close {
  position: absolute; top: 20px; right: 20px; width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--ph-line); background: rgba(255,255,255,.03); color: var(--ph-text-soft);
  cursor: pointer; font-size: 17px; line-height: 1; transition: all .2s ease;
}
.ph-modal-close:hover { border-color: var(--ph-line-hi); color: var(--ph-text); }
.ph-modal h2 { font-size: 23px; margin-bottom: 6px; }
.ph-modal .ph-lede { font-size: 14px; color: var(--ph-text-soft); margin-bottom: 26px; }

.ph-field { margin-bottom: 17px; }
.ph-field label { display: block; font-family: var(--ph-f-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ph-text-dim); margin-bottom: 9px; }
.ph-field input[type="text"], .ph-field input[type="email"], .ph-field input[type="password"],
.ph-field input[type="tel"], .ph-field textarea, .ph-field select {
  width: 100%; padding: 13px 15px; font-size: 15px; font-family: var(--ph-f-body);
  color: var(--ph-text); background: rgba(4,7,15,.7);
  border: 1px solid var(--ph-line); border-radius: 10px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.ph-field input::placeholder, .ph-field textarea::placeholder { color: var(--ph-text-dim); }
.ph-field input:focus, .ph-field textarea:focus, .ph-field select:focus {
  outline: none; border-color: var(--ph-royal); box-shadow: 0 0 0 3px rgba(86,128,255,.16);
}
.ph-field textarea { resize: vertical; min-height: 100px; }
.ph-hint { font-size: 12px; color: var(--ph-text-dim); margin: 7px 0 0; }

.ph-radio-group { display: flex; flex-direction: column; gap: 9px; }
.ph-radio-group label {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  font-family: var(--ph-f-body); font-size: 14.5px; letter-spacing: 0; text-transform: none;
  color: var(--ph-text-soft); padding: 12px 15px; margin: 0;
  border: 1px solid var(--ph-line); border-radius: 10px; background: rgba(4,7,15,.5);
  transition: all .2s ease;
}
.ph-radio-group label:hover { border-color: var(--ph-line-hi); color: var(--ph-text); }
.ph-radio-group label:has(input:checked) { border-color: var(--ph-royal); background: rgba(86,128,255,.09); color: var(--ph-text); }
.ph-radio-group input { accent-color: var(--ph-cyan); width: 16px; height: 16px; flex: none; }

/* --- campo com pendência: destaque para localizar o erro --- */
.ph-field.is-invalid > label { color: var(--ph-err); }
.ph-field.is-invalid input[type="text"],
.ph-field.is-invalid input[type="email"],
.ph-field.is-invalid input[type="tel"],
.ph-field.is-invalid textarea {
  border-color: rgba(255, 107, 107, .6);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, .12);
}
.ph-field.is-invalid .ph-radio-group label { border-color: rgba(255, 107, 107, .35); }

/* --- anexos --- */
.ph-file-input {
  position: absolute; width: 1px; height: 1px;
  opacity: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.ph-file-drop {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 18px; cursor: pointer;
  border: 1px dashed var(--ph-line-hi); border-radius: 10px;
  background: rgba(4, 7, 15, .5);
  color: var(--ph-text-soft);
  font-family: var(--ph-f-body); font-size: 14px;
  letter-spacing: 0; text-transform: none;
  margin: 0;
  transition: border-color .25s ease, color .25s ease, background .25s ease;
}
.ph-file-drop svg { width: 19px; height: 19px; flex: none; }
.ph-file-drop:hover { border-color: var(--ph-cyan); color: var(--ph-cyan); background: rgba(13, 235, 255, .04); }
.ph-file-input:focus-visible + .ph-file-drop { outline: 2px solid var(--ph-cyan); outline-offset: 2px; }

.ph-file-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ph-file-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 13px; border-radius: 8px;
  border: 1px solid var(--ph-line); background: rgba(11, 18, 32, .6);
  font-size: 13px; color: var(--ph-text-soft);
}
.ph-file-list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-file-list li em {
  font-style: normal; flex: none;
  font-family: var(--ph-f-mono); font-size: 11px; color: var(--ph-text-dim);
}

.ph-form-error {
  display: none; margin-bottom: 18px; padding: 12px 16px; border-radius: 10px;
  background: rgba(255,107,107,.09); border: 1px solid rgba(255,107,107,.3);
  color: var(--ph-err); font-size: 13.5px;
}
.ph-form-error.is-visible { display: block; }
.ph-form-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 26px; }
.ph-btn-block { width: 100%; }
.ph-btn[disabled] { opacity: .5; cursor: not-allowed; transform: none !important; }

/* wizard */
.ph-wizard-progress { display: flex; gap: 6px; margin-bottom: 28px; }
.ph-wizard-progress i { flex: 1; height: 3px; border-radius: 2px; background: rgba(120,160,255,.15); transition: background .4s ease; }
.ph-wizard-progress i.is-done { background: var(--ph-grad); }
.ph-wizard-step { display: none; }
.ph-wizard-step.is-active { display: block; animation: ph-slide .3s ease; }
@keyframes ph-slide { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.ph-wizard-success { text-align: center; padding: 14px 0; }
.ph-wizard-success-icon {
  width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center; font-size: 26px;
  background: rgba(43,229,155,.1); border: 1px solid rgba(43,229,155,.35); color: var(--ph-ok);
}
.ph-ticket-code {
  display: inline-block; margin-top: 16px; padding: 12px 22px; border-radius: 10px;
  background: rgba(13,235,255,.07); border: 1px solid rgba(13,235,255,.28);
  font-family: var(--ph-f-mono); font-size: 15px; letter-spacing: .1em; color: var(--ph-cyan);
}
[data-ph-summary] { font-family: var(--ph-f-mono); font-size: 13px; line-height: 2; color: var(--ph-text-soft); }

/* =========================================================
   SISTEMA DE SUPERFÍCIES — profundidade e brilho de marca

   Em fundo escuro, sombra preta quase não se lê. A profundidade
   aqui vem de três camadas: um filete claro no topo (aresta
   iluminada), uma sombra escura de apoio e um brilho colorido
   que só acende no hover — ciano de um lado, violeta do outro,
   formando um degradê ao redor do box.
   ========================================================= */

/* Ângulo animável do anel. Registrado para o browser saber
   interpolar entre valores (custom property "crua" não anima). */
@property --ph-ring-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
/* Fallback para browsers sem @property: o anel fica estático em
   vez de sumir, porque o conic-gradient continua válido. */
:root { --ph-ring-angle: 0deg; }

.ph-card,
.ph-diff-item,
.ph-status-item,
.ph-perf,
.ph-telemetry,
.ph-panel,
.ph-faq-item,
.ph-mail-mock,
.ph-flow-step,
.ph-metric {
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .045),
    0 16px 34px -26px rgba(2, 5, 14, .9);
  /* transform entra aqui de propósito: esta regra sobrescreve a
     `transition` declarada antes em .ph-card / .ph-status-item /
     .ph-flow-step, e sem ele o translate do hover saltaria. */
  transition:
    box-shadow .55s cubic-bezier(.22, .75, .25, 1),
    transform .4s cubic-bezier(.22, .75, .25, 1),
    border-color .45s ease,
    background .45s ease;
}

/* --- brilho em degradê no hover, com respiração lenta ---
   .ph-panel e .ph-mail-mock ficam de fora: o painel envolve os
   flow-steps e o mock, então acenderia junto com eles (dois
   brilhos aninhados ao mesmo tempo). */
.ph-card:hover,
.ph-diff-item:hover,
.ph-status-item:hover,
.ph-perf:hover,
.ph-faq-item:hover,
.ph-flow-step:hover,
.ph-metric:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .055),
    0 20px 42px -32px rgba(2, 5, 14, 1),
    -9px 13px 30px -34px rgba(13, 235, 255, .24),
    9px 13px 30px -34px rgba(123, 92, 255, .24);
  animation: ph-glow-breathe 5.4s ease-in-out infinite;
}

@keyframes ph-glow-breathe {
  0%, 100% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .055),
      0 20px 42px -32px rgba(2, 5, 14, 1),
      -9px 13px 30px -34px rgba(13, 235, 255, .22),
      9px 13px 30px -34px rgba(123, 92, 255, .22);
  }
  50% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .07),
      0 22px 46px -32px rgba(2, 5, 14, 1),
      -11px 15px 36px -33px rgba(13, 235, 255, .32),
      11px 15px 36px -33px rgba(123, 92, 255, .32);
  }
}

/* --- anel de luz que percorre a borda no hover ---
   inset:0 (e não -1px) porque vários desses boxes têm
   overflow:hidden e recortariam o anel. */
.ph-card::after,
.ph-diff-item::after,
.ph-status-item::after,
.ph-perf::after,
.ph-faq-item::after,
.ph-flow-step::after,
.ph-metric::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--ph-ring-angle),
    transparent 0deg,
    rgba(13, 235, 255, .28) 70deg,
    rgba(123, 92, 255, .24) 150deg,
    transparent 225deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity .5s ease;
  pointer-events: none;
  z-index: 3;
}

.ph-card:hover::after,
.ph-diff-item:hover::after,
.ph-status-item:hover::after,
.ph-perf:hover::after,
.ph-faq-item:hover::after,
.ph-flow-step:hover::after,
.ph-metric:hover::after {
  opacity: 1;
  animation: ph-ring-spin 10s linear infinite;
}

@keyframes ph-ring-spin {
  to { --ph-ring-angle: 360deg; }
}

/* Contêineres grandes: profundidade estática, sem reagir ao mouse. */
.ph-panel {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .05),
    0 30px 62px -48px rgba(2, 5, 14, 1),
    -14px 20px 46px -48px rgba(13, 235, 255, .16),
    14px 20px 46px -48px rgba(123, 92, 255, .16);
}

/* O painel de telemetria já tem borda em degradê permanente
   (::before), então recebe só a respiração — sem anel, para não
   empilhar dois contornos. */
.ph-telemetry {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 40px 90px -40px rgba(0, 0, 0, .9),
    -11px 16px 40px -40px rgba(13, 235, 255, .2),
    11px 16px 40px -40px rgba(123, 92, 255, .2);
}

/* ---------------- responsivo ---------------- */
@media (max-width: 1180px) {
  .ph-hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .ph-telemetry { max-width: 520px; margin-left: 0; }
  .ph-about { grid-template-columns: 1fr; }
  .ph-panel { grid-template-columns: 1fr; }
  .ph-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  /* header colapsado */
  .ph-menu-toggle { display: flex; }
  .ph-header-collapse {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(4,7,15,.98); backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--ph-line);
    padding: 8px var(--ph-gutter) 24px;
  }
  .ph-header.is-open .ph-header-collapse { display: flex; animation: ph-slide-down .28s cubic-bezier(.2,.8,.2,1); }
  @keyframes ph-slide-down { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
  .ph-header-inner { gap: 16px; padding-block: 14px; }
  .ph-nav { flex-direction: column; align-items: stretch; gap: 0; }
  .ph-nav a { padding: 15px 2px; font-size: 16px; border-bottom: 1px solid var(--ph-line); }
  .ph-nav a::after { display: none; }
  .ph-header-actions {
    margin-left: 0; margin-top: 18px; flex-direction: column-reverse; align-items: stretch; gap: 14px;
  }
  .ph-header-actions .ph-btn { width: 100%; padding: 14px 20px; font-size: 15px; }
  .ph-lang-switch { justify-content: center; gap: 6px; }
  .ph-lang-switch a { padding: 8px 16px; border: 1px solid var(--ph-line); font-size: 12.5px; }
}

@media (max-width: 760px) {
  .ph-hero { padding: 104px 0 44px; }
  .ph-hero h1 { max-width: none; }
  .ph-telemetry { animation: none; max-width: none; }
  .ph-status-head { gap: 18px; }
  .ph-footer-grid { grid-template-columns: 1fr 1fr; }
  .ph-footer-brand { grid-column: 1 / -1; }
  .ph-modal { padding: 28px 22px; }
  .ph-faq-q { font-size: 15.5px; padding: 18px 20px; }
  .ph-faq-a { padding: 0 20px 20px; }
}

@media (max-width: 460px) {
  .ph-footer-grid { grid-template-columns: 1fr; }
  .ph-hero-actions .ph-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .ph-reveal { opacity: 1; transform: none; }
  .ph-faq-panel { transition: none; }
}
