/* SecurityCAD — institutional landing page
   Tokens first, then layout, then components, then responsive. */

:root {
  --ink:        #0A1E3F;
  --text:       #3A4A63;
  --muted:      #66748D;
  --accent:     #1A50E8;
  --accent-dk:  #1340BE;
  --paper:      #FFFFFF;
  --paper-2:    #F5F8FC;
  --line:       #DDE4EF;
  --line-strong:#C3CEDE;
  --grid:       #EBF0F8;
  --subtle:     #EFF3F9;
  --text-3:     #8593AB;
  --header-h:   68px;
  --radius:     8px;
  --wrap:       1140px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 16px;
}

h1 { font-size: clamp(2rem, 1.35rem + 2.6vw, 3rem); max-width: 16ch; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
h3 { font-size: 1.0625rem; line-height: 1.35; margin-bottom: 8px; }

p { margin: 0 0 16px; }
a { color: var(--accent); }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  text-decoration: none;
  z-index: 20;
}
.skip-link:focus { left: 16px; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-row {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}

.wordmark {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  margin: 0;
}
.wordmark span { color: var(--accent); }
.wordmark img { display: block; }

.wordmark-light { color: #fff; font-size: 1.15rem; }
.wordmark-light span { color: #6E97FF; }

.nav {
  display: flex;
  gap: 26px;
  margin-right: auto;
}
.nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9375rem;
}
.nav a:hover { color: var(--ink); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-solid { background: var(--accent); color: #fff; }
.btn-solid:hover { background: var(--accent-dk); }

.btn-outline { background: var(--paper); border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-quiet { color: var(--ink); }
.btn-quiet:hover { color: var(--accent); }

.btn-lg { padding: 0.85rem 1.6rem; font-size: 1.0625rem; }
.btn-block { width: 100%; }

/* ---------- hero ---------- */

.hero {
  padding: 72px 0 88px;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  border-bottom: 1px solid var(--line);
}

.hero-row {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 56px;
  align-items: center;
}

.lead {
  font-size: 1.125rem;
  max-width: 52ch;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.hero-note {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
}

.hero-plan {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.plan-svg { display: block; width: 100%; height: auto; }

/* drawing */
.walls path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.door path {
  fill: none;
  stroke: #A6B4CC;
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
}
.cam { fill: var(--ink); stroke: #fff; stroke-width: 2; }

.band { stroke: none; fill: var(--accent); }
.band-d { opacity: 0.10; }
.band-r { opacity: 0.16; }
.band-i { opacity: 0.24; }

/* legend swatches show the stacked result, so they carry their own opacity */
.legend .band-d { opacity: 0.14; }
.legend .band-r { opacity: 0.30; }
.legend .band-i { opacity: 0.52; }
.legend text { font-size: 11px; fill: var(--muted); }
.legend-rule { stroke: var(--line); stroke-width: 1; }
.scale-bar { stroke: var(--ink); stroke-width: 1.2; fill: none; }
.scale-text { font-size: 10px; fill: var(--muted); }

/* one orchestrated moment: each camera sweeps to its final aim on load */
.fov { transform-box: view-box; transform-origin: 0 0; }
.fov-a {
  transform: translate(55px, 55px) rotate(38deg);
  animation: sweep-a 1100ms cubic-bezier(0.22, 1, 0.36, 1) 150ms both;
}
.fov-b {
  transform: translate(490px, 40px) rotate(125deg);
  animation: sweep-b 1100ms cubic-bezier(0.22, 1, 0.36, 1) 330ms both;
}
@keyframes sweep-a {
  from { transform: translate(55px, 55px) rotate(13deg); opacity: 0; }
  to   { transform: translate(55px, 55px) rotate(38deg); opacity: 1; }
}
@keyframes sweep-b {
  from { transform: translate(490px, 40px) rotate(153deg); opacity: 0; }
  to   { transform: translate(490px, 40px) rotate(125deg); opacity: 1; }
}

/* ---------- sections ---------- */

.section { padding: 80px 0; scroll-margin-top: 80px; }
.section-alt { background: var(--paper-2); border-top: 1px solid var(--line); }

.section h2 { margin-bottom: 8px; }
.section-lead { color: var(--muted); max-width: 60ch; margin-bottom: 32px; }
#recursos h2 { margin-bottom: 32px; }

/* ---------- features ---------- */

.quadro {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.feature { background: var(--paper); padding: 30px 28px; }
.feature p { margin: 0; font-size: 0.9375rem; max-width: 40ch; }

.ico {
  width: 26px;
  height: 26px;
  margin-bottom: 14px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ico-fill { fill: var(--accent); stroke: none; }

/* ---------- plans ---------- */

.plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: stretch;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
}
/* the featured plan differs by border and badge only: no scale, no fill */
.plan-featured {
  border-color: var(--line-strong);
  box-shadow: 0 1px 3px rgb(10 30 63 / 0.06);
}
.plan-badge {
  position: absolute;
  top: 20px;
  right: 18px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
}

.plan h3 { font-size: 1.3125rem; font-weight: 500; letter-spacing: -0.015em; margin-bottom: 6px; }

.plan-tagline {
  font-size: 0.9375rem;
  color: var(--muted);
  min-height: 4.8em;
  margin-bottom: 18px;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 2px;
  color: var(--ink);
  font-size: 3rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  min-height: 1em;
  margin-bottom: 6px;
}
.price-cur { font-size: 1.25rem; align-self: flex-start; margin-top: 0.3em; letter-spacing: 0; }
.price-per { font-size: 1rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.price-sob { font-size: 1.75rem; letter-spacing: -0.02em; align-self: flex-end; }

.price-note {
  font-size: 0.8125rem;
  color: var(--text-3);
  min-height: 2.4em;
  margin-bottom: 14px;
}

.plan-inherit {
  border-top: 1px solid var(--line);
  margin: 22px 0 16px;
  padding-top: 18px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
}

.plan-list {
  list-style: none;
  display: grid;
  gap: 12px;
  margin: 0 0 22px;
  padding: 0;
  font-size: 0.9375rem;
  line-height: 1.45;
}
.plan-list li { position: relative; padding-left: 26px; }
.plan-list li::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  width: 5px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
}

.plan-foot {
  margin: auto 0 0;
  padding-top: 8px;
  font-size: 0.8125rem;
  color: var(--text-3);
}

/* ---------- comparison table ---------- */

.block-title {
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 64px 0 20px;
}

.compare-wrap {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.compare {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9375rem;
}
.compare th,
.compare td {
  padding: 13px 16px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.compare thead th {
  position: sticky;
  top: var(--header-h);
  z-index: 2;
  background: var(--paper);
  color: var(--ink);
  font-weight: 500;
}
.compare thead th span {
  display: block;
  margin-top: 2px;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-3);
}
.compare th[scope="row"] {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 264px;
  background: var(--paper);
  text-align: left;
  font-weight: 400;
  color: var(--text);
}
.compare thead th:first-child { z-index: 3; text-align: left; }
.compare tr.group th {
  background: var(--subtle);
  text-align: left;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--ink);
}
.compare tbody tr:last-child th,
.compare tbody tr:last-child td { border-bottom: 0; }

.yes { display: inline-block; position: relative; width: 16px; height: 16px; }
.yes::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 10px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg);
}
.no { color: var(--text-3); }
.tbd { color: var(--text-3); font-size: 0.875rem; }

.compare-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 24px 0 14px;
}
.table-note { max-width: 62ch; margin: 0; font-size: 0.8125rem; color: var(--text-3); }

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

/* ---------- faq ---------- */

.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 18px 44px 18px 0;
  font-weight: 500;
  color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 24px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(-135deg); top: 27px; }
.faq-item p { max-width: 68ch; margin: 0 0 18px; font-size: 0.9375rem; }

/* ---------- footer ---------- */

.site-footer { background: var(--ink); color: #BFCDE4; padding: 52px 0 24px; }
.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 28px;
}
.footer-desc { font-size: 0.9375rem; margin: 0; max-width: 42ch; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a {
  color: #E2E9F5;
  text-decoration: none;
  font-size: 0.9375rem;
}
.footer-links a:hover { color: #7FA3FF; text-decoration: underline; }
.footer-base {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
}
.footer-base p { font-size: 0.8125rem; color: #8FA1BE; margin: 0; }

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .hero { padding: 48px 0 56px; }
  .hero-row { grid-template-columns: 1fr; gap: 40px; }
  h1 { max-width: 22ch; }
  .quadro { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1039px) {
  .plans { grid-template-columns: repeat(2, 1fr); }
}

/* below this width the table scrolls inside its own box, never the page */
@media (max-width: 900px) {
  .compare-wrap { overflow-x: auto; }
}

@media (max-width: 640px) {
  :root { --header-h: 60px; }
  body { font-size: 16px; }
  .header-row { gap: 12px; height: 60px; }
  .nav { display: none; }
  .wordmark { margin-right: auto; }
  .section { padding: 56px 0; }
  .quadro { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .feature { padding: 24px 22px; }
}

@media (max-width: 619px) {
  .plans { grid-template-columns: 1fr; }
  .price { font-size: 2.5rem; }
  .plan-tagline { min-height: 0; }
  .price-note { min-height: 0; }
  .compare-actions .btn { width: 100%; }
}

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