/* ============================================================
   ARKERION — Design System
   ============================================================ */

/* --- Custom Font --- */
@font-face {
  font-family: 'Designer';
  src: url('../fonts/DESIGNER.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --- Tokens --- */
:root {
  --bg:      #08090c;
  --s1:      #0e1017;
  --s2:      #161820;
  --s3:      #22242e;
  --border:  rgba(255,255,255,.06);
  --border2: rgba(255,255,255,.10);
  --accent:  #f0a030;
  --accent-dim: rgba(240,160,48,.10);
  --accent2: #2090c0;
  --coral:   #e04050;
  --violet:  #604080;
  --green:   #22c55e;
  --red:     #e04050;
  --grad:    linear-gradient(110deg, #f0b030 0%, #e04050 30%, #2090c0 65%, #604080 100%);
  --muted:   #3a3d52;
  --dim:     #6b7094;
  --text:    #9ba3c4;
  --light:   #d0d4e4;
  --white:   #eceef8;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
html { scroll-behavior: smooth }
body {
  background: var(--bg);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent2); color: #fff }
a { color: inherit; text-decoration: none }
img { max-width: 100%; display: block }
button { font-family: inherit }

/* --- Layout --- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px }
.sec { padding: 120px 0 }
.sec-alt { background: var(--s1) }

/* --- Typography --- */
.h1, .h2, .h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--white);
  line-height: 1.05;
  letter-spacing: -.02em;
}
.h1 { font-size: clamp(40px, 5.5vw, 72px) }
.h2 { font-size: clamp(30px, 3.5vw, 48px) }
.h3 { font-size: 20px; letter-spacing: -.01em }

.label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.label::before { content: ''; width: 20px; height: 1px; background: var(--accent) }

.desc { font-size: 16px; line-height: 1.8; color: var(--text); max-width: 560px; margin-top: 20px }
.desc strong { color: var(--light); font-weight: 500 }
.accent { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text }

/* --- Nav --- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  height: 64px;
  border-bottom: 1px solid var(--border);
  background: rgba(8,9,12,.82);
  backdrop-filter: blur(16px) saturate(1.3);
}
.nav-inner { max-width: 1120px; margin: 0 auto; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; height: 100% }
.nav-logo { display: flex; align-items: center; gap: 10px }
.nav-logo img { height: 28px }
.nav-logo-text { font-family: 'Designer', 'Space Grotesk', sans-serif; font-size: 18px; letter-spacing: .08em; color: var(--white); line-height: 1 }
.nav-links { display: flex; gap: 32px; list-style: none }
.nav-links a { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); transition: color .2s }
.nav-links a:hover, .nav-links a.active { color: var(--white) }
.nav-cta { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--bg); background: var(--accent); padding: 8px 20px; border: none; transition: background .2s; display: inline-block; font-weight: 600 }
.nav-cta:hover { background: #d88a20 }
.menu-btn { display: none; background: none; border: 1px solid var(--border2); color: var(--dim); font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; padding: 8px 16px; cursor: pointer }

/* --- Buttons --- */
.btn { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 10px; padding: 14px 32px; border: 1px solid var(--border2); color: var(--white); background: transparent; position: relative; overflow: hidden; transition: border-color .25s, color .25s, background .25s; cursor: pointer }
.btn:hover { border-color: var(--accent); background: var(--accent); color: var(--bg) }
.btn svg { transition: transform .2s }
.btn:hover svg { transform: translateX(3px) }
.btn-primary { border-color: var(--accent); background: var(--accent); color: var(--bg); font-weight: 600 }
.btn-primary:hover { background: #d88a20; border-color: #d88a20 }
.btn-ghost { border: none; padding: 14px 0; color: var(--dim); border-bottom: 1px solid transparent }
.btn-ghost:hover { color: var(--white); background: none; border-color: var(--white) }
.arrow { width: 14px; height: 14px; flex-shrink: 0 }

/* --- Hero --- */
.hero { min-height: 100vh; display: flex; align-items: center; padding: 140px 0 100px; position: relative; overflow: hidden }

.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center }
.hero-eyebrow { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 500; letter-spacing: .15em; text-transform: uppercase; color: var(--accent); margin-bottom: 24px; display: flex; align-items: center; gap: 12px }
.hero-eyebrow::before { content: ''; width: 32px; height: 1px; background: var(--accent) }
.hero-title { margin-bottom: 24px }
.hero-desc { font-size: 17px; line-height: 1.8; color: var(--text); max-width: 480px; margin-bottom: 40px }
.hero-desc strong { color: var(--light); font-weight: 500 }
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap }
.hero-visual { position: relative; background: var(--s1); border: 1px solid var(--border); padding: 32px; overflow: hidden }
.hero-visual::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--grad) }

