/* --- Color Palette & Variables --- */
:root {
  --primary-deep: #0e241c;       /* Deep evergreen */
  --primary-forest: #1b3d30;     /* Rich PNW pine */
  --accent-teal: #1f6e6b;        /* Mountain lake teal */
  --accent-light: #2ab398;       /* Highlight aqua */
  --lake-blue: #1c3643;          /* Deep glacial water */
  --slate-dark: #12181b;         /* Technical background */
  --slate-panel: #1b2428;        /* Card surface */
  --slate-border: #29373e;       /* Card borders */
  --text-main: #e8eff0;          /* Clean off-white */
  --text-muted: #9bb0b8;         /* Subdued technical copy */
  --font-heading: 'Cinzel', serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* --- Global Reset & Base --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--slate-dark);
  /* Layered dark overlay over a faint, fixed watermark of the letterhead */
  background-image: 
    linear-gradient(
      180deg, 
      rgba(18, 24, 27, 0.94) 0%, 
      rgba(18, 24, 27, 0.90) 50%, 
      rgba(18, 24, 27, 0.96) 100%
    ),
    url('assets/letterhead-bg.jpg');
  background-attachment: fixed;
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.container {
  width: 90%;
  max-width: 1240px;
  margin: 0 auto;
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #fff;
}

/* --- Top Bar --- */
.top-bar {
  background-color: #080d0f;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--slate-border);
  padding: 8px 0;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-contacts a {
  margin-left: 20px;
  color: var(--text-muted);
}

.top-contacts a:hover {
  color: var(--accent-light);
}

/* --- Navbar --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(18, 24, 27, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--slate-border);
  padding: 16px 0;
  transition: background-color 0.25s ease;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a:hover {
  color: #fff;
}

.btn-nav {
  padding: 8px 18px;
  border: 1px solid var(--accent-light);
  border-radius: 4px;
  color: var(--accent-light) !important;
}

.btn-nav:hover {
  background-color: var(--accent-light);
  color: var(--slate-dark) !important;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 75vh;
  display: flex;
  align-items: center;
  background: url('assets/hero-banner.jpg') center/cover no-repeat;
  padding: 100px 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 36, 28, 0.85) 0%, rgba(18, 24, 27, 0.96) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-light);
  background-color: rgba(42, 179, 152, 0.12);
  border: 1px solid var(--accent-light);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 20px;
}

.hero-subtext {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 35px;
  max-width: 720px;
}

.hero-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  font-weight: 600;
  border-radius: 4px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-primary {
  background-color: var(--accent-light);
  color: #091316;
}

.btn-primary:hover {
  background-color: #35d1b3;
  box-shadow: 0 0 15px rgba(42, 179, 152, 0.4);
}

.btn-secondary {
  background-color: transparent;
  color: #fff;
  border: 1px solid var(--slate-border);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: #fff;
}

/* --- Section Containers --- */
.section {
  padding: 90px 0;
}

.section-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 60px auto;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 2.3rem;
  color: #fff;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.grid {
  display: grid;
  gap: 30px;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card {
  background-color: var(--slate-panel);
  border: 1px solid var(--slate-border);
  border-radius: 8px;
  padding: 35px 30px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-teal);
}

/* --- Stat Cards --- */
.stat-card .stat-icon {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-light);
  margin-bottom: 15px;
}

.stat-card h3 {
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 12px;
}

.stat-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- Patent Details --- */
/* Update the section backgrounds so they don't completely block the watermark */
.patent-section {
  background-color: rgba(20, 27, 31, 0.78);
  backdrop-filter: blur(4px);
  border-top: 1px solid var(--slate-border);
  border-bottom: 1px solid var(--slate-border);
}

.transition-section {
  background: linear-gradient(
    180deg, 
    rgba(28, 54, 67, 0.85) 0%, 
    rgba(14, 36, 28, 0.88) 100%
  );
  backdrop-filter: blur(4px);
}

