/* Velar Bureau — Services (A-03): a graphite sheet with a signal screen.
   The screen carries the dither / ASCII object (js/svx.js); the tabs on the left pick the service.
   Phones and tablets get one card per service, each with its own object. */

.svx { --pad: clamp(24px, min(3vw, 43.2px), 48px); --notch: clamp(160px, min(13vw, 187.2px), 204px); --nx: 44%; --t-fade: .45s;
  background: var(--steel); padding-block: clamp(32px, min(4vw, 57.6px), 72px);
  padding-left: max(var(--gx), env(safe-area-inset-left, 0px)); padding-right: max(var(--gx), env(safe-area-inset-right, 0px)); }

/* ---------- sheet ---------- */
.svx__sheet { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: var(--notch) auto 1fr;
  column-gap: var(--gx0); min-height: min(calc(100vh - 100px), 880px); padding: var(--pad); background: var(--graphite); color: var(--steel); overflow: hidden; }
.svx__sheet::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .7;
  background-image: linear-gradient(to right, var(--line-d) 1px, transparent 1px), linear-gradient(to bottom, var(--line-d) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%, 100% 96px; }

.svx__head { grid-column: 1 / 10; grid-row: 1; position: relative; z-index: 2; display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.svx__h { margin: 0; font-weight: 500; font-size: clamp(2.2rem, min(3.5vw, 50.4px), 3.9rem); line-height: .98; letter-spacing: -.045em; max-width: 22ch; text-wrap: balance; color: var(--steel); }
.svx__h .mute { color: var(--slate); }

/* signal screen with the stepped notch the headline sits in */
.svx__screen { grid-column: 6 / 13; grid-row: 1 / 4; position: relative; z-index: 1; min-height: 640px;
  margin: calc(var(--pad) * -1) calc(var(--pad) * -1) calc(var(--pad) * -1) 0;
  background-color: var(--signal);
  background-image: radial-gradient(circle, color-mix(in srgb, var(--peach) 20%, transparent) 0 .9px, transparent 1.2px);
  background-size: 6px 6px;
  clip-path: polygon(var(--nx) 0, 100% 0, 100% 100%, 18% 100%, 18% calc(100% - 64px), 0 calc(100% - 64px), 0 calc(var(--notch) + var(--pad)), var(--nx) calc(var(--notch) + var(--pad))); }
.svx__cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.svx__hud { position: absolute; inset: 0; pointer-events: none; font-family: var(--fm); color: var(--graphite); }
.svx__code { position: absolute; top: 18px; right: 22px; padding: 5px 8px; background: var(--signal); font-size: .78rem; letter-spacing: .04em; }
.svx__code b { font-weight: 500; }
.svx__caps { position: absolute; right: 22px; bottom: 20px; display: grid; text-align: right; }
.svx__cap { grid-area: 1 / 1; justify-self: end; padding: 7px 9px; background: var(--signal); display: flex; flex-direction: column; gap: 2px; opacity: 0; transform: translateY(6px); transition: opacity var(--t-fade) var(--ease), transform var(--t-fade) var(--ease); }
.svx__cap.is-on { opacity: 1; transform: none; transition-delay: .35s; }
.svx__cap small { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: color-mix(in srgb, var(--graphite) 62%, transparent); }
.svx__cap b { font-size: .82rem; font-weight: 500; }
.svx__tick { position: absolute; width: 14px; height: 14px; }
.svx__tick::before, .svx__tick::after { content: ""; position: absolute; background: var(--graphite); }
.svx__tick::before { left: 6px; top: 0; width: 1px; height: 14px; }
.svx__tick::after { top: 6px; left: 0; width: 14px; height: 1px; }
.svx__tick--a { left: calc(var(--nx) + 20px); top: 20px; }
.svx__tick--b { right: 20px; top: 50%; }

/* tabs, detail, stats */
.svx__side { grid-column: 1 / 6; grid-row: 2 / 4; position: relative; z-index: 2; align-self: end; display: flex; flex-direction: column; gap: 24px; min-width: 0; padding-top: 28px; }
.svx__tabs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-d); }
.svx__tab { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) 18px; align-items: center; min-height: 50px; padding-block: 8px;
  border-bottom: 1px solid var(--line-d); color: var(--mist); text-decoration: none; font-size: clamp(1.05rem, min(1.35vw, 19.44px), 1.35rem); letter-spacing: -.02em; transition: color .3s var(--ease); }
