/* =========================================================
   Xron Technologies — stylesheet
   Plain CSS, no build step. Custom properties drive theming.
   ========================================================= */

:root {
  /* Brand */
  --accent:        #4f7cff;
  --accent-2:      #16d1c9;
  --accent-soft:   rgba(79, 124, 255, 0.14);

  /* Dark theme (default) */
  --bg:            #0b0f19;
  --bg-alt:        #0f1524;
  --surface:       #131a2b;
  --surface-2:     #18203400;
  --border:        rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text:          #eef1f7;
  --text-muted:    #9aa5bd;
  --text-dim:      #6f7a92;

  /* Type scale — fluid */
  --h1: clamp(2.4rem, 1.2rem + 4.6vw, 4.4rem);
  --h2: clamp(1.75rem, 1.1rem + 2.2vw, 2.7rem);
  --h3: 1.125rem;

  --maxw: 1140px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:            #ffffff;
    --bg-alt:        #f6f8fc;
    --surface:       #ffffff;
    --border:        rgba(12, 20, 40, 0.11);
    --border-strong: rgba(12, 20, 40, 0.2);
    --text:          #101728;
    --text-muted:    #55607a;
    --text-dim:      #7b8499;
    --accent-soft:   rgba(79, 124, 255, 0.1);
    --shadow: 0 18px 46px rgba(16, 24, 48, 0.1);
    color-scheme: light;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, "SF Pro Text", "Segoe UI", Inter,
               Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  line-height: 1.15;
  letter-spacing: -0.022em;
  margin: 0 0 0.6em;
  font-weight: 650;
}
h1 { font-size: var(--h1); letter-spacing: -0.035em; font-weight: 700; }
h2 { font-size: var(--h2); letter-spacing: -0.028em; }
h3 { font-size: var(--h3); font-weight: 620; }
p  { margin: 0 0 1rem; }

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

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.7rem 1.1rem;
  z-index: 200;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.82rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 580;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), background 0.18s, border-color 0.18s,
              box-shadow 0.18s, opacity 0.18s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6f5cff);
  color: #fff;
  box-shadow: 0 8px 24px rgba(79, 124, 255, 0.3);
}
.btn-primary:hover { box-shadow: 0 12px 30px rgba(79, 124, 255, 0.42); }

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

.btn-sm { padding: 0.55rem 1.15rem; font-size: 0.875rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; pointer-events: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, background 0.25s;
}
.site-header.scrolled { border-bottom-color: var(--border); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 1rem;
}

.brand { display: inline-flex; align-items: center; gap: 0.55rem; }
.brand-mark { width: 26px; height: 26px; color: var(--accent); flex: none; }
.brand-name {
  font-weight: 720;
  letter-spacing: 0.06em;
  font-size: 1.06rem;
}
.brand-dot { color: var(--accent); }

.nav { display: flex; align-items: center; gap: 1.9rem; }
.nav > a:not(.btn) {
  font-size: 0.925rem;
  color: var(--text-muted);
  position: relative;
  transition: color 0.18s;
}
.nav > a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -5px;
  width: 100%; height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.28s var(--ease);
}
.nav > a:not(.btn):hover { color: var(--text); }
.nav > a:not(.btn):hover::after { transform: scaleX(1); transform-origin: left; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  padding: 0;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 1.8px;
  margin-inline: auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.28s var(--ease), opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.8px) 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.8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(4.5rem, 11vw, 9rem) 0 clamp(3.5rem, 8vw, 6rem);
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -28%;
  left: 50%;
  width: min(1000px, 130vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 38% 42%, var(--accent-soft), transparent 58%),
    radial-gradient(circle at 66% 38%, rgba(22, 209, 201, 0.11), transparent 55%);
  pointer-events: none;
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; max-width: 860px; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 620;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.grad {
  background: linear-gradient(100deg, var(--accent) 5%, var(--accent-2) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: clamp(1.03rem, 0.9rem + 0.5vw, 1.22rem);
  color: var(--text-muted);
  max-width: 62ch;
  margin-bottom: 2.2rem;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-bottom: 3.6rem; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding-top: 2.2rem;
  border-top: 1px solid var(--border);
  max-width: 620px;
}
.stat dt {
  font-size: 0.83rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  margin-bottom: 0.28rem;
}
.stat dd {
  margin: 0;
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.8rem, 8vw, 7rem) 0; }
.section-alt { background: var(--bg-alt); }

