/* Aurexis Digital Systems - shared stylesheet
   Stack: plain CSS, CSS variables, view transitions, mobile-first
*/

@view-transition {
  navigation: auto;
}

/* View transition animations - subtle fade + slide */
::view-transition-group(root) {
  animation-duration: 380ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
::view-transition-old(root) {
  animation: 240ms ease both fade-out;
}
::view-transition-new(root) {
  animation: 380ms cubic-bezier(0.22,1,0.36,1) both fade-in,
             380ms cubic-bezier(0.22,1,0.36,1) both slide-up;
}
@keyframes fade-out { from { opacity:1 } to { opacity:0 } }
@keyframes fade-in { from { opacity:0 } to { opacity:1 } }
@keyframes slide-up { from { transform: translateY(10px) } to { transform: translateY(0) } }

/* Persistent chrome */
.site-header { view-transition-name: site-header; }
.site-footer { view-transition-name: site-footer; }
.main-shell { view-transition-name: main-shell; }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  html { scroll-behavior: auto !important; }
}

/* Design tokens */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #eef2f9;
  --surface-3: #e6ebf5;
  --text: #0a1020;
  --text-strong: #060b1a;
  --muted: #5b6783;
  --line: #d9deea;
  --line-strong: #c5cddf;
  --accent: #2348d1;
  --accent-2: #19d3f3;
  --accent-ink: #ffffff;
  --accent-soft: #e8ecff;
  --radius: 18px;
  --radius-sm: 10px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(10,16,32,.06), 0 4px 12px rgba(10,16,32,.04);
  --shadow-md: 0 8px 24px rgba(10,16,32,.08), 0 2px 8px rgba(10,16,32,.06);
  --max: 1200px;
  --header-h: 68px;
  --font-sans: "Inter", ui-sans-system, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #060a18;
    --surface: #0e1222;
    --surface-2: #171c32;
    --surface-3: #1e2542;
    --text: #e6eaf6;
    --text-strong: #f4f6ff;
    --muted: #94a0bf;
    --line: #1f2742;
    --line-strong: #2a355a;
    --accent: #5a7cff;
    --accent-2: #2ae2ff;
    --accent-soft: #1a2346;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.2);
    --shadow-md: 0 12px 32px rgba(0,0,0,.35);
  }
}

/* Reset / base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display:block; max-width:100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* Layout utils */
.container { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.grid { display:grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2,1fr); } .grid-3 { grid-template-columns: repeat(3,1fr);} }
@media (min-width: 980px) { .grid-4 { grid-template-columns: repeat(2,1fr);} }
@media (min-width: 1120px) { .grid-4 { grid-template-columns: repeat(4,1fr);} }

/* Header */
.site-header {
  position: sticky; top:0; z-index: 40;
  height: var(--header-h);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header-h);
  display:flex; align-items:center; justify-content:space-between; gap: 16px;
}
.brand {
  display:flex; align-items:center; gap: 12px; font-weight: 700; letter-spacing: -.02em;
}
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display:grid; place-items:center; color:white; font-weight:800; font-size:.9rem;
  box-shadow: var(--shadow-sm);
}
.brand-text { line-height: 1.1; }
.brand-text b { display:block; font-size: .98rem; letter-spacing: .02em; }
.brand-text span { display:block; font-family: var(--font-mono); font-size:.62rem; color: var(--muted); letter-spacing:.12em; text-transform: uppercase; font-weight:600; }

/* Logo variants */
.brand-logo {
  width: 120px; height: auto; display: block;
}
@media (prefers-color-scheme: dark) {
  .brand-logo { filter: invert(1) hue-rotate(180deg); }
}
.hero-logo {
  max-width: 280px; width: 100%; height: auto; display: block;
  margin: 0 auto 20px;
}
@media (min-width: 720px) { .hero-logo { max-width: 340px; } }
@media (min-width: 1000px) { .hero-logo { max-width: 400px; } }
.footer-logo {
  height: 32px; width: auto; display: block; margin-bottom: 12px;
}
.page-logo {
  height: 28px; width: auto; display: block; margin-bottom: 12px; opacity: .7;
}
.contact-logo {
  width: 48px; height: 48px; display: block; margin-bottom: 16px;
}

.nav-toggle { display:inline-grid; place-items:center; width:40px; height:40px; border-radius:10px; border:1px solid var(--line); background: var(--surface); cursor:pointer; }
.nav-toggle svg { width:18px; height:18px; }
@media (min-width: 900px) { .nav-toggle { display:none; } }

