/* Alpha Tuning Solutions — design system
   Palette + type lifted from the live Replit build:
     bg #0a0a0a  text #f2f2f2  accent #49de17 (green)
     surface #262626  muted #a6a6a6
   Font: Inter 400/500/600/700, tight negative tracking on display headings. */

:root {
  --bg: #0a0a0a;
  --bg-elev: #121212;
  --surface: #171717;
  --surface-2: #1f1f1f;
  --border: #262626;
  --border-bright: #3a3a3a;
  --text: #f2f2f2;
  --muted: #a6a6a6;
  --dim: #737373;
  --accent: #49de17;
  --accent-dark: #3cb813;
  --accent-glow: rgba(73, 222, 23, 0.18);
  --danger: #ef4444;
  --warn: #f59e0b;
  --ok: #10b981;
  --info: #3b82f6;
  --radius: 4px;
  --maxw: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 620px; margin: 0 auto; padding: 0 24px; }

/* ---------------------------------------------------------- typography */

h1, h2, h3, h4 { margin: 0 0 12px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
h1 { font-size: clamp(38px, 6vw, 72px); }
h2 { font-size: clamp(28px, 4vw, 44px); }
h3 { font-size: 19px; letter-spacing: -0.01em; }
h4 { font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

.display { text-transform: uppercase; }
.accent { color: var(--accent); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.strike { text-decoration: line-through; color: var(--dim); }

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

/* ---------------------------------------------------------- header */

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .bar {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 28px;
}
/* Logo sits on a white plate — the mark has dark elements that disappear
   against the near-black header. */
.site-header .logo {
  display: inline-flex; align-items: center;
  background: #fff; border-radius: 6px; padding: 7px 12px;
  line-height: 0;
}
.site-header .logo:hover { background: #fff; }
.site-header .logo img { height: 34px; display: block; }
.site-header nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.site-header nav a {
  color: var(--text); font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
}
.site-header nav a:hover { color: var(--accent); }
.site-header nav a.on { color: var(--accent); }

.cart-chip {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border-bright); padding: 7px 13px; border-radius: var(--radius);
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text);
}
.cart-chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.cart-chip .n {
  background: var(--accent); color: #04140a; border-radius: 999px;
  min-width: 18px; height: 18px; display: inline-grid; place-items: center;
  font-size: 11px; font-weight: 800; padding: 0 5px;
}

/* ---------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: var(--radius); border: 1px solid transparent;
  font-family: inherit; font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer; transition: all .14s ease; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #04140a; }
.btn-primary:hover { background: var(--accent-dark); box-shadow: 0 0 22px var(--accent-glow); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-bright); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: transparent; color: var(--danger); border-color: #5c2222; }
.btn-danger:hover { background: rgba(239, 68, 68, .12); }
.btn-sm { padding: 8px 14px; font-size: 11px; }
.btn-block { width: 100%; }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------------------------------------------------------- hero / sections */

.hero {
  position: relative; padding: 110px 0 96px; overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: var(--hero-img); background-size: cover; background-position: center;
  opacity: .34; z-index: 0;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(10,10,10,.96) 0%, rgba(10,10,10,.72) 55%, rgba(10,10,10,.42) 100%);
}
.hero .wrap { position: relative; z-index: 2; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero p.lede { color: var(--muted); font-size: 16px; max-width: 46ch; margin: 18px 0 28px; }
.hero-art img { width: 100%; height: auto; display: block; filter: drop-shadow(0 24px 60px rgba(0,0,0,.7)); }

.section { padding: 76px 0; border-bottom: 1px solid var(--border); }
.section.tight { padding: 48px 0; }
.section-head { margin-bottom: 38px; max-width: 62ch; }
.section-head p { color: var(--muted); margin: 10px 0 0; }

.band {
  position: relative; padding: 84px 0; border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
}
.band::before {
  content: ""; position: absolute; inset: 0;
  background-image: var(--band-img); background-size: cover; background-position: center;
  opacity: .2;
}
.band .wrap { position: relative; z-index: 2; }

/* ---------------------------------------------------------- grid + cards */

.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.split-side { display: grid; grid-template-columns: 1.6fr .9fr; gap: 28px; align-items: start; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.card.pad-lg { padding: 30px; }
.card-hover { transition: border-color .15s, transform .15s; }
.card-hover:hover { border-color: var(--accent); transform: translateY(-2px); }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--muted); margin: 0; font-size: 14px; }

.feature { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.feature .ico {
  width: 34px; height: 34px; border-radius: var(--radius); margin-bottom: 14px;
  background: var(--accent-glow); color: var(--accent);
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
}

/* ------------------------------------------------------- platform showcase */

.platform-cycle {
  position: relative; width: 100%; aspect-ratio: 16/6; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--border);
}
.platform-cycle-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; animation: platform-fade 9s infinite;
}
.platform-cycle-slide:nth-child(1) { animation-delay: 0s; }
.platform-cycle-slide:nth-child(2) { animation-delay: 2.25s; }
.platform-cycle-slide:nth-child(3) { animation-delay: 4.5s; }
.platform-cycle-slide:nth-child(4) { animation-delay: 6.75s; }
@keyframes platform-fade {
  0% { opacity: 0; }
  4% { opacity: 1; }
  21% { opacity: 1; }
  25% { opacity: 0; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .platform-cycle-slide { animation: none; opacity: 0; }
  .platform-cycle-slide:first-child { opacity: 1; }
}

.platform-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.platform-card .shot { aspect-ratio: 16/10; background-size: cover; background-position: center; }
.platform-card .body { padding: 16px 18px; }
.platform-card .body h3 { margin: 0 0 4px; font-size: 16px; }
.platform-card .body p { margin: 0; font-size: 13px; }
.feature h3 { font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }

.step { border-left: 2px solid var(--accent); padding: 4px 0 4px 18px; }
.step .num { font-size: 12px; font-weight: 800; color: var(--accent); letter-spacing: .12em; }

.prod-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.prod-card .shot {
  aspect-ratio: 16/11; background: #000 center/contain no-repeat;
  border-bottom: 1px solid var(--border);
}
/* Imageless products (support blocks, tunes) get a branded placeholder instead
   of an empty black void, and white-background product photos get a dark mat
   so they don't glare on the dark theme. */
.prod-card .shot.ph {
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(73,222,23,.13), transparent 62%),
    repeating-linear-gradient(135deg, #0d0d0d 0 12px, #101010 12px 24px);
}
.prod-card .shot.ph span {
  font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); border: 1px solid rgba(73,222,23,.32);
  padding: 8px 14px; border-radius: 999px; background: rgba(0,0,0,.45);
}
.prod-card .body { padding: 20px; display: flex; flex-direction: column; flex: 1; gap: 10px; }
.prod-card .body h3 { margin: 0; }
.prod-card .foot { margin-top: auto; display: flex; align-items: center; gap: 12px; }

