/* DUSK Tools design system.
   One bold idea: a dusk horizon (a glowing planet edge) at the top of every page.
   Everything else is quiet, Apple-disciplined glass and type. */
@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --space: #000000;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --dim: #6e6e73;
  --violet: #7b2ff7;
  --blue: #2d5bff;
  --lime: #d5ff4a;
  --lime-ink: #0c0f00;
  --danger: #ff6961;
  --warn: #ffcc4d;
  --ok: #5fe39b;

  --glass: rgba(255, 255, 255, .045);
  --glass-strong: rgba(255, 255, 255, .075);
  --rim: rgba(255, 255, 255, .09);
  --rim-strong: rgba(255, 255, 255, .16);
  --field: rgba(255, 255, 255, .055);

  --r-xl: 30px;
  --r-lg: 22px;
  --r-md: 14px;
  --pill: 999px;

  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter Tight", system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--space); }
body {
  background: var(--space);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(213, 255, 74, .3); color: #fff; }

/* ---------- the dusk horizon ---------- */
.horizon { position: absolute; inset: 0 0 auto 0; height: 900px; overflow: hidden; pointer-events: none; z-index: 0;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent); mask-image: linear-gradient(180deg, #000 72%, transparent); }
.horizon .sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 55% at 50% 100%, rgba(123, 47, 247, .55), transparent 70%),
    radial-gradient(38% 40% at 30% 100%, rgba(45, 91, 255, .45), transparent 70%),
    radial-gradient(30% 30% at 72% 100%, rgba(213, 255, 74, .18), transparent 70%);
  opacity: .9;
}
.horizon .planet {
  position: absolute; left: 50%; top: 600px; width: 2600px; height: 2600px; margin-left: -1300px;
  border-radius: 50%; background: var(--space);
  box-shadow:
    0 -1px 0 rgba(255, 255, 255, .55),
    0 -2px 6px rgba(213, 255, 74, .55),
    0 -10px 40px rgba(123, 47, 247, .55),
    0 -40px 120px rgba(45, 91, 255, .35);
}
.horizon .stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(255,255,255,.7), transparent),
    radial-gradient(1px 1px at 27% 8%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 44% 30%, rgba(255,255,255,.4), transparent),
    radial-gradient(1px 1px at 63% 14%, rgba(255,255,255,.6), transparent),
    radial-gradient(1px 1px at 78% 26%, rgba(255,255,255,.45), transparent),
    radial-gradient(1px 1px at 89% 9%, rgba(255,255,255,.55), transparent),
    radial-gradient(1.5px 1.5px at 6% 40%, rgba(255,255,255,.35), transparent),
    radial-gradient(1.5px 1.5px at 94% 38%, rgba(255,255,255,.35), transparent);
  opacity: .8;
}
.horizon.small { height: 760px; }
.horizon.small .planet { top: 500px; }
.horizon.small .sky { opacity: .6; }
.horizon.full { position: fixed; height: 100vh; -webkit-mask-image: none; mask-image: none; }
.horizon.full .planet { top: 62vh; }

@media (prefers-reduced-motion: no-preference) {
  .horizon .planet { animation: rise 1.6s var(--ease) both; }
  .horizon .sky { animation: glow 2.2s var(--ease) both; }
}
@keyframes rise { from { transform: translateY(70px); } to { transform: none; } }
@keyframes glow { from { opacity: 0; } to { opacity: .9; } }
@media (max-width: 700px) {
  .horizon .planet { width: 1600px; height: 1600px; margin-left: -800px; top: 640px; }
  .horizon.small .planet { top: 560px; }
}

/* old decorative orbs are replaced by the horizon */
.orb { display: none; }

