/* ============================================
   Diaboliq — Design System
   ============================================ */

/* --- Custom Properties --- */
:root {
  --color-bg: #0a0a0c;
  --color-bg-surface: #111115;
  --color-bg-elevated: #1a1a1f;
  --color-border: #2a2a32;
  --color-text: #e8e8ed;
  --color-text-muted: #7a7a8a;
  --color-accent: #c41e3a;
  --color-accent-hover: #e6223f;
  --color-accent-subtle: rgba(196, 30, 58, 0.12);

  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.6);

  --transition: 150ms ease;
  --max-width: 1100px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.125rem; }

p { max-width: 65ch; }
p + p { margin-top: 1em; }

a { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent-hover); }

.text-muted { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent); }
.text-center { text-align: center; }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section--sm { padding: 3rem 0; }
.section--lg { padding: 7rem 0; }

.grid {
  display: grid;
  gap: 2rem;
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 2rem;
}

.nav__logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.03em;
  text-decoration: none;
}

.nav__logo span { color: var(--color-accent); }

.nav__logo:hover span { color: var(--color-text); }
.nav__logo:hover { color: var(--color-accent); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
}

.nav__links a:hover,
.nav__links a[aria-current="page"] {
  color: var(--color-text);
  background: var(--color-bg-elevated);
}

.nav__links a[aria-current="page"] { color: var(--color-accent); }

.nav__cta {
  margin-left: 0.5rem;
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__links.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--color-bg-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem;
    gap: 0.25rem;
  }
  .nav__cta { display: none; }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.625rem 1.375rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-accent);
  color: #fff;
}
.btn--primary:hover {
  background: var(--color-accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(196, 30, 58, 0.35);
}

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn--outline:hover {
  border-color: var(--color-text-muted);
  color: var(--color-text);
  background: var(--color-bg-elevated);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-muted);
  padding: 0.625rem 1rem;
}
.btn--ghost:hover { color: var(--color-text); background: var(--color-bg-elevated); }

/* --- Hero --- */
.hero {
  padding: 8rem 0 6rem;
  text-align: center;
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1.25rem;
}

.hero__title {
  margin-bottom: 1.5rem;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--color-text-muted);
  max-width: 55ch;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --- Cards --- */
.card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: var(--color-text-muted);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card__icon {
  width: 48px;
  height: 48px;
  background: var(--color-accent-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--color-accent);
  font-size: 1.25rem;
}

.card__title { margin-bottom: 0.75rem; }
.card__body { color: var(--color-text-muted); font-size: 0.9375rem; }

/* --- Section Header --- */
.section-header {
  margin-bottom: 3.5rem;
}
.section-header--center { text-align: center; }
.section-header--center p { margin: 1rem auto 0; }

/* --- Forms --- */
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

.form-input {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

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

.form-input::placeholder { color: var(--color-text-muted); }

/* --- Divider --- */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 3rem 0;
}

/* --- Footer --- */
.footer {
  background: var(--color-bg-surface);
  border-top: 1px solid var(--color-border);
  padding: 3rem 0 2rem;
  margin-top: auto;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.footer__brand {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text);
}

.footer__brand span { color: var(--color-accent); }

.footer__brand:hover span { color: var(--color-text); }
.footer__brand:hover { color: var(--color-accent); }

.footer__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

.footer__links a {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.footer__links a:hover { color: var(--color-text); }

.footer__copy {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* --- Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-up {
  animation: fadeUp 0.5s ease both;
}
.animate-fade-up:nth-child(2) { animation-delay: 0.1s; }
.animate-fade-up:nth-child(3) { animation-delay: 0.2s; }
.animate-fade-up:nth-child(4) { animation-delay: 0.3s; }

/* --- Responsive --- */
@media (max-width: 640px) {
  .section { padding: 3.5rem 0; }
  .hero { padding: 5rem 0 4rem; }
  .grid--3, .grid--4 { grid-template-columns: 1fr; }
}
