/* IPRO Shah Alam — Dark Navy + Red Precision Hardware Spec System */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/ibm-plex-sans-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/ibm-plex-sans-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/ibm-plex-sans-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/ibm-plex-sans-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/jetbrains-mono-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/jetbrains-mono-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/jetbrains-mono-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg-navy: #071022;
  --bg-alt: #0c1730;
  --bg-surface: #122142;
  --bg-surface-hover: #192c56;
  --bg-header: rgba(7, 16, 34, 0.9);

  --border-subtle: rgba(148, 178, 224, 0.18);
  --border-strong: rgba(148, 178, 224, 0.34);

  --text-primary: #f4f7fc;
  --text-secondary: #c7d4ea;
  --text-muted: #94a8c8;

  --accent-red: #dc2626;
  --accent-red-hover: #b91c1c;
  --accent-red-text: #ff8585;

  --wa-green: #15803d;
  --wa-green-hover: #166534;
  --wa-on-green: #ffffff;

  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 36px);
  --radius-sm: 8px;
  --radius-md: 12px;

  --sticky-bar-h: 76px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  scroll-padding-bottom: 92px;
  scrollbar-color: #274278 var(--bg-navy);
  scrollbar-width: thin;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.97rem + 0.14vw, 1.0625rem);
  line-height: 1.55;
  color: var(--text-primary);
  background-color: var(--bg-navy);
  overflow-x: clip;
  caret-color: var(--accent-red-text);
  padding-bottom: calc(var(--sticky-bar-h) + env(safe-area-inset-bottom));
}

::selection {
  background: var(--accent-red);
  color: #ffffff;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 2px solid var(--accent-red-text);
  outline-offset: 3px;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.wrap {
  width: min(var(--wrap), 100%);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent-red);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

/* Preview Banner */
.preview-banner {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  text-align: center;
  padding: 8px var(--gutter);
  font-size: 0.8125rem;
  font-weight: 500;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-inline: var(--gutter);
  background: var(--bg-header);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.015em;
  white-space: nowrap;
  min-height: 44px;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--accent-red);
  flex-shrink: 0;
}

.brand-area {
  color: var(--text-secondary);
  font-weight: 500;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 24px;
}

.nav-desktop a {
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 4px;
  transition: color 160ms ease;
}

