:root {
  color-scheme: light;
  --navy: #0f2742;
  --charcoal: #20242c;
  --gold: #c69c4a;
  --mist: #eef2f6;
  --navy-light: #1a3a5c;
  --gold-light: rgba(198, 156, 74, 0.12);
  --shadow-sm: 0 1px 3px rgba(15, 39, 66, 0.06);
  --shadow-md: 0 8px 30px rgba(15, 39, 66, 0.08);
  --shadow-lg: 0 16px 45px rgba(15, 39, 66, 0.1);
  --shadow-xl: 0 24px 70px rgba(15, 39, 66, 0.14);
  --transition-fast: 200ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

::selection {
  background: var(--gold);
  color: var(--navy);
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--mist); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #b88930; }

/* ============ NAVIGATION ============ */
#nav-menu.show {
  display: block !important;
}

/* Sticky header shadow on scroll */
header.scrolled {
  box-shadow: 0 4px 20px rgba(15, 39, 66, 0.1);
}

/* Mobile nav animation */
@media (max-width: 767px) {
  #nav-menu {
    background: var(--navy) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 1rem !important;
    left: auto !important;
    padding: 1rem !important;
    position: absolute !important;
    right: 0 !important;
    top: calc(100% + 0.75rem) !important;
    width: min(88vw, 320px) !important;
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
    transition: opacity 250ms ease, transform 250ms ease !important;
    pointer-events: none;
  }

  #nav-menu.show {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    pointer-events: all !important;
  }

  #nav-menu li a {
    color: rgba(255, 255, 255, 0.9) !important;
    display: block !important;
    padding: 0.65rem 0.75rem !important;
    border-radius: 0.5rem !important;
    transition: background var(--transition-fast) !important;
  }

  #nav-menu li a:hover {
    background: rgba(255, 255, 255, 0.1) !important;
  }

  #nav-menu li + li {
    margin-top: 0.25rem !important;
  }

  #nav-menu li:last-child {
    margin-top: 0.75rem !important;
    padding-top: 0.75rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.14) !important;
  }

  #nav-menu li:last-child a {
    background: var(--gold) !important;
    color: var(--navy) !important;
    font-weight: 800 !important;
    text-align: center !important;
  }
}

/* Desktop nav link hover effect */
@media (min-width: 768px) {
  #nav-menu a {
    position: relative;
  }

  #nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width var(--transition-base);
    border-radius: 1px;
  }

  #nav-menu a:hover::after,
  #nav-menu a.text-navy::after {
    width: 100%;
  }
}

/* ============ SECTIONS ============ */
.section-pad {
  padding: 5rem 0;
}

@media (max-width: 767px) {
  .section-pad {
    padding: 3.5rem 0;
  }
}

.eyebrow {
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.section-title {
  color: var(--navy);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 950;
  line-height: 1.05;
  margin-top: 0.9rem;
}

.section-head {
  max-width: 760px;
}

.section-head p:last-child {
  color: #64748b;
  line-height: 1.8;
  margin-top: 1rem;
}

/* ============ ANIMATIONS ============ */
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideLeft {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideRight {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

.animate-rise {
  animation: rise 900ms ease both;
}

.animate-rise-delay {
  animation: rise 900ms 180ms ease both;
}

.animate-rise-delay-2 {
  animation: rise 900ms 360ms ease both;
}

.animate-fade {
  animation: fadeIn 600ms ease both;
}

.animate-scale {
  animation: scaleIn 500ms ease both;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1), transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1), transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1), transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ============ CARDS ============ */
.service-card,
.training-card {
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  background: #fff;
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 300ms ease, border-color 300ms ease;
}

.service-card:hover,
.training-card:hover,
.project-card:hover,
.drawing-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(198, 156, 74, 0.35);
}

.service-card span {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 950;
}

.service-card h3,
.training-card h3 {
  color: var(--navy);
  font-size: 1.1rem;
  font-weight: 900;
  margin-top: 1rem;
}

.service-card p,
.training-card p {
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.7;
  margin-top: 0.75rem;
}

/* Feature card */
.feature-card {
  background: var(--navy);
  border-color: var(--navy);
}

