:root {
  --background: #f2dcb7;
  --text-color: #0f1e2f;
  --accent: #c1914b;
  --accent-dark: #a67432;
  --surface: #f7e8cd;
  --nav-height: 88px;
  --border-subtle: rgba(15, 30, 47, 0.12);
  --glass-overlay: rgba(255, 255, 255, 0.4);
  --panel-overlay: rgba(255, 255, 255, 0.32);
  --panel-shadow: rgba(15, 30, 47, 0.12);
  --focus-glow: rgba(193, 145, 75, 0.25);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  font-family: "Montserrat", "Avenir Next", "Segoe UI", sans-serif;
  background: var(--background);
  color: var(--text-color);
  min-height: 100%;
  transition: background 0.5s ease, color 0.5s ease;
}

body.theme-fade-in {
  animation: themeFadeIn 0.6s ease forwards;
}

body.theme-fade-out {
  animation: themeFadeOut 0.45s ease forwards;
}

@keyframes themeFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes themeFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  box-shadow: 0 2px 12px var(--border-subtle);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  height: var(--nav-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.brand img {
  width: 60px;
  height: 60px;
}

.brand-name {
  font-size: 1.25rem;
  letter-spacing: 0.18rem;
  text-transform: uppercase;
  font-weight: 700;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2.25rem;
  font-size: 0.95rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  font-weight: 600;
}

.navbar nav {
  margin-left: 3rem;
}

.navbar nav li {
  position: relative;
}

.has-submenu::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 0.75rem;
  pointer-events: none;
}

.has-submenu > a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.has-submenu > a::after {
  content: "";
  border: 5px solid transparent;
  border-top-color: currentColor;
  margin-top: 2px;
  transition: transform 0.2s ease;
}

.has-submenu:hover > a::after,
.has-submenu:focus-within > a::after,
.has-submenu > a[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.submenu {
  display: none;
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  flex-direction: column;
  gap: 0;
  list-style: none;
  background: var(--surface);
  color: var(--text-color);
  border-radius: 0.75rem;
  min-width: 220px;
  box-shadow: 0 12px 32px var(--panel-shadow);
  padding: 0.75rem 0;
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
}

.submenu li a {
  display: block;
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
  letter-spacing: 0.08rem;
  text-transform: none;
}

.submenu li a:hover,
.submenu li a:focus {
  background: rgba(193, 145, 75, 0.1);
  text-decoration: none;
}

.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu,
.has-submenu > a[aria-expanded="true"] + .submenu {
  display: flex;
}

.site-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.55);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(15, 30, 47, 0.12);
  backdrop-filter: blur(8px);
  margin-left: auto;
}

.site-toggle span {
  font-size: 0.75rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  font-weight: 600;
}

.mode-toggle {
  position: relative;
  width: 70px;
  height: 32px;
  border-radius: 999px;
  background: rgba(15, 30, 47, 0.14);
  display: inline-flex;
  align-items: center;
  padding: 0 4px;
}

.mode-toggle input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}

.mode-toggle .toggle-handle {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 10px rgba(15, 30, 47, 0.18);
  transform: translateX(2px);
  transition: transform 0.35s ease;
}

.mode-toggle input:checked + .toggle-handle {
  transform: translateX(38px);
}

.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;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.hero {
  text-align: center;
  padding: 3.5rem 0;
}

.hero-logo {
  margin: 0 auto 2rem;
  width: 140px;
}

.hero h1 {
  font-size: 2.75rem;
  letter-spacing: 0.25rem;
  text-transform: uppercase;
}

.hero h2 {
  font-size: 1rem;
  letter-spacing: 0.45rem;
  margin-top: 0.75rem;
  text-transform: uppercase;
}

.hero p {
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 640px;
  margin: 1.75rem auto 0;
}

.section-title {
  font-size: 1.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3rem;
  text-align: center;
  margin-bottom: 2rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: 2.5rem 2rem;
  align-content: start;
  justify-items: stretch;
}

