/* ==========================================================================
   Maxtrion — styles
   ========================================================================== */

@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root, .light {
  color-scheme: light;
  --bg-white: oklch(1 0 0);
  --bg: oklch(0.972 0.0054 125);
  --bg-soft: oklch(0.906 0.041 149.23);
  --text: oklch(0.249 0.023 143.68);
  --text-muted: oklch(0.392 0.031 144.37);
  --text-subtle: oklch(0.509 0.032 145.1);
  --accent: oklch(0.679 0.048 146.42);
  --accent-subtle: oklch(0.816 0.051 147.78);
  --border-light: oklch(0.938 0.029 148.97);
  --border-default: oklch(0.816 0.051 147.78);
  --input-text: oklch(0.1 0.005 0);
  --primary: oklch(0.55 0.22 264);
  --primary-hover: oklch(0.48 0.24 264);
  --primary-soft: oklch(0.95 0.05 264);
  --primary-text: oklch(0.55 0.22 264);
  --secondary-border: oklch(0.50 0.02 264);
  --secondary-text: oklch(0.50 0.02 264);
  --secondary-soft: oklch(0.96 0.01 264);
  --success: oklch(0.55 0.18 145);
  --success-soft: oklch(0.95 0.05 145);
  --success-text: oklch(0.55 0.18 145);
  --danger-border: oklch(0.5023 0.1829 29.29);
  --danger-soft: oklch(80.8% 0.114 19.571);
  --danger-text: oklch(0.5023 0.1829 29.29);
  --info: oklch(0.58 0.16 210);
  --info-text: oklch(0.58 0.16 210);
  --deposit-border: oklch(0.75 0.15 300);
  --deposit-text: oklch(0.55 0.20 300);
}
.dark {
  color-scheme: dark;
  --bg-white: oklch(18.056% 0.03053 140.473);
  --bg: oklch(0.16 0.018 143);
  --bg-soft: oklch(0.24 0.028 144.5);
  --text: oklch(0.92 0.015 148);
  --text-muted: oklch(0.75 0.025 146);
  --text-subtle: oklch(0.62 0.03 145);
  --accent: oklch(0.65 0.055 146.5);
  --accent-subtle: oklch(0.45 0.045 145.5);
  --border-light: oklch(0.28 0.03 144);
  --border-default: oklch(0.35 0.038 145);
  --input-text: oklch(0.85 0.015 148);
  --primary: oklch(0.62 0.24 264);
  --primary-hover: oklch(0.68 0.26 264);
  --primary-soft: oklch(0.25 0.08 264);
  --primary-text: oklch(0.70 0.22 264);
  --secondary-border: oklch(0.55 0.02 264);
  --secondary-text: oklch(0.65 0.02 264);
  --secondary-soft: oklch(0.25 0.01 264);
  --success: oklch(0.62 0.20 145);
  --success-soft: oklch(0.25 0.08 145);
  --success-text: oklch(0.70 0.18 145);
  --danger-border: oklch(0.62 0.20 29.29);
  --danger-soft: oklch(0.35 0.08 25);
  --danger-text: oklch(0.70 0.18 29.29);
  --info: oklch(0.65 0.18 210);
  --info-text: oklch(0.72 0.16 210);
  --deposit-border: oklch(0.65 0.18 300);
  --deposit-text: oklch(0.72 0.20 300);
}

:root {
  --font-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r-lg: 0.5rem;
  --r-xl: 0.75rem;
  --r-2xl: 1rem;
  --r-3xl: 1.5rem;
  --header-h: 64px;
  /* Orbit speed: 1 = calm, 3 = current default */
  --orbit-speed: 3;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  transition: background-color 200ms, color 200ms;
}
h1, h2, h3, h4, p { margin: 0; }
img { display: block; max-width: 100%; }
a { color: var(--primary-text); text-decoration: none; }
a:hover { color: var(--primary-hover); }
button, input, textarea { font: inherit; }
[hidden] { display: none !important; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { border-top: 1px solid var(--border-light); padding: 80px 0; }
.section--alt { background: var(--bg-white); }

.stack-6, .stack-8, .stack-12, .stack-16, .stack-40 { display: flex; flex-direction: column; }
.stack-6 { gap: 6px; } .stack-8 { gap: 8px; } .stack-12 { gap: 12px; } .stack-16 { gap: 16px; } .stack-40 { gap: 40px; }

.grid { display: grid; gap: 16px; }
.grid--200 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.grid--260 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid--340 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid--420 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.gap-56 { gap: 56px; }

/* ---------- Type ---------- */
.micro-label, .info-list dt {
  font-size: 0.75rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-subtle);
}
h2 { font-size: 2rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.section-head--wide { max-width: 680px; }
.section-head p, .lead { font-size: 1rem; line-height: 1.7; color: var(--text-muted); text-wrap: pretty; }
.mono { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--text-subtle); }

