/* ==========================================================================
   HD EasyTec — main.css
   Reset, CSS variables, typography, and utility helpers
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Google Fonts — Inter
   -------------------------------------------------------------------------- */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

/* --------------------------------------------------------------------------
   2. CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
  /* Brand colors */
  --color-primary: #1856a0;
  --color-primary-dark: #0f3d7a;
  --color-secondary: #0f6e56;
  --color-dark: #1a1a2e;
  --color-light: #f5f7fa;
  --color-text: #2d2d2d;
  --color-text-muted: #6b7280;

  /* Surfaces */
  --color-white: #ffffff;
  --color-border: #e5e7eb;

  /* Typography */
  --font-body:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  --font-heading: var(--font-body);

  --fs-xs: 0.75rem; /* 12px */
  --fs-sm: 0.875rem; /* 14px */
  --fs-base: 1rem; /* 16px */
  --fs-lg: 1.125rem; /* 18px */
  --fs-xl: 1.25rem; /* 20px */
  --fs-2xl: 1.5rem; /* 24px */
  --fs-3xl: 1.875rem; /* 30px */
  --fs-4xl: 2.25rem; /* 36px */
  --fs-5xl: 3rem; /* 48px */

  --lh-tight: 1.2;
  --lh-base: 1.6;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  /* Layout */
  --container-max: 1200px;
  --container-pad: 1.5rem; /* 24px */

  /* Borders & radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.12);

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

/* --------------------------------------------------------------------------
   3. Modern CSS Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* --------------------------------------------------------------------------
   4. Typography
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--lh-tight);
  color: var(--color-dark);
}

h1 {
  font-size: clamp(2rem, 5vw, var(--fs-5xl));
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.625rem, 3.5vw, var(--fs-4xl));
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--fs-2xl);
}

h4 {
  font-size: var(--fs-xl);
}

p {
  margin-bottom: var(--space-4);
}

p:last-child {
  margin-bottom: 0;
}

a {
  transition: color var(--transition-fast);
}

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

strong {
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   5. Utility Classes
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: 5rem; /* 80px */
}

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

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

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

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

.bg-light {
  background-color: var(--color-light);
}

.bg-dark {
  background-color: var(--color-dark);
  color: var(--color-light);
}

.lead {
  font-size: var(--fs-lg);
  color: var(--color-text-muted);
}

.eyebrow {
  display: inline-block;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

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

.no-scroll {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   6. Accessibility — focus styles
   -------------------------------------------------------------------------- */

/* Remove default outline in browsers that support :focus-visible */
:focus:not(:focus-visible) {
  outline: none;
}

/* Visible keyboard-focus ring for all interactive elements */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Tighter ring for small interactive elements (links in text) */
a:focus-visible {
  outline-offset: 2px;
}

/* Skip-to-content link (add to top of <body> if needed) */
.skip-link {
  position: absolute;
  top: -9999px;
  left: var(--space-4);
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
  border-radius: var(--radius-sm);
  z-index: 9999;
}

.skip-link:focus {
  top: var(--space-4);
}

/* --------------------------------------------------------------------------
   7. Accessibility — reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

/* --------------------------------------------------------------------------
   8. Print styles
   -------------------------------------------------------------------------- */
@media print {
  /* Hide navigation chrome and animated/CTA elements */
  .nav-cta,
  .nav-toggle,
  .nav-cta-mobile,
  .hero-actions,
  .cta-banner,
  .site-footer .social-links {
    display: none !important;
  }

  /* Ensure all reveal elements are visible — animations won't run in print */
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* Sensible print typography */
  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  /* Print full URL after external links */
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #555;
  }

  /* Avoid page breaks inside cards */
  .service-card,
  .testimonial-card,
  .faq-item {
    break-inside: avoid;
  }
}
