@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700&display=swap');

/* ==========================================================================
   NEAPP DESIGN SYSTEM — Direction: product-performs (design-taste-frontend)
   Tokens, Fluid Typography, Anti-Slop House Rules & Layout Grid
   ========================================================================== */

:root {
  /* Core Palette (White & Fresh Mint Tiles) */
  --bg: #ffffff;
  --surface: #f4f4f4;
  --surface-alt: #eaeaea;
  --surface-raised: #e0e0e0;
  
  --ink: #1c1c1c;
  --ink-secondary: #585858;
  --ink-tertiary: #595959;
  
  --accent: #a1ffcb;
  --accent-ink: #10261b;
  --accent-hover: #8be6b5;
  
  --dark-field: #141414;
  --dark-surface: #222222;
  --dark-ink: #f8f8f8;
  --dark-muted: #a0a0a0;

  /* Typography Scale (Fluid clamp) */
  --font-display: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, sans-serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  --step-lead: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem);
  --step-h3: clamp(1.4rem, 1.25rem + 0.8vw, 1.85rem);
  --step-h2: clamp(1.9rem, 1.55rem + 1.5vw, 2.75rem);
  --step-h1: clamp(2.4rem, 1.8rem + 3.2vw, 4.25rem);

  /* Spacing */
  --space-unit: 8px;
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;
  --space-xxl: 96px;

  /* Layout */
  --max-width: 1280px;
  --container-padding: clamp(16px, 4vw, 40px);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 160ms var(--ease-out);
  --transition-normal: 280ms var(--ease-out);
}

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

html {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  font-size: 16px;
  line-height: 1.5;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
}

/* Strict Typography Rules: Max 2 lines for headings */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-wrap: balance;
}

h1, .hero-title {
  font-size: var(--step-h1);
  margin-bottom: var(--space-md);
  max-width: 40ch;
}

h2, .section-header h2 {
  font-size: var(--step-h2);
  margin-bottom: var(--space-sm);
  max-width: 42ch;
}

h3, .tool-card h3 {
  font-size: var(--step-h3);
  margin-bottom: var(--space-xs);
  max-width: 40ch;
}

.faq-item summary {
  max-width: 45ch;
}

p {
  font-size: var(--step-body);
  color: var(--ink-secondary);
  line-height: 1.55;
  max-width: 65ch;
}

p.lead {
  font-size: var(--step-lead);
  color: var(--ink);
  line-height: 1.45;
  margin-bottom: var(--space-md);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

/* Focus state visible without shadows */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Buttons: Flat colors, zero gradients, zero shadows at rest */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-body);
  padding: 14px 28px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
  user-select: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-secondary {
  background-color: var(--surface);
  color: var(--ink);
}

.btn-secondary:hover {
  background-color: var(--surface-alt);
}

.btn-dark {
  background-color: var(--dark-field);
  color: var(--dark-ink);
}

.btn-dark:hover {
  background-color: #2a2a2a;
}

.btn-sm {
  padding: 8px 16px;
  font-size: var(--step-small);
}

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

/* UI Fragment Attribute: Isolate app widgets */
[data-ui] {
  background-color: var(--surface);
  border-radius: 8px;
}

/* Navigation Bar */
.neapp-nav {
  width: 100%;
  background-color: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.neapp-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.neapp-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.neapp-brand-dot {
  width: 9px;
  height: 9px;
  background-color: var(--accent);
  border-radius: 50%;
  display: inline-block;
}

.neapp-nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
}

.neapp-nav-link {
  font-size: var(--step-small);
  font-weight: 600;
  color: var(--ink-secondary);
  padding: 6px 12px;
  border-radius: 4px;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.neapp-nav-link:hover,
.neapp-nav-link.active {
  color: var(--ink);
  background-color: var(--surface);
}

.neapp-nav-tag {
  font-size: var(--step-small);
  font-weight: 600;
  color: var(--accent-ink);
  background-color: var(--accent);
  padding: 4px 10px;
  border-radius: 4px;
}

/* Footer of Tiles: Dealt Blueprint */
.neapp-footer-tiles {
  background-color: var(--surface);
  padding: var(--space-xl) 0 var(--space-lg);
  margin-top: auto;
}

.tiles-grid-upper {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.tiles-grid-lower {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}

.tile {
  background-color: var(--bg);
  border-radius: 6px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tile-statement {
  grid-column: span 4;
}

.tile-statement h3 {
  font-size: 1.25rem;
  line-height: 1.2;
}

.tile-nav {
  grid-column: span 5;
}

.tile-nav-title,
.tile-specs-title {
  font-size: var(--step-small);
  font-weight: 700;
  color: var(--ink-tertiary);
  margin-bottom: 12px;
  display: block;
}

.tile-nav ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
}

.tile-nav a {
  font-size: var(--step-small);
  color: var(--ink-secondary);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.tile-nav a:hover {
  color: var(--ink);
  background-color: var(--surface);
}

.tile-nav a.active {
  color: var(--accent-ink);
  background-color: var(--accent);
  font-weight: 700;
}

.tile-specs {
  grid-column: span 3;
}

.tile-brand-huge {
  grid-column: span 8;
  background-color: var(--dark-field);
  color: var(--dark-ink);
  min-height: 140px;
  justify-content: center;
  align-items: center;
}

.tile-brand-huge span {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.05em;
}

.tile-cta-accent {
  grid-column: span 4;
  background-color: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  transition: background-color var(--transition-fast);
}

.tile-cta-accent:hover {
  background-color: var(--accent-hover);
}

.tile-cta-accent h4 {
  font-size: 1.35rem;
  line-height: 1.15;
  margin-bottom: 12px;
}

.tile-cta-arrow {
  align-self: flex-end;
  font-size: 1.8rem;
  font-weight: 700;
}

/* Mobile Responsive */
@media (max-width: 900px) {
  h1, .hero-title {
    max-width: 100%;
    font-size: clamp(2rem, 8vw, var(--step-h1));
    line-height: 1.12;
  }

  h2, .section-header h2 {
    max-width: 100%;
    font-size: clamp(1.4rem, 6vw, var(--step-h2));
    line-height: 1.15;
  }

  h3, .tool-card h3 {
    max-width: 100%;
  }

  .faq-item summary {
    max-width: 100%;
  }

  .tiles-grid-upper,
  .tiles-grid-lower {
    grid-template-columns: 1fr;
  }
  
  .tile-statement,
  .tile-nav,
  .tile-specs,
  .tile-brand-huge,
  .tile-cta-accent {
    grid-column: span 1;
  }

  .tile-nav ul {
    grid-template-columns: 1fr;
  }
  
  .neapp-nav-links {
    display: none;
  }
}
