@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  color-scheme: dark;
  --bg: #060c18;
  --bg-elevated: #0a1324;
  --surface: rgba(14, 24, 42, 0.78);
  --surface-strong: rgba(22, 35, 59, 0.88);
  --surface-subtle: rgba(140, 167, 205, 0.1);
  --surface-overlay: rgba(6, 12, 24, 0.82);
  --foreground: #e7eefb;
  --foreground-muted: #9aabc8;
  --primary: #4f8cff;
  --primary-hover: #66a0ff;
  --accent: #2dd4bf;
  --danger: #ef5f7a;
  --border-subtle: rgba(163, 184, 215, 0.26);
  --border-muted: rgba(163, 184, 215, 0.18);
  --shadow-soft: 0 18px 40px rgba(2, 6, 18, 0.4);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f5f8fe;
    --bg-elevated: #ffffff;
    --surface: rgba(255, 255, 255, 0.86);
    --surface-strong: rgba(246, 250, 255, 0.96);
    --surface-subtle: rgba(64, 102, 176, 0.08);
    --surface-overlay: rgba(245, 248, 254, 0.8);
    --foreground: #101a2f;
    --foreground-muted: #4d6286;
    --primary: #2f62d9;
    --primary-hover: #3a73f7;
    --accent: #0f9a88;
    --danger: #d63d5c;
    --border-subtle: rgba(47, 98, 217, 0.22);
    --border-muted: rgba(16, 26, 47, 0.12);
    --shadow-soft: 0 14px 32px rgba(26, 40, 66, 0.12);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  position: relative;
  font-family: var(--font-heading), sans-serif;
  color: var(--foreground);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.ui-background {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      circle at 18% 10%,
      color-mix(in srgb, var(--primary) 28%, transparent),
      transparent 44%
    ),
    radial-gradient(
      circle at 82% 0%,
      color-mix(in srgb, var(--accent) 20%, transparent),
      transparent 36%
    ),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--bg-elevated) 86%, var(--bg)),
      var(--bg)
    );
}

.ui-background::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(
      to right,
      color-mix(in srgb, var(--foreground-muted) 10%, transparent) 1px,
      transparent 1px
    ),
    linear-gradient(
      to bottom,
      color-mix(in srgb, var(--foreground-muted) 10%, transparent) 1px,
      transparent 1px
    );
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 55% 42%, black, transparent 78%);
  opacity: 0.2;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--foreground);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 3.8vw, 3.4rem);
  font-weight: 700;
  line-height: 1.08;
}

h2 {
  font-size: clamp(1.4rem, 2.3vw, 2rem);
  font-weight: 650;
  line-height: 1.15;
}

p {
  margin: 0;
  line-height: 1.65;
  color: var(--foreground-muted);
}

small {
  color: var(--foreground-muted);
}

label {
  display: grid;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--foreground-muted);
}

.mono {
  font-family: var(--font-mono), ui-monospace, SFMono-Regular, Menlo, monospace;
}

.section-kicker {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 700;
}

.section-title {
  max-width: 18ch;
}

.section-description {
  max-width: 68ch;
}

.reveal-up {
  animation: revealUp 420ms ease-out both;
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .section-title {
    max-width: 100%;
  }
}
