/* ==========================================================================
   Haberberger Consulting & Software, LLC - Custom Styles
   PCB/Microchip Aesthetic with Pico CSS
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Color Palette)
   Based on business card branding - PCB/microchip aesthetic
   -------------------------------------------------------------------------- */
:root {
  /* Dark base (like front of card) - deeper, glossier black */
  --bg-primary: #0d0d0d;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #242424;

  /* Text colors */
  --text-primary: #e6edf3;
  --text-muted: #8b949e;

  /* PCB / Microchip accent colors */
  --gold: #c5d94e;
  --gold-bright: #d4e157;
  --gold-dim: #a8b93d;
  --pcb-green: #2d522d;
  --pcb-green-dark: #1e3a1e;

  /* Functional colors */
  --border-color: #30363d;
  --link-color: var(--gold);
  --link-hover: var(--gold-bright);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.5);

  /* Spacing - tighter design */
  --section-spacing: 3rem;
  --container-max: 1200px;
}

/* --------------------------------------------------------------------------
   Pico CSS Overrides
   -------------------------------------------------------------------------- */
:root {
  --pico-font-family-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pico-font-family-monospace: "Fira Code", "Cascadia Code", "JetBrains Mono", Consolas, monospace;

  /* Override Pico's color scheme */
  --pico-background-color: var(--bg-primary);
  --pico-color: var(--text-primary);
  --pico-muted-color: var(--text-muted);
  --pico-primary: var(--gold);
  --pico-primary-hover: var(--gold-bright);
  --pico-card-background-color: var(--bg-secondary);
  --pico-card-border-color: var(--border-color);
  --pico-border-color: var(--border-color);
}

/* Force dark mode */
[data-theme="dark"],
:root:not([data-theme="light"]) {
  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   Base Styles
   -------------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  /* Subtle glossy gradient overlays for depth */
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(197, 217, 78, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(197, 217, 78, 0.02) 0%, transparent 50%);
  color: var(--text-primary);
  min-height: 100vh;
  min-width: 375px;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 600;
}

.text-gold {
  color: var(--gold);
}

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

/* Monospace accent for code-like text */
.mono {
  font-family: var(--pico-font-family-monospace);
}

/* --------------------------------------------------------------------------
   Links
   -------------------------------------------------------------------------- */
a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn-primary,
[role="button"].primary,
button.primary,
input[type="submit"].primary {
  background: linear-gradient(180deg, var(--gold-bright) 0%, var(--gold) 100%);
  border: none;
  color: var(--bg-primary);
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-primary:hover,
[role="button"].primary:hover,
button.primary:hover,
input[type="submit"].primary:hover {
  background: linear-gradient(180deg, #e4f167 0%, var(--gold-bright) 100%);
  box-shadow: 0 0 20px rgba(197, 217, 78, 0.3);
}

.btn-secondary,
[role="button"].secondary,
button.secondary {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
}

.btn-secondary:hover,
[role="button"].secondary:hover,
button.secondary:hover {
  background: rgba(197, 217, 78, 0.1);
  border-color: var(--gold-bright);
  color: var(--gold-bright);
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
article {
  position:  relative;
}
article,
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

article:hover,
.card:hover {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(197, 217, 78, 0.1);
}

/* --------------------------------------------------------------------------
   PCB Decorative Elements (Minimalistic)
   -------------------------------------------------------------------------- */

/* Sparse circuit dot pattern - for backgrounds */
.circuit-dots {
  position: relative;
}

.circuit-dots::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--gold) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.15;
  pointer-events: none;
}

/* PCB green accent section with microchip styling */
.pcb-section {
  background:
    /* Glossy highlight at top */
    linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 40%),
    /* Main gradient */
    linear-gradient(135deg, var(--pcb-green-dark) 0%, var(--pcb-green) 100%);
  position: relative;
  border: 1px solid rgba(197, 217, 78, 0.3);
  border-radius: 4px;
  overflow: hidden;
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -2px 5px rgba(0,0,0,0.15);
  padding:  0 !important;
}

.pcb-section h2,
.pcb-section h3 {
  color: #ffffff;
}

.pcb-section p,
.pcb-section .text-muted {
  color: rgba(255, 255, 255, 0.9);
}

/* Circuit board SVG pattern overlay */
.pcb-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('/images/circuit-pattern.svg');
  background-size: 300px 300px;
  background-repeat: repeat;
  opacity: 0.6;
  pointer-events: none;
}

/* Glossy shine overlay */
.pcb-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.15) 100%);
  pointer-events: none;
}

.pcb-section > * {
  position: relative;
  z-index: 1;
}

.pcb-statement {
  /* max-width: 600px !important;  */
  margin: 0 auto 2rem !important;
}

.pcb-text {
  padding: 3rem 1rem !important;
}

/* Gold accent line (for section dividers) */
.gold-line {
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
  border: none;
  margin: 2rem 0;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
  padding: var(--section-spacing) 0;
  text-align: center;
  position: relative;
}

.hero .subtitle {
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
  box-shadow: 0 0 30px rgba(197, 217, 78, 0.2);
  margin-bottom: 1.5rem;
}

/* --------------------------------------------------------------------------
   Services Grid
   -------------------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.service-card {
  text-align: center;
  padding: 1.75rem 1.25rem;
}

.service-card .icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
}

.service-card h3 {
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.service-card a {
  position:  absolute;
  display: block;
  bottom:  0.5em;
  left:  0;
  right:  0;
  margin:  0 auto;
  text-decoration:  underline;
}

/* --------------------------------------------------------------------------
   About Preview
   -------------------------------------------------------------------------- */
