/* 
  Medico Instruments — Premium Multi-Page Styling
  Design System & Custom Properties
*/

:root {
  --navy: #ea580c;
  --navy-deep: #141210;
  --blue: #1e1b18;
  --teal: #ea580c;
  --teal-dark: #c2410c;
  --teal-light: #f97316;
  --pale: #fffaf5;
  --white: #FFFFFF;
  --ink: #141210;
  --slate: #5c534e;
  --line: #f0e4dc;
  --radius: 10px;
  --radius-sm: 6px;
  --maxw: 1200px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Headings & Typography */
h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--navy-deep);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 700;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

ul {
  list-style: none;
}

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

/* Layout Utilities */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

section {
  padding: 100px 0;
}

.section-head {
  max-width: 680px;
  margin-bottom: 56px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 42px);
  margin-top: 14px;
}

.section-head p {
  color: var(--slate);
  font-size: 17px;
  margin-top: 14px;
}

/* Badges & Micro-components */
.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 2px;
  background: var(--teal);
  display: inline-block;
}

.spec-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--blue);
  background: var(--pale);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.spec-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
}

.btn:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--teal);
  color: var(--white);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.25);
}

.btn-primary:hover {
  background: var(--teal-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -8px rgba(0, 0, 0, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-outline:hover {
  border-color: var(--teal-dark);
  color: var(--teal-dark);
  transform: translateY(-2px);
  background: var(--pale);
}

/* Header & Glassmorphic Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(234, 88, 12, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: var(--transition);
}

header.scrolled {
  background: rgba(194, 65, 12, 0.98);
  box-shadow: 0 4px 20px rgba(20, 18, 16, 0.15);
}

header.scrolled .nav {
  padding: 8px 32px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  max-width: var(--maxw);
  margin: 0 auto;
  transition: var(--transition);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 21px;
  color: var(--white);
}

.logo-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  object-fit: contain;
}

.logo-fallback {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--white), rgba(255, 255, 255, 0.7));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  font-weight: 700;
  font-size: 18px;
  font-family: 'Space Grotesk', sans-serif;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: #ffe3d1;
  position: relative;
  padding: 4px 0;
}

.nav-links a.active {
  color: var(--white);
}

.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 0;
  background: var(--white);
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a.active:not(.btn)::after,
.nav-links a:not(.btn):hover::after {
  width: 100%;
}

.nav-cta {
  display: flex;
  gap: 12px;
}

.nav-cta .btn {
  padding: 10px 20px;
  font-size: 14px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1100;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin: 6px 0;
  transition: var(--transition);
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.page-hero {
  padding: 140px 0 60px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--ink);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.94) 30%, rgba(255, 255, 255, 0.25) 100%);
  z-index: 1;
  pointer-events: none;
}

.page-hero .wrap {
  position: relative;
  z-index: 2;
}

.page-hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  color: var(--navy-deep);
  margin-top: 10px;
}

.page-hero p {
  font-size: 18px;
  color: var(--slate);
  max-width: 600px;
  margin-top: 16px;
}

.page-hero .eyebrow {
  color: var(--teal) !important;
}

.page-hero .eyebrow::before {
  background: var(--teal) !important;
}

/* Footer Section */
footer {
  background: var(--blue);
  color: #a89f9a; /* Warm beige-slate instead of cool blue-gray */
  padding: 80px 0 32px;
  position: relative;
  overflow: hidden;
  border-top: 4px solid var(--teal); /* Vibrant Malta Orange top border */
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 20px;
}

.footer-logo-fallback {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 18px;
  font-family: 'Space Grotesk', sans-serif;
}

.footer-grid p {
  font-size: 14px;
  margin-top: 18px;
  max-width: 320px;
  line-height: 1.6;
}

.footer-grid h4 {
  color: var(--white);
  font-size: 15px;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.footer-grid ul li {
  margin-bottom: 12px;
}

.footer-grid ul li a {
  font-size: 14px;
  color: #a89f9a; /* Warm beige-slate */
  transition: var(--transition);
}

.footer-grid ul li a:hover {
  color: var(--teal-light);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 60px;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: #8c8078; /* Warm slate gray for copyright text */
}

/* Reveal Scroll Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Image fallback styling for missing assets */
.img-placeholder {
  background: linear-gradient(135deg, var(--pale) 0%, #D7E4EC 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--blue);
  font-family: 'Space Grotesk', sans-serif;
  text-align: center;
  padding: 24px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px dashed var(--line);
}

.img-placeholder svg {
  margin-bottom: 12px;
  stroke-width: 1.5;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
  section {
    padding: 80px 0;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 860px) {
  .nav {
    padding: 16px 24px;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    background: var(--white);
    border-left: 1px solid var(--line);
    flex-direction: column;
    padding: 100px 32px 40px;
    gap: 24px;
    align-items: flex-start;
    box-shadow: -10px 0 30px rgba(20, 18, 16, 0.08);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
  }
  
  .nav-links a {
    color: var(--slate) !important;
  }
  
  .nav-links a.active {
    color: var(--teal) !important;
  }
  
  .nav-links.open {
    transform: translateX(0);
  }
  
  .menu-toggle {
    display: block;
  }
  
  .nav-cta {
    display: none;
  }
  
  .nav-links .btn-outline {
    width: 100%;
    margin-top: 16px;
    border-color: var(--teal);
    color: var(--teal);
  }
}

@media (max-width: 640px) {
  section {
    padding: 60px 0;
  }
  .wrap {
    padding: 0 20px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}