@media (max-width: 800px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

.product-card {
  background: var(--glass-overlay);
  border-radius: 20px;
  box-shadow: 0 10px 30px var(--panel-shadow);
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
  align-items: center;
  text-align: left;
}

.product-card--feature {
  grid-column: 1 / -1;
  grid-template-columns: 1fr;
  text-align: center;
  padding: 2.5rem 3rem;
  gap: 2rem;
}

.product-card--feature .product-media {
  justify-items: center;
}

.product-card--feature .product-media img {
  max-width: 280px;
}

.product-card--feature .product-info {
  display: grid;
  gap: 1.2rem;
  max-width: 580px;
  margin: 0 auto;
  justify-items: center;
}

.product-card--feature .product-info p {
  font-size: 1.05rem;
  line-height: 1.7;
}

.product-card--compact {
  grid-template-columns: 1fr;
  text-align: center;
  padding: 1.75rem 2rem;
  gap: 1.5rem;
}

.product-card--compact .product-media {
  justify-items: center;
}

.product-card--compact .product-media img {
  max-width: 180px;
}

.product-card--compact .product-info {
  display: grid;
  gap: 0.9rem;
  justify-items: center;
}

.product-availability {
  font-size: 0.85rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  color: var(--accent-dark);
}
.product-media {
  display: grid;
  gap: 0.5rem;
  align-items: center;
}

.product-media img {
  max-width: 160px;
  width: 100%;
  display: block;
}

.product-media h3 {
  text-transform: uppercase;
  letter-spacing: 0.18rem;
  font-size: 1rem;
  margin: 0;
}

.product-info p {
  margin-bottom: 0.9rem;
  line-height: 1.6;
}

@media (max-width: 800px) {
  .product-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .product-media {
    justify-items: center;
  }
}

/* Product detail page styles (products/) */
.product-detail {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  align-items: start;
  padding: 3rem 0;
  border-bottom: 1px solid rgba(15,30,47,0.06);
}
.detail-media img {
  width: 100%;
  max-width: 320px;
  display: block;
}
.detail-content h2 {
  margin-top: 0;
}

.product-detail .button {
  margin-top: 1.25rem;
}

.coming-soon-detail .coming-soon-badge {
  display: grid;
  place-items: center;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(193, 145, 75, 0.85), rgba(255, 255, 255, 0.75));
  color: #0f1e2f;
  font-weight: 700;
  letter-spacing: 0.28rem;
  text-transform: uppercase;
  font-size: 0.95rem;
  box-shadow: 0 18px 38px rgba(15, 30, 47, 0.18);
}

.coming-soon-detail .coming-soon-badge span {
  transform: rotate(-8deg);
}

body.engineering-theme .coming-soon-detail .coming-soon-badge {
  background: linear-gradient(135deg, rgba(42, 125, 225, 0.82), rgba(246, 249, 255, 0.85));
  color: #0b1d33;
}

@media (max-width: 900px) {
  .product-detail {
    grid-template-columns: 1fr;
    padding: 2rem 0;
  }
  .detail-media img {
    max-width: 240px;
    margin: 0 auto 1rem;
  }
  .coming-soon-detail .coming-soon-badge {
    margin: 0 auto 1.5rem;
    width: 200px;
    height: 200px;
  }
}

.cta-section {
  margin-top: 4rem;
  display: grid;
  gap: 2rem;
}

.cta-card {
  background: var(--glass-overlay);
  border-radius: 24px;
  padding: 2.5rem;
  display: grid;
  gap: 1.5rem;
  box-shadow: 0 15px 40px var(--panel-shadow);
}

.cta-card h3 {
  text-transform: uppercase;
  letter-spacing: 0.25rem;
  font-size: 1.1rem;
}

.cta-card p {
  line-height: 1.7;
}

.button {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.18rem;
  font-weight: 700;
  font-size: 0.9rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover,
.button:focus {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 30, 47, 0.18);
  text-decoration: none;
}

footer {
  text-align: center;
  padding: 2.5rem 0 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
}

/* Engineering theme overrides */
body.engineering-theme {
  --background: #e6efff;
  --text-color: #0b1d33;
  --accent: #2a7de1;
  --accent-dark: #1c5fb8;
  --surface: #0b1d33;
  --border-subtle: rgba(18, 53, 102, 0.16);
  --glass-overlay: rgba(255, 255, 255, 0.7);
  --panel-overlay: rgba(255, 255, 255, 0.85);
  --panel-shadow: rgba(11, 29, 51, 0.18);
  --focus-glow: rgba(42, 125, 225, 0.3);
}

body.engineering-theme header {
  backdrop-filter: blur(16px);
}

body.engineering-theme nav ul li a {
  color: rgba(255, 255, 255, 0.9);
}

body.engineering-theme .brand,
body.engineering-theme .brand-name {
  color: #f5f9ff;
}

body.engineering-theme .site-toggle {
  background: rgba(185, 209, 255, 0.9);
  box-shadow: 0 10px 22px rgba(11, 29, 51, 0.22);
}