/* ---------- type ---------- */
a { color: var(--lime); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; color: var(--text); }
h1 {
  font-size: clamp(42px, 7vw, 84px); font-weight: 600; line-height: 1.02; letter-spacing: -.035em;
  background: linear-gradient(180deg, #ffffff 30%, #b7b7c0 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
h3 { font-size: 19px; font-weight: 600; letter-spacing: -.012em; line-height: 1.25; }
.accent { color: inherit; }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--muted); line-height: 1.45; max-width: 640px; letter-spacing: -.01em; }
.eyebrow { font-size: 15px; color: var(--muted); margin-bottom: 14px; font-weight: 500; }
.hint { font-size: 13px; color: var(--muted); font-weight: 400; font-family: var(--body); }

/* ---------- layout ---------- */
.wrap { position: relative; z-index: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 28px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* floating glass nav */
.topbar {
  position: sticky; top: 14px; z-index: 20; margin: 14px auto 0; max-width: 1180px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 8px 8px 16px; border-radius: var(--pill);
  background: rgba(20, 20, 26, .55); border: 1px solid var(--rim);
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 12px 40px rgba(0,0,0,.45);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--display); font-weight: 600; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.logo {
  width: 30px; height: 30px; border-radius: 50%; flex: none; position: relative;
  background: radial-gradient(circle at 50% 120%, var(--lime) 0 22%, var(--violet) 48%, #000 72%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
  font-size: 0; color: transparent;
}
.brand-name { font-size: 15px; }
.brand-name span { color: var(--muted); font-weight: 500; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { color: var(--muted); font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: var(--pill); transition: background .2s, color .2s; }
.nav a:hover, .nav a[aria-current] { color: var(--text); background: rgba(255,255,255,.07); text-decoration: none; }
@media (max-width: 520px) { .brand-name span { display: none; } .nav a { padding: 8px 10px; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 16px/1 var(--body); letter-spacing: -.01em; color: var(--space);
  background: var(--text); border: 1px solid transparent; border-radius: var(--pill);
  padding: 15px 28px; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s, background .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 10px 30px rgba(255,255,255,.12); }
.btn:active { transform: scale(.98); }
.btn.lime { background: var(--lime); color: var(--lime-ink); }
.btn.lime:hover { box-shadow: 0 10px 36px rgba(213,255,74,.28); }
.btn.ghost { background: var(--glass); color: var(--text); border-color: var(--rim); }
.btn.ghost:hover { background: var(--glass-strong); box-shadow: none; }
.btn.small { padding: 10px 18px; font-size: 14px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

/* ---------- glass cards ---------- */
.card {
  position: relative; border-radius: var(--r-xl); padding: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
  border: 1px solid var(--rim);
  -webkit-backdrop-filter: blur(24px) saturate(150%); backdrop-filter: blur(24px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
}
.card.lit { overflow: hidden; }
.card.lit::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(213,255,74,.10), transparent 60%);
}
.card.lit:hover::before { opacity: 1; }
@media (max-width: 600px) { .card { padding: 22px; border-radius: var(--r-lg); } }

/* ---------- forms ---------- */
label.field { display: block; margin-bottom: 18px; }
.field > span, .label { display: block; font-weight: 500; font-size: 14px; margin-bottom: 8px; color: var(--text); }
input[type=text], input[type=url], input[type=password], input[type=number], textarea, select {
  width: 100%; background: var(--field); color: var(--text); border: 1px solid var(--rim);
  border-radius: var(--r-md); padding: 13px 15px; font: inherit; font-size: 15px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
select option { background: #1c1c22; color: var(--text); }
input::placeholder, textarea::placeholder { color: var(--dim); }
input:focus, textarea:focus, select:focus { outline: none; border-color: rgba(213,255,74,.6); box-shadow: 0 0 0 4px rgba(213,255,74,.12); background: rgba(255,255,255,.075); }
textarea { resize: vertical; min-height: 90px; }

/* ---------- footer ---------- */
.foot { position: relative; z-index: 1; color: var(--dim); font-size: 13px; padding: 64px 0 36px; text-align: center; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