/* --- Hero Schema Animation --- */
.hv-schema { width: 100%; height: auto }
.hv-blink { animation: hvBlink 2s ease-in-out infinite }
.hv-blink2 { animation: hvBlink 2.5s ease-in-out infinite .5s }
@keyframes hvBlink { 0%,100% { opacity: 1 } 50% { opacity: .3 } }
.hv-pulse1 { animation: hvFlow 2.5s ease-in-out infinite }
.hv-pulse1b { animation: hvFlow 2.5s ease-in-out infinite .8s }
.hv-pulse2 { animation: hvFlow 2.5s ease-in-out infinite .3s }
.hv-pulse2b { animation: hvFlow 2.5s ease-in-out infinite 1.1s }
.hv-pulse3 { animation: hvFlowV 2.5s ease-in-out infinite .6s }
.hv-pulse3b { animation: hvFlowV 2.5s ease-in-out infinite 1.4s }
@keyframes hvFlow { 0% { opacity: 1; transform: translateX(-10px) } 50% { opacity: .6 } 100% { opacity: 0; transform: translateX(10px) } }
@keyframes hvFlowV { 0% { opacity: 1; transform: translateY(-8px) } 50% { opacity: .6 } 100% { opacity: 0; transform: translateY(8px) } }
.hv-bar1 { animation: hvBar 3s ease-in-out infinite }
.hv-bar2 { animation: hvBar 3.5s ease-in-out infinite .5s }
.hv-bar3 { animation: hvBar 4s ease-in-out infinite 1s }
@keyframes hvBar { 0%,100% { width: 52px } 50% { width: 70px } }
.hv-chart1,.hv-chart2,.hv-chart3,.hv-chart4,.hv-chart5 { animation: hvChart 3s ease-in-out infinite }
.hv-chart2 { animation-delay: .2s } .hv-chart3 { animation-delay: .4s } .hv-chart4 { animation-duration: 2s } .hv-chart5 { animation-delay: .6s }
@keyframes hvChart { 0%,100% { opacity: .7 } 50% { opacity: 1 } }
.hv-line-anim { stroke-dasharray: 200; stroke-dashoffset: 200; animation: hvDraw 3s ease-in-out infinite }
@keyframes hvDraw { 0% { stroke-dashoffset: 200 } 50% { stroke-dashoffset: 0 } 100% { stroke-dashoffset: -200 } }

/* --- Sectors bar --- */
.sectors { display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--border) }
.sectors a { flex: none; padding: 24px 44px; border-right: 1px solid var(--border); font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); transition: color .2s, background .2s }
.sectors a:last-child { border-right: none }
.sectors a:hover { color: var(--white); background: var(--s1) }

/* --- Stat bar --- */
.stat-bar { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); display: grid; grid-template-columns: repeat(4, 1fr); background: var(--border); gap: 1px }
.stat { background: var(--s1); padding: 36px 32px; text-align: center }
.stat-val { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 36px; color: var(--white); letter-spacing: -.02em; line-height: 1 }
.stat-val span { color: var(--accent) }
.stat-label { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-top: 10px }

/* --- Pillar cards --- */
.pillars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border); margin-top: 48px }
.pillar { background: var(--bg); padding: 48px 40px; position: relative; transition: background .25s }
.pillar:hover { background: var(--s2) }
.pillar::before { content: ''; position: absolute; top: 0; left: 0; width: 2px; height: 0; background: var(--grad); transition: height .4s cubic-bezier(.16,1,.3,1) }
.pillar:hover::before { height: 100% }
.pillar-num { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 56px; color: var(--muted); line-height: 1; margin-bottom: 20px; opacity: .35; transition: opacity .25s, color .25s }
.pillar:hover .pillar-num { opacity: .7; color: var(--accent) }
.pillar-title { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 17px; color: var(--white); letter-spacing: -.01em; margin-bottom: 12px; text-transform: uppercase }
.pillar-text { font-size: 14px; line-height: 1.8; color: var(--text) }

/* --- Before / After --- */
.ba-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); margin-top: 48px }
.ba-col { background: var(--bg); padding: 48px 40px }
.ba-col.after { background: var(--s1) }
.ba-tag { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; padding: 4px 12px; display: inline-block; margin-bottom: 24px }
.ba-tag.before-tag { color: var(--red); border: 1px solid rgba(224,64,80,.25) }
.ba-tag.after-tag { color: var(--green); border: 1px solid rgba(34,197,94,.25) }
.ba-list { list-style: none }
.ba-list li { font-size: 14px; line-height: 1.8; padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; gap: 12px }
.ba-list li:last-child { border-bottom: none }
.ba-icon { flex-shrink: 0; width: 18px; height: 18px; margin-top: 3px }

/* --- Tech stack --- */
.stack-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); margin-top: 48px }
.stack-group { background: var(--bg); padding: 36px 32px }
.stack-cat { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px }
.stack-list { list-style: none; display: flex; flex-direction: column; gap: 8px }
.stack-list li { font-size: 13px; color: var(--light); font-weight: 400 }

/* --- Blog cards --- */
.blog-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 48px }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border) }
.bc { background: var(--s1); padding: 40px 32px; display: flex; flex-direction: column; position: relative; transition: background .25s }
.bc:hover { background: var(--s2) }
.bc::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .4s cubic-bezier(.16,1,.3,1) }
.bc:hover::after { transform: scaleX(1) }
.bc-tag { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px }
.bc-title { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 18px; color: var(--white); line-height: 1.3; margin-bottom: 12px; transition: color .2s }
.bc:hover .bc-title { color: var(--accent) }
.bc-excerpt { font-size: 13px; line-height: 1.8; color: var(--text); margin-bottom: 32px; flex: 1 }
.bc-read { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); display: flex; align-items: center; gap: 8px }
.bc-read::before { content: '\2192'; color: var(--accent) }