.nav-desktop a:hover {
  color: var(--text-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-wa {
  display: none;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.nav-toggle:hover {
  background: var(--bg-surface-hover);
}

.nav-mobile {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-alt);
}

.nav-mobile-list {
  list-style: none;
  margin: 0;
  padding: 10px var(--gutter) 16px;
  display: grid;
  gap: 4px;
}

.nav-mobile-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  text-decoration: none;
  font-weight: 500;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
}

.nav-mobile-list a:hover {
  background: var(--bg-surface);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms ease, border-color 160ms ease;
}

.btn.header-wa {
  display: none;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-sm {
  min-height: 44px;
  padding: 9px 16px;
  font-size: 0.875rem;
}

.btn-wa {
  background: var(--wa-green);
  color: var(--wa-on-green);
  border-color: rgba(255, 255, 255, 0.14);
}

.btn-wa:hover {
  background: var(--wa-green-hover);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: rgba(148, 178, 224, 0.55);
}

/* Hero — compact mobile above-the-fold priority */
.hero {
  padding: clamp(22px, 4vw, 64px) var(--gutter) clamp(28px, 5vw, 64px);
  border-bottom: 1px solid var(--border-subtle);
}

.hero-grid {
  display: grid;
  gap: 28px;
  align-items: center;
}

.hero-copy {
  max-width: 62ch;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(1.75rem, 1.35rem + 2.2vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero-sub {
  margin: 12px 0 0;
  font-size: clamp(1rem, 0.96rem + 0.25vw, 1.125rem);
  color: var(--text-secondary);
  max-width: 52ch;
}

.hero-ctas {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-ctas .btn {
  flex: 1 1 auto;
}

.hero-wa {
  animation: heroIn 480ms var(--ease-out) both, waPulse 1.6s ease 3s 2;
}

.hero-copy h1,
.hero-sub {
  animation: heroIn 440ms var(--ease-out) both;
}

.hero-facts {
  margin: 22px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--border-subtle);
  display: grid;
  gap: 12px;
}

.fact-item dt {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-red-text);
}

.fact-item dd {
  margin: 2px 0 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.hero-blueprint {
  display: none;
}

.blueprint-frame {
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 18px;
}

.blueprint-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.blueprint-tag {
  color: var(--accent-red-text);
  font-weight: 600;
}

.blueprint-svg {
  width: 100%;
  height: auto;
}

/* Sections */
.section {
  padding: clamp(44px, 6vw, 76px) var(--gutter);
  border-bottom: 1px solid var(--border-subtle);
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 62ch;
  margin-bottom: clamp(24px, 3vw, 36px);
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.5rem, 1.25rem + 1.2vw, 2.125rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section-lead {
  margin: 10px 0 0;
  color: var(--text-secondary);
}

/* Services & Diagnostic Selector */
.diag-layout {
  display: grid;
  gap: 24px;
  align-items: start;
}

.service-list {
  display: grid;
  gap: 10px;
}

.service-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms var(--ease-out);
}

.service-row:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.service-row[aria-pressed="true"] {
  background: var(--bg-surface-hover);
  border-color: var(--accent-red);
}

.service-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.service-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-navy);
  border: 1px solid var(--border-subtle);
  color: var(--accent-red-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.service-row[aria-pressed="true"] .service-icon {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: #ffffff;
}

.service-icon svg {
  width: 18px;
  height: 18px;
}

.service-name {
  font-weight: 600;
  line-height: 1.3;
}

.service-price {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.price-quote {
  color: var(--accent-red-text);
}

/* Diagnostic Panel */
.diag-panel {
  background: var(--bg-navy);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 20px;
  display: grid;
  gap: 18px;
}

.diag-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.diag-schematic {
  width: 68px;
  flex-shrink: 0;
}

.diag-schematic svg {
  width: 100%;
  height: auto;
}

.diag-schematic .part-water {
  opacity: 0;
  transition: opacity 160ms ease;
}

.diag-schematic[data-active-part="lcd"] .part-lcd,
.diag-schematic[data-active-part="battery"] .part-battery,
.diag-schematic[data-active-part="housing"] .part-housing,
.diag-schematic[data-active-part="board"] .part-board,
.diag-schematic[data-active-part="water"] .part-water {
  opacity: 1;
  stroke: var(--accent-red);
  fill: rgba(220, 38, 38, 0.22);
}

.diag-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
}

.diag-price {
  margin: 4px 0 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.diag-note {
  margin: 6px 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.wa-preview-box {
  background: var(--bg-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.wa-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.reset-btn {
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.reset-btn:hover {
  background: var(--bg-surface-hover);
}

.wa-preview-code {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.diag-hint {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Location Photos & Details */
.photo-grid {
  display: grid;
  gap: 16px;
}

.photo-subgrid {
  display: grid;
  gap: 16px;
}

.photo-card {
  margin: 0;
  background: var(--bg-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.photo-card img {
  width: 100%;
  height: auto;
  display: block;
}

.photo-card figcaption {
  padding: 12px 16px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
}

.location-details {
  margin-top: 28px;
  display: grid;
  gap: 24px;
}

.location-block {
  background: var(--bg-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}

.location-block h3 {
  margin: 0 0 12px;
  font-size: 1.125rem;
  font-weight: 700;
}

.shop-address {
  margin: 0 0 16px;
  font-style: normal;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.landmark-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.landmark-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.landmark-list svg {
  width: 18px;
  height: 18px;
  color: var(--accent-red-text);
  flex-shrink: 0;
  margin-top: 3px;
}

.maps-btn {
  width: 100%;
}

.hours-list {
  margin: 0;
  display: grid;
  gap: 12px;
}

.hours-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.hours-row dt {
  color: var(--text-secondary);
  font-weight: 500;
}

.hours-row dd {
  margin: 0;
  font-weight: 600;
  color: var(--text-primary);
}

.hours-note {
  margin: 14px 0 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* Closing WhatsApp Band */
.closing-band {
  background: var(--bg-alt);
  border-top: 2px solid var(--accent-red);
}

.closing-inner {
  display: grid;
  gap: 20px;
  align-items: center;
}

.closing-copy h2 {
  margin: 0;
  font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
}

.closing-lead {
  margin: 8px 0 0;
  color: var(--text-secondary);
  max-width: 54ch;
}

.closing-action .btn-wa {
  width: 100%;
}

/* Footer */
.site-footer {
  padding: 28px var(--gutter);
  background: var(--bg-navy);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-name {
  margin: 0;
  font-weight: 700;
  font-size: 1rem;
}

.footer-meta {
  margin: 4px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.footer-tel {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: underline;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-alt);
  color: var(--text-secondary);
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.footer-social a:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--bg-surface);
}

.footer-social svg {
  width: 20px;
  height: 20px;
}

/* Sticky Mobile Bar */
.sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(7, 16, 34, 0.96);
  border-top: 1px solid var(--border-strong);
}

.sticky-wa {
  width: 100%;
}

/* Scroll reveal (only when JS marks html.js-ready; content stays visible without JS) */
html.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 340ms var(--ease-out), transform 340ms var(--ease-out);
}

html.js-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Keyframes */
@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes waPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.025);
  }
}

@media (min-width: 640px) {
  .hero-ctas .btn {
    flex: 0 0 auto;
  }

  .hero-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .photo-subgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .maps-btn {
    width: auto;
  }

  .closing-action .btn-wa {
    width: auto;
  }
}

@media (min-width: 900px) {
  body {
    padding-bottom: 0;
  }

  .nav-desktop {
    display: flex;
  }

  .btn.header-wa {
    display: inline-flex;
  }

  .nav-toggle,
  .nav-mobile,
  .sticky-bar {
    display: none;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 44px;
  }

  .hero-blueprint {
    display: block;
  }

  .diag-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 28px;
  }

  .location-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .closing-inner {
    grid-template-columns: 1fr auto;
  }

  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  html.js-ready [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