.section-head { max-width: 700px; margin: 0 auto clamp(2.4rem, 5vw, 3.6rem); text-align: center; }
.section-sub { color: var(--text-muted); margin-inline: auto; max-width: 60ch; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 1.35rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.9rem 1.6rem;
  transition: transform 0.28s var(--ease), border-color 0.28s, box-shadow 0.28s;
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.card p { color: var(--text-muted); font-size: 0.945rem; margin-bottom: 1.1rem; }

.card-icon {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  margin-bottom: 1.15rem;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.card-icon svg { width: 22px; height: 22px; }

.tags { display: flex; flex-wrap: wrap; gap: 0.42rem; list-style: none; margin: 0; padding: 0; }
.tags li {
  font-size: 0.755rem;
  font-weight: 540;
  letter-spacing: 0.02em;
  padding: 0.24rem 0.62rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-dim);
}

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 1.35rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  counter-reset: step;
}
.step {
  position: relative;
  padding: 1.7rem 1.4rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.step-num {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.step p { color: var(--text-muted); font-size: 0.93rem; margin: 0; }

/* ---------- Case studies ---------- */
.case {
  padding: 1.8rem 1.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  transition: transform 0.28s var(--ease), border-color 0.28s;
}
.case:hover { transform: translateY(-5px); border-color: var(--border-strong); }
.case-tag {
  font-size: 0.73rem;
  font-weight: 640;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--accent-2);
  margin-bottom: 0.85rem;
}
.case > p:not(.case-tag):not(.case-metric) {
  color: var(--text-muted);
  font-size: 0.94rem;
  flex: 1;
}
.case-metric {
  margin: 1.1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.87rem;
  color: var(--text-dim);
}
.case-metric strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.about-grid p { color: var(--text-muted); }

.checklist { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: 0.7rem; }
.checklist li {
  position: relative;
  padding-left: 1.9rem;
  font-size: 0.95rem;
  color: var(--text);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.42em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.quote-card {
  padding: 2.1rem 1.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.quote-card blockquote { margin: 0; }
.quote-card p {
  font-size: 1.08rem;
  line-height: 1.6;
  letter-spacing: -0.012em;
  color: var(--text);
  margin-bottom: 1.3rem;
}
.quote-card footer { display: grid; gap: 0.12rem; }
.quote-name { font-weight: 620; font-size: 0.93rem; }
.quote-role { font-size: 0.85rem; color: var(--text-dim); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.contact-direct { margin-top: 1.8rem; }
.contact-line {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.98rem;
  font-weight: 560;
  color: var(--text);
  padding: 0.75rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: border-color 0.2s, color 0.2s;
}
.contact-line svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.contact-line:hover { border-color: var(--accent); color: var(--accent); }

.form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 2rem);
  display: grid;
  gap: 1.05rem;
}
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.86rem; font-weight: 570; color: var(--text-muted); }
.optional { color: var(--text-dim); font-weight: 400; }

.field input,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.18s, box-shadow 0.18s;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-dim); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #ff6b6b; }

.error { margin: 0; font-size: 0.8rem; color: #ff8080; min-height: 1em; }

.form-status { margin: 0; font-size: 0.9rem; text-align: center; min-height: 1.3em; }
.form-status.ok { color: var(--accent-2); }
.form-status.bad { color: #ff8080; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding-top: 3rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.8rem;
  padding-bottom: 2.2rem;
}
.footer-brand p { color: var(--text-dim); font-size: 0.9rem; margin: 0.4rem 0 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer-nav a { font-size: 0.9rem; color: var(--text-muted); transition: color 0.18s; }
.footer-nav a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-block: 1.4rem;
}
.footer-bottom p { margin: 0; font-size: 0.84rem; color: var(--text-dim); }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    inset: 68px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.6rem 1.2rem 1.4rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-140%);
    transition: transform 0.36s var(--ease);
  }
  .nav.open { transform: translateY(0); }
  .nav > a:not(.btn) { padding: 0.85rem 0; border-bottom: 1px solid var(--border); }
  .nav > a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 1rem; }
  .hero-cta .btn { flex: 1 1 auto; }
}

/* ---------- Motion / print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .nav-toggle, .hero-glow, .form { display: none; }
  body { background: #fff; color: #000; }
}