/* --- CTA section --- */
.cta-sec { padding: 100px 0; text-align: center; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border) }
.cta-sec .h2 { margin-bottom: 16px }
.cta-sec .desc { margin: 0 auto 40px; text-align: center }

/* --- Contact --- */
.ct-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 80px; align-items: start }
.ct-block { padding: 20px 0; border-bottom: 1px solid var(--border) }
.ct-block:first-child { padding-top: 0 }
.ct-key { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px }
.ct-val { font-size: 15px; color: var(--white); line-height: 1.7 }
.fr { margin-bottom: 16px }
.fr label { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 8px }
.fr input, .fr textarea, .fr select { width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--white); font-family: 'Inter', sans-serif; font-size: 14px; padding: 14px 18px; outline: none; transition: border-color .2s; appearance: none }
.fr input:focus, .fr textarea:focus, .fr select:focus { border-color: rgba(240,160,48,.3) }
.fr textarea { height: 110px; resize: vertical }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px }

/* --- Toast notification --- */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(20px);
  padding: 16px 32px;
  font-family: 'IBM Plex Mono', monospace; font-size: 12px; font-weight: 500; letter-spacing: .04em;
  border: 1px solid var(--border2);
  background: var(--s1);
  color: var(--white);
  z-index: 100;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  max-width: 90vw;
  text-align: center;
}
.toast-show { opacity: 1; transform: translateX(-50%) translateY(0) }
.toast-success { border-color: rgba(34,197,94,.4); color: var(--green) }
.toast-error { border-color: rgba(224,64,80,.4); color: var(--red) }

/* --- Footer --- */
footer { padding: 40px 0; border-top: 1px solid var(--border) }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 0 32px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 40px }
.fl { display: flex; align-items: center; gap: 10px }
.fl img { height: 20px }
.fl-text { font-family: 'Designer', 'Space Grotesk', sans-serif; font-size: 14px; letter-spacing: .08em; color: var(--white); line-height: 1 }
.fk { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .04em; color: var(--muted); line-height: 1.8 }
.fc { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap }
.fc a { color: var(--dim); transition: color .2s }
.fc a:hover { color: var(--white) }

/* --- Article --- */
.article-hero { padding: 160px 0 60px; text-align: center }
.article-body { padding: 0 0 120px }
.article-content { max-width: 680px; margin: 0 auto; font-size: 16px; line-height: 2; color: var(--text) }
.article-content h2 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 24px; color: var(--white); margin: 48px 0 16px; letter-spacing: -.01em }
.article-content h3 { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 18px; color: var(--white); margin: 36px 0 12px }
.article-content p { margin-bottom: 20px }
.article-content strong { color: var(--light); font-weight: 500 }
.article-content ul, .article-content ol { margin: 16px 0 20px 24px }
.article-content li { margin-bottom: 8px; line-height: 1.8 }
.article-back { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px; transition: color .2s }
.article-back:hover { color: var(--white) }
.article-date { font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px }
.page-hero { padding: 140px 0 60px; text-align: center }
.page-hero .label { justify-content: center }
.page-hero .desc { margin: 20px auto 0; text-align: center }

/* --- Reveal animation --- */
/* Everything visible by default. JS adds .rv-on to body, then animations work. */
.rv { opacity: 1; transform: none }
.rv-on .rv { opacity: 0; transform: translateY(20px); transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1) }
.rv-on .rv.vis { opacity: 1; transform: none }
.rv-on .rvd { transition-delay: .1s }

/* --- Responsive --- */
@media (max-width: 960px) {
  .nav-links { display: none }
  .nav-cta-desk { display: none }
  .menu-btn { display: block }
  .hero { padding: 120px 0 80px; min-height: auto }
  .hero-grid { grid-template-columns: 1fr; gap: 48px }
  .hero-visual { display: none }
  .stat-bar { grid-template-columns: 1fr 1fr }
  .sectors { flex-wrap: wrap }
  .sectors a { flex: 1 1 50%; text-align: center; border-bottom: 1px solid var(--border) }
  .pillars { grid-template-columns: 1fr }
  .ba-grid { grid-template-columns: 1fr }
  .stack-grid { grid-template-columns: 1fr 1fr }
  .blog-header { flex-direction: column; align-items: flex-start; gap: 16px }
  .blog-grid { grid-template-columns: 1fr }
  .ct-grid { grid-template-columns: 1fr; gap: 40px }
  .f2 { grid-template-columns: 1fr }
  .footer-inner { grid-template-columns: 1fr; gap: 16px }
}
@media (max-width: 600px) {
  .stat-bar { grid-template-columns: 1fr }
  .stack-grid { grid-template-columns: 1fr }
  .wrap { padding: 0 20px }
  .sec { padding: 80px 0 }
}
