:root {
  color-scheme: light;
  --ink: #0a0f1c;
  --ink-soft: #111827;
  --ink-muted: #94a3b8;
  --surface: #ffffff;
  --canvas: #f4f5f7;
  --line: #e5e7eb;
  --text: #111827;
  --muted: #667085;
  --brand: #f15a24;
  --brand-action: #d54112;
  --brand-hover: #c83d0e;
  --brand-text: #c83d0e;
  --brand-soft: #fff0e9;
  --success: #087a55;
  --success-soft: #e7f8f1;
  --warning: #a96305;
  --warning-soft: #fff7dd;
  --danger: #c93636;
  --danger-soft: #fff0f0;
  --shadow: 0 24px 70px rgba(10, 15, 28, .12);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--ink);
  color: #fff;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(241, 90, 36, .45);
  outline-offset: 4px;
}

.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  width: min(1120px, calc(100% - 48px));
  min-height: 84px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 142px;
  height: auto;
}

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #cbd5e1;
  font-size: .78rem;
  font-weight: 700;
}

.privacy-pill > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3dd598;
  box-shadow: 0 0 0 5px rgba(61, 213, 152, .1);
}

.hero {
  position: relative;
  display: grid;
  width: min(1120px, calc(100% - 48px));
  min-height: calc(100svh - 84px);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: clamp(60px, 9vw, 130px);
  align-items: center;
  padding: 60px 0 86px;
}

.hero::before {
  position: absolute;
  z-index: -1;
  width: 620px;
  height: 620px;
  top: 50%;
  left: -360px;
  border-radius: 50%;
  background: rgba(241, 90, 36, .07);
  filter: blur(2px);
  content: "";
  transform: translateY(-50%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.eyebrow, .section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ff9a74;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .15em;
}

.eyebrow > span {
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: var(--brand-action);
}

h1, h2, p { margin-top: 0; }

h1 {
  max-width: 690px;
  margin: 22px 0 20px;
  font-size: clamp(3.2rem, 6.6vw, 5.9rem);
  font-weight: 820;
  line-height: .94;
  letter-spacing: -.067em;
}

.hero-description {
  max-width: 590px;
  margin-bottom: 0;
  color: #aeb9c9;
  font-size: clamp(1.04rem, 1.7vw, 1.22rem);
  line-height: 1.65;
}

.primary-button {
  display: inline-flex;
  min-height: 62px;
  margin-top: 34px;
  padding: 0 24px 0 27px;
  align-items: center;
  justify-content: center;
  gap: 28px;
  border: 0;
  border-radius: 16px;
  background: var(--brand);
  box-shadow: 0 18px 44px rgba(241, 90, 36, .27);
  color: #fff;
  cursor: pointer;
  font-size: .96rem;
  font-weight: 850;
  transition: transform .2s var(--ease), background .2s ease, box-shadow .2s ease;
}

.primary-button:hover:not(:disabled) {
  background: var(--brand-hover);
  box-shadow: 0 22px 54px rgba(241, 90, 36, .34);
  transform: translateY(-3px);
}

.primary-button:disabled { cursor: wait; opacity: .75; }

.button-arrow {
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1;
  transition: transform .2s var(--ease);
}

.primary-button:hover .button-arrow { transform: translateX(4px); }
.primary-button.is-running .button-arrow { animation: arrowPulse 1s ease-in-out infinite; }

.test-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  color: #7f8da1;
  font-size: .77rem;
}

