/* ============================================================
   Palo Alto Networks — Sizing Guide CSS  v2
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── Custom properties (dark) ── */
:root {
  --bg:           #080b12;
  --bg2:          #0d1120;
  --surface:      #111827;
  --surface2:     #1a2235;
  --surface3:     #212d45;
  --border:       #1e2d45;
  --border2:      #2d4070;
  --accent:       #e84b1a;
  --accent-hover: #ff5c24;
  --accent-dim:   rgba(232,75,26,0.12);
  --accent-glow:  rgba(232,75,26,0.25);
  --blue:         #003087;
  --blue-bright:  #1a5fd4;
  --text:         #c8d4ea;
  --text-bright:  #eef2ff;
  --text-muted:   #6a7d9f;
  --text-dim:     #8a9bbf;
  --green:        #22c55e;
  --green-dim:    rgba(34,197,94,0.15);
  --yellow:       #f59e0b;
  --yellow-dim:   rgba(245,158,11,0.15);
  --red:          #ef4444;
  --red-dim:      rgba(239,68,68,0.15);
  --purple:       #8b5cf6;
  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    16px;
  --shadow:       0 8px 32px rgba(0,0,0,0.5);
  --shadow-accent:0 8px 24px rgba(232,75,26,0.2);
  --font:         'Inter', sans-serif;
  --mono:         'JetBrains Mono', monospace;
  --header-h:     60px;
}

[data-theme="light"] {
  --bg:           #f4f6fb;
  --bg2:          #ebeef7;
  --surface:      #ffffff;
  --surface2:     #f0f3fa;
  --surface3:     #e4e9f5;
  --border:       #d0d8ed;
  --border2:      #b0bed8;
  --text:         #1e2a45;
  --text-bright:  #0a1225;
  --text-muted:   #5a6a8a;
  --text-dim:     #3a4a6a;
  --accent-dim:   rgba(232,75,26,0.08);
  --shadow:       0 4px 20px rgba(0,48,135,0.1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}

/* Animated grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
  animation: gridDrift 30s linear infinite;
}

@keyframes gridDrift {
  0%   { background-position: 0 0; }
  100% { background-position: 48px 48px; }
}

/* Radial glow top */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 40% at 50% -5%, rgba(232,75,26,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 80% 100%, rgba(0,48,135,0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(8,11,18,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 8px;
}

[data-theme="light"] .site-header {
  background: rgba(244,246,251,0.9);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  flex-shrink: 0;
}

/* Dark mode: white logo with text */
.header-logo .logo-dark { display: block; }
.header-logo .logo-light { display: none; }
[data-theme="light"] .header-logo .logo-dark { display: none; }
[data-theme="light"] .header-logo .logo-light { display: block; }

.header-logo img {
  height: 28px;
  width: auto;
}

.logo-sep {
  width: 1px;
  height: 20px;
  background: var(--border2);
  margin: 0 12px;
  flex-shrink: 0;
}

.header-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-bright);
  white-space: nowrap;
  letter-spacing: -0.2px;
}

.header-title span {
  color: var(--accent);
}

.header-spacer { flex: 1; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-btn {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: color .15s, background .15s;
  white-space: nowrap;
}

.nav-btn:hover {
  color: var(--text-bright);
  background: var(--surface2);
}

.nav-divider {
  width: 1px;
  height: 16px;
  background: var(--border);
  margin: 0 4px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--surface);
  white-space: nowrap;
}

.badge-accent {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* Icon button */
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
}

.icon-btn:hover {
  border-color: var(--accent);
  color: var(--text-bright);
  background: var(--accent-dim);
}

/* ── Dropdown ── */
.dropdown { position: relative; }

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 300;
  animation: dropIn .15s ease;
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu { display: block; }

.dropdown-item {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 10px 12px !important;
  border-radius: 8px;
  text-decoration: none;
  transition: background .15s;
  color: inherit !important;
}

.dropdown-item:hover { background: var(--surface2); }

.dropdown-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.dropdown-item-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-bright);
}

.dropdown-item-sub {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.dropdown-soon { opacity: 0.4; pointer-events: none; }

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ── Hero ── */
.hero {
  position: relative;
  z-index: 1;
  padding: 64px 24px 48px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(232,75,26,0.2);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 14px;
  animation: heroIn .6s ease backwards;
}

.hero h1 span {
  color: var(--accent);
  position: relative;
  display: inline-block;
}

/* Animated underline on accent word */
.hero h1 span::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  animation: lineGrow .8s .4s ease backwards;
  transform-origin: left;
}

@keyframes lineGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes heroIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero p {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 500px;
  margin: 0 auto;
  animation: heroIn .6s .1s ease backwards;
}

/* ── App container ── */
#app {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px 100px;
}

/* ── Category nav ── */
.cat-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.cat-nav button {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cat-nav button:hover {
  border-color: var(--border2);
  color: var(--text-bright);
  background: var(--surface2);
}

.cat-nav button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow-accent);
}

/* ── Category sections ── */
.category-section { display: none; }
.category-section.visible { display: block; }

