/* Matt Solutions — home prototype
   System type (SF on Apple devices), ink on white, navy only for action + the stamp.
   One signature moment: the service order that fills in as you read the steps. */

:root {
  --ink: #1d1d1f;          /* 16.8:1 on white */
  --ink-2: #6e6e73;        /* 5.1:1 on white, 4.65:1 on --desk */
  --paper: #ffffff;
  --desk: #f5f5f7;
  --rule: #d2d2d7;
  --navy: #1b1f26;         /* brand graphite, 16.3:1 on white */
  --navy-hover: #2c323d;
  --done: #1e7f43;         /* 5.0:1 on white */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;          /* 17px */
  line-height: 1.47;
  letter-spacing: -0.012em;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: var(--navy); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 6px; }

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

.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 16px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  border-radius: 12px;
  font: 600 1.0625rem/1 var(--font); letter-spacing: -0.01em;
  text-decoration: none;
  transition: background-color .15s ease;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-hover); }
.btn-secondary { background: var(--desk); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); }
.btn-secondary:hover { background: #ebebef; }
.btn-small { min-height: 36px; padding: 0 16px; font-size: .9375rem; border-radius: 10px; }
.text-link { font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.text-link:hover { text-decoration-thickness: 2px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.nav-inner { display: flex; align-items: center; gap: 32px; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; letter-spacing: -0.02em; }
.brand-logo { height: 36px; width: auto; display: block; }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a, .lang { color: var(--ink); text-decoration: none; font-size: .9375rem; }
.nav-links a:hover, .lang:hover { color: var(--navy); }
.nav-end { display: flex; align-items: center; gap: 20px; }
.lang { color: var(--ink-2); }

/* ---------- hero ---------- */
.hero { padding: clamp(48px, 9vw, 112px) 0 clamp(56px, 8vw, 104px); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
h1 {
  font-family: var(--display);
  font-size: clamp(2.75rem, 6vw, 5rem);
  line-height: 1.03; letter-spacing: -0.04em; font-weight: 700;
  max-width: 9em;
  text-wrap: balance;
}
.lede { margin-top: 28px; font-size: clamp(1.0625rem, 1.6vw, 1.3125rem); line-height: 1.45; color: var(--ink-2); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 32px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 32px; font-size: .9375rem; color: var(--ink-2); }
.facts li { padding-left: 14px; position: relative; }
.facts li::before { content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--rule); }



/* ---------- hero picker (interactive) ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.picker { background: var(--desk); border-radius: 24px; padding: clamp(20px, 3vw, 32px); }
.picker-title { font-size: 1.5rem; letter-spacing: -0.025em; }
.picker-options { border: 0; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.picker-options label { position: relative; cursor: pointer; }
.picker-options input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.picker-options span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  border-radius: 10px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule);
  font-size: .9375rem; font-weight: 500;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.picker-options label:hover span { box-shadow: inset 0 0 0 1px var(--ink-2); }
.picker-options input:checked + span { background: var(--ink); color: #fff; box-shadow: none; }
.picker-options input:focus-visible + span { outline: 3px solid var(--navy); outline-offset: 2px; }
.answer { margin-top: 20px; background: var(--paper); border-radius: 16px; padding: 20px; }
.answer dl { display: grid; gap: 14px; }
.answer dt { font-size: .8125rem; color: var(--ink-2); }
.answer dd { margin-top: 2px; font-size: 1rem; }
.answer dl, .answer .tip { transition: opacity .2s ease; }
.answer.is-changing dl, .answer.is-changing .tip { opacity: 0; }
.tip { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: #fff4e5; color: #6b3d00; font-size: .9375rem; }
.btn-block { width: 100%; margin-top: 18px; }

/* ---------- services ---------- */
.services { padding: clamp(56px, 8vw, 104px) 0; border-top: 1px solid var(--rule); }
h2 {
  font-family: var(--display);
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.08; letter-spacing: -0.03em; font-weight: 700;
  text-wrap: balance;
}
.service-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin: 40px 0 32px; }
.group h3 { font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.02em; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.group li { padding: 14px 0; border-bottom: 1px solid var(--rule); display: grid; gap: 2px; }
.group strong { font-weight: 600; }
.group span { color: var(--ink-2); font-size: .9375rem; }

/* ---------- process / signature ---------- */
.process { background: var(--desk); padding: clamp(56px, 8vw, 112px) 0; }
.section-lede { margin-top: 12px; color: var(--ink-2); font-size: 1.1875rem; }
.process-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); margin-top: 48px; }
.ticket-wrap { order: 2; }
.steps { order: 1; }

.step { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; max-width: 28em; }
.step h3 { font-size: clamp(1.375rem, 2.4vw, 1.75rem); letter-spacing: -0.025em; font-weight: 700; line-height: 1.15; display: flex; gap: 14px; align-items: baseline; }
.step .n { font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 600; min-width: 1ch; }
.step p { margin-top: 10px; color: var(--ink-2); padding-left: calc(1ch + 14px); }
.js .step h3 { color: var(--ink-2); transition: color .25s ease; }
.js .step.is-active h3 { color: var(--ink); }
.js .step.is-active .n { color: var(--navy); }

.ticket {
  position: sticky; top: 96px;
  background: var(--paper);
  border-radius: 8px;
  padding: 28px 28px 22px;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 18px 40px -12px rgba(0,0,0,.16);
  max-width: 440px; margin-left: auto;
}
.ticket::before { /* torn-off edge of a carbon form */
  content: ""; position: absolute; left: 0; right: 0; top: -6px; height: 6px;
  background: radial-gradient(circle at 6px 6px, transparent 4px, var(--paper) 4.5px) 0 0 / 12px 6px repeat-x;
}
.ticket-head { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--ink); }
.ticket-org { font-weight: 600; font-size: .9375rem; letter-spacing: -0.01em; }
.ticket-meta, .ticket-date { color: var(--ink-2); font-size: .8125rem; }
.ticket-meta .num, .ticket-date { font-variant-numeric: tabular-nums; }
.fields { display: grid; }
.field { padding: 14px 0 12px; border-bottom: 1px solid var(--rule); }
.field dt { font-size: .8125rem; color: var(--ink-2); }
.field dd { margin-top: 4px; min-height: 1.47em; font-size: 1rem; }
.js .field dd { opacity: 0; transform: translateY(4px); transition: opacity .35s ease, transform .35s ease; }
.js .field.is-filled dd { opacity: 1; transform: none; }
.js .field:not(.is-filled) { background: linear-gradient(var(--rule), var(--rule)) 0 calc(100% - 14px) / 100% 1px no-repeat; }

