/* ---------------------------------------------------------
   Shahmat Industries — tokens
--------------------------------------------------------- */
:root {
  /* type */
  --font-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SF Mono', Consolas, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.125rem;
  --text-lg: 1.375rem;
  --text-xl: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
  --text-2xl: clamp(2.25rem, 1.6rem + 3vw, 3.5rem);
  --text-3xl: clamp(2.75rem, 1.8rem + 4.5vw, 4.75rem);

  /* space — 4px base */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 128px;

  --radius: 3px;
  --radius-sm: 2px;

  --container: 1160px;
  --gutter: var(--sp-5);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 150ms;
  --dur: 320ms;
  --dur-slow: 500ms;

  /* dark theme (only theme) */
  --bg: #1A1917;
  --bg-raised: #221F1B;
  --bg-sunken: #141312;
  --text: #ECE8DF;
  --text-muted: #A6A194;
  --border: #38352E;
  --border-strong: #4C473D;
  --accent: #FB923C;
  --accent-ink: #1A1917;
  --accent-soft: rgba(251, 146, 60, 0.12);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* ---------------------------------------------------------
   Reset
--------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, figure, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
textarea { font: inherit; color: inherit; }

html {
  background: var(--bg);
  color-scheme: dark;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

h2 { font-size: var(--text-2xl); max-width: 16ch; }
h3 { font-size: var(--text-md); letter-spacing: -0.01em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: var(--sp-2) var(--sp-4);
  z-index: 200;
}
.skip-link:focus { left: var(--sp-4); top: var(--sp-4); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------------------------------------------------------
   Logo
--------------------------------------------------------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
}
.logo-mark { width: 30px; height: auto; flex-shrink: 0; }
.logo-mark__ghost { fill: none; stroke: var(--border-strong); stroke-width: 1; }
.logo-mark__origin { fill: none; stroke: var(--text); stroke-width: 1.4; }
.logo-mark__dest { fill: var(--accent); }
.logo-mark__path { stroke: var(--accent); stroke-width: 1; }

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.logo-text small {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

/* ---------------------------------------------------------
   Header
--------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: var(--sp-5);
}

.nav { display: none; }
.nav ul { display: flex; gap: var(--sp-6); }
.nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: var(--sp-1) 0;
  transition: color var(--dur-fast) var(--ease);
}
.nav a:hover { color: var(--text); }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.nav a:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: var(--sp-3); }

.header-actions .nav-cta { display: none; }

.nav-toggle {
  width: 36px; height: 36px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  width: 20px; height: 1.5px;
  background: var(--text);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* mobile drawer */
@media (max-width: 1023px) {
  .nav {
    display: block;
    position: fixed;
    inset: 72px 0 0 0;
    background: var(--bg);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
    overflow-y: auto;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav ul { flex-direction: column; gap: 0; padding: var(--sp-5) var(--gutter); }
  .nav li { border-bottom: 1px solid var(--border); }
  .nav a { display: block; padding: var(--sp-5) 0; font-size: var(--text-md); }
  .nav a::after { display: none; }
}

@media (min-width: 1024px) {
  .nav { display: block; }
  .header-actions .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
}

/* ---------------------------------------------------------
   Buttons
--------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius);
  border: 1px solid transparent;
  min-height: 44px;
  transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { transform: translateY(-1px); }
.btn--ghost { border-color: var(--border-strong); color: var(--text); }
.btn--ghost:hover { border-color: var(--text); }
.btn--sm { padding: var(--sp-2) var(--sp-4); min-height: 36px; }
.btn--lg { padding: var(--sp-4) var(--sp-6); font-size: var(--text-base); }

/* ---------------------------------------------------------
   Section scaffolding
--------------------------------------------------------- */
section { padding: var(--sp-9) 0; border-bottom: 1px solid var(--border); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 500;
}
.move-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.02em;
  display: none;
}
@media (min-width: 640px) { .move-tag { display: inline; } }

.section-intro {
  color: var(--text-muted);
  font-size: var(--text-md);
  max-width: 48ch;
  margin-top: var(--sp-4);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ---------------------------------------------------------
   Hero
--------------------------------------------------------- */
.hero { position: relative; padding-top: var(--sp-8); overflow: hidden; }
.hero .container { position: relative; z-index: 1; }

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.4;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  pointer-events: none;
}

.hero__title {
  font-size: var(--text-3xl);
  max-width: 14ch;
  margin-top: var(--sp-4);
}
.hero__sub {
  font-size: var(--text-md);
  color: var(--text-muted);
  max-width: 46ch;
  margin-top: var(--sp-5);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
  margin-top: var(--sp-9);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border);
}
.stat__value {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--text);
}
.stat__label {
  display: block;
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--sp-2);
  max-width: 18ch;
}

/* ---------------------------------------------------------
   Product / demo
--------------------------------------------------------- */
h2 { margin-top: var(--sp-2); }

.product-grid {
  display: grid;
  gap: var(--sp-6);
  margin-top: var(--sp-7);
}
@media (min-width: 1024px) {
  .product-grid { grid-template-columns: 1.3fr 1fr; align-items: start; }
}

