/* ==========================================================================
   DoodleWerks — Mobile-first stylesheet
   ========================================================================== */

/* ----- Reset & Base ----- */

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

:root {
  --charcoal: #555;
  --orange: #F5921B;
  --orange-text: #C47012;
  --white: #fff;
  --light-gray: #f5f5f5;
  --dark-gray: #333;
  --focus-ring: #4A90D9;
  --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-display: 'Outfit', 'Nunito', sans-serif;
  --shadow-sm: rgba(0, 0, 0, 0.08);
  --shadow-md: rgba(0, 0, 0, 0.08);
  --shadow-lg: rgba(0, 0, 0, 0.12);
  --shadow-orange: rgba(245, 146, 27, 0.4);
  --dot-color: rgba(0, 0, 0, 0.07);
  --border-color: #ddd;
  --table-stripe: #fafafa;
  --footer-bg: #333;
  --footer-text: rgba(255, 255, 255, 0.85);
}

@media (prefers-color-scheme: dark) {
  :root {
    --charcoal: #b8b8b8;
    --orange: #F5921B;
    --orange-text: #f0a040;
    --white: #1a1a1a;
    --light-gray: #242424;
    --dark-gray: #e8e8e8;
    --focus-ring: #6aadef;
    --shadow-sm: rgba(0, 0, 0, 0.3);
    --shadow-md: rgba(0, 0, 0, 0.4);
    --shadow-lg: rgba(0, 0, 0, 0.5);
    --shadow-orange: rgba(245, 146, 27, 0.25);
    --dot-color: rgba(255, 255, 255, 0.05);
    --border-color: #444;
    --table-stripe: #222;
    --footer-bg: #111;
    --footer-text: rgba(255, 255, 255, 0.75);
  }
}

html {
  scroll-behavior: smooth;
  color-scheme: light dark;
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--charcoal);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--dark-gray);
  margin-bottom: 1rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2.5rem;
}

h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--orange);
  margin: 0.6rem auto 0;
  border-radius: 2px;
}

p {
  margin-bottom: 1rem;
}

a {
  text-decoration: none;
  color: var(--orange-text);
  transition: color 0.2s ease;
}

a:hover {
  color: var(--orange);
}

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

/* ----- Focus Styles ----- */

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

a:focus-visible {
  border-radius: 2px;
}

/* ----- Skip Link ----- */

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.5rem;
  background: var(--footer-bg);
  color: #fff;
  font-weight: 700;
  border-radius: 0 0 4px 4px;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
  color: #fff;
  outline-offset: 0;
}

/* ----- Container ----- */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

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

.site-header {
  background-color: var(--white);
  box-shadow: 0 2px 8px var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
}

.nav-logo {
  flex-shrink: 0;
}

.nav-logo a {
  display: inline-flex;
  align-items: center;
}

.nav-logo .logo {
  height: 40px;
  width: auto;
}

/* Hamburger button */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--charcoal);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

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

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

/* Mobile nav menu */
.nav-menu {
  display: none;
  list-style: none;
  flex-direction: column;
  gap: 0;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: 0 4px 12px var(--shadow-md);
  padding: 0.5rem 0;
}

.nav-menu.is-open {
  display: flex;
}

.nav-menu a {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--charcoal);
  font-weight: 600;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--orange);
  background-color: var(--light-gray);
}

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

.hero {
  background:
    radial-gradient(circle, var(--dot-color) 1px, transparent 1px),
    linear-gradient(160deg, var(--light-gray) 0%, var(--white) 60%);
  background-size: 28px 28px, auto;
  padding: 3rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Decorative rings */
.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  border: 2px solid var(--orange);
  opacity: 0.12;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 2px solid var(--orange);
  opacity: 0.08;
  pointer-events: none;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.veteran-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--orange);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  margin-bottom: 1.5rem;
}

.veteran-icon {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px;
  max-height: 14px;
  flex-shrink: 0;
}

.hero-logo {
  max-width: 300px;
  width: 100%;
  margin: 0 auto 1rem;
}

.hero-tagline {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange-text);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 2.25rem;
  color: var(--dark-gray);
  margin-bottom: 0.75rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--charcoal);
  margin-bottom: 2rem;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.cta-button {
  display: inline-block;
  background-color: var(--orange);
  color: #fff;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px var(--shadow-orange);
  color: #fff;
}

.cta-button:focus-visible {
  outline-offset: 4px;
}

