:root {
  --ink: #f5efe2;
  --muted: #b7c2ba;
  --deep: #07110d;
  --panel: rgba(13, 31, 25, 0.82);
  --panel-soft: rgba(255, 255, 255, 0.07);
  --line: rgba(232, 200, 136, 0.2);
  --gold: #e8c888;
  --gold-strong: #f6d77b;
  --jade: #44d7a8;
  --danger: #ff8c7a;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Cormorant Garamond", "Noto Serif SC", "Songti SC", serif;
  background:
    linear-gradient(120deg, rgba(7, 17, 13, 0.92), rgba(10, 31, 30, 0.95)),
    radial-gradient(circle at 18% 8%, rgba(232, 200, 136, 0.32), transparent 34rem),
    radial-gradient(circle at 88% 18%, rgba(68, 215, 168, 0.24), transparent 28rem),
    #07110d;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent 72%);
}

.ambient {
  position: fixed;
  width: 44vw;
  height: 44vw;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.22;
  pointer-events: none;
}
.ambient-a { top: -18vw; left: -8vw; background: var(--gold); }
.ambient-b { right: -18vw; top: 20vh; background: var(--jade); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(22px, 5vw, 78px);
  background: rgba(7, 17, 13, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(22px);
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #07110d;
  font: 900 16px/1 "Trebuchet MS", sans-serif;
  background: linear-gradient(135deg, var(--gold-strong), #fff1b7);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(232, 200, 136, 0.22);
}
.brand strong { display: block; font-size: 17px; letter-spacing: 0.04em; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font: 700 11px/1.2 "Trebuchet MS", sans-serif; letter-spacing: 0.18em; text-transform: uppercase; }

nav { display: flex; gap: 18px; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
nav a:hover { color: var(--gold); }

main { position: relative; padding: 0 clamp(18px, 5vw, 78px) 80px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 36px;
  align-items: end;
  min-height: 680px;
  padding: 88px 0 70px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font: 800 12px/1.2 "Trebuchet MS", sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1, h2, h3 { margin: 0; }
h1 {
  max-width: 980px;
  font-size: clamp(52px, 8vw, 112px);
  line-height: 0.92;
  letter-spacing: -0.08em;
}
h2 { font-size: clamp(34px, 4vw, 64px); line-height: 1; letter-spacing: -0.055em; }
h3 { font-size: 24px; line-height: 1.18; letter-spacing: -0.02em; }

.subtitle {
  max-width: 820px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.85;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 36px; }
.hero-actions a, button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: 800 14px/1 "Trebuchet MS", "Noto Sans SC", sans-serif;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.primary, .feature-form button, .auth-panel button {
  color: #07110d;
  background: linear-gradient(135deg, var(--gold-strong), #fff2b8);
  box-shadow: 0 18px 40px rgba(232, 200, 136, 0.2);
}
.hero-actions a { padding: 16px 22px; }
.ghost { color: var(--ink); border: 1px solid var(--line); background: rgba(255,255,255,0.06); }

.hero-card {
  position: relative;
  padding: 28px;
  min-height: 280px;
  background: linear-gradient(160deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04));
  border: 1px solid var(--line);
  border-radius: 34px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-card::after { content: ""; position: absolute; inset: auto -20% -30% 25%; height: 160px; background: radial-gradient(circle, rgba(232,200,136,.34), transparent 70%); }
.live-dot { display: inline-block; width: 12px; height: 12px; border-radius: 999px; background: var(--jade); box-shadow: 0 0 0 8px rgba(68,215,168,.12); }
.hero-card p { color: var(--muted); font: 800 12px/1 "Trebuchet MS", sans-serif; letter-spacing: .18em; text-transform: uppercase; }
.hero-card strong { display: block; margin-top: 28px; font-size: 34px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 46px; }
.hero-stats span { padding: 12px; color: var(--muted); background: rgba(0,0,0,.18); border: 1px solid rgba(255,255,255,.08); border-radius: 18px; }
.hero-stats b { display: block; color: var(--gold); font-size: 24px; }

.section {
  margin: 34px auto;
  max-width: 1320px;
  padding: clamp(24px, 4vw, 48px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 38px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.section-head { display: grid; grid-template-columns: 0.75fr 1fr; gap: 24px; align-items: end; margin-bottom: 28px; }
.section-head p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 18px; line-height: 1.8; }
.section-head.compact { display: block; max-width: 900px; }
.section-head.compact p:not(.eyebrow) { margin-top: 16px; }

.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.module-card {
  min-height: 240px;
  padding: 24px;
  border: 1px solid rgba(232, 200, 136, 0.16);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.035));
}
.module-card strong { color: var(--gold); font: 900 13px/1 "Trebuchet MS", sans-serif; letter-spacing: 0.18em; }
.module-card h3 { margin-top: 14px; min-height: 58px; }
.module-card p { color: var(--muted); line-height: 1.7; }
.module-card ul { margin: 18px 0 0; padding: 0; list-style: none; color: #d8ded9; font-size: 14px; }
.module-card li { padding: 7px 0; border-top: 1px solid rgba(255,255,255,.08); }

.command { background: rgba(8, 20, 17, 0.9); }
.auth-panel {
  display: grid;
  grid-template-columns: 220px minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 24px;
  background: rgba(255,255,255,.055);
}
label { color: var(--muted); font: 800 12px/1.5 "Trebuchet MS", sans-serif; letter-spacing: .12em; text-transform: uppercase; }
input, select, textarea {
  width: 100%;
  margin-top: 8px;
  padding: 13px 14px;
  color: var(--ink);
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  outline: none;
  font: 500 15px/1.4 "Trebuchet MS", "Noto Sans SC", sans-serif;
}
textarea { min-height: 96px; resize: vertical; grid-column: 1 / -1; }
input:focus, select:focus, textarea:focus { border-color: rgba(232,200,136,.72); box-shadow: 0 0 0 4px rgba(232,200,136,.08); }
.auth-panel button, .feature-form button { padding: 15px 20px; }

.metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.metric { padding: 16px; border: 1px solid rgba(255,255,255,.1); border-radius: 20px; background: rgba(255,255,255,.055); }
.metric b { display: block; color: var(--gold); font-size: 30px; }
.metric span { color: var(--muted); font-size: 13px; }

.tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0; }
.tabs button { padding: 12px 16px; color: var(--muted); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.tabs button.active { color: #07110d; background: var(--gold); }

.workspace { border: 1px solid rgba(255,255,255,.1); border-radius: 30px; overflow: hidden; }
.feature-form { display: none; padding: 26px; background: rgba(255,255,255,.04); }
.feature-form.active { display: block; }
.feature-form p { max-width: 860px; color: var(--muted); line-height: 1.75; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 20px 0; }

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.quick-actions article {
  padding: 18px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 24px;
  background: rgba(255,255,255,.05);
}
.quick-actions h3 { font-size: 20px; }
.quick-actions p { min-height: 72px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.quick-actions button { width: 100%; margin-top: 10px; padding: 13px 14px; color: #07110d; background: var(--gold); }

.result-panel {
  display: grid;
  grid-template-columns: 0.55fr 1fr;
  gap: 18px;
  margin-top: 18px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 28px;
  background: #050b09;
}
.result-panel p { color: var(--muted); line-height: 1.7; }
pre { margin: 0; max-height: 360px; overflow: auto; color: #d5ffe9; white-space: pre-wrap; font: 13px/1.65 "Cascadia Code", Consolas, monospace; }

.ops-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ops-grid article { padding: 22px; min-height: 190px; border: 1px solid rgba(255,255,255,.1); border-radius: 26px; background: rgba(255,255,255,.055); }
.ops-grid b { color: var(--gold); font: 900 34px/1 "Trebuchet MS", sans-serif; }
.ops-grid h3 { margin-top: 18px; }
.ops-grid p { color: var(--muted); line-height: 1.7; }

@media (max-width: 1040px) {
  .hero, .section-head, .result-panel { grid-template-columns: 1fr; }
  .module-grid, .ops-grid, .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .auth-panel { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .topbar { position: relative; align-items: flex-start; flex-direction: column; }
  nav { gap: 12px; }
  .hero { min-height: auto; padding-top: 54px; }
  .module-grid, .ops-grid, .form-grid, .metrics, .quick-actions { grid-template-columns: 1fr; }
}
