/* MDT Repair: home page
   Matches the mdt.mt store: bright MDT blue bar, dark hero panel, pale-blue bands,
   grey product-style tiles with blue buttons, dark navy footer.
   One accent (MDT blue). Shape rule: controls 6px, tiles and photos 10px. Light theme. */

@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --band: #eef6fd;
  --tile: #f4f6f8;
  --ink: #0c1a2b;
  --ink-2: #33415a;
  --muted: #566378;
  --line: #dbe3ec;

  --blue: #1c75c6;
  --blue-hover: #165fa3;
  --blue-ink: #14589c;
  --navy: #04172b;
  --navy-2: #0a2745;

  --open: #17754d;
  --closed: #9a4a12;

  --r-ctl: 6px;
  --r-tile: 10px;
  --container: 1240px;
  --gutter: clamp(18px, 4vw, 44px);
  --header-h: 68px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --z-header: 10;
  --z-skip: 20;

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip; }
[hidden] { display: none !important; }
img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
address { font-style: normal; }
h1, h2, h3 { line-height: 1.1; font-weight: 600; text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--blue-ink); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -100px; z-index: var(--z-skip); padding: 10px 16px; background: var(--navy); color: #fff; border-radius: var(--r-ctl); }
.skip:focus { top: 12px; }
.icon { width: 1.125em; height: 1.125em; flex-shrink: 0; fill: currentColor; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.nowrap { white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding-inline: 22px;
  border-radius: var(--r-ctl); border: 1px solid transparent;
  font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.985); }