.cta-button-secondary {
  display: inline-block;
  background-color: transparent;
  color: var(--orange-text);
  padding: 0.85rem 2rem;
  border-radius: 50px;
  border: 2px solid var(--orange);
  font-size: 1rem;
  font-weight: 700;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.cta-button-secondary:hover {
  background-color: var(--orange);
  color: #fff;
  transform: translateY(-2px);
}

.cta-button-secondary:focus-visible {
  outline-offset: 4px;
}

/* ==========================================================================
   Services
   ========================================================================== */

.services {
  padding: 4rem 0;
  background-color: var(--light-gray);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.service-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 12px var(--shadow-sm);
  border-top: 3px solid var(--orange);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px var(--shadow-md);
  border-top-color: var(--orange-text);
}

.service-icon {
  width: 56px;
  height: 56px;
  color: var(--orange);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 146, 27, 0.08);
  border-radius: 12px;
}

.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-card h3 {
  font-size: 1.25rem;
  color: var(--dark-gray);
  margin-bottom: 0.75rem;
}

.service-card p {
  font-size: 0.95rem;
  color: var(--charcoal);
  margin-bottom: 1rem;
}

.service-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
}

.service-features li {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--orange-text);
  background-color: var(--light-gray);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

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

.about {
  padding: 4rem 0;
  background-color: var(--white);
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.lead {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--dark-gray);
  margin-bottom: 1.25rem;
}

.about-pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  padding: 1.25rem;
  background: var(--light-gray);
  border-radius: 10px;
  border-left: 3px solid var(--orange);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pillar:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--shadow-sm);
}

.pillar-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.pillar strong {
  font-size: 0.95rem;
  color: var(--dark-gray);
}

.pillar span {
  font-size: 0.85rem;
  color: var(--charcoal);
}

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

.products {
  padding: 4rem 0;
  background-color: var(--light-gray);
}

.product-stealth {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.product-stealth-icon {
  width: 56px;
  height: 56px;
  color: var(--orange);
  margin: 0 auto 1.25rem;
}

.product-stealth-icon svg {
  width: 100%;
  height: 100%;
}

.product-cta-text {
  font-size: 0.95rem;
  color: var(--charcoal);
  font-style: italic;
  margin-bottom: 1rem;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.product-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 16px var(--shadow-md);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow-lg);
}

.product-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: var(--orange);
  color: #fff;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

.product-card h3 {
  font-size: 1.5rem;
  color: var(--dark-gray);
  margin-bottom: 0.5rem;
}

.product-tagline {
  font-size: 1.05rem;
  color: var(--orange-text);
  font-weight: 700;
  margin-bottom: 1rem;
}

.product-description {
  margin-bottom: 1.5rem;
}

.product-features {
  background-color: var(--light-gray);
  padding: 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.product-features strong {
  display: block;
  margin-bottom: 0.5rem;
}

.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  padding: 0.2rem 0;
}

.feature-list li::before {
  content: "\2713\00a0";
  color: var(--orange);
  font-weight: 700;
}

.product-link {
  display: inline-block;
  color: var(--orange-text);
  font-weight: 700;
  font-size: 1.05rem;
  transition: transform 0.2s ease;
}

.product-link:hover {
  transform: translateX(4px);
  color: var(--orange);
}

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

.contact {
  padding: 4rem 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  text-align: center;
  position: relative;
}

.contact h2 {
  color: #fff;
}

.contact .lead {
  color: rgba(255, 255, 255, 0.8);
}

.contact-content {
  max-width: 600px;
  margin: 0 auto;
}

.email-link {
  display: inline-block;
  font-size: 1.2rem;
  color: #fff;
  font-weight: 700;
  padding: 0.85rem 1.5rem;
  background-color: var(--orange);
  border: 2px solid var(--orange);
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.email-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(245, 146, 27, 0.4);
  color: #fff;
}

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

.footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.9rem;
  border-top: 3px solid var(--orange);
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  align-items: center;
}

.footer-links a {
  color: var(--footer-text);
}

.footer-links a:hover {
  color: var(--orange);
}

/* ==========================================================================
   Legal Pages
   ========================================================================== */

.legal-page {
  padding: 3rem 0;
  max-width: 900px;
  margin: 0 auto;
}