.about-preview {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: var(--section-spacing) 0;
}

.about-preview img {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--border-color);
}

@media (max-width: 768px) {
  .about-preview {
    flex-direction: column;
    text-align: center;
  }
}

/* --------------------------------------------------------------------------
   Contact Form
   -------------------------------------------------------------------------- */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197, 217, 78, 0.1);
}

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: var(--section-spacing) 0;
}

.no-padding { 
  padding-top: 0;
  padding-bottom: 0;
}

.contact-section {
  padding: 0;
}

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

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

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

/* Visually hidden (for accessibility) */
.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;
}

/* --------------------------------------------------------------------------
   Accessibility (a11y) Enhancements
   -------------------------------------------------------------------------- */

/* Skip link for keyboard navigation */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--gold);
  color: var(--bg-primary);
  padding: 8px 16px;
  z-index: 1001;
  text-decoration: none;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* Focus indicators for keyboard navigation */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* WCAG 2.4.11 Focus Not Obscured - ensure focused elements aren't hidden by sticky header */
:focus {
  scroll-margin-top: 100px;
  scroll-margin-bottom: 20px;
}

/* WCAG 2.5.8 Target Size Minimum - ensure interactive elements are at least 24x24 CSS pixels */
/* Exclude inline text links (p a, li a, etc.) to avoid layout issues */
nav a,
footer a,
a.btn-primary,
a.btn-secondary,
a[role="button"],
button,
[role="button"],
.btn-primary,
.btn-secondary {
  min-height: 24px;
  min-width: 24px;
}

/* Form inputs get minimum height but use flexible width to avoid layout issues */
input,
select,
textarea {
  min-height: 24px;
}

/* Enhanced touch targets for touch devices (44x44px recommended) */
@media (pointer: coarse) {
  nav a,
  footer a,
  a.btn-primary,
  a.btn-secondary,
  a[role="button"],
  button,
  [role="button"],
  .btn-primary,
  .btn-secondary {
    min-height: 44px;
    min-width: 44px;
  }

  /* Form inputs get enhanced padding for touch instead of fixed width */
  input,
  select,
  textarea {
    min-height: 44px;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
}

/* --------------------------------------------------------------------------
   About Page Styles
   -------------------------------------------------------------------------- */
.about-hero {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  align-items: start;
  padding: 3rem 0;
}

.about-photo {
  width: 100%;
  border-radius: 8px;
  border: 2px solid var(--border-color);
}

.expertise-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.expertise-list li {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1rem;
  font-size: 0.95rem;
  color: white;
  text-align:  center;
}

.expertise-list li:hover {
  box-shadow: 0px 0px 15px white;
}

.expertise-list li::before {
  content: none;
}

.expertise-list li::marker {
  content: none;
}

.timeline {
  position: relative;
  padding-left: 2rem;
  margin: 2rem 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2rem;
  top: 0.5rem;
  width: 10px;
  height: 10px;
  background: var(--gold);
  border-radius: 50%;
  transform: translateX(-4px);
}

.timeline-item h4 {
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.timeline-item .date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .about-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-photo {
    max-width: 250px;
    margin: 0 auto;
  }
}

/* --------------------------------------------------------------------------
   Services Page Styles
   -------------------------------------------------------------------------- */
.page-intro {
  text-align: center;
  padding: 2rem 0;
  max-width: 700px;
  margin: 0 auto;
}

.pricing-section {
  padding: 2rem 0;
}

.pricing-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.pricing-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  color: #e6edf3;
}

.pricing-list .service-name {
  flex: 1;
  padding-right: 1rem;
}

.pricing-list .rate {
  color: var(--gold);
  font-weight: 600;
  white-space: nowrap;
}

.tier-label {
  color: var(--gold);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 2rem 0 0.5rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold);
}

.tier-label:first-child {
  margin-top: 0;
}

.disclaimer {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  padding: 1.25rem;
  margin: 2rem 0;
  font-size: 0.9rem;
}

.disclaimer strong {
  color: var(--gold);
}

.disclaimer p {
  margin: 0;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .pricing-list li {
    flex-direction: column;
    gap: 0.25rem;
  }

  .pricing-list .rate {
    align-self: flex-start;
  }
}

/* --------------------------------------------------------------------------
   Contact Page Styles
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  padding: 3rem 0;
}

.contact-info h2 {
  margin-bottom: 1.5rem;
}

.contact-method {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-method .icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.contact-method h4 {
  margin: 0 0 0.25rem 0;
  color: var(--gold);
}

.contact-method p {
  margin: 0;
  color: var(--text-muted);
}

.contact-method a {
  color: var(--text-primary);
}

.contact-method a:hover {
  color: var(--gold);
}

.response-note {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.response-note h4 {
  margin-top: 0;
  color: var(--gold);
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .contact-info {
    max-width: 600px;
    margin: 0 auto;
  }

  .contact-inf h2 {
    text-align: center;
  }
}

.page-header {
  text-align: center;
  padding: 3rem 0 1rem;
}

/* --------------------------------------------------------------------------
   404 Error Page Styles
   -------------------------------------------------------------------------- */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 2rem;
}

.error-code {
  font-size: clamp(4rem, 15vw, 8rem);
  font-weight: 700;
  background: linear-gradient(180deg, #d4e157 0%, #c5d94e 50%, #a8b93d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
  line-height: 1;
}

.error-message {
  font-size: 1.5rem;
  margin: 1rem 0 2rem;
  color: var(--text-muted);
}

.error-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
