/* ============================================================
   DeviceFreedom Design System — Phase 2.1
   df-system.css
   Art direction: dark open-platform hardware brand
   Palette: #0A0A0A bg, #00F0FF cyan accent, #A78BFA violet secondary
   Typography: Inter (body) + Space Grotesk (display)
   Density: balanced
============================================================ */

/* Google Fonts — Inter + Space Grotesk */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300..700&family=Space+Grotesk:wght@400..700&display=swap');

/* ── Design Tokens ───────────────────────────────────────── */
:root {
  /* Brand colors */
  --df-bg:          #0A0A0A;
  --df-surface:     #0F0F0F;
  --df-surface-2:   #141414;
  --df-card:        rgba(255,255,255,0.03);
  --df-border:      rgba(255,255,255,0.06);
  --df-border-hover:rgba(0,240,255,0.18);
  --df-cyan:        #00F0FF;
  --df-cyan-dim:    rgba(0,240,255,0.12);
  --df-cyan-glow:   rgba(0,240,255,0.25);
  --df-violet:      #A78BFA;
  --df-text:        #FFFFFF;
  --df-muted:       #9CA3AF;
  --df-faint:       #4B5563;

  /* Typography */
  --font-display:  'Space Grotesk', 'Helvetica Neue', sans-serif;
  --font-body:     'Inter', 'Helvetica Neue', sans-serif;

  /* Fluid type scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);

  /* 4px spacing scale */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  /* Radii */
  --radius-sm:   0.375rem;
  --radius-md:   0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow:  640px;
  --content-default: 960px;
  --content-wide:    1200px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-padding-top: var(--sp-16);
  hanging-punctuation: first last;
}

body {
  background-color: var(--df-bg);
  color: var(--df-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  min-height: 100dvh;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

ul[role="list"], ol[role="list"] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; line-height: 1.15; }
p, li, figcaption { text-wrap: pretty; max-width: 72ch; }

::selection {
  background: rgba(0,240,255,0.2);
  color: var(--df-text);
}

:focus-visible {
  outline: 2px solid var(--df-cyan);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

button { cursor: pointer; background: none; border: none; }
table  { border-collapse: collapse; width: 100%; }

a, button, [role="button"], [role="link"], input, textarea, select {
  transition: color var(--transition),
              background var(--transition),
              border-color var(--transition),
              box-shadow var(--transition);
}

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

/* ── Strip Umbrel / Framer / Next.js Artifacts ───────────── */
script[src*="_next"],
link[href*="_next"],
script[src*="umbrel-support-widget"],
[data-framer],
[class*="framer-"],
[id*="__next"] {
  display: none !important;
}

/* ── Glassmorphism Card ──────────────────────────────────── */
.df-card {
  background: var(--df-card);
  border: 1px solid var(--df-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow var(--transition),
              border-color var(--transition),
              transform var(--transition);
}

.df-card:hover {
  border-color: var(--df-border-hover);
  box-shadow: 0 0 24px rgba(0,240,255,0.06);
  transform: translateY(-2px);
}

/* ── CTA Button ──────────────────────────────────────────── */
.df-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--df-cyan);
  color: #000;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  text-decoration: none;
  animation: df-cyan-pulse 3s ease-in-out infinite;
  transition: opacity var(--transition), box-shadow var(--transition);
}

.df-btn:hover {
  opacity: 0.88;
  box-shadow: 0 0 32px rgba(0,240,255,0.4);
}

.df-btn--ghost {
  background: transparent;
  color: var(--df-cyan);
  border: 1px solid rgba(0,240,255,0.35);
  animation: none;
}

.df-btn--ghost:hover {
  background: rgba(0,240,255,0.07);
  border-color: var(--df-cyan);
  box-shadow: 0 0 16px rgba(0,240,255,0.15);
  opacity: 1;
}

@keyframes df-cyan-pulse {
  0%,  100% { box-shadow: 0 0 0 0 rgba(0,240,255,0); }
  50%        { box-shadow: 0 0 18px 4px rgba(0,240,255,0.2); }
}

/* ── Trust Badge ─────────────────────────────────────────── */
.df-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: rgba(0,240,255,0.06);
  border: 1px solid rgba(0,240,255,0.15);
  border-radius: var(--radius-full);
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--text-xs);
  color: var(--df-cyan);
  font-weight: 500;
  white-space: nowrap;
}

/* ── Section Utility ─────────────────────────────────────── */
.df-section {
  padding-block: clamp(var(--sp-12), 8vw, var(--sp-24));
  padding-inline: var(--sp-6);
}

.df-container {
  max-width: var(--content-wide);
  margin-inline: auto;
}

.df-container--narrow {
  max-width: var(--content-narrow);
  margin-inline: auto;
}

/* ── Typography Utilities ────────────────────────────────── */
.df-heading {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--df-text);
}

.df-subheading {
  font-size: var(--text-base);
  color: var(--df-muted);
  max-width: 56ch;
}

.df-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--df-cyan);
}

/* ── Divider ─────────────────────────────────────────────── */
.df-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-block: var(--sp-12);
}

/* ── Scroll-fade animation ───────────────────────────────── */
.df-fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.df-fade-in.df-visible {
  opacity: 1;
  transform: none;
}