body.engineering-theme .mode-toggle {
  background: rgba(42, 125, 225, 0.35);
}

body.engineering-theme .mode-toggle .toggle-handle {
  background: #ffffff;
  box-shadow: 0 6px 14px rgba(18, 53, 102, 0.25);
}

body.engineering-theme .product-card,
body.engineering-theme .cta-card,
body.engineering-theme .about-highlight,
body.engineering-theme .detail-card,
body.engineering-theme .project-card,
body.engineering-theme .testimonial-card,
body.engineering-theme .contact-card {
  border: 1px solid rgba(42, 125, 225, 0.18);
}

body.engineering-theme footer {
  color: rgba(7, 26, 49, 0.72);
}

body.engineering-theme input,
body.engineering-theme textarea {
  background: rgba(246, 249, 255, 0.8);
  border-color: rgba(42, 125, 225, 0.4);
  color: var(--text-color);
}

body.engineering-theme input::placeholder,
body.engineering-theme textarea::placeholder {
  color: rgba(7, 26, 49, 0.5);
}

/* Engineering content blocks */
.solutions-hero {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  text-align: center;
}

.solutions-hero p {
  line-height: 1.8;
  max-width: 720px;
  justify-self: center;
}

.solutions-grid {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
}

.solution-card {
  background: var(--panel-overlay);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 18px 45px var(--panel-shadow);
  display: grid;
  gap: 1.25rem;
  border: 1px solid rgba(77, 177, 255, 0.15);
}

.solution-card h3 {
  text-transform: uppercase;
  letter-spacing: 0.22rem;
  font-size: 1rem;
}

.solution-card ul {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.75rem;
  line-height: 1.7;
}

.tech-stack {
  display: grid;
  gap: 1rem;
  margin-top: 3rem;
}

.tech-stack h3 {
  font-size: 1rem;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
}

.tech-stack ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.metrics-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 3rem;
}

.metric {
  padding: 1.75rem;
  border-radius: 18px;
  background: var(--glass-overlay);
  box-shadow: 0 12px 30px var(--panel-shadow);
  text-align: center;
  border: 1px solid rgba(77, 177, 255, 0.12);
}

.metric strong {
  display: block;
  font-size: 1.75rem;
  margin-bottom: 0.35rem;
}

.team-grid {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
}

.team-card {
  background: var(--panel-overlay);
  border-radius: 24px;
  padding: 2.25rem;
  box-shadow: 0 16px 38px var(--panel-shadow);
  display: grid;
  gap: 1rem;
  border: 1px solid rgba(77, 177, 255, 0.15);
}

.team-card h3 {
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  font-size: 1rem;
}

.contact-cta {
  margin-top: 4rem;
  display: grid;
  gap: 1.5rem;
  text-align: center;
}

.contact-cta .button {
  justify-self: center;
}

.contact-grid {
  display: grid;
  gap: 2rem;
}

.contact-panel {
  background: var(--panel-overlay);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 18px 45px var(--panel-shadow);
  display: grid;
  gap: 1.5rem;
  border: 1px solid rgba(77, 177, 255, 0.15);
}

.contact-panel address {
  font-style: normal;
  line-height: 1.8;
}

.contact-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.contact-panel a {
  color: inherit;
  font-weight: 600;
}

.timeline {
  display: grid;
  gap: 1.75rem;
  margin-top: 3rem;
  border-left: 2px solid rgba(77, 177, 255, 0.2);
  padding-left: 1.5rem;
}

.timeline-entry {
  position: relative;
  padding-left: 0.5rem;
}

.timeline-entry::before {
  content: "";
  position: absolute;
  left: -1.8rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(77, 177, 255, 0.15);
}

