/*
Theme Name:  Hersaz Technologies
Theme URI:   https://www.hersaz.com
Author:      Hersaz Technologies LLC
Author URI:  https://www.hersaz.com
Description: A premium, custom WordPress theme for Hersaz Technologies LLC — IT Consulting, Cybersecurity, Cloud & Infrastructure, Technical Staffing. Inspired by modern professional services design.
Version:     1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License:     Proprietary
Text Domain: hersaz
Tags:        custom-logo, custom-menu, featured-images, responsive-layout, accessibility-ready
*/

/* ============================================================
   TABLE OF CONTENTS
   1. CSS Custom Properties (Design Tokens)
   2. CSS Reset & Base
   3. Typography
   4. Layout Utilities
   5. Buttons & Links
   6. Forms
   7. WordPress Core Classes
   8. Accessibility
   ============================================================ */

/* ─── 1. CSS Custom Properties ─────────────────────────────── */
:root {
  /* Brand Colors */
  --color-navy:       #0B2E5E;
  --color-navy-dark:  #071E3F;
  --color-navy-light: #1A4A8A;
  --color-teal:       #00B4C8;
  --color-teal-dark:  #008FA0;
  --color-teal-light: #E0F7FA;
  --color-slate:      #4A5878;
  --color-slate-light:#6B7A99;

  /* Neutral Colors */
  --color-white:      #FFFFFF;
  --color-off-white:  #F5F7FA;
  --color-light-gray: #E8EBF0;
  --color-mid-gray:   #C2C8D4;
  --color-dark-gray:  #888FA0;
  --color-text:       #1A2340;
  --color-text-muted: #4A5878;

  /* Semantic Colors */
  --color-success:    #22A06B;
  --color-warning:    #F59E0B;
  --color-error:      #DC2626;

  /* Typography */
  --font-primary:   'Inter', Arial, Helvetica, sans-serif;
  --font-mono:      'JetBrains Mono', 'Courier New', monospace;

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

  --font-normal: 400;
  --font-medium: 500;
  --font-semi:   600;
  --font-bold:   700;

  --leading-tight:  1.25;
  --leading-snug:   1.375;
  --leading-normal: 1.5;
  --leading-relaxed:1.625;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --container-sm:  640px;
  --container-md:  768px;
  --container-lg:  1024px;
  --container-xl:  1280px;
  --container-2xl: 1440px;
  --container-max: 1200px;

  /* Borders & Radius */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(11, 46, 94, 0.08), 0 1px 2px rgba(11, 46, 94, 0.04);
  --shadow-md:  0 4px 16px rgba(11, 46, 94, 0.10), 0 2px 6px rgba(11, 46, 94, 0.06);
  --shadow-lg:  0 10px 40px rgba(11, 46, 94, 0.14), 0 4px 16px rgba(11, 46, 94, 0.08);
  --shadow-xl:  0 20px 60px rgba(11, 46, 94, 0.18), 0 8px 24px rgba(11, 46, 94, 0.10);
  --shadow-teal: 0 4px 20px rgba(0, 180, 200, 0.25);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;
  --transition-spring: 350ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index */
  --z-base:    1;
  --z-above:   10;
  --z-nav:     100;
  --z-overlay: 200;
  --z-modal:   300;
  --z-toast:   400;
}

/* ─── 2. CSS Reset & Base ───────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

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

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

ul, ol { list-style: none; }

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

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ─── 3. Typography ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--color-navy);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, var(--text-6xl)); }
h2 { font-size: clamp(1.75rem, 4vw, var(--text-5xl)); }
h3 { font-size: clamp(1.375rem, 3vw, var(--text-3xl)); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p { margin-bottom: var(--space-4); line-height: var(--leading-relaxed); }
p:last-child { margin-bottom: 0; }

strong, b { font-weight: var(--font-semi); }
em, i { font-style: italic; }

/* Section label / eyebrow text */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--font-semi);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-teal);
  margin-bottom: var(--space-4);
}

.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-teal);
  flex-shrink: 0;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, var(--text-5xl));
  font-weight: var(--font-bold);
  color: var(--color-navy);
  line-height: var(--leading-tight);
  letter-spacing: -0.025em;
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  max-width: 640px;
}