.footer {
  background-color: rgba(9, 14, 16, 0.92);
  backdrop-filter: blur(6px);
  border-top: 1px solid var(--slate-border);
  padding: 70px 0 0 0;
}
.patent-box {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.patent-badge {
  font-family: var(--font-mono);
  color: var(--accent-light);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.patent-meta h2 {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  color: #fff;
  margin: 10px 0 15px 0;
}

.patent-desc {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.patent-list {
  list-style: none;
}

.patent-list li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.95rem;
  color: var(--text-muted);
}

.patent-list strong {
  color: #fff;
  display: inline-block;
  width: 170px;
}

.spec-terminal {
  background-color: #090e10;
  border: 1px solid var(--accent-teal);
  border-radius: 6px;
  padding: 25px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #92d8cb;
  line-height: 1.9;
}

.terminal-header {
  border-bottom: 1px solid var(--slate-border);
  padding-bottom: 10px;
  margin-bottom: 15px;
  color: #fff;
  font-weight: 600;
}

/* --- Subsystem Engineering Rows --- */
.tech-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  margin-bottom: 90px;
}

.tech-row.reverse {
  direction: rtl;
}

.tech-row.reverse .tech-text {
  direction: ltr;
}

.sub-title {
  font-family: var(--font-mono);
  color: var(--accent-light);
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.tech-text h3 {
  font-size: 1.8rem;
  color: #fff;
  margin: 10px 0 16px 0;
}

.tech-text p {
  color: var(--text-muted);
  margin-bottom: 18px;
}

.tech-text ul {
  padding-left: 20px;
  color: var(--text-muted);
}

.tech-text li {
  margin-bottom: 10px;
}

.tech-text strong {
  color: #fff;
}

.blueprint-frame {
  background-color: var(--slate-panel);
  border: 1px solid var(--slate-border);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.blueprint-frame:hover {
  border-color: var(--accent-light);
  transform: translateY(-3px);
}

.blueprint-frame img {
  width: 100%;
  max-height: 380px;
  object-fit: contain;
  background-color: #ffffff;
  padding: 12px;
  border-radius: 4px;
}

.fig-caption {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* --- Transition Timeline --- */
.transition-section {
  background: linear-gradient(180deg, var(--lake-blue) 0%, var(--primary-deep) 100%);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 25px;
}

.timeline-step {
  background-color: rgba(18, 24, 27, 0.65);
  border: 1px solid rgba(42, 179, 152, 0.3);
  padding: 30px 20px;
  border-radius: 8px;
  position: relative;
}

.step-num {
  width: 40px;
  height: 40px;
  background-color: var(--accent-light);
  color: #000;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: 15px;
}

.timeline-step h4 {
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.timeline-step p {
  color: #c7d8de;
  font-size: 0.9rem;
}

/* --- Gallery Grid --- */
.gallery-card {
  background-color: var(--slate-panel);
  border: 1px solid var(--slate-border);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.gallery-card:hover {
  border-color: var(--accent-light);
  transform: translateY(-4px);
}

.gallery-card img {
  width: 100%;
  height: 230px;
  object-fit: contain;
  background-color: #ffffff;
  padding: 16px;
  border-bottom: 1px solid var(--slate-border);
}

.gallery-info {
  padding: 16px 18px;
  flex-grow: 1;
}

.gallery-info h5 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.gallery-info span {
  color: var(--accent-light);
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

/* --- Modal Viewer --- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.88);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background-color: var(--slate-panel);
  border: 1px solid var(--slate-border);
  padding: 30px;
  max-width: 860px;
  width: 100%;
  border-radius: 8px;
  position: relative;
  max-height: 92vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  line-height: 1;
}

.modal-content img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  background-color: #ffffff;
  padding: 14px;
  border-radius: 4px;
  margin-bottom: 18px;
}

.modal-content h4 {
  color: #fff;
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.modal-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- Applications & Footer --- */
.app-card h4 {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.app-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer {
  background-color: #090e10;
  border-top: 1px solid var(--slate-border);
  padding: 70px 0 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 50px;
  padding-bottom: 50px;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: #fff;
}

.footer-tagline {
  color: var(--accent-light);
  font-size: 0.85rem;
  margin-bottom: 15px;
  letter-spacing: 1px;
}

.footer-text {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-grid h4 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.footer-grid p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 900px) {
  .patent-box,
  .tech-row,
  .tech-row.reverse,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .hero h1 {
    font-size: 2.2rem;
  }
}