/* ============================================
   MIHALD TECH — Design tokens
   ============================================ */
:root {
  --navy: #0B2545;
  --navy-deep: #071A33;
  --blue: #1D6FD9;
  --blue-light: #4F93F0;
  --orange: #F5A623;
  --orange-deep: #E08900;
  --off-white: #F7F8FA;
  --ink: #12181F;
  --ink-soft: #445064;
  --line: #E2E6ED;
  --white: #FFFFFF;

  --font-display: 'Barlow Condensed', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius: 6px;
  --max-w: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--off-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.05;
  color: var(--navy);
  text-transform: uppercase;
}

h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
h3 { font-size: 1.5rem; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange-deep);
  font-weight: 600;
  display: inline-block;
  margin-bottom: 10px;
}

.lede {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 60ch;
}

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

/* Focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

/* ============================================
   Header
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
}

.logo .gear {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

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

.logo-text .name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}
.logo-text .name span { color: var(--orange); }

.logo-text .tag {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: #B7C4DA;
  margin-top: 2px;
}

nav.main-nav ul {
  display: flex;
  gap: 32px;
}

nav.main-nav a {
  color: #DCE4F0;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--white);
  border-color: var(--orange);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 18px;
}

.btn-whatsapp-small {
  background: var(--orange);
  color: var(--navy-deep);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 18px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s, transform 0.15s;
}
.btn-whatsapp-small:hover { background: #FFC15E; transform: translateY(-1px); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.6rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  nav.main-nav { display: none; }
  .nav-toggle { display: block; }
  .header-cta .btn-whatsapp-small span.long { display: none; }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 15px 30px;
  border-radius: var(--radius);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--orange);
  color: var(--navy-deep);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(245,166,35,0.35); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.5);
}
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }

.btn-outline-navy {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn-outline-navy:hover { background: var(--navy); color: var(--white); }

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  background: linear-gradient(155deg, var(--navy-deep) 0%, var(--navy) 55%, #0E3A6B 100%);
  color: var(--white);
  overflow: hidden;
  padding: 90px 0 70px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  color: var(--orange);
  font-family: var(--font-display);
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.4rem, 5.2vw, 3.6rem);
  margin: 14px 0 20px;
}
.hero h1 .accent { color: var(--orange); }

.hero p.lede {
  color: #C7D3E6;
  font-size: 1.1rem;
  max-width: 48ch;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-strip {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  padding-top: 26px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.hero-strip .stat .num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--orange);
  font-weight: 700;
  line-height: 1;
}
.hero-strip .stat .label {
  font-size: 0.78rem;
  color: #AAB8CE;
  margin-top: 4px;
  letter-spacing: 0.02em;
}

.hero-media {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(7,26,51,0.7) 0%, transparent 40%);
}

/* Power-flow signature line (SVG animated) */
.power-flow {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1;
  opacity: 0.5;
  pointer-events: none;
}

.power-flow path {
  fill: none;
  stroke: url(#flowGradient);
  stroke-width: 1.5;
  stroke-dasharray: 6 10;
  animation: flow 3s linear infinite;
}

@keyframes flow {
  to { stroke-dashoffset: -160; }
}

.power-flow circle {
  fill: var(--orange);
  opacity: 0;
  animation: pulse-dot 3s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0; r: 3; }
  50% { opacity: 0.9; r: 5; }
}

/* ============================================
   Trust strip
   ============================================ */
.trust-strip {
  background: var(--navy-deep);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
}
.trust-strip .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #C7D3E6;
  font-size: 0.88rem;
  font-weight: 500;
}
.trust-item svg { flex-shrink: 0; color: var(--orange); }

/* ============================================
   Section basics
   ============================================ */
section { padding: 90px 0; }

.section-head {
  max-width: 640px;
  margin-bottom: 50px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Circuit divider — signature element between sections */
.circuit-divider {
  height: 40px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.circuit-divider svg { width: 100%; max-width: 200px; height: 100%; color: var(--line); }

/* ============================================
   Services
   ============================================ */
.services-section { background: var(--white); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  background: var(--off-white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(11,37,69,0.1);
  border-color: var(--blue-light);
}

.service-card .icon-box {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--orange);
}

.service-card h3 { margin-bottom: 12px; font-size: 1.3rem; }

.service-card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.service-card ul li {
  font-size: 0.9rem;
  color: var(--ink);
  padding-left: 22px;
  position: relative;
  margin-bottom: 9px;
}
.service-card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  background: var(--orange);
  border-radius: 2px;
}

@media (max-width: 900px) {
  .service-grid { grid-template-columns: 1fr; }
}

/* ============================================
   Work / Gallery
   ============================================ */
.work-section { background: var(--off-white); }

.work-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 16px;
}

.work-grid figure {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--navy);
}
.work-grid figure:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.work-grid figure:nth-child(4) { grid-column: span 2; }

.work-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.work-grid figure:hover img { transform: scale(1.06); }

.work-grid figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px;
  background: linear-gradient(0deg, rgba(7,26,51,0.9), transparent);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.work-grid figure:hover figcaption { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .work-grid figure:nth-child(1) { grid-column: span 2; grid-row: span 1; }
  .work-grid figure:nth-child(4) { grid-column: span 1; }
}

/* ============================================
   Why us
   ============================================ */
.why-section { background: var(--navy); color: var(--white); }
.why-section h2 { color: var(--white); }
.why-section .lede { color: #B7C4DA; }

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 20px;
}