.nav-links {
  display:flex; gap: 6px; align-items:center; list-style:none; margin:0; padding:0;
}
.nav-links a {
  display:inline-flex; align-items:center; height:34px; padding:0 14px;
  border-radius: var(--radius-full);
  font-size:.9rem; font-weight:500; color: var(--muted);
  border:1px solid transparent; transition: all .18s ease;
}
.nav-links a:hover { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.nav-links a[aria-current="page"] {
  background: var(--text); color: var(--bg); border-color: var(--text);
  font-weight:600;
}
@media (prefers-color-scheme: dark) {
  .nav-links a[aria-current="page"] { background: var(--surface-2); color: var(--text-strong); border-color: var(--line-strong); }
}

.nav-cta a {
  background: var(--accent); color: var(--accent-ink) !important; border-color: var(--accent) !important;
}
.nav-cta a:hover { filter: brightness(1.08); transform: translateY(-1px); }

.mobile-panel {
  position: fixed; inset: var(--header-h) 0 0 0; background: var(--surface);
  border-top:1px solid var(--line); padding: 18px 16px 24px;
  display:none; flex-direction:column; gap: 8px; z-index:39;
}
.mobile-panel.open { display:flex; }
.mobile-panel a { padding:14px 14px; border-radius:12px; border:1px solid var(--line); background: var(--bg); font-weight:500; }
.mobile-panel a[aria-current="page"] { background: var(--text); color: var(--bg); }

/* Hero */
.hero {
  padding: clamp(42px, 8vw, 92px) 0 clamp(28px, 5vw, 48px);
  border-bottom:1px solid var(--line);
  background:
    radial-gradient(600px 400px at 85% 10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    radial-gradient(800px 600px at 10% 0%, color-mix(in srgb, var(--accent-2) 10%, transparent), transparent 60%);
}
.hero-kicker { display:flex; flex-wrap:wrap; gap: 8px; align-items:center; margin-bottom:16px; }
.pill {
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 12px; border-radius: var(--radius-full);
  background: var(--surface); border:1px solid var(--line);
  font-family: var(--font-mono); font-size:.7rem; letter-spacing:.08em; text-transform:uppercase; color: var(--muted);
}
.pill-dot { width:7px; height:7px; border-radius:50%; background: #16d19a; box-shadow:0 0 0 4px rgba(22,209,154,.18); }
.hero h1 {
  font-size: clamp(2.1rem, 5.2vw, 4.2rem);
  line-height: .95; letter-spacing:-.04em; font-weight:800; margin:0 0 14px;
  max-width: 14ch;
}
.hero h1 em { font-style:normal; background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip:text; background-clip:text; color:transparent; }
.hero-lead { font-size: clamp(1.05rem, 2vw, 1.22rem); color: var(--muted); max-width: 62ch; margin: 0 0 22px; }
.hero-actions { display:flex; flex-wrap:wrap; gap:12px; }
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  height:46px; padding:0 20px; border-radius: var(--radius-full);
  border:1px solid var(--line); background: var(--surface); font-weight:600; font-size:.95rem;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
  box-shadow: var(--shadow-sm); cursor:pointer; white-space:nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary:hover { background: var(--text-strong); }
@media (prefers-color-scheme: dark) { .btn-primary { background: var(--surface-2); color: var(--text); border-color: var(--line-strong);} .btn-primary:hover{ background: var(--surface-3);} }
.btn-accent { background: var(--accent); color:white; border-color: var(--accent); }
.btn-accent:hover { filter:brightness(1.06); }
.hero-meta { margin-top:26px; display:flex; flex-wrap:wrap; gap:18px; font-family:var(--font-mono); font-size:.78rem; color:var(--muted); }
.hero-meta b { color: var(--text); font-family: var(--font-sans); }

/* Sections */
.section { padding: clamp(36px, 6vw, 84px) 0; border-bottom:1px solid var(--line); }
.section-muted { background: var(--surface); }
.section-dark { background: var(--text); color: var(--bg); border-bottom-color: #ffffff14; }
@media (prefers-color-scheme: dark) { .section-dark { background: #0a0f21; color: var(--text); } }
.section-header { margin-bottom: 28px; max-width: 72ch; }
.section-header h2 { font-size: clamp(1.6rem, 3.2vw, 2.6rem); line-height:1.05; letter-spacing:-.03em; margin:6px 0 10px; }
.section-header p { color: var(--muted); font-size: 1.04rem; margin:0; }
.section-dark .section-header p { color: #a8b3cf; }

.card {
  background: var(--surface); border:1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm); transition: transform .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.card h3 { margin: 10px 0 8px; font-size:1.12rem; letter-spacing:-.02em; line-height:1.2; }
.card p { margin:0; color: var(--muted); font-size:.94rem; }
.card-icon {
  width:42px; height:42px; border-radius:12px; display:grid; place-items:center;
  background: var(--surface-2); border:1px solid var(--line); font-family: var(--font-mono); font-size:.8rem; font-weight:700;
}
.card ul { margin:12px 0 0; padding:0 0 0 18px; color: var(--muted); font-size:.9rem; }
.card ul li { margin:6px 0; }
.card ul li::marker { color: var(--accent); }

.badge {
  display:inline-flex; padding:4px 10px; border-radius:var(--radius-full);
  background: var(--accent-soft); color: var(--accent); border:1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  font-family:var(--font-mono); font-size:.68rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
}

/* Timeline / steps */
.steps { display:grid; gap:14px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(5,1fr);} }
.step { position:relative; background: var(--surface); border:1px solid var(--line); border-radius: var(--radius); padding:18px; }
.step b { font-family: var(--font-mono); font-size:.74rem; letter-spacing:.12em; text-transform:uppercase; color: var(--accent); }
.step h4 { margin:8px 0 6px; font-size:1rem; }
.step p { margin:0; color: var(--muted); font-size:.9rem; }
.step::after { content:"→"; position:absolute; right:-12px; top:50%; transform:translateY(-50%); width:24px; height:24px; display:grid; place-items:center; background: var(--surface); border:1px solid var(--line); border-radius:50%; font-size:.8rem; color:var(--muted); z-index:1; }
@media (max-width: 759px) { .step::after { display:none; } }
.steps .step:last-child::after { display:none; }

/* Approach list */
.approach-grid { display:grid; gap:16px; grid-template-columns:1fr; }
@media (min-width:860px){ .approach-grid{ grid-template-columns: repeat(2,1fr);} }
.approach-item { display:flex; gap:14px; padding:18px; background: var(--surface); border:1px solid var(--line); border-radius: var(--radius); }
.approach-num { width:36px; height:36px; flex:0 0 36px; border-radius:50%; display:grid; place-items:center; background: var(--text); color: var(--bg); font-family: var(--font-mono); font-size:.8rem; font-weight:700; }
@media (prefers-color-scheme: dark){ .approach-num{ background: var(--surface-2); color: var(--text); border:1px solid var(--line-strong);} }

/* Lists */
.list-check { list-style:none; padding:0; margin:0; display:grid; gap:10px; }
.list-check li { display:flex; gap:10px; align-items:flex-start; font-size:.94rem; color: var(--muted); }
.list-check li::before { content:"✓"; flex:0 0 22px; width:22px; height:22px; display:grid; place-items:center; background: var(--accent-soft); border:1px solid color-mix(in srgb, var(--accent) 18%, transparent); border-radius:50%; color: var(--accent); font-weight:800; font-size:.75rem; margin-top:2px; }

/* CTA */
.cta {
  background: linear-gradient(105deg, var(--text) 0%, #1a2350 55%, var(--accent) 100%);
  color: white; border-radius: calc(var(--radius) * 1.3);
  padding: clamp(28px, 5vw, 48px); position:relative; overflow:hidden; isolation:isolate;
}
@media (prefers-color-scheme: dark){ .cta{ background: linear-gradient(105deg, #0e142a 0%, #16205a 60%, #2348d1 100%); } }
.cta::before{
  content:""; position:absolute; inset:-40% -20% auto auto; width:60%; height:180%;
  background: radial-gradient(closest-side, rgba(42,226,255,.22), transparent 70%); z-index:-1;
}
.cta h2{ font-size: clamp(1.8rem, 3.4vw, 2.8rem); line-height:1; letter-spacing:-.03em; margin:0 0 12px; max-width:14ch; }
.cta p{ color:#c2cae6; max-width:52ch; margin:0 0 18px; }
.cta .btn{ background:white; color:#0a1020; border-color:white; }
.cta .btn:hover{ background:#f1f5ff; }

/* Contact */
.contact-grid { display:grid; gap:20px; grid-template-columns:1fr; }
@media (min-width:900px){ .contact-grid{ grid-template-columns: 1.1fr .9fr; } }
.form { display:grid; gap:14px; }
.input, .textarea {
  width:100%; padding:13px 14px; border-radius:12px; border:1px solid var(--line);
  background: var(--surface); color: var(--text); font:inherit; font-size:.95rem;
}
.textarea { min-height:120px; resize: vertical; }
.input:focus, .textarea:focus { outline:2px solid var(--accent); outline-offset:0; border-color: var(--accent); }
.form label { font-size:.84rem; font-weight:600; color: var(--muted); display:grid; gap:6px; }

/* Footer */
.site-footer { border-top:1px solid var(--line); background: var(--surface); padding: 28px 0 32px; }
.footer-grid { display:grid; gap:28px; grid-template-columns: 1fr; }
@media (min-width:800px){ .footer-grid{ grid-template-columns: 1.4fr .8fr .8fr; } }
.footer-brand p{ color: var(--muted); max-width:36ch; font-size:.92rem; margin:10px 0 0; }
.footer-col h5{ margin:0 0 12px; font-size:.82rem; letter-spacing:.12em; text-transform:uppercase; color: var(--muted); font-family: var(--font-mono); }
.footer-col ul{ list-style:none; padding:0; margin:0; display:grid; gap:8px; }
.footer-col a{ color: var(--muted); font-size:.92rem; }
.footer-col a:hover{ color: var(--text); }
.footer-bottom { margin-top:28px; padding-top:18px; border-top:1px solid var(--line); display:flex; flex-wrap:wrap; gap:10px; justify-content:space-between; font-size:.84rem; color: var(--muted); }

/* Divider */
.hr { height:1px; background: var(--line); border:0; margin: 0; }

/* Utilities */
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
