/* ============================================================
   JL Engineering — Stylesheet
   Brand colours:
     Blueprint Navy  #1A3650
     Burnt Amber     #D97706
     Carbon Black    #121212
     Drafting Paper  #FBFBFA
     Anodized Steel  #9E9E9E
   Fonts: Titillium Web (headings), Inter (body)
============================================================ */

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

:root {
  --navy:        #1A3650;
  --navy-mid:    #1e4068;
  --amber:       #D97706;
  --amber-light: #F59E0B;
  --black:       #121212;
  --paper:       #FBFBFA;
  --steel:       #9E9E9E;
  --steel-light: #D4D4D4;
  --white:       #FFFFFF;

  --font-head: 'Titillium Web', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.16);

  --transition: 200ms ease;
  --max-w: 1200px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background-color: var(--paper);
  color: var(--black);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ---------- Typography helpers ---------- */
.section-eyebrow {
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: .5rem;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.0625rem;
  color: #444;
  max-width: 560px;
}

.section-header {
  margin-bottom: 3.5rem;
}

.section-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .8rem 1.75rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: .01em;
  transition: background var(--transition), color var(--transition),
              transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--amber);
  color: var(--white);
  border: 2px solid var(--amber);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--amber-light);
  border-color: var(--amber-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(217,119,6,.35);
}

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border: 2px solid rgba(251,251,250,.4);
}
.btn-ghost:hover, .btn-ghost:focus-visible {
  border-color: var(--paper);
  background: rgba(251,251,250,.08);
}

.btn--full { width: 100%; }

/* ---------- Nav Header ---------- */
.nav-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background var(--transition), box-shadow var(--transition);
  background: transparent;
}

.nav-header.scrolled {
  background: var(--navy);
  box-shadow: 0 2px 16px rgba(0,0,0,.25);
}

.nav-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
}

.logo-mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.logo-mark--sm {
  width: 34px;
  height: 34px;
}

.logo-wordmark {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--paper);
  letter-spacing: -.01em;
}
.logo-wordmark strong {
  font-weight: 900;
}

.logo-wordmark--light {
  color: var(--paper);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: .9375rem;
  font-weight: 500;
  color: rgba(251,251,250,.85);
  padding: .5rem .9rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover, .nav-links a:focus-visible {
  color: var(--paper);
  background: rgba(255,255,255,.08);
}

.nav-cta {
  background: var(--amber) !important;
  color: var(--white) !important;
  padding: .5rem 1.1rem !important;
  border-radius: var(--radius-md) !important;
  font-weight: 600 !important;
}
.nav-cta:hover, .nav-cta:focus-visible {
  background: var(--amber-light) !important;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: .5rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--paper);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  background: var(--navy);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  max-width: 100%;
  padding: 6rem 1.5rem 4rem;
  position: relative;
  overflow: hidden;
}

