:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --fg: #0f172a;
  --muted: #5b6478;
  --soft: #8a93a6;
  --accent: #4f46e5;
  --accent-2: #7c3aed;
  --accent-hover: #3b32c7;
  --border: #e6e8ee;
  --ring: rgba(79, 70, 229, 0.18);
  --error-bg: #fff5f5;
  --error-border: #fdb4b4;
  --error-fg: #9b1c1c;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 6px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 48px rgba(79, 70, 229, 0.18);
  --radius: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 520px;
  z-index: -1;
  background:
    radial-gradient(900px 400px at 18% 0%, rgba(124, 58, 237, 0.10), transparent 60%),
    radial-gradient(900px 400px at 82% 0%, rgba(79, 70, 229, 0.10), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 56px 24px 24px;
}

h1 {
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  font-weight: 800;
  background: linear-gradient(135deg, #0f172a 0%, #4f46e5 60%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-size: clamp(1.3rem, 1rem + 0.8vw, 1.65rem);
  margin: 56px 0 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.05rem;
  margin: 18px 0 6px;
  font-weight: 600;
}

p { margin: 0 0 12px; }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 120ms ease;
}
a:hover { border-bottom-color: currentColor; }

.hero { text-align: center; padding-top: 8px; }

.subheading {
  color: var(--muted);
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.15rem);
  margin: 0 auto 24px;
  max-width: 640px;
}

.errors {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error-fg);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin: 0 auto 18px;
  max-width: 640px;
  text-align: left;
}
.errors ul { margin: 0; padding-left: 20px; }

.analyze-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  background: var(--surface);
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  text-align: left;
  margin: 8px auto 0;
  max-width: 720px;
}

.analyze-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
  text-transform: uppercase;
}

.analyze-form .optional {
  font-size: 0.7rem;
  color: var(--soft);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 4px;
}

.analyze-form input {
  margin-top: 6px;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--fg);
  font-family: inherit;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.analyze-form input::placeholder { color: var(--soft); }

.analyze-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--ring);
}

.analyze-form button {
  grid-column: 1 / -1;
  margin-top: 6px;
  padding: 14px 20px;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 120ms ease, box-shadow 200ms ease, filter 120ms ease;
}
.analyze-form button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  filter: brightness(1.03);
}
.analyze-form button:active { transform: translateY(0); }

.how-it-works {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  margin-top: 36px;
}
.how-it-works h2 { margin-top: 0; }

.how-it-works ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 14px;
}

.how-it-works ol li {
  position: relative;
  padding-left: 48px;
  counter-increment: step;
  color: var(--fg);
}

.how-it-works ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.what-is article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 28px;
  box-shadow: var(--shadow-sm);
  color: var(--fg);
}

.faq {
  display: grid;
  gap: 12px;
}

.faq article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 200ms ease, transform 200ms ease;
}

.faq article:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.faq h3 { margin-top: 0; color: var(--fg); }
.faq p { color: var(--muted); margin: 0; }

.status {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-md);
  text-align: center;
  max-width: 560px;
  margin: 24px auto 0;
}

.status h1 {
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem);
  margin-top: 8px;
}

footer {
  border-top: 1px solid var(--border);
  margin-top: 56px;
  padding: 24px 20px;
  text-align: center;
  color: var(--soft);
  font-size: 0.88rem;
}

@media (max-width: 640px) {
  main { padding: 32px 18px 16px; }
  .analyze-form {
    grid-template-columns: 1fr;
    padding: 22px;
  }
  .how-it-works,
  .what-is article,
  .faq article { padding: 18px 20px; }
}