/* ---------- Components ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 16px; border: 2px solid transparent; border-radius: var(--r-xl);
  font-size: 1rem; font-weight: 500; line-height: 1.5; cursor: pointer;
  transition: all 200ms; white-space: nowrap;
}
.btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--primary); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-outline { background: transparent; border-color: var(--secondary-border); color: var(--secondary-text); }
.btn-outline:hover { background: var(--secondary-soft); color: var(--secondary-text); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 8px; }

.icon-btn {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-default); border-radius: var(--r-xl);
  background: transparent; color: var(--text-muted); cursor: pointer; transition: background-color 200ms;
}
.icon-btn:hover { background: var(--bg-soft); }

.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px;
  border-radius: 9999px; background: var(--bg-soft); color: var(--text-muted);
  font-size: 0.6875rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.025em;
  white-space: nowrap;
}
.chip--success { background: var(--success-soft); color: var(--success-text); }
.chip--danger { background: var(--danger-soft); color: var(--danger-text); }
.chip--lg { padding: 6px 14px; font-size: 0.8125rem; }

.card {
  display: flex; flex-direction: column; gap: 16px; padding: 24px;
  border: 1px solid var(--border-light); border-radius: var(--r-2xl); background: var(--bg);
}
.card--lg { border-radius: var(--r-3xl); background: var(--bg-white); gap: 24px; }
.card h3 { font-size: 1.125rem; font-weight: 600; }
.card p { font-size: 0.875rem; line-height: 1.6; color: var(--text-muted); text-wrap: pretty; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg-white); border-bottom: 1px solid var(--border-light);
}
.header-inner {
  padding-top: 12px; padding-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
  column-gap: 16px; row-gap: 8px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand img { height: 28px; width: auto; }
.brand span { font-size: 1.125rem; font-weight: 700; letter-spacing: 0.08em; }
.brand--sm img { height: 24px; }
.brand--sm span { font-size: 1rem; }
.main-nav { display: flex; align-items: center; gap: 2px; margin: 0 -6px; }
.main-nav a {
  padding: 8px 12px; border-radius: var(--r-xl); white-space: nowrap;
  font-size: 0.8125rem; font-weight: 500; color: var(--text-muted); transition: background-color 200ms;
}
.main-nav a:hover { background: var(--bg-soft); color: var(--text); }
.theme-toggle .icon-sun { display: none; }
.dark .theme-toggle .icon-sun { display: flex; }
.dark .theme-toggle .icon-moon { display: none; }
.theme-toggle span { display: flex; }

@media (max-width: 759px) {
  .header-inner { padding-left: 16px; padding-right: 16px; }
  .main-nav { order: 3; width: calc(100% + 12px); justify-content: space-between; }
  .main-nav a { padding: 6px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero-glow { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.glow { position: absolute; border-radius: 50%; filter: blur(40px); }
.glow--1 { width: 640px; height: 640px; left: -180px; top: -260px;
  background: radial-gradient(circle, color-mix(in oklch, var(--primary) 32%, transparent) 0%, transparent 70%); }
.glow--2 { width: 560px; height: 560px; right: -120px; top: -120px;
  background: radial-gradient(circle, color-mix(in oklch, var(--info) 26%, transparent) 0%, transparent 70%); }
.glow--3 { width: 520px; height: 520px; left: 35%; bottom: -320px;
  background: radial-gradient(circle, color-mix(in oklch, var(--deposit-border) 24%, transparent) 0%, transparent 70%); }

.hero-inner {
  padding-top: 88px; padding-bottom: 72px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 56px; align-items: center;
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.eyebrow-pill {
  display: flex; align-items: center; gap: 10px; padding: 8px 16px;
  border: 1px solid var(--border-default); border-radius: 9999px;
  background: color-mix(in oklch, var(--bg-white) 60%, transparent);
  font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted);
}
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--info); box-shadow: 0 0 8px var(--info); }
.hero-title {
  font-size: clamp(2.25rem, 4.6vw, 3.5rem); line-height: 1.08; font-weight: 700;
  letter-spacing: -0.02em; text-wrap: balance;
}
.hero-title span {
  background: linear-gradient(100deg, var(--info-text) 0%, var(--primary-text) 55%, var(--deposit-text) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.hero-desc { font-size: 1.125rem; line-height: 1.6; color: var(--text-muted); max-width: 520px; text-wrap: pretty; }

/* ---------- Orbit animation ---------- */
@keyframes mx-spin { to { transform: rotate(360deg); } }
@keyframes mx-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.12); opacity: 0.75; } }
@keyframes mx-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes mx-glow { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.6; } }