/* Blueprint grid overlay */
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(251,251,250,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(251,251,250,.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-content {
  max-width: var(--max-w);
  margin: 0 auto;
  z-index: 1;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.25rem;
}

.hero-headline {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  font-weight: 900;
  color: var(--paper);
  line-height: 1.08;
  margin-bottom: 1.5rem;
}
.hero-headline em {
  font-style: normal;
  color: var(--amber);
}

.hero-sub {
  font-size: 1.0625rem;
  color: rgba(251,251,250,.72);
  max-width: 480px;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-graphic {
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}
.hero-graphic svg {
  width: 100%;
  max-width: 420px;
  animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ---------- Stats Bar ---------- */
.stats-bar {
  background: var(--black);
  padding: 2.5rem 1.5rem;
}

.stats-container {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: .75rem 3rem;
  flex: 1;
  min-width: 140px;
}

.stat-number {
  font-family: var(--font-head);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--amber);
  line-height: 1;
}
.stat-number sup {
  font-size: 1.1rem;
  vertical-align: super;
}

.stat-label {
  font-size: .8125rem;
  font-weight: 500;
  color: var(--steel);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: .3rem;
}

.stat-divider {
  width: 1px;
  height: 48px;
  background: rgba(255,255,255,.1);
  flex-shrink: 0;
}

/* ---------- Services ---------- */
.services {
  padding: 6rem 0;
  background: var(--paper);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--steel-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.service-card:hover {
  border-color: var(--amber);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.service-icon {
  width: 48px;
  height: 48px;
  background: rgba(26,54,80,.06);
  border-radius: var(--radius-md);
  padding: .5rem;
  margin-bottom: .25rem;
}
.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-card h3 {
  font-family: var(--font-head);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--navy);
}

.service-card p {
  font-size: .9375rem;
  color: #555;
  flex: 1;
}

.service-link {
  font-size: .875rem;
  font-weight: 600;
  color: var(--amber);
  margin-top: .5rem;
  transition: color var(--transition);
}
.service-link:hover { color: var(--navy); }

/* ---------- About ---------- */
.about {
  padding: 6rem 0;
  background: #F0F4F8;
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 5rem;
  align-items: center;
}

/* Hex grid visual */
.about-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-hex-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 280px;
}

.hex-cell {
  aspect-ratio: 1;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  border-radius: 2px;
}
.hex-navy      { background: var(--navy); }
.hex-amber     { background: var(--amber); }
.hex-navy-light { background: var(--navy-mid); }
.hex-steel     { background: var(--steel); }
.hex-amber-light { background: var(--amber-light); }

.about-badge {
  position: absolute;
  bottom: -1rem;
  right: 1rem;
  width: 120px;
  filter: drop-shadow(0 8px 20px rgba(26,54,80,.3));
}

.about-content {
  max-width: 540px;
}

.about-content p {
  font-size: 1rem;
  color: #444;
  margin-bottom: 1rem;
}

.about-values {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.about-values li {
  display: flex;
  align-items: flex-start;
  gap: .875rem;
}

.value-icon {
  color: var(--amber);
  font-size: .625rem;
  flex-shrink: 0;
  margin-top: .35rem;
}

.about-values strong {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
}
.about-values span {
  font-size: .9375rem;
  color: #555;
}

/* ---------- Projects ---------- */
.projects {
  padding: 6rem 0;
  background: var(--paper);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.5rem;
}

.project-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-card--large {
  grid-row: span 2;
}

.project-bg {
  aspect-ratio: 16/9;
  overflow: hidden;
  flex-shrink: 0;
}
.project-card--large .project-bg {
  aspect-ratio: unset;
  flex: 1;
  min-height: 260px;
}
.project-bg svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-info {
  padding: 1.5rem;
}

.project-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid rgba(217,119,6,.4);
  border-radius: 100px;
  padding: .2rem .7rem;
  margin-bottom: .75rem;
}

.project-info h3 {
  font-family: var(--font-head);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--paper);
  margin-bottom: .5rem;
}

.project-info p {
  font-size: .9rem;
  color: rgba(251,251,250,.65);
}

/* ---------- Why Us ---------- */
.why-us {
  padding: 6rem 0;
  background: var(--navy);
}

.section-header--light .section-title {
  color: var(--paper);
}

.section-eyebrow--amber {
  color: var(--amber);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.why-item {
  padding: 2rem 1.5rem;
  border-top: 3px solid rgba(255,255,255,.1);
  transition: border-color var(--transition);
}
.why-item:hover {
  border-color: var(--amber);
}

.why-number {
  font-family: var(--font-head);
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(217,119,6,.25);
  line-height: 1;
  margin-bottom: 1rem;
  letter-spacing: -.04em;
}

.why-item h3 {
  font-family: var(--font-head);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--paper);
  margin-bottom: .6rem;
}

.why-item p {
  font-size: .9375rem;
  color: rgba(251,251,250,.62);
}

/* ---------- Contact ---------- */
.contact {
  padding: 6rem 0;
  background: var(--paper);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 5rem;
  align-items: start;
}

.contact-info .section-title {
  margin-bottom: 1.25rem;
}

.contact-info > p {
  font-size: 1rem;
  color: #555;
  margin-bottom: 2rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-details li {
  display: flex;
  align-items: flex-start;
  gap: .875rem;
  font-size: .9375rem;
  color: #444;
}

.contact-icon {
  width: 20px;
  height: 20px;
  color: var(--amber);
  flex-shrink: 0;
  margin-top: .1rem;
}
.contact-icon svg {
  width: 100%;
  height: 100%;
}

.contact-details a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.contact-details a:hover { color: var(--amber); }

/* Form */
.contact-form {
  background: var(--white);
  border: 1px solid var(--steel-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.form-group label {
  font-size: .875rem;
  font-weight: 600;
  color: var(--navy);
}
.form-group label span { color: var(--amber); }

.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font-body);
  font-size: .9375rem;
  color: var(--black);
  background: var(--paper);
  border: 1.5px solid #D4D4D4;
  border-radius: var(--radius-md);
  padding: .65rem .9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  outline: none;
  resize: vertical;
}
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239E9E9E' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  padding-right: 2.2rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,54,80,.1);
}

.form-note {
  font-size: .8125rem;
  color: var(--steel);
  text-align: center;
  margin-top: -.25rem;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--black);
  padding: 4rem 0 0;
}

.footer-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-brand .nav-logo {
  margin-bottom: 1.25rem;
}

.footer-brand p {
  font-size: .9375rem;
  color: rgba(251,251,250,.5);
  line-height: 1.7;
}

.footer-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.footer-nav-col h4 {
  font-family: var(--font-head);
  font-size: .875rem;
  font-weight: 700;
  color: var(--paper);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 1.25rem;
}

.footer-nav-col ul {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.footer-nav-col a {
  font-size: .9rem;
  color: rgba(251,251,250,.5);
  transition: color var(--transition);
}
.footer-nav-col a:hover { color: var(--amber); }

.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}

.footer-bottom p {
  font-size: .8125rem;
  color: rgba(251,251,250,.35);
}

/* ============================================================
   RESPONSIVE
============================================================ */

/* Tablet */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
  .project-card--large {
    grid-row: span 1;
  }
  .project-card--large .project-bg {
    min-height: 200px;
    aspect-ratio: 16/7;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .about-visual {
    justify-content: flex-start;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.5rem 1.5rem;
    gap: .25rem;
    border-top: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .75rem 1rem; border-radius: var(--radius-md); }
  .nav-cta { text-align: center; }

  .nav-toggle { display: flex; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 6rem 1.5rem 3rem;
    text-align: center;
    gap: 2.5rem;
  }
  .hero-sub { margin: 0 auto 2.5rem; }
  .hero-actions { justify-content: center; }
  .hero-graphic { display: none; }

  .stats-container {
    flex-direction: column;
    gap: 1.5rem;
  }
  .stat-divider { width: 60%; height: 1px; }
  .stat { padding: 0; }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .section-container { padding: 0 1rem; }
  .services { padding: 4rem 0; }
  .about { padding: 4rem 0; }
  .projects { padding: 4rem 0; }
  .why-us { padding: 4rem 0; }
  .contact { padding: 4rem 0; }
  .contact-form { padding: 1.75rem 1.25rem; }

  .hero-headline { font-size: 2.1rem; }
}

/* ---------- Focus styles (accessibility) ---------- */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}