.legal-page h1 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.legal-page h2 {
  font-size: 1.5rem;
  text-align: left;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal-page h2::after {
  display: none;
}

.legal-page h3 {
  font-size: 1.15rem;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.legal-page h4 {
  font-size: 1rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.legal-page table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
  .legal-page table {
    display: table;
    overflow-x: visible;
  }
}

.legal-page th,
.legal-page td {
  border: 1px solid var(--border-color);
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.legal-page thead th {
  background-color: var(--light-gray);
  font-weight: 700;
  color: var(--dark-gray);
}

.legal-page tbody tr:nth-child(even) {
  background-color: var(--table-stripe);
}

.legal-page code {
  background-color: var(--light-gray);
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  font-size: 0.85em;
}

.legal-page p,
.legal-page ul {
  margin-bottom: 1rem;
}

.legal-page ul {
  margin-left: 1.5rem;
}

.last-updated {
  color: var(--charcoal);
  font-style: italic;
  margin-bottom: 2rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--orange-text);
  font-weight: 700;
}

.back-link:hover {
  color: var(--orange);
}

/* ==========================================================================
   Tablet — 768px+
   ========================================================================== */

@media (min-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }

  h2 {
    font-size: 2.25rem;
    margin-bottom: 3rem;
  }

  .nav-toggle {
    display: none;
  }

  .nav-menu {
    display: flex;
    flex-direction: row;
    position: static;
    background: none;
    box-shadow: none;
    padding: 0;
    gap: 1.75rem;
  }

  .nav-menu a {
    padding: 0.25rem 0;
    background: none !important;
  }

  .nav-logo .logo {
    height: 50px;
  }

  .hero {
    padding: 5rem 0 6rem;
  }

  .hero-logo {
    max-width: 400px;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }

  .cta-button,
  .cta-button-secondary {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .about,
  .services,
  .products,
  .contact {
    padding: 5rem 0;
  }

  .about-content {
    font-size: 1.1rem;
  }

  .about-pillars {
    grid-template-columns: repeat(3, 1fr);
  }

  .lead {
    font-size: 1.25rem;
  }

  .product-card {
    padding: 2.5rem;
  }

  .product-card h3 {
    font-size: 1.75rem;
  }

  .email-link {
    font-size: 1.35rem;
    padding: 1rem 2rem;
  }

  .legal-page {
    padding: 4rem 0;
  }

  .legal-page h1 {
    font-size: 2.5rem;
  }

  .legal-page h2 {
    font-size: 1.75rem;
  }
}

/* ==========================================================================
   Desktop — 1024px+
   ========================================================================== */

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }

  h2 {
    font-size: 2.5rem;
  }

  .hero {
    padding: 6rem 0;
  }

  .hero-title {
    font-size: 3.5rem;
  }

  .hero-subtitle {
    font-size: 1.5rem;
  }

  .about,
  .services,
  .products,
  .contact {
    padding: 6rem 0;
  }

  .product-card h3 {
    font-size: 2rem;
  }

  .email-link {
    font-size: 1.5rem;
  }
}

/* ==========================================================================
   Scroll Reveal
   ========================================================================== */

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
}

.reveal.is-visible {
  animation: reveal-up 0.7s ease-out forwards;
}

/* Stagger children inside revealed service grids */
.reveal.is-visible .service-card:nth-child(1) { animation: reveal-up 0.6s ease-out 0.1s forwards; opacity: 0; }
.reveal.is-visible .service-card:nth-child(2) { animation: reveal-up 0.6s ease-out 0.2s forwards; opacity: 0; }
.reveal.is-visible .service-card:nth-child(3) { animation: reveal-up 0.6s ease-out 0.3s forwards; opacity: 0; }

/* Stagger pillars */
.reveal.is-visible .pillar:nth-child(1) { animation: reveal-up 0.6s ease-out 0.1s forwards; opacity: 0; }
.reveal.is-visible .pillar:nth-child(2) { animation: reveal-up 0.6s ease-out 0.2s forwards; opacity: 0; }
.reveal.is-visible .pillar:nth-child(3) { animation: reveal-up 0.6s ease-out 0.3s forwards; opacity: 0; }

/* ==========================================================================
   Accessibility — Reduced Motion
   ========================================================================== */

@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;
  }

  .reveal {
    opacity: 1;
  }
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
  .site-header,
  .nav-toggle,
  .footer,
  .cta-button,
  .back-link {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
    font-size: 12pt;
    line-height: 1.5;
  }

  .hero {
    padding: 1rem 0;
    background: none;
  }

  .about,
  .products,
  .contact,
  .legal-page {
    padding: 1rem 0;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #555;
  }
}