.field[data-at="3"] { position: relative; }
.field[data-at="3"] dd { max-width: calc(100% - 165px); }
.stamp {
  position: absolute; right: 0; top: 50%; margin-top: -10px;
  padding: 6px 12px;
  border: 2.5px solid var(--navy); border-radius: 6px;
  color: var(--navy);
  font: 800 .8125rem/1.1 var(--font); letter-spacing: .08em; text-transform: uppercase; /* rubber-stamp vernacular */
  transform: rotate(-9deg);
  opacity: .88;
  pointer-events: none;
  white-space: nowrap;
}
.js .stamp { opacity: 0; transform: rotate(-9deg) scale(1.35); transition: opacity .18s ease-out, transform .22s cubic-bezier(.2,.9,.25,1.25); }
.js .ticket.is-approved .stamp { opacity: .88; transform: rotate(-9deg) scale(1); }

.ticket-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: .8125rem; color: var(--ink-2); }
.status { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--done); }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.js .ticket:not(.is-done) .status { color: var(--ink-2); font-weight: 400; }
.when-progress { display: none; }
.js .ticket:not(.is-done) .when-progress { display: inline; }
.js .ticket:not(.is-done) .when-done { display: none; }

/* ---------- areas + faq ---------- */
.info { padding: clamp(56px, 8vw, 104px) 0; }
.info-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 7vw, 96px); }
.areas p { margin-top: 16px; color: var(--ink-2); max-width: 30em; }
.areas .text-link { display: inline-block; margin-top: 20px; }
.faq h2 { margin-bottom: 16px; }
details { border-bottom: 1px solid var(--rule); }
summary {
  list-style: none; cursor: pointer;
  padding: 18px 36px 18px 0; position: relative;
  font-weight: 600; font-size: 1.0625rem;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2);
  transform: rotate(45deg); transition: transform .2s ease;
}
details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
details p { padding: 0 36px 20px 0; color: var(--ink-2); max-width: 36em; }