.why-card {
  padding: 26px 22px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.03);
}
.why-card svg { color: var(--orange); margin-bottom: 16px; }
.why-card h4 {
  color: var(--white);
  font-size: 1.05rem;
  text-transform: none;
  margin-bottom: 8px;
}
.why-card p { color: #AAB8CE; font-size: 0.88rem; }

@media (max-width: 900px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .why-grid { grid-template-columns: 1fr; }
}

/* ============================================
   Process
   ============================================ */
.process-section { background: var(--white); }

.process-line {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 20px;
}

.process-line::before {
  content: '';
  position: absolute;
  top: 26px;
  left: 6%;
  right: 6%;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--blue) 0, var(--blue) 8px, transparent 8px, transparent 16px);
}

.process-step { position: relative; text-align: left; }
.process-step .step-num {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--blue);
  color: var(--blue);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}
.process-step h4 { font-size: 1.05rem; color: var(--navy); text-transform: none; margin-bottom: 8px; }
.process-step p { font-size: 0.88rem; color: var(--ink-soft); }

@media (max-width: 900px) {
  .process-line { grid-template-columns: repeat(2, 1fr); }
  .process-line::before { display: none; }
}

/* ============================================
   CTA band
   ============================================ */
.cta-band {
  background: linear-gradient(120deg, var(--orange-deep), var(--orange));
  padding: 60px 0;
}
.cta-band .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.cta-band h2 { color: var(--navy-deep); font-size: clamp(1.6rem, 3vw, 2.1rem); }
.cta-band p { color: rgba(11,37,69,0.8); font-weight: 500; }
.cta-band .btn-primary { background: var(--navy-deep); color: var(--white); }
.cta-band .btn-primary:hover { background: var(--navy); box-shadow: 0 8px 20px rgba(11,37,69,0.35); }

/* ============================================
   Footer
   ============================================ */
footer {
  background: var(--navy-deep);
  color: #AAB8CE;
  padding: 64px 0 24px;
}

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

.footer-brand .logo-text .name { color: var(--white); }
.footer-brand p { font-size: 0.88rem; margin-top: 14px; max-width: 32ch; }

footer h5 {
  color: var(--white);
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-bottom: 16px;
}

footer ul li { margin-bottom: 10px; font-size: 0.9rem; }
footer ul li a:hover { color: var(--orange); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 24px;
  font-size: 0.82rem;
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================
   WhatsApp floating button
   ============================================ */
.float-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}
.float-whatsapp:hover { transform: scale(1.08); }

/* ============================================
   Page header (inner pages)
   ============================================ */
.page-hero {
  background: linear-gradient(155deg, var(--navy-deep), var(--navy));
  color: var(--white);
  padding: 64px 0 50px;
}
.page-hero .eyebrow { color: var(--orange); }
.page-hero h1 { color: var(--white); font-size: clamp(2rem, 4vw, 2.8rem); margin-top: 10px; }
.breadcrumb { font-size: 0.85rem; color: #AAB8CE; margin-bottom: 14px; }
.breadcrumb a:hover { color: var(--orange); }

/* Form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--white);
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
}
.form-group textarea { resize: vertical; min-height: 120px; }

.contact-info-card {
  background: var(--navy);
  color: var(--white);
  border-radius: 10px;
  padding: 38px 34px;
}
.contact-info-card h3 { color: var(--white); margin-bottom: 24px; }
.contact-row {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: flex-start;
}
.contact-row .icon-box {
  width: 42px; height: 42px;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--orange);
  flex-shrink: 0;
}
.contact-row .label { font-size: 0.78rem; color: #AAB8CE; text-transform: uppercase; letter-spacing: 0.05em; }
.contact-row .value { font-size: 0.98rem; font-weight: 500; margin-top: 2px; }

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* Portfolio filters */
.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.filter-btn {
  padding: 9px 20px;
  border-radius: 30px;
  border: 1.5px solid var(--line);
  background: var(--white);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s;
}
.filter-btn.active,
.filter-btn:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.portfolio-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.portfolio-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(11,37,69,0.1); }
.portfolio-card .img-wrap { aspect-ratio: 4/3; overflow: hidden; }
.portfolio-card img { width: 100%; height: 100%; object-fit: cover; }
.portfolio-card .content { padding: 20px 22px; }
.portfolio-card .tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--orange-deep);
  margin-bottom: 8px;
}
.portfolio-card h4 { color: var(--navy); font-size: 1.05rem; text-transform: none; margin-bottom: 6px; }
.portfolio-card p { font-size: 0.85rem; color: var(--ink-soft); }

@media (max-width: 900px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .portfolio-grid { grid-template-columns: 1fr; }
}

/* 404 */
.error-section {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--navy);
  color: var(--white);
  padding: 80px 24px;
}
.error-section .code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 15vw, 9rem);
  color: var(--orange);
  line-height: 1;
}
.error-section h2 { color: var(--white); margin: 10px 0 16px; }
.error-section p { color: #B7C4DA; margin-bottom: 30px; }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--navy-deep);
  padding: 24px;
}
.mobile-nav.open { display: block; }
.mobile-nav-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}
.mobile-nav-top button {
  background: none; border: none; color: var(--white); font-size: 1.8rem; cursor: pointer;
}
.mobile-nav ul li { margin-bottom: 6px; }
.mobile-nav ul a {
  display: block;
  padding: 16px 4px;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.3rem;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mobile-nav .btn-primary { margin-top: 30px; width: 100%; justify-content: center; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-media { max-width: 420px; margin: 0 auto; }
  section { padding: 60px 0; }
}