.orbit-wrap { display: flex; justify-content: center; align-items: center; min-width: 0; }
.orbit { position: relative; width: 100%; max-width: 460px; aspect-ratio: 1 / 1; }
.orbit-glow {
  position: absolute; left: 30%; top: 30%; width: 40%; height: 40%; border-radius: 50%;
  background: var(--accent); filter: blur(48px);
  animation: mx-glow calc(4s / var(--orbit-speed)) ease-in-out infinite;
}
.ring {
  position: absolute; border-radius: 50%; border: 1px solid var(--border-default);
  animation: mx-spin var(--dur) linear infinite var(--dir);
}
.ring--1 { --dur: calc(70s / var(--orbit-speed)); --dir: normal; --counter: reverse; inset: 0; }
.ring--2 { --dur: calc(40s / var(--orbit-speed)); --dir: reverse; --counter: normal; inset: 15%; border-style: dashed; }
.ring--3 { --dur: calc(26s / var(--orbit-speed)); --dir: normal; --counter: reverse; inset: 29%; }
.orbit-item { position: absolute; inset: 0; transform: rotate(var(--a)); }
.orbit-pos { position: absolute; left: 50%; top: 0; transform: translate(-50%, -50%) rotate(calc(var(--a) * -1)); }
.orbit-counter { display: flex; animation: mx-spin var(--dur) linear infinite var(--counter); }
.dot {
  width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 4px var(--bg);
  animation: mx-pulse calc(2.4s / var(--orbit-speed)) ease-in-out infinite;
}
.dot--slow { animation-duration: calc(3s / var(--orbit-speed)); }
.dot--slower { animation-duration: calc(3.6s / var(--orbit-speed)); }
.dot--primary { background: var(--primary); }
.dot--success { background: var(--success); }
.dot--info { background: var(--info); }
.dot--accent { background: var(--accent); }
.orbit-mark {
  position: absolute; left: 39%; top: 40%; width: 22%; height: auto;
  animation: mx-breathe calc(4s / var(--orbit-speed)) ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .orbit *, .orbit-glow { animation: none !important; }
}

/* ---------- Services ---------- */
.icon-tile {
  width: 40px; height: 40px; border-radius: var(--r-xl);
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary-text);
}
.service-card { transition: box-shadow 200ms; }
.service-card:hover { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.08); }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }

/* ---------- Products ---------- */
.product-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.logo-tile {
  width: 56px; height: 56px; border-radius: var(--r-2xl); background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
}
.logo-tile img { width: 38px; height: 38px; object-fit: contain; }
.product-meta { display: flex; align-items: center; gap: 8px; }
.card .product-name { font-size: 1.25rem; }
.product-cta { margin-top: auto; align-self: flex-start; }

/* ---------- About ---------- */
.panel { background: var(--bg-white); border: 1px solid var(--border-light); border-radius: var(--r-3xl); overflow: hidden; }
.panel-head { padding: 16px 24px; }
.panel-head h3 { font-size: 1.25rem; font-weight: 600; }
.panel-head p { font-size: 0.875rem; color: var(--text-subtle); }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px;
  padding: 16px 24px; border-top: 1px solid var(--border-light);
}
.steps .mono { padding-top: 2px; }
.steps h4 { font-size: 0.9375rem; font-weight: 600; margin-bottom: 4px; }
.steps p { font-size: 0.875rem; line-height: 1.55; color: var(--text-muted); }

