/* ============================================
   MEDTECHNICA SERVICES — Design System
   Australian Medical Equipment B2B Website
   ============================================ */

:root {
  /* Brand Colors */
  --med-blue: #1A4B8C;
  --med-blue-dark: #0F3266;
  --med-blue-light: #2E6BC4;
  --med-blue-50: #E8F0FA;
  --med-blue-100: #D1E2F5;

  /* Accent Colors */
  --med-green: #39A78E;
  --med-green-dark: #2A8470;
  --med-green-light: #5CC4AB;
  --med-green-50: #E6F5F1;

  /* Neutral Colors */
  --ink-dark: #222830;
  --ink-body: #666666;
  --ink-muted: #8A94A6;
  --bg-light: #F5F8FB;
  --bg-white: #FFFFFF;
  --border-color: #E2E8F0;

  /* Fonts */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --container-max: 1280px;
  --header-h: 72px;

  /* Transitions */
  --transition: 0.3s ease;
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-primary);
  color: var(--ink-body);
  background: var(--bg-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--ink-dark);
  font-weight: 700;
  line-height: 1.3;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; display: block; }

/* ============ LAYOUT ============ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }

.bg-light { background: var(--bg-light); }
.bg-blue { background: var(--med-blue); }
.bg-blue-dark { background: var(--med-blue-dark); }
.bg-white { background: var(--bg-white); }
.bg-green { background: var(--med-green); }

.text-center { text-align: center; }
.text-white { color: #fff !important; }
.text-blue { color: var(--med-blue) !important; }
.text-green { color: var(--med-green) !important; }

/* ============ TYPOGRAPHY ============ */
.section-eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--med-blue);
  display: inline-block;
}

.section-eyebrow.green { color: var(--med-green); }
.section-eyebrow.light { color: rgba(255,255,255,0.7); }

h2.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-top: 12px;
}

.title-bar::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--med-blue);
  margin-top: 16px;
  border-radius: 2px;
}

.title-bar.green-bar::after { background: var(--med-green); }
.title-bar.center::after { margin-left: auto; margin-right: auto; }

.lead-text {
  font-size: 1.125rem;
  color: var(--ink-body);
  line-height: 1.8;
}

/* ============ HEADER ============ */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 1000;
  transition: all var(--transition);
  background: transparent;
}

#header.scrolled {
  background: rgba(255,255,255,0.98);
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
  backdrop-filter: blur(10px);
}

#header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-text .logo-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  transition: var(--transition);
}

.logo-text .logo-sub {
  font-size: 0.625rem;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: var(--transition);
}

#header.scrolled .logo-name { color: var(--med-blue); }
#header.scrolled .logo-sub { color: var(--med-green); }

/* Desktop Nav */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  padding: 8px 14px;
  border-radius: 6px;
  transition: var(--transition);
  position: relative;
}

#header.scrolled .nav-link { color: var(--ink-dark); }

.nav-link:hover { color: var(--med-green-light); }
#header.scrolled .nav-link:hover { color: var(--med-blue); }

.nav-link.active { color: var(--med-green-light); }
#header.scrolled .nav-link.active { color: var(--med-blue); }

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--med-green);
  border-radius: 1px;
}

/* CTA Button in nav */
.btn-quote {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--med-green);
  color: #fff !important;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 6px;
  transition: var(--transition);
  margin-left: 8px;
}

.btn-quote:hover {
  background: var(--med-green-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(57,167,142,0.3);
}

/* Mobile menu button */
.menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #fff;
}

#header.scrolled .menu-btn { color: var(--ink-dark); }

/* Mobile Menu */
#menuOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

#menuOverlay.active { opacity: 1; visibility: visible; }

#mobileMenu {
  position: fixed;
  top: 0; right: -320px;
  width: 300px;
  height: 100vh;
  background: #fff;
  z-index: 1200;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 30px rgba(0,0,0,0.15);
}

#mobileMenu.active { right: 0; }

.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.menu-body {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto;
}

.menu-body a {
  display: block;
  padding: 14px 24px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-dark);
  border-bottom: 1px solid var(--bg-light);
  transition: var(--transition);
}

.menu-body a:hover, .menu-body a.active {
  color: var(--med-blue);
  background: var(--med-blue-50);
  padding-left: 28px;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn-lg { padding: 14px 36px; font-size: 0.9375rem; }

.btn-blue {
  background: var(--med-blue);
  color: #fff;
}
.btn-blue:hover {
  background: var(--med-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26,75,140,0.25);
}

.btn-green {
  background: var(--med-green);
  color: #fff;
}
.btn-green:hover {
  background: var(--med-green-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(57,167,142,0.25);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
}

.btn-outline-blue {
  background: transparent;
  border-color: var(--med-blue);
  color: var(--med-blue);
}
.btn-outline-blue:hover {
  background: var(--med-blue);
  color: #fff;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--med-blue-dark);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,50,102,0.92) 0%, rgba(26,75,140,0.75) 50%, rgba(15,50,102,0.85) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: var(--header-h);
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 800px;
}

.hero h1 .accent { color: var(--med-green-light); }

.hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255,255,255,0.8);
  margin-top: 20px;
  max-width: 640px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 36px;
  flex-wrap: wrap;
}