.svx__tn { font-family: var(--fm); font-size: .76rem; letter-spacing: .04em; color: var(--slate); transition: color .3s var(--ease); }
.svx__ta { width: 18px; height: 18px; opacity: 0; transform: translate(-6px, 6px); transition: opacity .3s var(--ease), transform .45s var(--ease); }
.svx__bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--signal); transform: scaleX(0); transform-origin: left center; }
.svx__tab.is-on { color: var(--steel); }
.svx__tab.is-on .svx__tn { color: var(--signal); }
.svx__tab.is-on .svx__ta, .svx__tab:hover .svx__ta { opacity: 1; transform: none; }
.svx__tab:focus-visible, .svx__cta:focus-visible { outline: 2px solid var(--signal); outline-offset: 4px; }

.svx__det { display: grid; }
.svx__d { grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 18px 32px; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity var(--t-fade) var(--ease), transform var(--t-fade) var(--ease), visibility 0s linear var(--t-fade); }
.svx__d.is-on { opacity: 1; visibility: visible; transform: none; transition-delay: .08s, .08s, 0s; }
.svx__d p { grid-column: 1 / -1; margin: 0; max-width: 46ch; color: var(--mist); font-size: 1rem; line-height: 1.55; }

.svx__log { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-family: var(--fm); font-size: .8rem; line-height: 1.4; color: var(--steel-2); }
.svx__log li { display: flex; gap: 10px; min-width: 0; }
.svx__log li::before { content: ">"; color: var(--slate); }
.svx__lk { color: var(--signal); }

.svx__stats { display: flex; flex-wrap: wrap; gap: 14px 44px; margin: 0; }
.svx__d .svx__stats { flex-direction: column; gap: 14px; text-align: right; }
.svx__stats dt { font-family: var(--fm); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); }
.svx__stats dd { margin: 6px 0 0; font-size: clamp(1.35rem, min(1.9vw, 27.36px), 1.9rem); font-weight: 500; letter-spacing: -.035em; line-height: 1.05; color: var(--steel); }

.svx__cta { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-family: var(--fm); font-size: .78rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--steel); text-decoration: none; border-bottom: 1px solid currentColor; transition: color .3s var(--ease); }
.svx__cta svg { width: 14px; height: 14px; transition: transform .45s var(--ease); }
.svx__cta:hover { color: var(--signal); }
.svx__cta:hover svg { transform: translate(3px, -3px); }

/* ---------- cards (tablet / phone) ---------- */
.svx__cards { display: none; list-style: none; margin: 0; padding: 0; }
.svx__card { display: flex; flex-direction: column; height: 100%; background: var(--paper); border: 1px solid var(--line); color: var(--graphite); text-decoration: none; }
.svx__art { position: relative; height: clamp(250px, min(64vw, 921.6px), 340px); margin: 6px 6px 0; overflow: hidden; background-color: var(--signal);
  background-image: radial-gradient(circle, color-mix(in srgb, var(--peach) 20%, transparent) 0 .8px, transparent 1px); background-size: 5px 5px; }
.svx__art canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.svx__pill { position: absolute; top: 8px; left: 8px; right: 8px; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 14px; background: var(--paper); }
.svx__pill b { font-weight: 500; font-size: 1.02rem; letter-spacing: -.02em; }
.svx__pill code { flex: none; font-family: var(--fm); font-size: .7rem; padding: 5px 8px; background: var(--steel); color: var(--graphite); }
.svx__cb { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 18px 18px 8px; }
.svx__cb p { margin: 0; color: var(--slate); font-size: .98rem; line-height: 1.5; }
.svx__card .svx__log { color: var(--graphite); padding: 12px 14px; background: var(--steel); }
.svx__card .svx__log li::before { color: var(--mist); }
.svx__card .svx__lk { color: var(--signal-2); }
.svx__card .svx__stats dd { color: var(--graphite); font-size: 1.3rem; }
.svx__card .svx__stats dt { color: var(--slate); }
.svx__go { margin-top: auto; display: flex; align-items: center; justify-content: space-between; min-height: 48px; border-top: 1px solid var(--line); font-weight: 500; }
.svx__go svg { width: 18px; height: 18px; transition: transform .45s var(--ease); }
.svx__card:hover .svx__go { color: var(--signal-2); }
.svx__card:hover .svx__go svg { transform: translate(3px, -3px); }
.svx__card:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