.demo-panel {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-5);
}
.demo-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.demo-panel__head h3 { font-size: var(--text-base); }
.demo-panel__live {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-soft);
  animation: pulse 2.4s var(--ease) infinite;
}

.demo-label {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
}
.demo-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--sp-4);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text);
  resize: vertical;
  transition: border-color var(--dur-fast) var(--ease);
}
.demo-input:focus { border-color: var(--accent); outline: none; }

.demo-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
  margin-top: var(--sp-5);
}
@media (min-width: 480px) {
  .demo-stats { grid-template-columns: repeat(4, 1fr); }
}
.demo-stat {
  border-top: 1px solid var(--border);
  padding-top: var(--sp-3);
}
.demo-stat__value {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 500;
}
.demo-stat--accent .demo-stat__value { color: var(--accent); }
.demo-stat__label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: var(--sp-1);
}

.demo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: var(--sp-5);
  line-height: 1.9;
}
.demo-chips .chip {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  padding: 1px 4px;
  border-radius: 2px;
  white-space: pre;
}
.demo-caption {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--sp-4);
}

.feature-list { display: flex; flex-direction: column; gap: var(--sp-5); }
.feature-list li { display: flex; gap: var(--sp-4); padding-bottom: var(--sp-5); border-bottom: 1px solid var(--border); }
.feature-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.feature-list__num {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--accent);
  flex-shrink: 0;
  padding-top: 2px;
}
.feature-list h3 { margin-bottom: var(--sp-1); }
.feature-list p { color: var(--text-muted); font-size: var(--text-sm); }

.product-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
  margin-top: var(--sp-7);
}
.product-cta__note { font-size: var(--text-sm); color: var(--text-muted); }

/* ---------------------------------------------------------
   Services
--------------------------------------------------------- */
.services-grid {
  display: grid;
  gap: var(--sp-5);
  margin-top: var(--sp-7);
}
@media (min-width: 768px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
}
.service-card {
  padding: var(--sp-6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
}
.service-card h3 { font-size: var(--text-lg); margin-bottom: var(--sp-3); }
.service-card > p { color: var(--text-muted); margin-bottom: var(--sp-5); }
.service-card ul { display: flex; flex-direction: column; gap: var(--sp-3); }
.service-card li {
  font-size: var(--text-sm);
  padding-left: var(--sp-5);
  position: relative;
}
.service-card li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.5em;
  width: 7px; height: 7px;
  background: var(--accent);
}

.tag-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-6);
}
.tag-strip li {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--sp-2) var(--sp-3);
}

/* ---------------------------------------------------------
   Approach
--------------------------------------------------------- */
.steps {
  display: grid;
  gap: var(--sp-6);
  margin-top: var(--sp-7);
  counter-reset: step;
}
@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}
.step { border-top: 2px solid var(--text); padding-top: var(--sp-4); }
.step__num {
  display: block;
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: var(--text-sm);
  margin-bottom: var(--sp-3);
}
.step h3 { margin-bottom: var(--sp-2); }
.step p { color: var(--text-muted); font-size: var(--text-sm); max-width: 32ch; }

.principles {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-5) var(--sp-7);
  margin-top: var(--sp-8);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border);
}
.principles li {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* ---------------------------------------------------------
   CTA / contact
--------------------------------------------------------- */
.cta { border-bottom: 0; }
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-5);
  margin-top: var(--sp-7);
}
.cta-row__note { font-size: var(--text-sm); color: var(--text-muted); }

/* ---------------------------------------------------------
   Footer
--------------------------------------------------------- */
.site-footer { background: var(--bg-sunken); padding: var(--sp-8) 0 var(--sp-6); }
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-bottom: var(--sp-7);
  border-bottom: 1px solid var(--border);
}
.footer-tagline {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 600;
}
.footer-tagline .mate { color: var(--accent); }

.footer-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-6);
  padding: var(--sp-7) 0;
}
@media (min-width: 640px) {
  .footer-columns { grid-template-columns: repeat(2, minmax(160px, max-content)); gap: var(--sp-9); max-width: none; }
}
.footer-col h3 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--sp-4);
}
.footer-col ul { display: flex; flex-direction: column; gap: var(--sp-3); }
.footer-col a { font-size: var(--text-sm); transition: color var(--dur-fast) var(--ease); }
.footer-col a:hover { color: var(--accent); }
.footer-col li { font-size: var(--text-sm); color: var(--text-muted); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border);
}

/* ---------------------------------------------------------
   Motion
--------------------------------------------------------- */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--accent-soft); }
  70% { box-shadow: 0 0 0 6px var(--accent-soft); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------
   Breakpoint refinements
--------------------------------------------------------- */
@media (min-width: 640px) {
  :root { --gutter: var(--sp-7); }
}
@media (min-width: 1024px) {
  :root { --gutter: var(--sp-8); }
  .stat-row { grid-template-columns: repeat(3, auto); justify-content: start; gap: var(--sp-9); }
}
