/* CrateMate marketing site */
:root {
  --bg: #0c0e13;
  --bg2: #141821;
  --panel: rgba(255,255,255,.04);
  --panel2: rgba(255,255,255,.07);
  --border: rgba(255,255,255,.10);
  --text: #e8eaed;
  --dim: #9aa0aa;
  --faint: #6b7280;
  --accent: #3b82f6;
  --accent2: #8b5cf6;
  --good: #22c55e; --warn: #f59e0b; --bad: #ef4444;
  --radius: 16px;
  --radius-sm: 10px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--text); background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1,h2,h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; }
.muted { color: var(--dim); }
.grad { background: linear-gradient(100deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* animated background */
.bg-fx {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 600px at 12% -5%, rgba(59,130,246,.20), transparent 60%),
    radial-gradient(800px 600px at 95% 8%, rgba(139,92,246,.18), transparent 60%),
    linear-gradient(160deg, var(--bg2), var(--bg));
}
.bg-fx::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(700px 500px at 80% 100%, rgba(20,184,166,.12), transparent 60%);
  animation: floaty 16s ease-in-out infinite alternate;
}
@keyframes floaty { from { transform: translateY(0); } to { transform: translateY(-40px); } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  padding: 12px 20px; border-radius: var(--radius-sm); font-weight: 600; font-size: 15px;
  border: 1px solid var(--border); background: var(--panel2); color: var(--text);
  transition: transform .12s, filter .15s, background .15s; font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(100deg, var(--accent), var(--accent2)); border-color: transparent; color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn .ico { font-size: 17px; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 28px; backdrop-filter: blur(16px);
  background: rgba(12,14,19,.6); border-bottom: 1px solid var(--border);
}
.nav-brand img { height: 48px; display: block; border-radius: 10px; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 15px; font-weight: 500; }
.nav-links a:not(.btn) { color: var(--dim); }
.nav-links a:not(.btn):hover { color: var(--text); }

/* hero */
.hero { position: relative; max-width: 1080px; margin: 0 auto; padding: 72px 24px 40px; text-align: center; }
.hero-inner { position: relative; z-index: 2; }
.pill {
  display: inline-block; font-size: 13px; font-weight: 600; color: var(--dim);
  border: 1px solid var(--border); background: var(--panel); padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(38px, 7vw, 76px); font-weight: 800; }
.lead { max-width: 680px; margin: 22px auto 0; font-size: clamp(16px, 2.2vw, 20px); color: var(--dim); }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--faint); }
.hero-wave { display: block; width: 100%; max-width: 900px; height: 90px; margin: 36px auto 0; opacity: .95; }

/* app window mockup */
.showcase { max-width: 1040px; margin: 30px auto 10px; padding: 0 24px; }
.window {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(160deg, #12161e, #0c0e13);
  box-shadow: 0 40px 120px rgba(0,0,0,.55);
}
.win-bar { display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02); }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.r{background:#ff5f57} .dot.y{background:#febc2e} .dot.g{background:#28c840}
.win-title { margin-left: 10px; font-size: 13px; color: var(--dim); font-weight: 600; }
.win-body { display: grid; grid-template-columns: 200px 1fr; min-height: 360px; }
.win-side { border-right: 1px solid var(--border); padding: 14px 10px; background: rgba(255,255,255,.02); }
.side-logo img { width: 120px; display: block; margin: 4px auto 14px; border-radius: 10px; }
.side-item { padding: 9px 12px; border-radius: 8px; color: var(--dim); font-size: 13.5px; font-weight: 500; }
.side-item.active { background: rgba(59,130,246,.16); color: var(--accent); }
.win-main { padding: 18px; }
.kpi-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.m-kpi { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.m-kpi .k { font-size: 12px; color: var(--dim); }
.m-kpi .v { font-size: 22px; font-weight: 800; margin-top: 4px; }
.m-kpi .v.warn{color:var(--warn)} .m-kpi .v.bad{color:var(--bad)} .m-kpi .v.accent{color:var(--accent)}
.m-card { margin-top: 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.m-card-h { font-size: 12px; color: var(--dim); margin-bottom: 10px; }
.mock-wave { width: 100%; height: 70px; display: block; }
.m-bars { display: flex; align-items: flex-end; gap: 3px; height: 60px; margin-top: 14px; }
.m-bars span { flex: 1; background: linear-gradient(180deg, var(--accent), var(--accent2)); border-radius: 3px 3px 0 0; opacity: .8; }

/* sections */
.section { max-width: 1100px; margin: 0 auto; padding: 80px 24px; }
.section.alt { background: rgba(255,255,255,.02); max-width: none; }
.section.alt > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.section-head { text-align: center; margin-bottom: 46px; }
.section-head h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; }
.section-head p { margin-top: 12px; font-size: 17px; }

/* features */
.feature-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.feature {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
  transition: transform .15s, border-color .15s, background .15s;
}
.feature:hover { transform: translateY(-4px); border-color: rgba(59,130,246,.5); background: var(--panel2); }
.feature-ico { font-size: 30px; margin-bottom: 12px; }
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { color: var(--dim); font-size: 14.5px; margin: 0; }

/* steps */
.steps { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.step { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.step-n {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; margin-bottom: 14px;
}
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { color: var(--dim); margin: 0; }

/* detail cards */
.detail-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.detail-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.detail-card h3 { font-size: 18px; margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.chip { padding: 7px 14px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--border); font-size: 13.5px; color: var(--text); }
.flag { width: 30px; height: 21px; border-radius: 4px; display: inline-grid; place-items: center; color: #fff; font-size: 11px; font-weight: 800; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.flag-chip { display: inline-flex; }
.flag-svg { border-radius: 4px; box-shadow: 0 0 0 1px rgba(0,0,0,.25); display: block; }
.accent-dot { width: 30px; height: 30px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.12); }

/* download */
.download-row { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.dl-card {
  display: flex; align-items: center; gap: 16px; padding: 20px 24px; min-width: 320px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
}
.dl-ico { font-size: 34px; }
.dl-meta { margin-right: 8px; }
.dl-platform { font-weight: 700; font-size: 17px; }
.dl-ver { font-size: 13px; }
.dl-news { text-align: center; margin-top: 26px; }

/* footer */
.footer { border-top: 1px solid var(--border); background: rgba(0,0,0,.25); margin-top: 30px; }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 40px 24px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.footer-logo { height: 96px; border-radius: 16px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--dim); font-weight: 500; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { font-size: 13px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; }
.modal[hidden] { display: none; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); }
.modal-card {
  position: relative; width: 420px; max-width: 92vw; background: #161b24; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px; text-align: center; box-shadow: 0 40px 120px rgba(0,0,0,.6);
}
.modal-x { position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--dim); font-size: 16px; cursor: pointer; }
.modal-ico { font-size: 38px; }
.modal-card h3 { font-size: 22px; margin: 8px 0; }
#dl-email { width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--panel2); color: var(--text); font-size: 15px; margin-top: 16px; }
.modal-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.modal-msg { min-height: 18px; font-size: 13px; margin-top: 8px; }
.modal-msg.ok { color: var(--good); }
.modal-msg.err { color: var(--bad); }

/* reveal animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .nav-links a:not(.btn) { display: none; }
  .win-body { grid-template-columns: 1fr; }
  .win-side { display: none; }
  .kpi-row { grid-template-columns: repeat(2,1fr); }
  .steps { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .bg-fx::after { animation: none; }
}
