/* ==========================================
   WebGuru NZ – Heritage 2024 Design System
   Shared Stylesheet
   ========================================== */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: #f5faff;
  color: #171c20;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; }
img { display: block; max-width: 100%; }

/* === Material Icons === */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

/* ==========================================
   NAVIGATION
   ========================================== */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(245, 250, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid #bdc8d1;
  transition: box-shadow 0.25s ease;
}
.site-nav.scrolled {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  height: 64px;
  max-width: 1280px;
  margin: 0 auto;
}

.nav-logo {
  font-size: 24px;
  font-weight: 700;
  color: #00658d;
  line-height: 1;
}

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

.nav-link {
  font-size: 15px;
  font-weight: 400;
  color: #3e4850;
  text-decoration: none;
  padding-bottom: 2px;
  transition: color 0.2s ease;
  position: relative;
}
.nav-link:hover { color: #00aeef; }
.nav-link.active {
  color: #00658d;
  font-weight: 600;
  border-bottom: 2px solid #00658d;
}

.nav-cta {
  background: #00658d;
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s ease;
  border-bottom: none !important;
}
.nav-cta:hover { background: #00aeef !important; color: #003e58 !important; }

/* Hamburger Button */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  align-items: center;
  justify-content: center;
  color: #00658d;
}
.hamburger-btn .material-symbols-outlined {
  font-size: 26px;
}

/* Mobile Menu */
#mobile-menu {
  display: none;
  flex-direction: column;
  padding: 12px 20px 20px;
  gap: 4px;
  border-top: 1px solid #E9ECEF;
  background: #f5faff;
}
#mobile-menu.open { display: flex; }
#mobile-menu .nav-link {
  padding: 10px 0;
  border-bottom: 1px solid #eaeef4;
  display: block;
}
#mobile-menu .nav-cta {
  display: block;
  text-align: center;
  padding: 12px 20px;
  margin-top: 8px;
}

@media (max-width: 767px) {
  .hamburger-btn { display: flex !important; }
  .desktop-nav { display: none !important; }
  .nav-inner { padding: 0 20px; }
}

/* ==========================================
   BENTO TILES
   ========================================== */
.bento-tile {
  background-color: #F8F9FA;
  border: 1px solid #E9ECEF;
  transition: border-color 0.2s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.bento-tile:hover {
  border-color: #00aeef;
  transform: translateY(-2px);
}

/* === Cyan Square Bullet === */
.cyan-square {
  width: 6px;
  height: 6px;
  min-width: 6px;
  background-color: #00aeef;
  display: inline-block;
  flex-shrink: 0;
}

/* ==========================================
   CONTACT FORM
   ========================================== */
.technical-input {
  border: none;
  border-bottom: 1px solid #bdc8d1;
  background: transparent;
  padding: 12px 0;
  width: 100%;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #171c20;
  transition: border-bottom 0.25s ease;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border-radius: 0;
}
.technical-input::placeholder { color: #6e7881; }
.technical-input:focus {
  border-bottom: 2px solid #00aeef;
}
.technical-input.input-error {
  border-bottom: 2px solid #ba1a1a;
}

/* Select arrow */
select.technical-input {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236e7881' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  padding-right: 24px;
}

.field-group { position: relative; }

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #3e4850;
  margin-bottom: 4px;
  transition: color 0.2s ease;
}
.field-group:focus-within .field-label { color: #00aeef; }

.field-error {
  font-size: 12px;
  color: #ba1a1a;
  margin-top: 4px;
  min-height: 16px;
  display: block;
}

/* Form Status Alerts */
.form-alert {
  display: none;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 4px;
  font-size: 15px;
  line-height: 1.5;
  margin-top: 20px;
}
.form-alert.visible { display: flex; }
.form-alert-success {
  background: #e8f5e9;
  border: 1px solid #66bb6a;
  color: #2e7d32;
}
.form-alert-error {
  background: #ffdad6;
  border: 1px solid #ba1a1a;
  color: #93000a;
}

/* Submit button loading state */
.btn-loading {
  opacity: 0.75;
  pointer-events: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-spinner { animation: spin 0.75s linear infinite; display: inline-block; }

/* ==========================================
   SCROLL ANIMATIONS
   ========================================== */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays */
.fade-up:nth-child(2) { transition-delay: 0.08s; }
.fade-up:nth-child(3) { transition-delay: 0.16s; }
.fade-up:nth-child(4) { transition-delay: 0.24s; }

/* ==========================================
   PERFORMANCE BARS
   ========================================== */
.perf-bar {
  height: 6px;
  background: #dee3e8;
  border-radius: 3px;
  overflow: hidden;
}
.perf-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00658d, #00aeef);
  border-radius: 3px;
  width: 0;
  transition: width 1.4s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}
.perf-bar-fill.animate { width: var(--fill-width, 100%); }

/* ==========================================
   IMAGE UTILITIES
   ========================================== */
.img-grayscale {
  filter: grayscale(100%);
  transition: filter 0.5s ease;
}
.img-grayscale:hover { filter: grayscale(0%); }

/* ==========================================
   FOOTER
   ========================================== */
.site-footer {
  background-color: #eaeef4;
  border-top: 1px solid #bdc8d1;
  margin-top: 80px;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 40px;
}
@media (max-width: 767px) {
  .footer-inner { padding: 40px 20px; }
}

/* ==========================================
   UTILITY
   ========================================== */
.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;
}

/* Map dot grid pattern */
.dot-grid {
  background-image: radial-gradient(#00aeef 1px, transparent 1px);
  background-size: 20px 20px;
}