/* ─── 4. Layout Utilities ───────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

@media (min-width: 768px) {
  .container { padding-left: var(--space-8); padding-right: var(--space-8); }
}

@media (min-width: 1200px) {
  .container { padding-left: var(--space-12); padding-right: var(--space-12); }
}

.section {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
}

@media (min-width: 1024px) {
  .section { padding-top: var(--space-32); padding-bottom: var(--space-32); }
}

.section--sm {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

.section--light { background-color: var(--color-off-white); }
.section--navy  { background-color: var(--color-navy); }
.section--dark  { background-color: var(--color-navy-dark); }

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

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 640px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

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

@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

.text-center { text-align: center; }
.text-white  { color: var(--color-white) !important; }
.text-teal   { color: var(--color-teal) !important; }
.text-muted  { color: var(--color-text-muted); }

.mx-auto { margin-left: auto; margin-right: auto; }
.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;
}

/* ─── 5. Buttons & Links ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.875rem var(--space-8);
  font-size: var(--text-sm);
  font-weight: var(--font-semi);
  letter-spacing: 0.03em;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    background-color var(--transition-base),
    color var(--transition-base),
    border-color var(--transition-base),
    transform var(--transition-fast),
    box-shadow var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn:focus-visible {
  outline: 3px solid var(--color-teal);
  outline-offset: 3px;
}

.btn-primary {
  background-color: var(--color-teal);
  color: var(--color-white);
  border-color: var(--color-teal);
}

.btn-primary:hover {
  background-color: var(--color-teal-dark);
  border-color: var(--color-teal-dark);
  color: var(--color-white);
  box-shadow: var(--shadow-teal);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-navy);
  border-color: var(--color-navy);
}

.btn-secondary:hover {
  background-color: var(--color-navy);
  color: var(--color-white);
}

.btn-ghost-white {
  background-color: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,0.4);
}

.btn-ghost-white:hover {
  background-color: var(--color-white);
  color: var(--color-navy);
  border-color: var(--color-white);
}

.btn-white {
  background-color: var(--color-white);
  color: var(--color-navy);
  border-color: var(--color-white);
}

.btn-white:hover {
  background-color: var(--color-off-white);
  border-color: var(--color-off-white);
  color: var(--color-navy);
}

.btn-lg {
  padding: 1.125rem var(--space-10);
  font-size: var(--text-base);
}

.btn-sm {
  padding: 0.625rem var(--space-5);
  font-size: var(--text-xs);
}

/* Arrow link */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--font-semi);
  color: var(--color-teal);
  transition: gap var(--transition-base);
}

.link-arrow:hover { gap: var(--space-3); color: var(--color-teal); }

.link-arrow::after {
  content: '→';
  font-size: 1em;
  transition: transform var(--transition-base);
}

.link-arrow:hover::after { transform: translateX(3px); }

/* ─── 6. Forms ──────────────────────────────────────────────── */
.form-group { margin-bottom: var(--space-5); }

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.form-control {
  width: 100%;
  padding: 0.875rem var(--space-4);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-white);
  border: 1.5px solid var(--color-light-gray);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(0, 180, 200, 0.15);
}

.form-control::placeholder { color: var(--color-dark-gray); }

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

/* ─── 7. WordPress Core Classes ─────────────────────────────── */
.alignnone  { margin: var(--space-4) 0; }
.aligncenter { display: block; margin: var(--space-4) auto; }
.alignright  { float: right; margin: var(--space-4) 0 var(--space-4) var(--space-6); }
.alignleft   { float: left; margin: var(--space-4) var(--space-6) var(--space-4) 0; }

.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-2); }

.sticky { /* handled per-template */ }

.gallery-item img {
  border-radius: var(--radius-md);
}

/* Content styles (used inside .entry-content) */
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.entry-content ul,
.entry-content ol {
  list-style: revert;
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}

.entry-content li { margin-bottom: var(--space-2); }

.entry-content blockquote {
  border-left: 4px solid var(--color-teal);
  padding: var(--space-4) var(--space-6);
  margin: var(--space-8) 0;
  background: var(--color-off-white);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--color-text-muted);
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-6) 0;
  font-size: var(--text-sm);
}

.entry-content table th,
.entry-content table td {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-light-gray);
  text-align: left;
}

.entry-content table th {
  background: var(--color-navy);
  color: var(--color-white);
  font-weight: var(--font-semi);
}

.entry-content table tr:nth-child(even) {
  background: var(--color-off-white);
}

.entry-content pre {
  background: var(--color-navy-dark);
  color: var(--color-teal-light);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  margin: var(--space-6) 0;
}

.entry-content code {
  background: var(--color-off-white);
  color: var(--color-navy);
  padding: 0.125em 0.375em;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.875em;
}

/* ─── 8. Accessibility ──────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  padding: var(--space-3) var(--space-6);
  background: var(--color-teal);
  color: var(--color-white);
  font-weight: var(--font-semi);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  z-index: var(--z-toast);
  transition: top var(--transition-fast);
  text-decoration: none;
}

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

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

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