/* ---------- call ---------- */
.call { padding: clamp(72px, 10vw, 136px) 0; background: var(--ink); color: #f5f5f7; }
.call h2 { color: #f5f5f7; }
.call .big-phone { color: #fff; }
.call .btn-primary { background: #fff; color: var(--ink); }
.call .btn-primary:hover { background: #e8e8ed; }
.call .btn-secondary { background: transparent; color: #f5f5f7; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.call .btn-secondary:hover { background: rgba(255,255,255,.08); }
.call .text-link { color: #f5f5f7; }
.call :focus-visible { outline-color: #fff; }
.big-phone {
  display: inline-block; margin-top: 12px;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.5rem, 8vw, 5.5rem); letter-spacing: -0.04em; line-height: 1.05;
  font-variant-numeric: tabular-nums;
  color: var(--navy); text-decoration: none;
}
.big-phone:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; }

/* ---------- footer ---------- */
.foot { background: var(--desk); padding: 28px 0 40px; font-size: .8125rem; color: var(--ink-2); }
.foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.foot a { color: var(--ink-2); }
.foot a:hover { color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-end { margin-left: auto; }
  .hero-grid { grid-template-columns: 1fr; }
  .service-groups { grid-template-columns: 1fr; gap: 32px; }
  .info-grid { grid-template-columns: 1fr; }

  .process-grid { grid-template-columns: 1fr; gap: 0; margin-top: 32px; }
  .ticket-wrap { order: 0; position: sticky; top: 64px; z-index: 2; padding-bottom: 12px; }
  .ticket { position: relative; top: auto; margin: 0; max-width: none; padding: 18px 18px 14px; }
  .ticket-head { padding-bottom: 10px; }
  .ticket-head img { width: 24px; height: 24px; }
  .field { padding: 8px 0 7px; }
  .field dd { font-size: .9375rem; margin-top: 2px; }
  .js .field:not(.is-filled) { background-position: 0 calc(100% - 8px); }
  .stamp { font-size: .6875rem; padding: 4px 8px; }
  .field[data-at="3"] dd { max-width: calc(100% - 142px); }
  .ticket-org { font-size: .8125rem; }
  .ticket-foot { margin-top: 10px; }
  .step { min-height: 46vh; }
}
@media (max-width: 420px) {
  .actions .btn { flex: 1 1 100%; }
  .copy-note { display: none; }
}

/* ---------- reduced motion: state still changes, nothing moves ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; }
  .js .field dd { transform: none; }
  .js .stamp { transform: rotate(-9deg); }
}

/* ---------- video layers ---------- */
.bg-video { display: block; width: 100%; height: 100%; object-fit: cover; }

/* hero over video */
.hero { position: relative; isolation: isolate; overflow: hidden; background: #000; color: #fff; }
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.80) 0%, rgba(0,0,0,.58) 48%, rgba(0,0,0,.30) 100%);
}
.hero h1 { color: #fff; }
.hero .lede { color: rgba(255,255,255,.84); }
.hero .facts { color: rgba(255,255,255,.78); }
.hero .facts li::before { background: rgba(255,255,255,.45); }
.hero .btn-primary { background: #fff; color: var(--ink); }
.hero .btn-primary:hover { background: #e8e8ed; }
.hero .btn-secondary { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.38); }
.hero .btn-secondary:hover { background: rgba(255,255,255,.2); }
.hero :focus-visible { outline-color: #fff; }
.hero .picker { color: var(--ink); background: rgba(245,245,247,.97); }

/* repair band: grows from inset card to full width while scrolling in */
.band { padding: clamp(24px, 4vw, 48px) 0; }
.band-frame {
  --p: 1;
  position: relative; overflow: hidden; background: #000;
  height: min(78vh, 720px);
  width: calc(100% - (1 - var(--p)) * 2 * clamp(16px, 5vw, 64px));
  margin-inline: auto;
  border-radius: calc((1 - var(--p)) * 28px);
}
.band-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.15) 55%, rgba(0,0,0,0) 100%); }
.band-copy { position: absolute; z-index: 1; left: clamp(20px, 6vw, 80px); right: clamp(20px, 6vw, 80px); bottom: clamp(28px, 6vw, 72px); color: #fff; max-width: 34em; }
.band-copy h2 { color: #fff; }
.band-copy p { margin-top: 12px; color: rgba(255,255,255,.86); font-size: clamp(1.0625rem, 1.6vw, 1.25rem); }

/* systems */
.systems { padding: clamp(56px, 8vw, 104px) 0; }
.systems-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.systems-media { aspect-ratio: 16 / 10; border-radius: 24px; overflow: hidden; background: var(--desk); }
.systems-list { margin-top: 24px; }
.systems-list li { padding: 12px 0; border-bottom: 1px solid var(--rule); font-weight: 500; }
.systems-list li:first-child { border-top: 1px solid var(--rule); }

@media (max-width: 900px) {
  .hero-media::after { background: linear-gradient(180deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.78) 100%); }
  .band-frame { height: 64vh; }
  .systems-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .band-frame { --p: 1 !important; }
}

/* ---------- mobile menu (all pages) ---------- */
.nav-links a[aria-current="page"] { color: var(--navy); font-weight: 600; }
.menu-btn {
  display: none; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 10px;
  background: transparent; border: 0; box-shadow: inset 0 0 0 1px var(--rule);
  font: 600 .9375rem/1 var(--font); color: var(--ink); cursor: pointer;
}
.nav-sheet { background: rgba(255,255,255,.98); border-top: 1px solid rgba(0,0,0,.08); padding: 4px 16px 20px; }
.nav-sheet a:not(.btn) { display: block; padding: 14px 0; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
.nav-sheet a[aria-current="page"] { color: var(--navy); }
.nav-sheet .btn { width: 100%; margin-top: 16px; }
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .nav-end .lang { display: none; }
  .nav-end { gap: 10px; }
}
@media (min-width: 901px) { .nav-sheet { display: none !important; } }