.timeline-entry h3 {
  font-size: 0.95rem;
  letter-spacing: 0.18rem;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.timeline-entry p {
  line-height: 1.7;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.badge {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: rgba(77, 177, 255, 0.18);
  border: 1px solid rgba(77, 177, 255, 0.25);
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 600;
}

.hero-split {
  display: grid;
  gap: 3rem;
}

.hero-split img {
  justify-self: center;
  width: min(100%, 420px);
  border-radius: 28px;
  box-shadow: 0 20px 40px rgba(15, 30, 47, 0.2);
}

.page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.about-intro {
  display: grid;
  gap: 2.5rem;
}

.about-intro h1 {
  font-size: clamp(2.4rem, 2.2rem + 1vw, 3.2rem);
}

.about-highlight {
  display: grid;
  gap: 2rem;
  background: var(--glass-overlay);
  border-radius: 24px;
  padding: 2.5rem;
  text-align: left;
  box-shadow: 0 18px 40px var(--panel-shadow);
}

.about-highlight h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.about-meta {
  list-style: none;
  display: grid;
  gap: 1rem;
  padding: 0;
  margin: 0;
}

.about-meta span {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.15rem;
  font-size: 0.75rem;
  margin-bottom: 0.35rem;
  color: rgba(15, 30, 47, 0.7);
}

.about-section {
  margin-top: 5rem;
  display: grid;
  gap: 2.5rem;
}

.section-heading {
  text-align: center;
  display: grid;
  gap: 1.25rem;
  max-width: 760px;
  justify-self: center;
}

.section-heading h2 {
  text-transform: uppercase;
  letter-spacing: 0.3rem;
  font-size: 1.3rem;
}

.section-heading p {
  line-height: 1.7;
}

.about-content,
.collaboration-grid {
  display: grid;
  gap: 2rem;
}

.detail-card {
  background: var(--glass-overlay);
  border-radius: 22px;
  padding: 2.25rem;
  box-shadow: 0 15px 35px var(--panel-shadow);
  display: grid;
  gap: 1.25rem;
}

.detail-card h3 {
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  font-size: 1rem;
}

.detail-card ul {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.75rem;
  line-height: 1.6;
}

.project-grid {
  display: grid;
  gap: 2rem;
}

.project-card {
  background: var(--panel-overlay);
  border-radius: 22px;
  padding: 2.5rem;
  box-shadow: 0 18px 40px var(--panel-shadow);
  display: grid;
  gap: 1.5rem;
  text-align: left;
}

.project-card h3 {
  text-transform: uppercase;
  letter-spacing: 0.22rem;
  font-size: 1.05rem;
}

.project-card ul {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.75rem;
  line-height: 1.6;
}

.testimonial-grid {
  display: grid;
  gap: 2rem;
}

.testimonial-card {
  background: var(--glass-overlay);
  border-radius: 22px;
  padding: 2.5rem;
  box-shadow: 0 12px 32px var(--panel-shadow);
  display: grid;
  gap: 1.5rem;
  text-align: left;
}

.testimonial-card blockquote {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.7;
  font-style: italic;
}

.testimonial-card figcaption {
  text-transform: uppercase;
  letter-spacing: 0.18rem;
  font-size: 0.8rem;
  color: rgba(15, 30, 47, 0.7);
}

body.engineering-theme .about-meta span,
body.engineering-theme .testimonial-card figcaption {
  color: rgba(11, 29, 51, 0.65);
}

@media (min-width: 768px) {
  .about-highlight {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    align-items: center;
  }

  .about-content,
  .collaboration-grid,
  .project-grid,
  .testimonial-grid,
  .solutions-grid,
  .team-grid,
  .contact-grid,
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .solutions-hero {
    text-align: left;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .solutions-hero p {
    justify-self: stretch;
  }
}

@media (min-width: 1024px) {
  .about-intro {
    gap: 3rem;
  }

  .section-heading {
    gap: 1.5rem;
  }

  .project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .solutions-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .contact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.page-header h1 {
  text-transform: uppercase;
  letter-spacing: 0.3rem;
  font-size: 2.25rem;
}

.page-header p {
  margin-top: 1.25rem;
  line-height: 1.8;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.two-column {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
}

.contact-card {
  background: var(--glass-overlay);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 15px 45px var(--panel-shadow);
}

form {
  display: grid;
  gap: 1.5rem;
}

label {
  font-weight: 600;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  font-size: 0.8rem;
}

input,
textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 2px solid rgba(15, 30, 47, 0.2);
  font: inherit;
  background: rgba(255, 255, 255, 0.85);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus-glow);
}

textarea {
  min-height: 160px;
  resize: vertical;
}

.form-status {
  font-size: 0.9rem;
  min-height: 1.2rem;
  letter-spacing: 0.08rem;
}

@media (max-width: 768px) {
  header {
    position: static;
  }

  .navbar {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
  }

  nav ul {
    gap: 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .navbar nav {
    margin-left: 0;
  }

  .site-toggle {
    order: -1;
    align-self: flex-end;
    margin-left: 0;
  }

  .hero h1 {
    font-size: 2.2rem;
    letter-spacing: 0.18rem;
  }

  .hero h2 {
    letter-spacing: 0.3rem;
  }
}
