/*
Theme Name: CSD Engineers 2
Theme URI: https://csdengineers.com/
Author: Your Name
Author URI: https://yourwebsite.com/
Description: A professional business and portfolio theme for engineering companies.
Version: 1.7
Text Domain: csdengineers
*/

/* ==========================================================================
   CSD ENGINEERS — CENTRAL DESIGN SYSTEM
   Single source of truth for color, type, spacing, radius, shadow.
   Loads before component stylesheets, so components can still override.
   ========================================================================== */

:root {
  /* --- Brand palette --- */
  --csd-navy:      #0B2A4A;   /* Deep Steel Navy  */
  --csd-navy-700:  #0F3357;
  --csd-navy-900:  #071D34;
  --csd-blue:      #1564B0;   /* Engineering Blue */
  --csd-blue-700:  #114E89;
  --csd-blue-300:  #5C9BD8;
  --csd-amber:     #E0A012;   /* Safety Amber (brand) */
  --csd-amber-700: #C1860C;
  --csd-cloud:     #F4F6F9;   /* Cool light bg    */

  /* --- Neutrals --- */
  --csd-ink:    #0F1B2D;
  --csd-body:   #33424F;
  --csd-muted:  #5A6B7E;
  --csd-line:   #E3E8EF;
  --csd-white:  #ffffff;

  /* --- Semantic aliases (used across legacy components) --- */
  --brand:       var(--csd-blue);
  --brand-dark:  var(--csd-navy);
  --primary:     var(--csd-blue);
  --secondary:   var(--csd-navy);
  --accent:      var(--csd-amber);
  --text:        var(--csd-ink);
  --txt:         var(--csd-ink);
  --muted:       var(--csd-muted);
  --border:      var(--csd-line);
  --bg:          var(--csd-white);
  --bg-alt:      var(--csd-cloud);

  /* --- Typography --- */
  --font-sans:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Sora", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --fs-h1: clamp(2.1rem, 1.4rem + 2.6vw, 3.4rem);
  --fs-h2: clamp(1.7rem, 1.2rem + 1.8vw, 2.5rem);
  --fs-h3: clamp(1.3rem, 1.05rem + 0.9vw, 1.7rem);
  --fs-h4: 1.2rem;
  --fs-body: 1.05rem;
  --fs-small: 0.9rem;

  /* --- Layout / shape / motion --- */
  --container: 1200px;
  --gutter: 24px;
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 8px rgba(11,42,74,.06);
  --shadow:    0 12px 30px rgba(11,42,74,.10);
  --shadow-lg: 0 24px 60px rgba(11,42,74,.16);
  --ring: 0 0 0 4px rgba(21,100,176,.18);
  --ease: cubic-bezier(.2,.8,.2,1);
  --transition: 220ms var(--ease);
}

/* --- Reset-ish base --- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--csd-body);
  /* Subtle architectural/structural blueprint backdrop instead of flat white.
     Seamless 600px SVG tile (very low-opacity navy lines) over a soft paper tint.
     Content sections/cards keep solid backgrounds, so readability is unaffected. */
  background-color: var(--csd-paper, #F6F8FB);
  background-image: url("assets/images/csd-blueprint.svg");
  background-repeat: repeat;
  background-size: 1000px 1000px;
  background-attachment: scroll;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Lighten the blueprint a touch on small screens so it never feels busy. */
@media (max-width: 640px) {
  body { background-size: 680px 680px; }
}

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

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--csd-ink);
  line-height: 1.18;
  margin: 0 0 .5em;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-h1); font-weight: 800; }
h2 { font-size: var(--fs-h2); font-weight: 800; }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p { margin: 0 0 1.1em; }

a { color: var(--csd-blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--csd-navy); }

::selection { background: rgba(224,160,18,.28); }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }

hr { border: 0; height: 1px; background: var(--csd-line); margin: 2rem 0; }

/* --- Layout helpers --- */
.csd-container,
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(18px, 5vw, 40px);
}

.csd-section { padding: clamp(48px, 7vw, 96px) 0; }
.csd-section--alt { background: var(--csd-cloud); }
.csd-section--navy { background: var(--csd-navy); color: #dce6f1; }
.csd-section--navy h1, .csd-section--navy h2, .csd-section--navy h3 { color: #fff; }

.csd-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--csd-blue);
  margin-bottom: .6rem;
}
.csd-section--navy .csd-eyebrow { color: var(--csd-amber); }

/* --- Button system --- */
.csd-btn,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}
.csd-btn:hover, .btn:hover { transform: translateY(-2px); }

.csd-btn-primary, .btn-primary {
  background: var(--csd-blue);
  color: #fff;
  box-shadow: 0 8px 20px rgba(21,100,176,.28);
}
.csd-btn-primary:hover, .btn-primary:hover { background: var(--csd-navy); color: #fff; box-shadow: 0 12px 26px rgba(11,42,74,.32); }

.csd-btn-accent, .btn-accent {
  background: var(--csd-amber);
  color: var(--csd-navy);
  box-shadow: 0 8px 20px rgba(224,160,18,.30);
}
.csd-btn-accent:hover, .btn-accent:hover { background: var(--csd-amber-700); color: var(--csd-navy); }

.csd-btn-outline, .btn-outline {
  background: transparent;
  color: var(--csd-navy);
  border-color: var(--csd-line);
}
.csd-btn-outline:hover, .btn-outline:hover { border-color: var(--csd-blue); color: var(--csd-blue); }

/* --- Card --- */
.csd-card {
  background: #fff;
  border: 1px solid var(--csd-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.csd-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

/* --- Utilities --- */
.csd-text-navy  { color: var(--csd-navy); }
.csd-text-blue  { color: var(--csd-blue); }
.csd-text-amber { color: var(--csd-amber); }
.csd-text-muted { color: var(--csd-muted); }
.csd-bg-cloud   { background: var(--csd-cloud); }
.csd-bg-navy    { background: var(--csd-navy); color: #fff; }
.csd-center     { text-align: center; }
.csd-mw-720     { max-width: 720px; margin-inline: auto; }

/* Accessibility: skip-link & sr-only */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
