/* ==========================================================================
   WILLDEVO LLC — Brand Tokens & Design System
   All brand values are defined here as CSS custom properties.
   To rebrand, update these values only.
   ========================================================================== */

:root {
  /* --- Colors: Core Palette --- */
  --color-bg-primary: #0a0f1c;
  --color-bg-secondary: #0f1528;
  --color-bg-tertiary: #141c33;
  --color-bg-card: #161e36;
  --color-bg-card-hover: #1c2644;

  --color-text-primary: #e8ecf4;
  --color-text-secondary: #9aa3bc;
  --color-text-muted: #6b7594;

  --color-accent-primary: #4f8cff;
  --color-accent-primary-hover: #6da0ff;
  --color-accent-primary-glow: rgba(79, 140, 255, 0.15);
  --color-accent-secondary: #38d9a9;

  --color-border: rgba(255, 255, 255, 0.06);
  --color-border-hover: rgba(255, 255, 255, 0.12);

  --color-badge-live: #38d9a9;
  --color-badge-dev: #f5a623;

  /* --- Typography --- */
  --font-family-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  --font-family-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono",
    "Cascadia Code", Menlo, Consolas, "DejaVu Sans Mono", monospace;

  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-md: 1.125rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 2.5rem;
  --font-size-4xl: 3.5rem;
  --font-size-5xl: 4.5rem;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  --line-height-tight: 1.15;
  --line-height-snug: 1.3;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.75;

  --letter-spacing-tight: -0.02em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.05em;
  --letter-spacing-wider: 0.1em;

  /* --- Spacing --- */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* --- Layout --- */
  --container-max: 1140px;
  --container-padding: var(--space-lg);

  /* --- Border Radius --- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* --- Shadows --- */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px var(--color-accent-primary-glow);

  /* --- Transitions --- */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* --- Z-Index Scale --- */
  --z-nav: 100;
  --z-overlay: 200;
}


/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover {
  color: var(--color-accent-primary-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-accent-primary);
  outline-offset: 2px;
}

ul {
  list-style: none;
}

address {
  font-style: normal;
}

strong {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}


/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.section {
  padding: var(--space-5xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-tight);
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
}

.section-divider {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent-primary), var(--color-accent-secondary));
  border-radius: var(--radius-full);
  margin: var(--space-md) auto 0;
}


/* ==========================================================================
   Navigation
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  background: rgba(10, 15, 28, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-base);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-md) var(--container-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  text-decoration: none;
  color: var(--color-text-primary);
}

.logo-text {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-wide);
  color: var(--color-text-primary);
}

.nav-links {
  display: flex;
  gap: var(--space-xl);
}

.nav-links a {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent-primary);
  border-radius: var(--radius-full);
  transition: width var(--transition-base);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text-secondary);
  border-radius: var(--radius-full);
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-title {
  font-size: var(--font-size-5xl);
  font-weight: var(--font-weight-extrabold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  margin-bottom: var(--space-lg);
}

.hero-title-accent {
  color: var(--color-accent-primary);
  font-weight: var(--font-weight-bold);
}

.hero-tagline {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  line-height: var(--line-height-snug);
  margin-bottom: var(--space-md);
}

.hero-description {
  font-size: var(--font-size-md);
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-2xl);
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.hero-glow {
  position: absolute;
  top: 20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    var(--color-accent-primary-glow) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
  animation: pulse-glow 6s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
  0% { opacity: 0.4; transform: scale(1); }
  100% { opacity: 0.7; transform: scale(1.15); }
}


/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-xl);
  font-family: var(--font-family-sans);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent-primary);
  color: #fff;
  box-shadow: 0 2px 12px rgba(79, 140, 255, 0.25);
}

.btn-primary:hover {
  background: var(--color-accent-primary-hover);
  box-shadow: 0 4px 20px rgba(79, 140, 255, 0.35);
  color: #fff;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-hover);
}

.btn-secondary:hover {
  color: var(--color-text-primary);
  border-color: var(--color-text-muted);
  transform: translateY(-1px);
}

.btn-full {
  width: 100%;
}


/* ==========================================================================
   What We Do
   ========================================================================== */

.section-what-we-do {
  background: var(--color-bg-secondary);
}

.what-we-do-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.focus-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  transition: border-color var(--transition-base), transform var(--transition-base),
    box-shadow var(--transition-base);
}

.focus-card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.focus-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-primary-glow);
  border-radius: var(--radius-md);
  color: var(--color-accent-primary);
  margin-bottom: var(--space-lg);
}

.focus-card h3 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-sm);
  color: var(--color-text-primary);
}

.focus-card p {
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  font-size: var(--font-size-sm);
}