.price { font-size: 27px; font-weight: 700; letter-spacing: -0.02em; }
.price-sm { font-size: 19px; font-weight: 700; }
.per { font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: .04em; }

.stat { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 18px; }
.stat .v { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.stat .k { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); font-weight: 600; }

/* ---------------------------------------------------------- badges + flash */

.badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  border: 1px solid var(--border-bright); color: var(--muted);
}
.badge-accent { background: var(--accent-glow); color: var(--accent); border-color: transparent; }
.badge-ok { background: rgba(16,185,129,.14); color: var(--ok); border-color: transparent; }
.badge-warn { background: rgba(245,158,11,.14); color: var(--warn); border-color: transparent; }
.badge-danger { background: rgba(239,68,68,.14); color: var(--danger); border-color: transparent; }
.badge-info { background: rgba(59,130,246,.14); color: var(--info); border-color: transparent; }

.flash { padding: 13px 16px; border-radius: var(--radius); margin-bottom: 12px; font-size: 14px; border: 1px solid; }
.flash-success { background: rgba(16,185,129,.1); border-color: #1c5c47; color: #8ff0cd; }
.flash-error { background: rgba(239,68,68,.1); border-color: #6b2a2a; color: #ffb4b4; }
.flashes { max-width: var(--maxw); margin: 18px auto 0; padding: 0 24px; }

.notice {
  border: 1px solid var(--warn); background: rgba(245,158,11,.08);
  color: #ffd79a; padding: 14px 16px; border-radius: var(--radius); font-size: 14px;
}
.notice-accent { border-color: var(--accent); background: var(--accent-glow); color: #c9f7b4; }

/* ---------------------------------------------------------- forms */

label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em;
        text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=number], input[type=search], input[type=file], select, textarea {
  width: 100%; padding: 11px 13px; background: var(--bg);
  border: 1px solid var(--border-bright); border-radius: var(--radius);
  color: var(--text); font-family: inherit; font-size: 14px;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
}
textarea { min-height: 120px; resize: vertical; }
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.check { display: flex; align-items: center; gap: 9px; }
.check input { width: auto; }
.check label { margin: 0; text-transform: none; letter-spacing: 0; font-size: 13.5px;
               color: var(--text); font-weight: 500; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.auth-shell { min-height: 78vh; display: grid; place-items: center; padding: 48px 20px; }
.auth-card { width: 100%; max-width: 430px; background: var(--surface);
             border: 1px solid var(--border); border-radius: var(--radius); padding: 34px; }
.auth-card .logo { text-align: center; margin-bottom: 22px; }
.auth-card .logo img { height: 40px; }

/* ---------------------------------------------------------- tables */

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th {
  text-align: left; padding: 11px 12px; font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--dim); font-weight: 700;
  border-bottom: 1px solid var(--border);
}
table.tbl td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.tbl tr:hover td { background: rgba(255,255,255,.018); }
table.tbl tr.void td { opacity: .45; }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.tabs a {
  padding: 8px 15px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
}
.tabs a:hover { border-color: var(--border-bright); color: var(--text); text-decoration: none; }
.tabs a.on { background: var(--accent); color: #04140a; border-color: var(--accent); }

/* ---------------------------------------------------------- portal / admin shell */

.shell { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100vh - 60px); }
.side { border-right: 1px solid var(--border); background: var(--bg-elev); padding: 26px 0; }
.side .grp { font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
             color: var(--dim); font-weight: 700; padding: 0 22px; margin: 22px 0 8px; }
.side .grp:first-child { margin-top: 0; }
.side a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 22px; color: var(--muted); font-size: 14px; text-decoration: none;
  border-left: 2px solid transparent;
}
.side a:hover { color: var(--text); background: rgba(255,255,255,.03); text-decoration: none; }
.side a.on { color: var(--accent); border-left-color: var(--accent); background: var(--accent-glow); }
.side .pill { background: var(--surface-2); border-radius: 999px; padding: 1px 8px;
              font-size: 11px; font-weight: 700; color: var(--muted); }
.main { padding: 32px 34px; min-width: 0; }
.main > h1 { font-size: 30px; margin-bottom: 4px; }
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); font-size: 14px; }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