@media (max-width: 1100px) {
  .svx { padding-block: var(--sec); }
  .svx__sheet { display: block; min-height: 0; padding: 0; background: none; color: var(--graphite); overflow: visible; }
  .svx__sheet::before, .svx__screen, .svx__side { display: none; }
  .svx__head { gap: 20px; margin-bottom: clamp(28px, min(6vw, 86.4px), 48px); }
  .svx__head .label--dark { color: var(--slate); }
  .svx__h { color: var(--graphite); max-width: 18ch; }
  .svx__h .mute { color: var(--mist); }
  .svx__cards { display: grid; gap: 12px; }
}
@media (min-width: 700px) and (max-width: 1100px) { .svx__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 699px) {
  .svx__cards { grid-auto-flow: column; grid-auto-columns: 86%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    margin-left: calc(max(var(--gx), env(safe-area-inset-left, 0px)) * -1); margin-right: calc(max(var(--gx), env(safe-area-inset-right, 0px)) * -1);
    padding-left: max(var(--gx), env(safe-area-inset-left, 0px)); padding-right: max(var(--gx), env(safe-area-inset-right, 0px)); scroll-padding-inline: max(var(--gx), env(safe-area-inset-left, 0px)); }
  .svx__cards::-webkit-scrollbar { display: none; }
  .svx__cards > li { scroll-snap-align: start; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .svx__cap, .svx__d, .svx__tab, .svx__ta { transition: none !important; }
  .svx__tab.is-on .svx__bar { transform: scaleX(1); }
}
@media (min-width: 1101px) { .svx__head .label__code { background: var(--signal); color: var(--graphite); } }

/* living field (js/field.js): the card picture prints in signal on paper and fades out at the bottom */
.svx__art.is-field { background-color: var(--paper); background-image: radial-gradient(circle, var(--line) 0 .7px, transparent 1px); }
.svx__art.is-field .svx__pill { border: 1px solid var(--line); box-shadow: 0 10px 24px -18px color-mix(in srgb, var(--graphite) 40%, transparent); }

/* icons (js/svxic.js) */
.svx__tab { grid-template-columns: 48px 34px minmax(0, 1fr) 18px; }
.svx__ti { width: 22px; height: 22px; color: var(--slate); transition: color .3s var(--ease), transform .45s var(--ease); }
.svx__tab:hover .svx__ti { color: var(--steel); }
.svx__tab.is-on .svx__ti { color: var(--signal); transform: scale(1.08); }
.svx__log--ic { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.svx__log--ic li { align-items: center; gap: 9px; padding: 8px 10px; min-height: 40px; border: 1px solid var(--line-d); }
.svx__log--ic li::before { display: none; }
.svx__log--ic .svx__lk { display: none; }
.svx__card .svx__log--ic .svx__lk { display: inline; order: 3; margin-left: auto; font-size: .68rem; opacity: .7; }
.svx__li { flex: none; width: 18px; height: 18px; color: var(--signal); }
.svx__d.is-on .svx__log--ic li { animation: svxIc .5s var(--ease) both; }
.svx__d.is-on .svx__log--ic li:nth-child(2) { animation-delay: .06s; }
.svx__d.is-on .svx__log--ic li:nth-child(3) { animation-delay: .12s; }
.svx__d.is-on .svx__log--ic li:nth-child(4) { animation-delay: .18s; }
@keyframes svxIc { from { opacity: 0; transform: translateY(6px); } }
.svx__pill { justify-content: flex-start; }
.svx__pill .svx__ti { flex: none; width: 20px; height: 20px; color: var(--signal-2, var(--signal)); }
.svx__pill code { margin-left: auto; }
.svx__card .svx__log--ic li { border-color: color-mix(in srgb, var(--graphite) 12%, transparent); background: var(--paper); }
.svx__card .svx__log--ic { background: none; padding: 0; }
.svx__card .svx__li { color: var(--signal-2, var(--signal)); }
@media (max-width: 420px) { .svx__log--ic { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .svx__d.is-on .svx__log--ic li { animation: none; } }

/* price and timing hidden on request */
.svx .svx__stats { display: none !important; }
.svx__d { grid-template-columns: minmax(0, 1fr); }

/* bigger service titles in the tab list */
.svx__tab { min-height: 66px; padding-block: 12px; font-size: clamp(1.4rem, min(2.05vw, 29.52px), 2.15rem); letter-spacing: -.035em; line-height: 1.05; }
.svx__ti { width: 26px; height: 26px; }