/* ==========================================================================
   Products
   ========================================================================== */

.section-products {
  background: var(--color-bg-primary);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.product-card {
  position: relative;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  transition: border-color var(--transition-base), transform var(--transition-base),
    box-shadow var(--transition-base);
  overflow: hidden;
}

.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.product-card-sapling::before {
  background: linear-gradient(90deg, var(--color-accent-secondary), #69db7c);
}

.product-card-note::before {
  background: linear-gradient(90deg, var(--color-accent-primary), #748ffc);
}

.product-card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-badge {
  display: inline-block;
  padding: var(--space-2xs) var(--space-sm);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
  border-radius: var(--radius-full);
  background: rgba(56, 217, 169, 0.12);
  color: var(--color-badge-live);
  margin-bottom: var(--space-lg);
}

.product-badge-dev {
  background: rgba(245, 166, 35, 0.12);
  color: var(--color-badge-dev);
}

.product-badge-beta {
  background: rgba(99, 144, 255, 0.12);
  color: #6390ff;
}

.product-icon {
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

.product-card-sapling .product-icon {
  color: var(--color-accent-secondary);
}

.product-card-note .product-icon {
  color: var(--color-accent-primary);
}

.product-name {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-xs);
  letter-spacing: var(--letter-spacing-tight);
}

.product-tagline {
  font-size: var(--font-size-md);
  color: var(--color-text-muted);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-md);
}

.product-description {
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-lg);
  font-size: var(--font-size-sm);
}

.product-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.product-features li {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  padding-left: var(--space-lg);
  position: relative;
}

.product-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent-primary);
}

.product-card-sapling .product-features li::before {
  background: var(--color-accent-secondary);
}


/* ==========================================================================
   About
   ========================================================================== */

.section-about {
  background: var(--color-bg-secondary);
}

.about-content {
  max-width: 680px;
  margin: 0 auto;
}

.about-content .section-header {
  text-align: left;
}

.about-content .section-divider {
  margin-left: 0;
}

.about-text p {
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  font-size: var(--font-size-md);
}

.about-text p + p {
  margin-top: var(--space-lg);
}


/* ==========================================================================
   Contact
   ========================================================================== */

.section-contact {
  background: var(--color-bg-primary);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

.contact-intro {
  font-size: var(--font-size-md);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-2xl);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-text-secondary);
}

.contact-item svg {
  color: var(--color-accent-primary);
  flex-shrink: 0;
}

.contact-item a {
  color: var(--color-text-secondary);
}

.contact-item a:hover {
  color: var(--color-accent-primary);
}

/* Form */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xs);
  letter-spacing: var(--letter-spacing-wide);
}

.form-input {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-family-sans);
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

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

.form-input:hover {
  border-color: var(--color-border-hover);
}

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

.form-textarea {
  resize: vertical;
  min-height: 120px;
}


/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
  padding: var(--space-2xl) 0;
}

.footer-content {
  text-align: center;
}

.footer-brand {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-wider);
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
}

.footer-copy {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2xs);
}

.footer-location {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}


/* ==========================================================================
   Scroll Animations
   ========================================================================== */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children in grids */
.what-we-do-grid .animate-on-scroll:nth-child(2) {
  transition-delay: 0.1s;
}

.what-we-do-grid .animate-on-scroll:nth-child(3) {
  transition-delay: 0.2s;
}

.products-grid .animate-on-scroll:nth-child(2) {
  transition-delay: 0.15s;
}


/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .what-we-do-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .hero-title {
    font-size: var(--font-size-4xl);
  }

  .section-title {
    font-size: var(--font-size-2xl);
  }
}

@media (max-width: 640px) {
  :root {
    --container-padding: var(--space-md);
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 15, 28, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2xl);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
    z-index: var(--z-overlay);
  }

  .nav-links.is-open {
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    font-size: var(--font-size-lg);
  }

  .nav-toggle {
    position: relative;
    z-index: calc(var(--z-overlay) + 1);
  }

  .hero {
    min-height: auto;
    padding-top: 120px;
    padding-bottom: var(--space-4xl);
  }

  .hero-title {
    font-size: var(--font-size-3xl);
  }

  .hero-tagline {
    font-size: var(--font-size-lg);
  }

  .hero-description {
    font-size: var(--font-size-base);
  }

  .hero-glow {
    width: 300px;
    height: 300px;
    top: 10%;
    right: -20%;
  }

  .section {
    padding: var(--space-3xl) 0;
  }

  .product-card {
    padding: var(--space-xl);
  }

  .focus-card {
    padding: var(--space-xl);
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    text-align: center;
  }
}


/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-glow {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