.balance-hero {
  border: 1px solid var(--accent); background: var(--accent-glow);
  border-radius: var(--radius); padding: 24px; display: flex; align-items: center; gap: 20px;
}
.balance-hero .v { font-size: 42px; font-weight: 700; letter-spacing: -0.03em; color: var(--accent); }
.balance-hero.neg { border-color: var(--danger); background: rgba(239,68,68,.1); }
.balance-hero.neg .v { color: var(--danger); }

.thread-msg { border: 1px solid var(--border); border-radius: var(--radius);
              padding: 16px 18px; margin-bottom: 12px; background: var(--surface); }
.thread-msg.staff { border-left: 3px solid var(--accent); }
.thread-msg.customer { border-left: 3px solid var(--border-bright); }
.thread-msg.system { border-left: 3px solid var(--info); }
.thread-msg.internal { border-left: 3px solid var(--warn); background: rgba(245,158,11,.05); }
.thread-msg .meta { font-size: 12px; color: var(--dim); margin-bottom: 8px;
                    display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.thread-msg .body { white-space: pre-wrap; font-size: 14.5px; }

.tier-ladder { width: 100%; border-collapse: collapse; font-size: 14px; }
.tier-ladder td { padding: 9px 10px; border-bottom: 1px solid var(--border); }
.tier-ladder tr.you td { background: var(--accent-glow); color: var(--text); font-weight: 600; }

/* ---------------------------------------------------------- footer */

.site-footer { padding: 52px 0 34px; background: var(--bg-elev); border-top: 1px solid var(--border); }
.site-footer .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; }
.site-footer img.logo {
  height: 38px; margin-bottom: 14px; display: inline-block;
  background: #fff; border-radius: 6px; padding: 7px 12px;
}
.site-footer p { color: var(--dim); font-size: 13.5px; max-width: 36ch; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer li a { color: var(--muted); font-size: 13.5px; }
.site-footer li a:hover { color: var(--accent); }
.site-footer .legal { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--border);
                      color: var(--dim); font-size: 12.5px;
                      display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------------------------------------------------------- responsive */

@media (max-width: 1000px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: repeat(2, 1fr); }
  .shell { grid-template-columns: 1fr; }
  .side { border-right: none; border-bottom: 1px solid var(--border); padding: 16px 0; }
  .side a { padding: 9px 22px; }
  .main { padding: 24px 20px; }
  .split, .split-side, .hero-grid { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .field-row, .field-row-3 { grid-template-columns: 1fr; }
  .site-header nav { gap: 14px; overflow-x: auto; }
  .site-header nav a { font-size: 11.5px; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .hero { padding: 66px 0 56px; }
}
