/* ============================================================
   Xtreme Computer Solutions — shared styles
   ============================================================ */

:root {
  --bg: #18191b;
  --bg-alt: #1f2124;
  --surface: #26282b;
  --surface-2: #2d3034;
  --border: #393c41;
  --text: #ece9e4;
  --text-dim: #a4a7ac;
  --text-faint: #6f7277;
  --orange: #c85e1c; /* #ff7a29; */
  --orange-bright: #c85e1c; /* #ff9a52; */
  --orange-deep: #c85e1c;

  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; color: var(--text-dim); max-width: 62ch; }

.lede { font-size: 1.15rem; color: var(--text); }

/* ---------- focus & motion ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(24, 25, 27, 0.9);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.mark .bracket { color: var(--orange); }

nav.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 36px;
  margin: 0;
  padding: 0;
}

nav.primary-nav a {
  font-size: 0.95rem;
  color: var(--text-dim);
  padding-bottom: 6px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

nav.primary-nav a:hover { color: var(--text); }

nav.primary-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--orange);
}

.nav-toggle { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 3px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--orange);
  color: #1a1a1a;
}
.btn-primary:hover { background: var(--orange-bright); }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--orange); color: var(--orange-bright); }

/* ---------- hero ---------- */
.hero {
  padding: 88px 0 96px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero .tagline {
  display: inline-block;
  color: var(--orange-bright);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  margin-bottom: 22px;
}

.hero h1 { margin-bottom: 22px; }

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.circuit {
  width: 100%;
  height: auto;
}
.circuit .draw {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: draw 2.2s ease forwards 0.2s;
}
@keyframes draw {
  to { stroke-dashoffset: 0; }
}

/* ---------- sections ---------- */
section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}

.eyebrow {
  color: var(--orange);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-bottom: 10px;
  display: block;
}

/* asymmetric pillars */
.pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.pillar {
  background: var(--bg);
  padding: 40px;
}

.pillar h3 { margin-bottom: 14px; color: var(--text); }

.pillar ul {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.pillar li {
  padding: 9px 0;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.96rem;
  display: flex;
  gap: 10px;
}
.pillar li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: 8px;
  background: var(--orange);
  flex-shrink: 0;
}

/* reasons list */
.reasons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.reason h3 { margin-bottom: 8px; }
.reason .icon { margin-bottom: 16px; color: var(--orange); }

/* cta band */
.cta-band {
  border-top: 1px solid var(--border);
  padding: 64px 0;
  text-align: left;
}
.cta-band .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-band h2 { margin-bottom: 6px; }
.cta-band p { margin: 0; }