/* ---------- Security ---------- */
.tiled {
  gap: 1px; background: var(--border-light);
  border: 1px solid var(--border-light); border-radius: var(--r-3xl); overflow: hidden;
}
.tile { display: flex; flex-direction: column; gap: 12px; padding: 24px; background: var(--bg-white); }
.tile-icon { display: flex; color: var(--success-text); }
.tile h3 { font-size: 1rem; font-weight: 600; }
.tile p { font-size: 0.875rem; line-height: 1.6; color: var(--text-muted); text-wrap: pretty; }

/* ---------- Contact ---------- */
.contact-card {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: 1px; background: var(--border-light);
  border: 1px solid var(--border-light); border-radius: var(--r-3xl); overflow: hidden;
}
.contact-intro, .contact-form-wrap { padding: 40px; background: var(--bg-white); }
.contact-intro { display: flex; flex-direction: column; gap: 16px; }
.mail-line { font-size: 0.875rem; color: var(--text-subtle); }
.mail-line a { font-weight: 500; }
.info-list { margin: auto 0 0; padding-top: 8px; border-top: 1px solid var(--border-light); }
.info-list div {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--border-light); font-size: 0.875rem;
}
.info-list dd { margin: 0; font-weight: 500; }

.contact-form, .form-success { display: flex; flex-direction: column; gap: 16px; }
.contact-form h3, .form-success h3 { font-size: 1.25rem; font-weight: 600; }
.form-success { align-items: flex-start; padding: 24px 0; }
.form-success p { font-size: 0.875rem; line-height: 1.6; color: var(--text-muted); }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field label, .field legend { font-size: 0.875rem; font-weight: 500; color: var(--text); padding: 0; }
.field legend { margin-bottom: 6px; }
.req { color: var(--danger-text); }
.input {
  width: 100%; padding: 8px 12px; border: 2px solid var(--border-default); border-radius: var(--r-xl);
  background: var(--bg-white); color: var(--input-text); font-size: 0.875rem; line-height: 1.5;
  transition: border-color 200ms, box-shadow 200ms;
}
.input::placeholder { color: var(--text-subtle); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-subtle); }
.input.is-invalid { border-color: var(--danger-border); }
.textarea { min-height: 96px; resize: vertical; }
.field-hint { font-size: 0.75rem; color: var(--danger-text); }
.field-hint:empty { display: none; }

.type-options { display: flex; flex-wrap: wrap; gap: 8px; }
.type-option input { position: absolute; opacity: 0; pointer-events: none; }
.type-option span {
  display: block; padding: 7px 14px; border-radius: 9999px; cursor: pointer;
  border: 1px solid var(--border-default); background: var(--bg-white);
  font-size: 0.8125rem; font-weight: 500; color: var(--text-muted); transition: all 200ms;
}
.type-option input:checked + span { background: var(--primary-soft); color: var(--primary-text); border-color: var(--primary); }
.type-option input:focus-visible + span { box-shadow: 0 0 0 2px var(--primary); }

.form-error {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 16px;
  border: 1px solid var(--danger-border); border-radius: var(--r-xl); background: var(--bg-white);
}
.form-error p { font-size: 0.875rem; line-height: 1.55; color: var(--text-muted); }
.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 4px; }
.privacy { font-size: 0.75rem; color: var(--text-subtle); max-width: 280px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border-light); background: var(--bg-white); }
.footer-grid {
  padding-top: 56px; padding-bottom: 32px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 32px;
}
.footer-grid p { font-size: 0.875rem; line-height: 1.6; color: var(--text-muted); }
.footer-col { display: flex; flex-direction: column; gap: 10px; font-size: 0.875rem; color: var(--text-muted); }
.footer-col a:not(.link) { color: var(--text-muted); }
.footer-col a:not(.link):hover { color: var(--text); }
.footer-bar { border-top: 1px solid var(--border-light); }
.footer-bar-inner {
  padding-top: 20px; padding-bottom: 20px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 0.8125rem; color: var(--text-subtle);
}