.test-meta strong { color: #cbd5e1; font-weight: 800; }

.test-meta > span[aria-hidden="true"] {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #475569;
}

.network-tip {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 29px 0 0;
  color: #8f9caf;
  font-size: .8rem;
  line-height: 1.5;
}

.network-tip span {
  display: grid;
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  place-items: center;
  border: 1px solid #475569;
  border-radius: 50%;
  color: #cbd5e1;
  font-size: .68rem;
  font-weight: 800;
}

.hero-orbit {
  position: relative;
  width: 390px;
  height: 390px;
}

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(255, 255, 255, .105);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-one { width: 100%; height: 100%; }
.orbit-two { width: 72%; height: 72%; border-color: rgba(255, 255, 255, .14); }
.orbit-three { width: 43%; height: 43%; border-color: rgba(241, 90, 36, .32); }

.orbit-core {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 29px;
  background: linear-gradient(145deg, #1d2636, #0d1422);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .07);
  color: #fff;
  font-size: 1.28rem;
  font-weight: 900;
  letter-spacing: -.06em;
  transform: translate(-50%, -50%);
}

.orbit-core::after {
  position: absolute;
  width: 12px;
  height: 12px;
  right: 8px;
  bottom: 8px;
  border: 3px solid var(--ink-soft);
  border-radius: 50%;
  background: #3dd598;
  content: "";
}

.orbit-node {
  position: absolute;
  width: 13px;
  height: 13px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 6px rgba(241, 90, 36, .1);
}

.node-one { top: 7%; left: 48%; }
.node-two { top: 51%; right: 13%; background: #3dd598; box-shadow: 0 0 0 6px rgba(61, 213, 152, .1); }
.node-three { bottom: 14%; left: 17%; background: #8ca2c0; box-shadow: 0 0 0 6px rgba(140, 162, 192, .1); }

.diagnostic-stage {
  min-height: 100vh;
  padding: clamp(58px, 8vw, 100px) 0;
  background: var(--canvas);
  color: var(--text);
}

.stage-inner {
  width: min(1040px, calc(100% - 48px));
  margin: 0 auto;
}

.diagnostic-panel {
  padding: clamp(24px, 4.5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.section-kicker { color: var(--brand-text); }

.panel-heading h2, .result-content h2 {
  margin: 9px 0 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -.045em;
}

.panel-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: .86rem;
}

.progress-copy {
  display: grid;
  flex: 0 0 auto;
  justify-items: end;
  gap: 5px;
}

.progress-copy strong { color: #344054; font-size: .82rem; }
.progress-copy span { color: #98a2b3; font-size: .75rem; }

.progress-track {
  height: 7px;
  margin: 28px 0 30px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef0f3;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #ff986f);
  transition: width .35s var(--ease);
}

.technical-details {
  margin-top: 6px;
  border-top: 1px solid var(--line);
}

.technical-details summary {
  display: inline-flex;
  margin-top: 18px;
  padding: 9px 0;
  align-items: center;
  gap: 8px;
  color: #667085;
  cursor: pointer;
  font-size: .76rem;
  font-weight: 750;
  list-style: none;
}

.technical-details summary::-webkit-details-marker { display: none; }
.technical-details summary::after { color: var(--brand-text); content: "+"; font-size: 1rem; }
.technical-details[open] summary::after { content: "−"; }
.technical-details summary:focus-visible { outline: 3px solid rgba(241, 90, 36, .25); outline-offset: 3px; border-radius: 5px; }

.test-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.test-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 13px;
  min-height: 92px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  transition: border-color .2s ease, background .2s ease, transform .2s var(--ease);
}

.test-card[data-state="running"] { border-color: #ffcbb6; background: #fff9f6; transform: translateY(-2px); }
.test-card[data-state="pass"] { border-color: #c7eadc; }
.test-card[data-state="warn"] { border-color: #edd999; }
.test-card[data-state="fail"] { border-color: #efc0c0; }

.test-state {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: #f2f4f7;
  color: #98a2b3;
  font-size: .68rem;
  font-weight: 900;
}

.test-card[data-state="running"] .test-state { background: var(--brand-soft); color: var(--brand); animation: softPulse 1s ease-in-out infinite; }
.test-card[data-state="pass"] .test-state { background: var(--success-soft); color: var(--success); }
.test-card[data-state="warn"] .test-state { background: var(--warning-soft); color: var(--warning); }
.test-card[data-state="fail"] .test-state { background: var(--danger-soft); color: var(--danger); }

.test-copy { min-width: 0; }
.test-copy strong { display: block; margin: 1px 0 5px; color: #1d2939; font-size: .83rem; }
.test-copy p { margin: 0; color: #667085; font-size: .73rem; line-height: 1.42; }
.test-duration { display: block; margin-top: 5px; color: #98a2b3; font-size: .66rem; font-variant-numeric: tabular-nums; }

.result-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 22px;
  margin-top: 18px;
  padding: clamp(25px, 4vw, 42px);
  border: 1px solid #bfe7d8;
  border-radius: 26px;
  background: var(--success-soft);
}

.result-panel[data-tone="warn"] { border-color: #ead58e; background: var(--warning-soft); }
.result-panel[data-tone="fail"] { border-color: #edbbbb; background: var(--danger-soft); }
.result-panel[data-tone="neutral"] { border-color: #d8dde5; background: #f5f6f8; }

.result-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  background: var(--success);
  color: #fff;
  font-size: 1.35rem;
  font-weight: 900;
}

.result-panel[data-tone="warn"] .result-icon { background: var(--warning); }
.result-panel[data-tone="fail"] .result-icon { background: var(--danger); }
.result-panel[data-tone="neutral"] .result-icon { background: var(--ink-soft); }
.result-content > p { max-width: 760px; margin: 13px 0 20px; color: #475467; font-size: .92rem; line-height: 1.62; }

.result-content .support-instruction {
  max-width: 760px;
  margin: 18px 0 0;
  padding: 13px 15px;
  border-left: 3px solid var(--brand);
  border-radius: 0 10px 10px 0;
  background: rgba(255, 255, 255, .72);
  color: #475467;
  font-size: .8rem;
  line-height: 1.55;
}

.result-identifiers {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.result-code-row {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  padding: 10px 13px;
  border: 1px solid rgba(17, 24, 39, .1);
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
}

.result-code-row span { color: #667085; font-size: .72rem; font-weight: 700; }
.result-code-row code { color: var(--text); font-size: .82rem; font-weight: 900; letter-spacing: .04em; }

.result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
}

.secondary-button, .whatsapp-button, .text-button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  cursor: pointer;
  font-size: .77rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform .18s var(--ease), box-shadow .18s ease, background .18s ease;
}

.whatsapp-button {
  display: inline-flex;
  align-items: center;
  border: 0;
  background: var(--ink-soft);
  color: #fff;
}

.secondary-button { border: 1px solid rgba(17, 24, 39, .14); background: #fff; color: var(--text); }
.text-button { border: 0; background: transparent; color: #667085; }
.whatsapp-button:hover, .secondary-button:hover { box-shadow: 0 9px 22px rgba(17, 24, 39, .1); transform: translateY(-1px); }

footer {
  display: flex;
  width: min(1120px, calc(100% - 48px));
  min-height: 76px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: #6f7d91;
  font-size: .75rem;
}

footer span { color: #cbd5e1; font-weight: 850; }
footer p { margin: 0; }

.toast {
  position: fixed;
  z-index: 30;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100% - 44px));
  padding: 13px 16px;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .24);
  color: var(--text);
  font-size: .8rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s var(--ease);
}

.toast.is-visible { opacity: 1; transform: translateY(0); }

@keyframes arrowPulse {
  0%, 100% { opacity: 1; transform: translateX(0); }
  50% { opacity: .45; transform: translateX(5px); }
}

@keyframes softPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .48; }
}

@media (max-width: 920px) {
  .hero { grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; }
  .hero-orbit { width: 280px; height: 280px; }
  .orbit-core { width: 76px; height: 76px; border-radius: 24px; }
}

@media (max-width: 760px) {
  .site-header, .hero, footer { width: min(100% - 32px, 1120px); }
  .site-header { min-height: 72px; }
  .brand img { width: 118px; }
  .hero { display: flex; min-height: calc(100svh - 72px); padding: 42px 0 58px; align-items: center; }
  .hero-content { width: 100%; }
  .hero-orbit { display: none; }
  h1 { max-width: 580px; font-size: clamp(3rem, 14vw, 4.7rem); }
  .hero-description { max-width: 520px; }
  .diagnostic-stage { padding: 48px 0; }
  .stage-inner { width: min(100% - 28px, 1040px); }
  .diagnostic-panel { padding: 25px 18px; border-radius: 22px; }
  .panel-heading { align-items: flex-start; }
  .test-list { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .privacy-pill { font-size: .7rem; }
  h1 { margin-top: 18px; font-size: clamp(2.8rem, 15vw, 3.75rem); }
  .hero-description { font-size: 1rem; }
  .primary-button { width: 100%; min-height: 60px; justify-content: space-between; }
  .test-meta { justify-content: center; gap: 9px; }
  .network-tip { align-items: flex-start; }
  .panel-heading { display: grid; }
  .progress-copy { justify-items: start; }
  .result-panel { grid-template-columns: 1fr; padding: 24px 18px; border-radius: 22px; }
  .result-code-row { width: 100%; justify-content: space-between; }
  .result-actions > * { width: 100%; justify-content: center; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; padding: 24px 0; }
}

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