/* Pera Systems enterprise stylesheet
   Extends the original perasystems.co design language: deep navy, circuit background,
   glass panels, sky-blue accent, blue gradient pill buttons, system font stack. */

:root {
  --bg: #0b1222;
  --bg-2: #0f172a;
  --panel: rgba(15, 23, 42, 0.62);
  --panel-strong: rgba(15, 23, 42, 0.85);
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --accent: #38bdf8;
  --blue-1: #1d4ed8;
  --blue-2: #3b82f6;
  --radius: 14px;
  --max: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  line-height: 1.65;
  background-color: var(--bg);
  background-image:
    linear-gradient(180deg, rgba(11, 18, 34, 0.86), rgba(11, 18, 34, 0.94)),
    url('https://perasystems.co/images/background-circuit.png');
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 18, 34, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { height: 40px; }
.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav > a, .nav-drop > button {
  color: #e2e8f0; font-size: 0.95rem; font-weight: 500; background: none; border: 0;
  font-family: inherit; cursor: pointer; padding: 26px 0;
}
.main-nav > a:hover, .nav-drop > button:hover { color: #fff; text-decoration: none; }
.nav-drop { position: relative; }
.nav-drop > button::after { content: " \25BE"; font-size: 0.75rem; color: var(--dim); }
.drop-panel {
  display: none; position: absolute; top: 72px; left: -24px; width: 640px;
  background: var(--panel-strong); backdrop-filter: blur(16px);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 26px; grid-template-columns: 1fr 1fr; gap: 8px 32px;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.6);
}
.nav-drop:hover .drop-panel, .nav-drop:focus-within .drop-panel { display: grid; }
.drop-panel h6 { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 4px 0 6px; }
.drop-panel a { display: block; color: var(--muted); font-size: 0.92rem; padding: 6px 0; }
.drop-panel a:hover { color: #fff; text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px; font-size: 0.95rem; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: all 0.2s ease; font-family: inherit;
}
.btn:hover { text-decoration: none; }
.btn.primary {
  background: linear-gradient(135deg, var(--blue-1), var(--blue-2)); color: #fff;
  box-shadow: 0 8px 20px -6px rgba(37, 99, 235, 0.45);
}
.btn.primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.secondary { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: var(--line-strong); backdrop-filter: blur(4px); }
.btn.secondary:hover { background: rgba(255, 255, 255, 0.16); }
.btn.small { padding: 9px 18px; font-size: 0.88rem; }
.text-link { font-weight: 600; font-size: 0.95rem; }
.text-link::after { content: " \2192"; }

/* ---------- Type ---------- */
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 18px;
}
h1, h2, h3, h4 { color: #fff; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.7rem); line-height: 1.08; font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.15; font-weight: 700; margin-bottom: 18px; }
h3 { font-size: 1.2rem; line-height: 1.3; margin-bottom: 10px; }
.lead { font-size: 1.22rem; color: var(--muted); max-width: 760px; }
p { color: var(--muted); }

/* ---------- Sections ---------- */
section { padding: 104px 0; }
.section-tight { padding: 72px 0; }
.section-alt { background: rgba(255, 255, 255, 0.025); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 780px; margin-bottom: 56px; }
.section-head p { font-size: 1.1rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative; padding: 140px 0 120px; overflow: hidden;
  background:
    linear-gradient(100deg, rgba(11, 18, 34, 0.96) 30%, rgba(11, 18, 34, 0.55) 100%),
    url('https://perasystems.co/images/hero-bg.png') center/cover;
  border-bottom: 1px solid var(--line);
}
.hero::after {
  content: ""; position: absolute; right: -180px; top: -180px; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18), transparent 65%); pointer-events: none;
}
.hero h1 { max-width: 900px; margin-bottom: 26px; }
.hero .lead { margin-bottom: 40px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.page-hero { padding: 120px 0 88px; }
.page-hero h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
.breadcrumb { font-size: 0.85rem; color: var(--dim); margin-bottom: 22px; }
.breadcrumb a { color: var(--dim); }

/* ---------- Logo marquee ---------- */
.logo-band { padding: 48px 0 52px; border-bottom: 1px solid var(--line); overflow: hidden; }
.logo-label { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); margin-bottom: 28px; }
.logo-track { display: flex; width: max-content; animation: marquee 70s linear infinite; }
.logo-track img { height: 44px; margin: 0 44px; object-fit: contain; filter: grayscale(1) invert(1) brightness(1.5); opacity: 0.55; }
.logo-track img:hover { opacity: 1; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.logo-note { font-size: 0.8rem; color: var(--dim); margin-top: 22px; }

/* ---------- Panels and grids ---------- */
.panel {
  background: var(--panel); backdrop-filter: blur(12px); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px; transition: transform 0.2s, border-color 0.2s;
}
a.panel { display: block; color: inherit; }
a.panel:hover { transform: translateY(-3px); border-color: rgba(56, 189, 248, 0.45); text-decoration: none; }
.panel p { font-size: 0.98rem; }
.panel .more { display: inline-block; margin-top: 16px; color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.panel .more::after { content: " \2192"; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.tag { display: inline-block; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 12px; }
.icon {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 20px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.35), rgba(56, 189, 248, 0.25)); border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--accent); font-weight: 700; font-size: 0.95rem;
}
ul.checks { list-style: none; margin-top: 14px; }
ul.checks li { position: relative; padding-left: 24px; margin-bottom: 8px; color: var(--muted); font-size: 0.96rem; }
ul.checks li::before { content: ""; position: absolute; left: 0; top: 9px; width: 10px; height: 10px; border-radius: 2px; background: var(--accent); opacity: 0.85; }