/* ── Tools grid ── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

/* ── Tool card ── */
.tool-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-decoration: none;
  transition: border-color .2s, transform .2s, box-shadow .25s, background .2s;
  position: relative;
  overflow: hidden;
  animation: cardIn .35s ease backwards;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  opacity: 0;
  transition: opacity .2s;
}

/* Shine effect on hover */
.tool-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}

.tool-card:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4), 0 0 0 1px var(--border2), 0 0 20px rgba(232,75,26,0.05);
  background: var(--surface2);
}

.tool-card:hover::before { opacity: 1; }
.tool-card:hover::after  { opacity: 1; }

.card-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 12px;
  transition: background .2s;
}

.tool-card:hover .card-icon {
  background: var(--accent-dim);
  border-color: rgba(232,75,26,0.3);
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-arrow {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 12px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .15s, transform .15s;
}

.tool-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

.card-description {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

/* Highlighted partner card */
.tool-card.card-partner {
  border-color: rgba(232,75,26,0.25);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(232,75,26,0.04) 100%);
}

.tool-card.card-partner::before { opacity: 0.5; }

/* ── Status message ── */
.status-msg {
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 13px;
}

/* ============================================================
   Product pages — layout
   ============================================================ */
.page-wrap {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px 100px;
}

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: clamp(18px, 3vw, 28px);
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.page-header p {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 12px;
}

.source-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--green);
  background: var(--green-dim);
  border: 1px solid rgba(34,197,94,0.2);
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: 8px;
}

/* ── Series selector tabs ── */
.series-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.series-tab {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
}

.series-tab:hover {
  border-color: var(--border2);
  color: var(--text-bright);
}

.series-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* ── Series section ── */
.series-section { display: none; }
.series-section.visible { display: block; }

/* ── Table styles ── */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.comparison-table th,
.comparison-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center;
  white-space: nowrap;
}

.comparison-table th:last-child,
.comparison-table td:last-child { border-right: none; }

.comparison-table tr:last-child td { border-bottom: none; }

/* Sticky header */
.comparison-table thead { position: sticky; top: 0; z-index: 2; }

.comparison-table thead th {
  background: var(--surface2);
  font-family: var(--mono);
  font-weight: 600;
  color: var(--accent);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border2);
}

.comparison-table thead th:first-child {
  text-align: left;
}

.comparison-table tbody tr:hover td {
  background: var(--surface2);
}

/* Row label (first col) */
.comparison-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 220px;
  border-right: 2px solid var(--border2);
}

.comparison-table tr:hover td:first-child {
  background: var(--surface2);
}

/* Section row */
.section-row td {
  background: var(--bg2) !important;
  font-family: var(--mono) !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  color: var(--accent) !important;
  text-transform: uppercase !important;
  letter-spacing: 1.5px !important;
  padding: 7px 14px !important;
  border-bottom: 1px solid var(--border2) !important;
}

/* Value classes */
.val-high   { color: var(--green);   font-weight: 600; font-family: var(--mono); font-size: 12px; }
.val-med    { color: var(--yellow);  font-weight: 500; font-family: var(--mono); font-size: 12px; }
.val-low    { color: var(--text-dim);                  font-family: var(--mono); font-size: 12px; }
.val-none   { color: var(--text-muted); font-family: var(--mono); font-size: 12px; opacity: 0.5; }
.val-check  { color: var(--green);   font-size: 14px; }
.val-na     { color: var(--text-muted); font-size: 12px; opacity: 0.4; }

/* ── Quick ref card row ── */
.model-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.model-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color .2s, transform .15s;
}

.model-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.model-card-name {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 4px;
}

.model-card-badge {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  background: var(--surface2);
  padding: 2px 7px;
  border-radius: 10px;
  margin-bottom: 12px;
  display: inline-block;
}

.model-card-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
}

.model-card-stat:last-child { border-bottom: none; }

.stat-label { color: var(--text-muted); }
.stat-val   { font-family: var(--mono); font-weight: 600; color: var(--text-bright); font-size: 12px; }

/* ── Search page ── */
.search-wrap {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 100px;
}

.search-bar {
  position: relative;
  margin-bottom: 24px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 15px;
}

.search-input {
  width: 100%;
  padding: 13px 16px 13px 42px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-bright);
  font-family: var(--font);
  font-size: 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.search-input::placeholder { color: var(--text-muted); }

.search-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.search-results { display: flex; flex-direction: column; gap: 10px; }

/* ── Footer ── */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}

.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 768px) {
  :root { --header-h: 56px; }
  .header-title { display: none; }
  .logo-sep { display: none; }
  .badge { display: none; }
  .hero { padding: 40px 16px 32px; }
  #app { padding: 0 16px 60px; }
  .tools-grid { grid-template-columns: 1fr; }
  .page-wrap { padding: 24px 16px 60px; }
}

@media (max-width: 480px) {
  .cat-nav button { font-size: 12px; padding: 6px 12px; }
  .model-cards { grid-template-columns: 1fr 1fr; }
}
