/* ==========================================================================
   QM Consulting — service pages, contact, legal
   ========================================================================== */

/* ---------- service hero ---------- */
.shero { position: relative; overflow: hidden; min-height: 94svh; display: flex; align-items: center; padding: calc(var(--hdr-h) + 72px) 0 96px; }
.shero__blob { top: 18%; }
.shero--sky .shero__blob { background: var(--sky); }
.shero--ember .shero__blob { background: var(--ember); }
.shero--ink .shero__blob { background: var(--ink); }
.shero__grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.shero h1 { font-size: clamp(2.7rem, 6.2vw, 6.4rem); }
.shero .lead { margin-top: 28px; max-width: 48ch; }
.shero .btn-row { margin-top: 34px; }
.shero__art { position: relative; }
.shero__art .ill { filter: drop-shadow(0 30px 40px rgba(14, 15, 18, .12)); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 26px; font-family: var(--f-mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; }
.crumbs a { opacity: .65; transition: opacity .2s; }
.crumbs a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.crumbs i { width: 6px; height: 6px; background: var(--ember); border-radius: 2px; transform: rotate(45deg); }
.crumbs span { padding: 4px 10px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--white); }

.pricebox { display: inline-flex; flex-wrap: wrap; margin-top: 30px; border: 2px solid var(--ink); border-radius: 20px; overflow: hidden; background: var(--white); box-shadow: var(--hard); }
.pricebox__cell { display: grid; gap: 4px; padding: 14px 22px; border-right: 2px solid var(--ink); }
.pricebox__cell:last-child { border-right: 0; }
.pricebox__cell--hl { background: var(--volt); }
.pricebox small { font-family: var(--f-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.pricebox b { font-size: clamp(1.3rem, 2vw, 1.8rem); font-weight: 750; letter-spacing: -.03em; line-height: 1; }

/* key numbers strip */
.keys { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 2px solid var(--ink); background: var(--white); }
.key { padding: clamp(22px, 3vw, 38px) clamp(16px, 2.4vw, 32px); border-right: 1.5px solid var(--ink); display: grid; gap: 6px; position: relative; overflow: hidden; }
.key:last-child { border-right: 0; }
.key b { font-size: clamp(2rem, 4vw, 3.6rem); font-weight: 800; letter-spacing: -.03em; line-height: .95; font-variation-settings: "wdth" 80; }
.key span { font-family: var(--f-mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.key::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: var(--volt); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.key:hover::after { transform: scaleX(1); }

/* included features */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat {
  position: relative; padding: 26px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--white);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), background-color .3s;
}
.feat:hover { transform: translate(-4px, -4px); box-shadow: var(--hard); }
.feat__ic { width: 52px; height: 52px; border-radius: 15px; background: var(--volt); border: 2px solid var(--ink); display: grid; place-items: center; transition: transform .7s var(--spring), background-color .3s; }
.feat__ic .ico { width: 24px; height: 24px; }
.feat:hover .feat__ic { transform: rotate(-12deg) scale(1.1); background: var(--ember); }
.feat h3 { margin-top: 20px; font-size: 1.22rem; font-weight: 680; letter-spacing: -.02em; line-height: 1.2; }
.feat p { margin-top: 8px; color: var(--muted); font-size: .96rem; line-height: 1.5; }
.feat__n { position: absolute; right: 22px; top: 22px; font-family: var(--f-mono); font-size: .74rem; color: var(--muted); }

/* package */
.pkg { display: grid; grid-template-columns: .9fr 1.1fr; border: 2px solid var(--ink); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--hard-lg); background: var(--white); }
.pkg__main { position: relative; overflow: hidden; background: var(--volt); padding: clamp(26px, 3.4vw, 48px); display: flex; flex-direction: column; gap: 22px; border-right: 2px solid var(--ink); }
.pkg__main .sticker { right: -30px; bottom: -30px; width: 150px; }
.pkg__price { font-size: clamp(3.6rem, 7vw, 6.4rem); font-weight: 800; letter-spacing: -.035em; line-height: .85; font-variation-settings: "wdth" 78; }
.pkg__price small { display: block; font-family: var(--f-mono); font-size: .8rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; }
.pkg__main p { color: #3c4020; max-width: 38ch; }
.pkg__side { padding: clamp(26px, 3.4vw, 48px); display: grid; gap: 26px; align-content: start; }
.pkg__side h3 { font-family: var(--f-mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border: 1.5px solid var(--ink); border-radius: 999px;
  font-size: .92rem; font-weight: 550; background: var(--paper); transition: transform .4s var(--spring), background-color .3s;
}
.chip .ico { width: 15px; height: 15px; }
.chip:hover { transform: translateY(-3px) rotate(-2deg); background: var(--volt); }
.section--dark .chip { background: transparent; border-color: var(--line-d); color: var(--paper); }
.section--dark .chip:hover { background: var(--volt); color: var(--ink); border-color: var(--volt); }

/* timeline */
.tl { position: relative; display: grid; max-width: 980px; }
.tl::before, .tl__fill { content: ""; position: absolute; left: 191px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--line-d); }
.tl__fill { background: var(--volt); transform-origin: top; transform: scaleY(var(--p, 0)); }
.tl__item { position: relative; display: grid; grid-template-columns: 160px 64px 1fr; gap: 0 0; padding-bottom: 52px; }
.tl__item:last-child { padding-bottom: 0; }
.tl__when { font-family: var(--f-mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-d); padding-top: 4px; text-align: right; padding-right: 8px; }
.tl__dot { justify-self: center; width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--paper); background: var(--ink); position: relative; z-index: 1; transition: background-color .4s, transform .6s var(--spring), border-color .4s; }
.tl__item.is-lit .tl__dot { background: var(--volt); border-color: var(--volt); transform: scale(1.25); }
.tl__item.is-lit .tl__dot::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--volt); animation: ping 1.8s ease-out infinite; }
.tl__body h3 { font-size: clamp(1.3rem, 2vw, 1.8rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.tl__body p { margin-top: 10px; color: var(--muted-d); max-width: 56ch; }

/* good-fit cards */
.fit { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.fit__card {
  min-height: 210px; padding: 24px; border: 2px solid var(--ink); border-radius: var(--r); display: flex; flex-direction: column; justify-content: space-between; gap: 20px;
  transition: transform .5s var(--spring);
}
.fit__card:nth-child(4n+1) { background: var(--volt); }
.fit__card:nth-child(4n+2) { background: var(--sky); }
.fit__card:nth-child(4n+3) { background: var(--white); }
.fit__card:nth-child(4n+4) { background: var(--ember); }
.fit__card:hover { transform: rotate(-2.5deg) translateY(-6px); }
.fit__card:nth-child(even):hover { transform: rotate(2.5deg) translateY(-6px); }
.fit__n { font-family: var(--f-mono); font-size: .78rem; font-weight: 600; }
.fit__card h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.fit__card p { margin-top: 6px; font-size: .94rem; line-height: 1.45; opacity: .8; }

/* tech band */
.tech { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.tech span { font-family: var(--f-mono); font-size: .82rem; padding: 8px 14px; border-radius: 10px; border: 1.5px solid var(--ink); background: var(--white); transition: transform .4s var(--spring), background-color .3s; }
.tech span:hover { transform: translateY(-4px); background: var(--volt); }

.others h2 { margin-bottom: 36px; }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.ccards { display: grid; gap: 14px; }
.ccard {
  position: relative; display: flex; align-items: center; gap: 18px; padding: 20px 22px; border: 2px solid var(--ink); border-radius: var(--r);
  background: var(--white); transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.ccard:hover { transform: translate(-4px, -4px); box-shadow: var(--hard); }
.ccard__ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--volt); border: 2px solid var(--ink); flex: none; }
.ccard__ic .ico { width: 24px; height: 24px; }
.ccard:hover .ccard__ic { animation: wobble .5s ease-in-out 2; }
.ccard__txt { display: grid; min-width: 0; flex: 1; }
.ccard__txt small { font-family: var(--f-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.ccard__txt b, .ccard__txt a { font-size: clamp(1.02rem, 1.5vw, 1.25rem); font-weight: 650; letter-spacing: -.01em; overflow-wrap: anywhere; }
.ccard__copy { font-family: var(--f-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; padding: 8px 12px; border-radius: 999px; border: 1.5px solid var(--ink); flex: none; transition: background-color .3s; min-height: 36px; }
.ccard__copy:hover, .ccard__copy.is-done { background: var(--volt); }
.ccard--dark { background: var(--ink); color: var(--paper); }
.ccard--dark .ccard__txt small { color: var(--muted-d); }
.company { display: grid; gap: 4px; font-size: .92rem; line-height: 1.5; }
.company dt { font-family: var(--f-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-d); margin-top: 10px; }
.company dt:first-child { margin-top: 0; }
.company dd { margin: 0; }

.form { position: relative; padding: clamp(24px, 3.4vw, 44px); border: 2px solid var(--ink); border-radius: var(--r-lg); background: var(--white); box-shadow: var(--hard-lg); }
.form h2 { margin-bottom: 8px; }
.form > p { color: var(--muted); margin-bottom: 28px; }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 24px; }
.field { display: grid; gap: 6px; position: relative; }
.field--full { grid-column: 1 / -1; }
.field label, .field legend { font-family: var(--f-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.field input, .field textarea {
  width: 100%; border: 0; border-bottom: 2px solid var(--ink); background: transparent; padding: 10px 0 12px; font-size: 1.08rem; outline: none; border-radius: 0;
}
.field textarea { resize: vertical; min-height: 120px; }
.field__line { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ember); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); pointer-events: none; }
.field input:focus ~ .field__line, .field textarea:focus ~ .field__line { transform: scaleX(1); }
.field input::placeholder, .field textarea::placeholder { color: #9a978d; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.field .opt { position: relative; font-family: var(--f-display); font-size: 1rem; text-transform: none; letter-spacing: 0; font-weight: 550; }
.opt input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.opt span {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 15px; border: 1.5px solid var(--ink); border-radius: 999px; cursor: pointer; font-size: .92rem; font-weight: 550;
  transition: background-color .25s, transform .45s var(--spring), box-shadow .3s; user-select: none; min-height: 44px;
}
.opt span:hover { transform: translateY(-2px); }
.opt input:checked + span { background: var(--volt); box-shadow: 3px 3px 0 var(--ink); transform: translate(-2px, -2px); }
.opt input:focus-visible + span { outline: 3px solid var(--ember); outline-offset: 2px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; line-height: 1.45; }
.consent input { width: 22px; height: 22px; accent-color: var(--ink); flex: none; margin-top: 1px; }
.consent a { text-decoration: underline; text-underline-offset: 3px; }
.form__foot { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-top: 30px; }
.form__status { font-family: var(--f-mono); font-size: .8rem; min-height: 1.2em; }
.form__status.is-error { color: #c42f00; }
.form__status.is-ok { color: #2d7a19; }
.field.is-invalid input, .field.is-invalid textarea { border-bottom-color: #c42f00; }

.map-card { position: relative; margin-top: 14px; height: 220px; border: 2px solid var(--ink); border-radius: var(--r); overflow: hidden; background: var(--sky); display: block; }
.map-card svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-card__label { position: absolute; left: 16px; bottom: 16px; padding: 8px 12px; border-radius: 12px; background: var(--white); border: 1.5px solid var(--ink); font-family: var(--f-mono); font-size: .76rem; display: inline-flex; gap: 8px; align-items: center; }
.map-card__label .ico { width: 14px; height: 14px; }

/* ---------- legal pages ---------- */
.lhero { position: relative; overflow: hidden; padding: calc(var(--hdr-h) + 90px) 0 70px; border-bottom: 2px solid var(--ink); }
.lhero__grid { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; }
.lhero h1 { margin-top: 20px; }
.lhero__meta { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.lhero__meta span { font-family: var(--f-mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--white); }
.lhero__art { width: clamp(150px, 18vw, 240px); }
.lhero .sticker--star { width: 70px; left: 46%; top: 120px; }

.legal { display: grid; grid-template-columns: 250px 1fr; gap: clamp(30px, 6vw, 90px); align-items: start; }
.toc { position: sticky; top: calc(var(--hdr-h) + 40px); display: grid; gap: 2px; font-size: .92rem; }
.toc p { font-family: var(--f-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 12px; }
.toc a { display: flex; gap: 10px; padding: 8px 12px; border-radius: 10px; border-left: 3px solid transparent; transition: background-color .25s, border-color .25s; color: var(--muted); }
.toc a span { font-family: var(--f-mono); font-size: .74rem; }
.toc a:hover { background: var(--white); color: var(--ink); }
.toc a.is-active { background: var(--white); border-left-color: var(--ember); color: var(--ink); font-weight: 600; }
.prose { max-width: 76ch; }
.prose section { scroll-margin-top: calc(var(--hdr-h) + 40px); padding-bottom: 12px; }
.prose h2 { display: flex; gap: 14px; align-items: baseline; font-size: clamp(1.4rem, 2.2vw, 1.9rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.15; margin: 54px 0 16px; }
.prose section:first-child h2 { margin-top: 0; }
.prose h2 span { font-family: var(--f-mono); font-size: .8rem; color: var(--ember); font-weight: 600; letter-spacing: 0; }
.prose h3 { font-size: 1.12rem; font-weight: 680; margin: 26px 0 8px; }
.prose p, .prose li { color: #34332e; line-height: 1.7; }
.prose p + p { margin-top: 14px; }
.prose ul { display: grid; gap: 8px; margin: 14px 0; }
.prose li { position: relative; padding-left: 24px; }
.prose li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 9px; height: 9px; border-radius: 2px; background: var(--volt); border: 1.5px solid var(--ink); transform: rotate(45deg); }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.prose a:hover { background: var(--volt); }
.prose strong { color: var(--ink); }
.prose code { font-family: var(--f-mono); font-size: .86em; padding: 2px 6px; border-radius: 6px; background: var(--paper-2); }
.callout { margin: 20px 0; padding: 20px 22px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--white); box-shadow: var(--hard); }
.tbl-wrap { overflow-x: auto; margin: 18px 0; border: 2px solid var(--ink); border-radius: var(--r); background: var(--white); }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 560px; }
.tbl th, .tbl td { text-align: left; padding: 12px 16px; border-bottom: 1.5px solid var(--line); vertical-align: top; }
.tbl th { font-family: var(--f-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; background: var(--volt); border-bottom: 2px solid var(--ink); }
.tbl tr:last-child td { border-bottom: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .shero__grid { grid-template-columns: 1fr; }
  .shero__art { max-width: 560px; width: 100%; margin: 10px auto 0; }
  .shero__blob { width: 80vw; right: -30vw; top: 50%; }
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .pkg { grid-template-columns: 1fr; }
  .pkg__main { border-right: 0; border-bottom: 2px solid var(--ink); }
  .fit { grid-template-columns: 1fr 1fr; }
  .contact { grid-template-columns: 1fr; }
  .legal { grid-template-columns: 1fr; }
  .toc { position: relative; top: 0; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .toc p { grid-column: 1 / -1; }
  .lhero__grid { grid-template-columns: 1fr; }
  .lhero__art { display: none; }
}
@media (max-width: 640px) {
  .keys { grid-template-columns: 1fr 1fr; }
  .key:nth-child(2) { border-right: 0; }
  .key:nth-child(-n+2) { border-bottom: 1.5px solid var(--ink); }
  .feat-grid, .fit { grid-template-columns: 1fr; }
  .form__grid { grid-template-columns: 1fr; }
  .tl::before, .tl__fill { left: 12px; }
  .tl__item { grid-template-columns: 26px 1fr; gap: 6px 18px; }
  .tl__when { grid-column: 2; grid-row: 1; text-align: left; padding: 0; }
  .tl__dot { grid-column: 1; grid-row: 1; }
  .tl__body { grid-column: 2; }
  .pricebox__cell { padding: 12px 16px; }
  .ccard { flex-wrap: wrap; }
}