/* Hero scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero-scroll .line {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.3);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { transform: scaleY(0.3); opacity: 0.3; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ============ PAGE BANNER ============ */
.page-banner {
  position: relative;
  padding: 140px 0 64px;
  background: var(--med-blue-dark);
  overflow: hidden;
}

.page-banner-content { position: relative; z-index: 2; }

.page-banner h1 {
  font-size: 2.75rem;
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.875rem;
}

.breadcrumb a { color: rgba(255,255,255,0.6); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { color: rgba(255,255,255,0.4); }

/* ============ CARDS ============ */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.card-hover:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
  transform: translateY(-4px);
  border-color: transparent;
}

.card-blue-top { border-top: 3px solid var(--med-blue); }
.card-green-top { border-top: 3px solid var(--med-green); }

/* ============ STATS ============ */
.stat-block { text-align: center; }

.stat-number {
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--med-blue);
  line-height: 1;
}

.stat-number.green { color: var(--med-green); }

.stat-label {
  font-size: 0.875rem;
  color: var(--ink-muted);
  margin-top: 8px;
  font-weight: 500;
}

/* ============ ICON BOX ============ */
.icon-box {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-box.blue { background: var(--med-blue-50); }
.icon-box.green { background: var(--med-green-50); }
.icon-box.solid-blue { background: var(--med-blue); }
.icon-box.solid-green { background: var(--med-green); }

/* ============ PRODUCT CARD ============ */
.product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  cursor: pointer;
}

.product-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
  transform: translateY(-4px);
}

.product-img {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.product-body { padding: 20px; }

.product-body h4 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.product-body p {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* ============ BADGE ============ */
.badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-blue { background: var(--med-blue-50); color: var(--med-blue); }
.badge-green { background: var(--med-green-50); color: var(--med-green); }

/* ============ FORM ============ */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-dark);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.9375rem;
  font-family: var(--font-primary);
  color: var(--ink-dark);
  background: #fff;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--med-blue);
  box-shadow: 0 0 0 3px rgba(26,75,140,0.1);
}

textarea.form-control { resize: vertical; min-height: 120px; }

select.form-control { cursor: pointer; }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--med-blue-dark);
  color: rgba(255,255,255,0.7);
  padding: 72px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-grid h4 {
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-link {
  display: block;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  padding: 5px 0;
  transition: var(--transition);
}

.footer-link:hover { color: var(--med-green-light); padding-left: 4px; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.4);
  flex-wrap: wrap;
  gap: 12px;
}

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

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

.animate-fade-in { animation: fadeIn 0.8s ease forwards; }
.animate-fade-in-up { animation: fadeInUp 0.8s ease forwards; }

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============ BACK TO TOP ============ */
#toTop {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--med-blue);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 900;
  box-shadow: 0 4px 16px rgba(26,75,140,0.3);
}

#toTop.visible { opacity: 1; visibility: visible; }
#toTop:hover { background: var(--med-blue-dark); transform: translateY(-2px); }

/* ============ UTILITY ============ */
.grid-pattern {
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

.divider {
  height: 1px;
  background: var(--border-color);
  margin: 48px 0;
}

/* ============ FAQ ============ */
.faq-item {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition);
}

.faq-item[open] {
  box-shadow: 0 8px 28px rgba(0,0,0,0.06);
  border-color: var(--med-green-light);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink-dark);
  list-style: none;
  transition: var(--transition);
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--med-blue); }

.faq-item .faq-icon {
  flex-shrink: 0;
  color: var(--med-green);
  transition: transform 0.3s ease;
}

.faq-item[open] .faq-icon {
  transform: rotate(180deg);
  color: var(--med-blue);
}

.faq-content {
  padding: 0 28px 24px;
  color: var(--ink-body);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ============ PROCESS FLOW ============ */
.process-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-color);
}

.process-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--med-blue);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.process-num.green { background: var(--med-green); }

.process-card {
  position: relative;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 28px;
  transition: var(--transition);
  overflow: hidden;
}

.process-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(92,196,171,0.4);
  transform: translateY(-4px);
}

.process-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--med-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.process-step-num {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 2rem;
  font-weight: 800;
  color: rgba(255,255,255,0.1);
  letter-spacing: -0.02em;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .hero h1 { font-size: 2.75rem; }
}

@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .menu-btn { display: flex; }
  .section { padding: 64px 0; }
  .hero h1 { font-size: 2.25rem; }
  .hero-subtitle { font-size: 1.0625rem; }
  h2.section-title { font-size: 1.75rem; }
  .page-banner h1 { font-size: 2rem; }
  .page-banner { padding: 120px 0 48px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .stat-number { font-size: 2rem; }
  .card { padding: 24px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero h1 { font-size: 1.875rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}