.feature-card h3,
.feature-card p {
  color: #fff;
}

.feature-card a {
  color: var(--gold);
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 950;
  margin-top: 1rem;
}

/* ============ PROJECTS ============ */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.filter-btn {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 850;
  padding: 0.65rem 1.25rem;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
  cursor: pointer;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.project-card {
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 300ms ease, border-color 300ms ease;
}

.project-card[hidden] {
  display: none;
}

.project-card img {
  aspect-ratio: 5 / 4;
  height: auto;
  object-fit: cover;
  width: 100%;
  transition: transform 400ms ease;
}

.project-card:hover img {
  transform: scale(1.05);
}

.project-card div {
  padding: 1.25rem;
}

.project-card p {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-card h3 {
  color: var(--navy);
  font-size: 1.12rem;
  font-weight: 950;
  margin-top: 0.55rem;
}

.project-card span,
.project-card strong,
.project-card small {
  display: block;
  line-height: 1.6;
  margin-top: 0.55rem;
}

.project-card span,
.project-card small {
  color: #64748b;
}

.project-card strong {
  color: var(--charcoal);
  font-size: 0.82rem;
}

/* ============ DRAWING CARD ============ */
.drawing-card {
  border: 0;
  border-radius: 1rem;
  cursor: zoom-in;
  display: block;
  min-height: 220px;
  overflow: hidden;
  position: relative;
  text-align: left;
  transition: transform 300ms ease, box-shadow 300ms ease;
  width: 100%;
}

.drawing-card img {
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  transition: transform 500ms ease;
  width: 100%;
}

.drawing-card:hover img {
  transform: scale(1.08);
}

.drawing-card::after {
  background: linear-gradient(to top, rgba(15, 39, 66, 0.85), transparent);
  content: "";
  inset: 0;
  position: absolute;
}

.drawing-card span {
  bottom: 1.25rem;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 950;
  left: 1.25rem;
  position: absolute;
  z-index: 1;
}

/* ============ TIMELINE ============ */
.timeline {
  display: grid;
  gap: 1rem;
  position: relative;
}

.timeline-item {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: auto 1fr;
}

.timeline-item span {
  align-items: center;
  background: var(--gold);
  border-radius: 999px;
  color: var(--navy);
  display: flex;
  font-weight: 950;
  height: 2.75rem;
  justify-content: center;
  width: 2.75rem;
}

.timeline-item div {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 1.3rem;
}

.timeline-item h3 {
  font-size: 1.1rem;
  font-weight: 950;
}

.timeline-item p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
  margin-top: 0.45rem;
}

/* ============ FORMS ============ */
label {
  color: var(--charcoal);
  display: grid;
  font-size: 0.86rem;
  font-weight: 850;
  gap: 0.45rem;
}

aside label {
  color: rgba(255, 255, 255, 0.9);
}

input,
select,
textarea {
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  color: var(--charcoal);
  font: inherit;
  font-weight: 500;
  outline: none;
  padding: 0.9rem 1rem;
  width: 100%;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(198, 156, 74, 0.16);
}

/* ============ DASHBOARD ============ */
.dashboard {
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  background: #fff;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.dashboard h3,
.dashboard span {
  color: var(--navy);
  font-size: 1.2rem;
  font-weight: 950;
}

.progress {
  background: #e2e8f0;
  border-radius: 999px;
  height: 0.75rem;
  margin: 1.1rem 0;
  overflow: hidden;
}

.progress span {
  background: linear-gradient(90deg, var(--gold), #e8d18c);
  display: block;
  height: 100%;
  transition: width 1s ease;
}

.dashboard li {
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  padding: 0.85rem 0;
}

.dashboard li strong {
  color: #0f766e;
  font-size: 0.82rem;
}

.doc-link {
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  color: var(--navy);
  display: block;
  font-size: 0.88rem;
  font-weight: 850;
  padding: 0.9rem;
  text-align: center;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.doc-link:hover {
  border-color: var(--gold);
  background: var(--gold-light);
}

/* ============ TRUST/TESTIMONIALS ============ */
.trust-stat,
.testimonial {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 1.5rem;
}

.trust-stat strong {
  color: var(--gold);
  display: block;
  font-size: 2.4rem;
  font-weight: 950;
}

.trust-stat span,
.testimonial p {
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.7;
}

.testimonial cite {
  color: #fff;
  display: block;
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 900;
  margin-top: 1rem;
}

.testimonial.light {
  background: #fff;
  border-color: #e5e7eb;
}

.testimonial.light p {
  color: #475569;
}

.testimonial.light cite {
  color: var(--navy);
}

.trust-strip {
  border-bottom: 1px solid #e5e7eb;
}

.trust-strip div div {
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
}

.trust-strip strong {
  color: var(--navy);
  display: block;
  font-size: 2rem;
  font-weight: 950;
}

.trust-strip span {
  color: #64748b;
  display: block;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* ============ LIGHTBOX ============ */
.lightbox {
  align-items: center;
  background: rgba(3, 7, 18, 0.88);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 1rem;
  position: fixed;
  z-index: 80;
  backdrop-filter: blur(4px);
}

.lightbox.open {
  display: flex;
  animation: fadeIn 200ms ease;
}

.lightbox img {
  border-radius: 0.75rem;
  max-height: 86vh;
  object-fit: contain;
  width: min(100%, 980px);
  animation: scaleIn 300ms ease;
}

.lightbox button {
  background: #fff;
  border-radius: 999px;
  color: var(--navy);
  font-size: 2rem;
  height: 3rem;
  line-height: 1;
  position: absolute;
  right: 1.25rem;
  top: 1.25rem;
  width: 3rem;
  cursor: pointer;
  border: none;
  transition: transform var(--transition-fast);
}

.lightbox button:hover {
  transform: scale(1.1);
}

/* ============ BUTTONS ============ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
  background: var(--navy);
  color: #fff;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(15, 39, 66, 0.2);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
  background: transparent;
  color: var(--navy);
  border: 2px solid #cbd5e1;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-secondary:hover {
  border-color: var(--navy);
  background: rgba(15, 39, 66, 0.04);
  transform: translateY(-2px);
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
  background: var(--gold);
  color: var(--navy);
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(198, 156, 74, 0.3);
}

/* ============ HERO ============ */
.hero-panel {
  border-radius: 1rem;
}

/* ============ CHAT ============ */
.chat-assistant {
  bottom: 1rem;
  left: 1rem;
  position: fixed;
  z-index: 70;
}

.chat-toggle {
  background: var(--gold);
  border-radius: 999px;
  color: var(--navy);
  font-weight: 950;
  padding: 0.9rem 1.25rem;
  box-shadow: var(--shadow-lg);
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.chat-toggle:hover {
  transform: scale(1.05);
}

.chat-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  bottom: 4rem;
  box-shadow: var(--shadow-xl);
  display: none;
  left: 0;
  overflow: hidden;
  position: absolute;
  width: min(92vw, 360px);
}

.chat-panel.open {
  display: block;
  animation: scaleIn 300ms ease;
}

.chat-head {
  align-items: center;
  background: var(--navy);
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: 1rem;
}

.chat-head button {
  color: #fff;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.chat-messages {
  display: grid;
  gap: 0.6rem;
  max-height: 300px;
  overflow: auto;
  padding: 1rem;
}

.chat-messages p {
  border-radius: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  padding: 0.75rem;
}

.chat-messages .bot {
  background: var(--mist);
  color: var(--charcoal);
}

.chat-messages .user {
  background: var(--navy);
  color: #fff;
  margin-left: 2rem;
}

.chat-form {
  border-top: 1px solid #e5e7eb;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1fr auto;
  padding: 0.75rem;
}

.chat-form input {
  padding: 0.7rem;
}

.chat-form button {
  background: var(--gold);
  border-radius: 0.75rem;
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 950;
  padding: 0 0.85rem;
  border: none;
  cursor: pointer;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 767px) {
  .section-pad {
    padding: 3.5rem 0;
  }

  .dashboard li {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .hero-shell {
    min-height: auto;
  }
}

@media (max-width: 639px) {
  .container-px {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .container-px {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}