.btn .icon { transition: transform .25s var(--ease); }
.btn:hover .icon-arrow { transform: translateX(3px); }
.btn--sm { height: 40px; padding-inline: 18px; font-size: 14px; }
.btn--lg { height: 54px; padding-inline: 26px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-hover); }
.btn--white { background: #fff; color: var(--blue-ink); }
.btn--white:hover { background: var(--band); }
.btn--outline { border-color: rgb(255 255 255 / 0.4); color: #fff; }
.btn--outline:hover { background: #fff; color: var(--navy); border-color: #fff; }

.link { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--blue-ink); border-bottom: 1px solid color-mix(in srgb, var(--blue-ink) 40%, transparent); padding-bottom: 2px; transition: border-color .2s; }
.link:hover { border-color: var(--blue-ink); }

/* ---------- Header (blue bar) ---------- */
.header { position: sticky; top: 0; z-index: var(--z-header); background: var(--blue); color: #fff; }
.header__inner { display: flex; align-items: center; gap: 40px; height: var(--header-h); }
.header__logo img { height: 40px; width: auto; }
.nav { display: flex; gap: 28px; }
.nav a { position: relative; padding-block: 6px; font-size: 15px; font-weight: 500; color: rgb(255 255 255 / 0.86); transition: color .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: #fff; }
.header__actions { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.header__phone { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; }
.header__toggle { display: none; width: 44px; height: 44px; place-items: center; border: 1px solid rgb(255 255 255 / 0.45); border-radius: var(--r-ctl); background: transparent; color: #fff; }
.header__toggle .icon { width: 22px; height: 22px; }
.header__toggle .icon-close { display: none; }
.header__toggle[aria-expanded="true"] .icon-open { display: none; }
.header__toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-nav { background: var(--blue-hover); }
.mobile-nav nav { display: grid; padding-block: 6px 18px; }
.mobile-nav a { display: flex; align-items: center; gap: 10px; padding: 15px 0; font-size: 18px; border-bottom: 1px solid rgb(255 255 255 / 0.2); }
.mobile-nav a:last-child { border-bottom: 0; font-weight: 600; }

/* ---------- Hero (dark panel) ---------- */
.hero { padding-block: clamp(20px, 3vw, 36px) 0; }
.hero__panel {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center;
  min-height: clamp(440px, 60vh, 580px); overflow: hidden; border-radius: var(--r-tile);
  background: radial-gradient(70% 90% at 85% 10%, #0d3a66 0%, transparent 70%), var(--navy);
  color: #fff;
}
.hero__copy { position: relative; z-index: 1; padding: clamp(32px, 5vw, 72px); }
.hero h1 { font-size: clamp(2.4rem, 1.2rem + 3.8vw, 4.1rem); letter-spacing: -0.04em; line-height: 1.03; margin-block: 0 22px; max-width: 13ch; }
.hero__lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: #c5d4e6; max-width: 44ch; }
.hero__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 32px; }
.hero__photo { position: absolute; inset: 0 0 0 auto; width: 52%; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 45%); mask-image: linear-gradient(to right, transparent 0%, #000 45%); }
.hero__panel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--navy) 38%, transparent 70%); opacity: .0; pointer-events: none; }

/* ---------- Facts bar ---------- */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 12px; border-radius: var(--r-tile); background: var(--navy-2); color: #fff; }
.facts > div { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; padding: 22px 26px; }
.facts > div + div { border-left: 1px solid rgb(255 255 255 / 0.12); }
.facts .icon { grid-row: span 2; width: 26px; height: 26px; color: #6fb3f0; }
.facts dt { font-weight: 600; font-size: 15px; line-height: 1.3; }
.facts dd { font-size: 13px; color: #9fb3cc; line-height: 1.3; }

/* ---------- Section frame ---------- */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: clamp(28px, 3.5vw, 44px); }
h2 { font-size: clamp(1.9rem, 1.2rem + 2.2vw, 2.8rem); letter-spacing: -0.035em; }
.band { background: var(--band); }

/* ---------- Service tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile { display: flex; flex-direction: column; height: 100%; padding: 12px 12px 14px; border-radius: var(--r-tile); background: var(--tile); transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.tile:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -20px rgb(12 50 92 / 0.45); }
.tile__media { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; background: #fff; }
.tile__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.tile:hover .tile__media img { transform: scale(1.05); }
.tile__media--icon { display: grid; place-items: center; background: #fff; color: var(--blue); }
.tile__media--icon .icon { width: 64px; height: 64px; transition: transform .4s var(--ease); }
.tile:hover .tile__media--icon .icon { transform: scale(1.08); }
.tile h3 { font-size: 18px; letter-spacing: -0.015em; margin: 16px 6px 0; }
.tile p { font-size: 14px; line-height: 1.5; color: var(--muted); margin: 6px 6px 18px; }
.tile .btn { margin-top: auto; }

/* ---------- Reviews ---------- */
.rating { margin-bottom: clamp(28px, 3.5vw, 44px); }
.rating p { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--ink-2); }
.stars { display: inline-flex; gap: 2px; color: #f2a900; font-size: 18px; }
.reviews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.review { display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: var(--r-tile); background: #fff; }
.review figcaption { display: flex; align-items: center; gap: 12px; order: -1; }
.review strong { display: block; font-weight: 600; line-height: 1.3; }
.review small { display: block; font-size: 13px; color: var(--muted); line-height: 1.3; }
.review blockquote { font-size: 16px; line-height: 1.55; }
.avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 8px; background: var(--blue); color: #fff; font-size: 14px; font-weight: 600; flex-shrink: 0; }

/* ---------- Process ---------- */
.process__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(36px, 7vw, 108px); align-items: center; }
.process__photo { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--r-tile); }
.process__photo img { width: 100%; height: 100%; object-fit: cover; }
.process h2 { max-width: 14ch; }
.steps { margin-top: clamp(24px, 3.5vw, 40px); }
.steps li { padding-block: 22px; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps h3 { font-size: 20px; letter-spacing: -0.02em; }
.steps p { margin-top: 6px; color: var(--ink-2); max-width: 52ch; }

/* ---------- Visit ---------- */
.visit__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: stretch; }
.visit__phone { display: inline-block; margin-top: 22px; font-size: clamp(2.2rem, 1.2rem + 3.6vw, 4rem); font-weight: 500; letter-spacing: -0.05em; line-height: 1; border-bottom: 2px solid var(--line); padding-bottom: 8px; transition: border-color .2s, color .2s; }
.visit__phone:hover { color: var(--blue-ink); border-color: var(--blue-ink); }
.visit__details { display: grid; gap: 12px; margin-top: 28px; }
.visit__details > div { display: flex; align-items: flex-start; gap: 12px; }
.visit__details .icon { margin-top: 4px; color: var(--blue); width: 20px; height: 20px; }
.visit__details a:hover { color: var(--blue-ink); }
.hours { width: 100%; max-width: 380px; margin-top: 24px; border-collapse: collapse; font-size: 15px; }
.hours th { text-align: left; font-weight: 400; color: var(--ink-2); padding-block: 7px; }
.hours td { text-align: right; padding-block: 7px; }
.hours tr + tr { border-top: 1px solid rgb(12 50 92 / 0.12); }
.visit__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 30px; }
.map { min-height: 380px; overflow: hidden; border-radius: var(--r-tile); background: var(--line); }
.map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; }

/* ---------- Footer (dark navy, as on mdt.mt) ---------- */
.footer { background: var(--navy); color: #c5d4e6; padding-top: clamp(44px, 5vw, 68px); font-size: 15px; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.footer__brand img { height: 52px; width: auto; }
.footer__contact { display: grid; gap: 12px; margin-top: 24px; }
.footer__contact li { display: flex; align-items: flex-start; gap: 12px; }
.footer__contact .icon { margin-top: 4px; color: #6fb3f0; }
.footer h2 { font-size: 20px; letter-spacing: -0.02em; color: #fff; margin-bottom: 16px; }
.footer ul { display: grid; gap: 10px; }
.footer a { transition: color .2s; }
.footer a:hover { color: #fff; }
.hours--dark { max-width: 300px; margin-top: 0; }
.hours--dark th { color: #c5d4e6; }
.hours--dark td { color: #fff; }
.hours--dark tr + tr { border-color: rgb(255 255 255 / 0.1); }
.footer__bottom { margin-top: 48px; padding-block: 22px; border-top: 1px solid rgb(255 255 255 / 0.12); font-size: 13px; color: #8fa5c0; }

/* ---------- Load-in: hero only ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__copy > *, .hero__photo { animation: rise .8s var(--ease) both; }
  .hero__copy > :nth-child(2) { animation-delay: .06s; }
  .hero__copy > :nth-child(3) { animation-delay: .12s; }
  .hero__copy > :nth-child(4) { animation-delay: .18s; }
  .hero__photo { animation-delay: .12s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1000px) {
  .nav, .header__actions .btn, .header__phone { display: none; }
  .header__toggle { display: grid; }
  .hero__panel { grid-template-columns: 1fr; min-height: 0; }
  .hero__photo { position: relative; inset: auto; width: 100%; aspect-ratio: 16 / 9; }
  .hero__photo img { -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 40%); mask-image: linear-gradient(to bottom, transparent 0%, #000 40%); }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts > div:nth-child(3) { border-left: 0; }
  .facts > div:nth-child(n+3) { border-top: 1px solid rgb(255 255 255 / 0.12); }
  .reviews { grid-template-columns: 1fr; }
  .process__grid, .visit__grid { grid-template-columns: 1fr; }
  .process__photo { aspect-ratio: 16 / 10; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .header__logo img { height: 36px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tile h3 { font-size: 16px; margin-inline: 4px; }
  .tile p { margin-inline: 4px; }
  .hero__ctas .btn { flex: 1 1 100%; }
  .facts > div { padding: 18px 16px; grid-template-columns: 1fr; row-gap: 2px; }
  .facts .icon { grid-row: auto; margin-bottom: 6px; }
  .footer__grid { grid-template-columns: 1fr; }
}

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