/* ---------- terminal panel (cyber page) ---------- */
.terminal {
  background: #101112;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}
.terminal-bar {
  display: flex;
  gap: 7px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.terminal-bar span {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--text-faint);
}
.terminal-body { padding: 22px 24px; color: #d7d5d0; }
.terminal-body .ok { color: #6fdc8c; }
.terminal-body .warn { color: var(--orange-bright); }
.terminal-body .line { margin-bottom: 6px; }
.terminal-body .prompt { color: var(--orange); }

/* process steps (genuinely sequential) */
.process {
  counter-reset: step;
  display: grid;
  gap: 0;
}
.step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
}
.step:last-child { border-bottom: 1px solid var(--border); }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  color: var(--orange);
  font-size: 1.1rem;
}

/* threat grid */
.threat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.threat {
  background: var(--bg);
  padding: 32px;
}
.threat h3 { margin-bottom: 10px; }

/* ---------- chat demo (AI page) ---------- */
.chat-demo {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.chat-demo-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
}
.chat-demo-bar span.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--orange);
}
.chat-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.msg {
  max-width: 78%;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--text);
}
.msg .role {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-bottom: 5px;
}
.msg.user {
  align-self: flex-end;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.msg.ai {
  align-self: flex-start;
  background: rgba(255, 122, 41, 0.08);
  border: 1px solid rgba(255, 122, 41, 0.28);
}

@media (max-width: 860px) {
  .msg { max-width: 90%; }
}

/* ---------- contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}
.contact-list li {
  padding: 18px 0;
  border-top: 1px solid var(--border);
}
.contact-list li:last-child { border-bottom: 1px solid var(--border); }
.contact-list .label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.contact-list .value {
  font-size: 1.1rem;
  color: var(--text);
}
.contact-list a.value:hover { color: var(--orange-bright); }

.form-field { margin-bottom: 20px; }
.form-field label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.98rem;
}
.form-field textarea { min-height: 120px; resize: vertical; }
.form-field select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23ff7a29' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.form-field select option { background: var(--surface); color: var(--text); }

/* Custom dropdown (built by the script on contact.html). The real <select>
   stays in the page, hidden, so the form value and no-JS fallback still work. */
.xselect { position: relative; }
.xselect-native {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  opacity: 0; pointer-events: none;
  overflow: hidden; clip: rect(0 0 0 0);
}
.xselect-button {
  width: 100%;
  text-align: left;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 12px 40px 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.98rem;
  line-height: 1.4;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23ff7a29' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.xselect-button:hover { border-color: #4a4d52; }
.xselect.open .xselect-button {
  border-color: var(--orange);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 7l5-5 5 5' fill='none' stroke='%23ff7a29' stroke-width='2'/%3E%3C/svg%3E");
}
.xselect-button.placeholder { color: var(--text-dim); }

.xselect-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0; right: 0;
  margin: 0; padding: 4px 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  max-height: 260px;
  overflow-y: auto;
}
.xselect-list:focus { outline: none; }
.xselect-list[hidden] { display: none; }
.xselect-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--text-dim);
  font-size: 0.96rem;
  cursor: pointer;
}
.xselect-option::before {
  content: "";
  width: 6px; height: 6px;
  flex-shrink: 0;
  background: transparent;
}
.xselect-option.active { background: var(--surface-2); color: var(--text); }
.xselect-option[aria-selected="true"] { color: var(--orange-bright); }
.xselect-option[aria-selected="true"]::before { background: var(--orange); }
.form-note {
  font-size: 0.85rem;
  color: var(--text-faint);
  margin-top: 14px;
}

/* ---------- footer ---------- */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
footer.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
footer.site-footer p { margin: 0; color: var(--text-faint); font-size: 0.88rem; }
footer.site-footer nav ul {
  list-style: none;
  display: flex;
  gap: 24px;
  padding: 0;
  margin: 0;
  font-size: 0.88rem;
}
footer.site-footer nav a { color: var(--text-faint); }
footer.site-footer nav a:hover { color: var(--orange-bright); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero .circuit { order: -1; max-width: 320px; margin: 0 auto; }
  .pillars, .threat-grid { grid-template-columns: 1fr; }
  .reasons { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  nav.primary-nav ul { gap: 20px; }
  .site-header .wrap { height: auto; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; gap: 14px; }
}

/* ---------- custom dropdown (replaces the native list, which can't be themed) ---------- */
.xselect { position: relative; }
.xselect-native {
  position: absolute !important;
  width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}
.xselect-button {
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 12px 40px 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.98rem;
  line-height: 1.4;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23ff7a29' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.xselect-button:hover { border-color: #4a4d52; }
.xselect-button[aria-expanded="true"] {
  border-color: var(--orange);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 7l5-5 5 5' fill='none' stroke='%23ff7a29' stroke-width='2'/%3E%3C/svg%3E");
}
.xselect-button.is-placeholder { color: var(--text-dim); }
.xselect-list {
  position: absolute;
  z-index: 30;
  left: 0; right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  max-height: 260px;
  overflow-y: auto;
}
.xselect-list:focus { outline: none; }
.xselect-list[hidden] { display: none; }
.xselect-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 2px;
  color: var(--text);
  font-size: 0.96rem;
  cursor: pointer;
}
.xselect-option::before {
  content: "";
  width: 6px; height: 6px;
  flex-shrink: 0;
  background: transparent;
}
.xselect-option.is-active { background: var(--surface-2); }
.xselect-option[aria-selected="true"] { color: var(--orange-bright); }
.xselect-option[aria-selected="true"]::before { background: var(--orange); }
