/* ==========================================================================
   C&T Engineering Group — Shared stylesheet
   Brand variables, reset, typography, base components, header, nav, footer
   ========================================================================== */

/* ---------- Brand variables ---------- */
:root {
  /* Palette (approx. of the app's oklch tokens) */
  --bg: #f7f8fa;
  --fg: #16192b;
  --card: #ffffff;
  --muted: #6b7185;
  --muted-bg: #eef1f6;
  --border: #e2e6ee;
  --border-strong: #cfd5e0;

  --navy: #1f2a55;
  --navy-deep: #131a38;
  --navy-fg: #f7f8fa;

  --gold: #d9a441;
  --gold-2: #b78420;
  --gold-fg: #1f1a10;

  /* Gradients & shadows */
  --gradient-hero: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 60%, #2a3670 100%);
  --gradient-gold: linear-gradient(135deg, #e6b558, #b78420);
  --shadow-elegant: 0 25px 60px -20px rgba(19, 26, 56, 0.4);
  --shadow-gold: 0 15px 40px -12px rgba(217, 164, 65, 0.45);

  /* Typography */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;

  /* Spacing scale */
  --container-max: 1200px;
  --container-px: clamp(1rem, 3vw, 2.5rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font: inherit; color: inherit; }
ul { list-style: none; padding: 0; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--navy);
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.4rem); }
p { color: inherit; }
.italic { font-style: italic; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 2rem;
  height: 1px;
  background: var(--gold);
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  min-height: 44px;
  border-radius: var(--r-md);
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform .15s ease, background-color .2s ease, box-shadow .2s ease, filter .2s ease;
  white-space: nowrap;
}
.btn svg { width: 1rem; height: 1rem; }
.btn-navy { background: var(--navy); color: var(--navy-fg); box-shadow: var(--shadow-elegant); }
.btn-navy:hover { background: var(--navy-deep); }
.btn-gold { background: var(--gradient-gold); color: var(--gold-fg); box-shadow: var(--shadow-gold); padding: 1rem 1.5rem; }
.btn-gold:hover { filter: brightness(1.05); }
.btn-outline-light {
  border: 1px solid rgba(247,248,250,0.25);
  color: rgba(247,248,250,0.9);
  padding: 1rem 1.5rem;
}
.btn-outline-light:hover { background: rgba(247,248,250,0.08); }
.btn-block { width: 100%; }

/* ---------- Forms ---------- */
.field { display: block; }
.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
}
.field input, .field select, .field textarea, .form-control {
  width: 100%;
  padding: 0.7rem 0.85rem;
  min-height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: #fff;
  font-size: 0.92rem;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus, .form-control:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(217,164,65,0.25);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247,248,250,0.9);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(226,230,238,0.7);
}
.nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.brand img { width: 44px; height: 44px; flex-shrink: 0; object-fit: contain; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand-sub {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}
.nav-links, .nav-cta { display: none; }

.nav-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
}
.nav-toggle svg { width: 22px; height: 22px; }

.mobile-menu {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.mobile-menu.open { display: block; }
.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 0 1.25rem;
}
.mobile-menu a {
  padding: 0.75rem 0.75rem;
  border-radius: var(--r-sm);
  font-size: 0.95rem;
  font-weight: 500;
}
.mobile-menu a:hover { background: var(--muted-bg); }
.mobile-menu .btn { margin-top: 0.5rem; }

@media (min-width: 1024px) {
  .nav { grid-template-columns: minmax(0,1fr) auto auto; }
  .brand img { width: 48px; height: 48px; }
  .brand-name { font-size: 1.15rem; }
  .nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
  }
  .nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(22,25,43,0.75);
    transition: color .15s ease;
  }
  .nav-links a:hover { color: var(--navy); }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-menu { display: none !important; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(247,248,250,0.8);
  padding: 3.5rem 0 1.75rem;
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}
.footer-brand { display: flex; flex-direction: column; gap: 1.25rem; }
.footer-brand-row { display: flex; align-items: center; gap: 0.75rem; }
.footer-brand-row img { width: 48px; height: 48px; border-radius: 8px; }
.footer-brand-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--navy-fg);
}
.footer-brand-sub {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(247,248,250,0.6);
}
.footer-brand p { font-size: 0.9rem; color: rgba(247,248,250,0.65); max-width: 32ch; }
.footer-col h4 {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gold);
  font-family: var(--font-sans);
  margin-bottom: 1rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.92rem; }
.footer-col a:hover { color: var(--gold); }
.footer-col li { color: rgba(247,248,250,0.7); }

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(247,248,250,0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(247,248,250,0.55);
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

/* ---------- Utility helpers ---------- */
.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;
}