/* ---------- Practice blocks ---------- */
.practice { display: grid; grid-template-columns: 340px 1fr; gap: 48px; padding: 48px 0; border-top: 1px solid var(--line); }
.practice:first-of-type { border-top: 0; }
.practice-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }

/* ---------- Stack diagram ---------- */
.stack-wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.layer {
  border-radius: 12px; padding: 20px 24px; border: 1px solid var(--line-strong);
  background: var(--panel); backdrop-filter: blur(10px); display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.layer strong { color: #fff; font-size: 1.02rem; }
.layer span { color: var(--dim); font-size: 0.85rem; text-align: right; }
.layer.l1 { margin: 0 64px; border-color: rgba(56, 189, 248, 0.55); background: linear-gradient(135deg, rgba(29, 78, 216, 0.30), rgba(15, 23, 42, 0.7)); }
.layer.l2 { margin: 0 42px; }
.layer.l3 { margin: 0 20px; }
.layer.l4 { margin: 0; border-color: rgba(56, 189, 248, 0.55); background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(15, 23, 42, 0.75)); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 30px 26px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
.step::before {
  counter-increment: step; content: "0" counter(step); display: block; font-size: 2.2rem; font-weight: 700; line-height: 1;
  margin-bottom: 18px; background: linear-gradient(135deg, var(--accent), var(--blue-2)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.step p { font-size: 0.95rem; }

/* ---------- Principles / quote ---------- */
.quote-block { border-left: 3px solid var(--accent); padding: 8px 0 8px 32px; max-width: 900px; margin-bottom: 56px; }
.quote-block p { font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.35; color: #fff; font-weight: 600; }

/* ---------- Split content ---------- */
.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: start; }
.split-img { border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: var(--panel); }
.prose p { font-size: 1.06rem; margin-bottom: 18px; }
.prose h3 { margin-top: 28px; }
.kv { border-top: 1px solid var(--line); padding: 18px 0; display: grid; grid-template-columns: 170px 1fr; gap: 20px; }
.kv strong { color: #fff; font-size: 0.95rem; }
.kv p { font-size: 0.97rem; }

/* ---------- Leadership ---------- */
.leader { display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start; }
.leader-mark {
  aspect-ratio: 1; border-radius: var(--radius); border: 1px solid var(--line-strong);
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.45), rgba(56, 189, 248, 0.2));
  display: flex; align-items: center; justify-content: center; font-size: 3.2rem; font-weight: 700; color: #fff;
}
.logo-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin-top: 28px; }
.logo-grid div { border: 1px solid var(--line); border-radius: 10px; padding: 18px; background: var(--panel); display: flex; align-items: center; justify-content: center; height: 86px; }
.logo-grid img { max-height: 40px; filter: grayscale(1) invert(1) brightness(1.5); opacity: 0.7; }

/* ---------- CTA band ---------- */
.cta-band {
  border-radius: 20px; padding: 64px; text-align: left; position: relative; overflow: hidden;
  background: linear-gradient(120deg, rgba(29, 78, 216, 0.55), rgba(15, 23, 42, 0.9) 60%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  display: grid; grid-template-columns: 1.4fr auto; gap: 40px; align-items: center;
}
.cta-band h2 { margin-bottom: 12px; }
.cta-band p { font-size: 1.08rem; max-width: 640px; }

/* ---------- Forms ---------- */
.contact-wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
.contact-form { padding: 34px; border-radius: var(--radius); background: var(--panel); backdrop-filter: blur(12px); border: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-row { margin-bottom: 18px; }
.form-row.full { grid-column: 1 / -1; }
.form-row label { display: block; font-size: 0.86rem; font-weight: 500; margin-bottom: 6px; color: var(--muted); }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05); color: #fff; font-family: inherit; font-size: 0.95rem;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2); }
.form-row select option { background: var(--bg-2); }
.sms-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.8rem; color: var(--dim); margin: 4px 0 20px; line-height: 1.45; }
.sms-consent input { margin-top: 3px; }
.form-hint { font-size: 0.8rem; color: var(--dim); margin-top: 14px; }
.contact-points { margin-top: 28px; }
.contact-points div { padding: 14px 0; border-top: 1px solid var(--line); }
.contact-points strong { display: block; color: #fff; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 2px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 72px 0 36px; background: rgba(8, 13, 26, 0.85); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 52px; }
.footer-grid h6 { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
.footer-grid a { display: block; color: var(--dim); font-size: 0.92rem; padding: 4px 0; }
.footer-grid a:hover { color: #fff; text-decoration: none; }
.footer-grid p { font-size: 0.92rem; color: var(--dim); margin-top: 16px; max-width: 320px; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 26px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; font-size: 0.85rem; color: var(--dim); }
.footer-bottom a { color: var(--dim); margin-left: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .grid-3, .grid-4, .steps { grid-template-columns: repeat(2, 1fr); }
  .stack-wrap, .split, .contact-wrap, .practice, .leader, .cta-band { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .logo-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .main-nav > a.hide-sm, .nav-drop { display: none; }
  .grid-2, .grid-3, .grid-4, .steps, .practice-list, .form-grid { grid-template-columns: 1fr; }
  section { padding: 72px 0; }
  .hero { padding: 96px 0 80px; }
  .cta-band { padding: 40px 28px; }
  .layer.l1, .layer.l2, .layer.l3 { margin: 0; }
  .kv { grid-template-columns: 1fr; gap: 4px; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Graphics ---------- */
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero-visual img { width: 100%; border-radius: 18px; border: 1px solid var(--line-strong); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6); }
.figure { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.figure img { width: 100%; }
.split-img img { width: 100%; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery img { width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.leader-photo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line-strong); }
@media (max-width: 1000px) { .hero-grid, .gallery { grid-template-columns: 1fr; } }
