/* Victory Door Systems: page CSS on top of the kit (system.css tokens). */

/* ---------- nav: the client's logo */
.nav__logo .vd-logo { height: 40px; width: auto; }
.nav__logo span { font-size: 19px; }
.vd-tel { font-variant-numeric: tabular-nums; }
@media (max-width: 1199px) { .vd-tel { display: none; } }
@media (max-width: 639px) { .nav__logo .vd-logo { height: 34px; } .nav__logo span { font-size: 17px; } }

/* ---------- hero: the door sequence
   .vd-frame is the 16:9 picture sized to cover the screen; every layer inside it is placed in percent of it,
   so the door rectangle (x 20.04%, y 26.41%, 57.06% x 51.76%) lines up with the photograph at every size. */
main > .hero.vd-hero { height: 100svh; padding: 0; background: #0d0b0a; }
main > .hero.vd-hero.is-live { height: 300svh; }
.vd-hero__pin { position: relative; height: 100svh; overflow: clip; }
.vd-hero.is-live .vd-hero__pin { position: sticky; top: 0; }
.vd-view { position: absolute; inset: var(--nav) 0 0 0; overflow: clip; container-type: size; }
.vd-frame {
  --door-l: 20.04%; --door-t: 26.41%; --door-w: 57.06%; --door-h: 51.76%;
  position: absolute; left: 50%; top: 50%;
  width: max(100cqw, 177.78cqh); aspect-ratio: 16 / 9;
  translate: -50% -50%; transform-origin: 48.57% 52.29%;
  will-change: transform;
}
.vd-layer, .vd-layer img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.vd-layer img { object-fit: cover; }
/* the closed photograph has the door cut out: the moving door panel draws the door itself */
.vd-closed { clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, 20.04% 26.41%, 77.1% 26.41%, 77.1% 78.17%, 20.04% 78.17%, 20.04% 26.41%); }
.vd-door { position: absolute; left: var(--door-l); top: var(--door-t); width: var(--door-w); height: var(--door-h); overflow: clip; }
.vd-door__panel { position: absolute; inset: 0; overflow: clip; will-change: transform; }
.vd-door__panel::after { /* the shadow line under the door's bottom edge while it rises */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 10%; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,var(--edge, 0)), transparent); }
.vd-door__img { position: absolute; left: calc(-20.04% / 0.5706); top: calc(-26.41% / 0.5176); width: calc(100% / 0.5706); height: calc(100% / 0.5176); }
.vd-door__img img { width: 100%; height: 100%; display: block; }

/* the words on the door: inside the part of the door that is on screen (site.js sets --w-l/--w-r) */
.vd-door__words {
  position: absolute; z-index: 1; top: 0; bottom: 0; left: var(--w-l, 7%); right: var(--w-r, 7%);
  display: flex; flex-direction: column; justify-content: center; gap: var(--s-5);
  color: #f4f2ee; padding-block: clamp(16px, 4%, 48px);
}
.vd-door__words h1 { color: #f4f2ee; font-size: clamp(34px, 3.2vw + 18px, 66px); line-height: 1.02; max-width: 16ch; text-wrap: balance; }
.vd-door__words .hero__lead { color: rgba(244,242,238,.86); font-size: clamp(16px, .55vw + 10px, 19px); line-height: 1.5; max-width: 46ch; margin: 0; }
.vd-door__words .btn-row { margin-top: var(--s-2); }
.vd-door__words .btn--secondary { background: transparent; color: #f4f2ee; border-color: rgba(244,242,238,.42); }
.vd-door__words .btn--secondary:hover { border-color: #f4f2ee; }
.vd-door__cue { position: absolute; z-index: 2; left: 0; right: 0; bottom: calc(20px + env(safe-area-inset-bottom)); margin: 0; display: none; justify-content: center; align-items: center; gap: 10px;
  font: 500 13px/1 var(--font-text); color: rgba(244,242,238,.85); text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.vd-hero.is-live .vd-door__cue { display: flex; }
.vd-door__cue span { width: 1px; height: 18px; background: currentColor; animation: vd-cue 1.8s ease-in-out 3; transform-origin: top; }
@keyframes vd-cue { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

/* the facts, on a solid bar once the garage is open */
.vd-facts {
  position: absolute; z-index: 2; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); translate: -50% 0;
  width: min(100% - 2 * var(--gut), 1280px); margin: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
  background: rgba(16,13,11,.92); color: #f4f2ee; border-radius: var(--r-lg); overflow: clip;
  opacity: 0; visibility: hidden;
}
.vd-hero.is-live .vd-facts { visibility: visible; }
.vd-facts > div { padding: var(--s-5) var(--s-6); display: grid; gap: 4px; }
.vd-facts > div + div { border-left: 1px solid rgba(244,242,238,.12); }
.vd-facts dt { font: 400 clamp(20px, 1.2vw + 6px, 26px)/1.15 var(--font-display); letter-spacing: -0.02em; }
.vd-facts dd { margin: 0; font-size: var(--t-small); color: rgba(244,242,238,.72); }
@media (max-width: 899px) {
  .vd-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vd-facts > div { padding: var(--s-4); }
  .vd-facts > div:nth-child(3) { border-left: 0; }
  .vd-facts > div:nth-child(n + 3) { border-top: 1px solid rgba(244,242,238,.12); }
}
@media (max-width: 639px) {
  .vd-door__words { gap: var(--s-4); }
  .vd-door__words .btn-row { flex-direction: column; align-items: stretch; }
  .vd-door__words .btn-row .btn { width: 100%; justify-content: center; }
  .vd-door__words .btn-row > .btn--secondary { text-decoration: none; border-color: rgba(244,242,238,.42); }
}

/* ---------- help: the two ways in */
.vd-paths { row-gap: var(--gutter); }
.vd-path { display: grid; grid-template-rows: auto 1fr; border-radius: var(--r-lg); overflow: clip; background: var(--surface); color: inherit; text-decoration: none; }
.vd-path__media { display: block; aspect-ratio: 2 / 1; overflow: clip; }
.vd-path__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: scale 600ms var(--m-ease, ease); }
.vd-path:hover .vd-path__media img { scale: 1.03; }
.vd-path__body { display: grid; gap: var(--s-2); align-content: start; padding: var(--s-6); }
.vd-path__title { font: var(--display-weight) var(--t-h3)/1.15 var(--font-display); letter-spacing: -0.02em; }
.vd-path__text { max-width: 48ch; }
.vd-path .link { justify-self: start; margin-top: var(--s-3); font-weight: 500; }
@media (max-width: 639px) { .vd-path__body { padding: var(--s-5); } .vd-path__media { aspect-ratio: 2 / 1; } }

/* ---------- door styles */
.vd-styles { row-gap: var(--s-6); }
.vd-style { margin: 0; display: grid; gap: var(--s-2); align-content: start; color: inherit; text-decoration: none; }
.vd-style__media { display: block; margin-bottom: var(--s-2); }
.vd-style__media { aspect-ratio: 4 / 5; border-radius: var(--r-lg); overflow: clip; background: var(--surface); max-height: 52svh; }
.vd-style__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: scale 600ms var(--m-ease, ease); }
.vd-style:hover .vd-style__media img { scale: 1.03; }
.vd-style__name { font: 500 var(--t-lead)/1.3 var(--font-text); letter-spacing: 0; }
.vd-style__line { margin: 0; }
@media (max-width: 1023px) { .vd-styles > .vd-style { grid-column: span 6; } .vd-style__media { aspect-ratio: 4 / 3; } }
@media (max-width: 639px) { .vd-style__media { max-height: 30svh; } }

/* ---------- photo beside a list */
.vd-split-photo { aspect-ratio: 4 / 3; max-height: 600px; border-radius: var(--r-lg); overflow: clip; }
.vd-split-photo .frame__img { width: 100%; height: 100%; object-fit: cover; }
.rows .rows__name small { display: block; font-weight: 400; color: var(--muted); font-size: var(--t-body); margin-top: 2px; }
@media (max-width: 1023px) { .vd-split-photo { margin-top: var(--s-7); } }

/* ---------- commercial */
.develop { margin: 0; border-radius: var(--r-lg); overflow: hidden; height: min(600px, 70svh); }
.develop > img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 1023px) { .develop { height: auto; aspect-ratio: 4 / 3; margin-top: var(--s-7); } }
.vd-quote { margin: var(--s-7) 0 0; padding-left: var(--s-5); border-left: 2px solid var(--accent); }
.vd-quote blockquote { margin: 0; font-size: var(--t-lead); line-height: 1.45; }
.vd-quote figcaption { margin-top: var(--s-3); color: var(--muted); }

/* ---------- the family (dark band) */
.vd-family__text { display: grid; gap: var(--s-5); align-content: start; }
.vd-family__logo { width: 96px; height: auto; }
.vd-family .t-lead { max-width: 40ch; }
.vd-warn { align-self: start; padding: var(--s-7); border-radius: var(--r-lg); background: var(--surface); display: grid; gap: var(--s-3); }
.vd-warn h3 { font: 500 var(--t-lead)/1.3 var(--font-text); letter-spacing: 0; }
.vd-warn .t-label { color: #ff8f78; }
@media (max-width: 1023px) { .vd-warn { margin-top: var(--s-7); } }

/* ---------- reviews */
.vd-scores { list-style: none; margin: var(--s-6) 0 0; padding: 0; row-gap: var(--s-4); }
@media (max-width: 639px) { .vd-scores > li { grid-column: 1 / -1; } }
.vd-scores li { display: grid; justify-items: start; gap: var(--s-2); }
.vd-scores img, .vd-bbb { width: 28px; height: 28px; flex: none; }
.vd-bbb { display: grid; place-items: center; border-radius: 6px; background: #005a78; color: #fff; font: 600 12px/1 var(--font-text); }
.vd-scores b { font-weight: 500; }
.vd-reviews { row-gap: var(--gutter); }
.vd-review { margin: 0; padding: var(--s-6); border-radius: var(--r-lg); background: var(--surface); display: grid; gap: var(--s-4); align-content: space-between; }
.vd-review blockquote { margin: 0; font-size: var(--t-lead); line-height: 1.45; }
.vd-review figcaption { display: flex; flex-wrap: wrap; gap: 4px var(--s-3); align-items: baseline; font-size: var(--t-small); }
.vd-review__name { font-weight: 500; }
.vd-review__tag { color: var(--muted); }
@media (max-width: 639px) { .vd-review { padding: var(--s-5); } .vd-review blockquote { font-size: var(--t-body); } }

/* ---------- area */
.vd-towns { margin: 0 0 var(--s-7); font-size: var(--t-lead); line-height: 1.5; max-width: 34ch; }
.vd-visit { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-6); border-top: 1px solid var(--line); padding-top: var(--s-6); }
.vd-visit > div { grid-column: span 2; display: grid; gap: var(--s-2); align-content: start; }
.vd-visit address { font-style: normal; }
.vd-visit .hours { margin: 0; display: grid; grid-template-columns: auto; gap: 2px; }
.vd-visit .hours dd { margin: 0 0 var(--s-2); color: var(--muted); }
.vd-visit p { margin: 0; }
@media (max-width: 639px) { .vd-visit { grid-template-columns: 1fr; } .vd-visit > div { grid-column: 1 / -1; } }

/* ---------- request form */
.vd-request__intro { display: grid; gap: var(--s-5); align-content: start; }
.vd-request__call { font-weight: 500; }
.rq { display: grid; gap: var(--s-5); --error: color-mix(in oklab, #d92d20 72%, var(--ink)); }
.rq fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.rq legend { padding: 0; font-size: var(--t-small); font-weight: 500; margin-bottom: var(--s-2); }
.rq-part { display: grid; gap: var(--s-5); }
.rq-part[hidden] { display: none; }
.rq-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.rq .field :is(input, select, textarea) { background: var(--bg); }
.rq .field input[type="file"] { height: auto; padding: 10px 12px; }
.rq-opt { font-weight: 400; color: var(--muted); }
.rq-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* the kind switch: two big halves */
.rq-kind { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: calc(var(--r-sm) + 4px); background: var(--surface); }
.rq-kind label, .seg label { position: relative; }
.rq-kind input, .chips input, .seg input, .rq-urgent input { position: absolute; opacity: 0; width: 1px; height: 1px; left: 0; top: 0; margin: 0; overflow: hidden; clip-path: inset(50%); }
.rq-kind span, .chips span, .seg span, .rq-urgent span { cursor: pointer; }
.rq-kind span { display: grid; place-items: center; min-height: 48px; border-radius: var(--r-sm); font-weight: 500; transition: background 160ms, color 160ms; }
.rq-kind input:checked + span { background: var(--ink); color: var(--bg); }
.rq-kind input:focus-visible + span, .chips input:focus-visible + span, .seg input:focus-visible + span, .rq-urgent input:focus-visible + span { outline: 2px solid var(--action); outline-offset: 2px; }
/* chips */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chips label { position: relative; }
.chips span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg); font-size: var(--t-small); font-weight: 500; transition: background 160ms, border-color 160ms; }
.chips input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.rq-chips[aria-invalid="true"] .chips span { border-color: var(--error); }
.rq-urgent { position: relative; display: block; }
.rq-urgent span { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 16px; border-radius: var(--r-sm); border: 1px dashed var(--line-strong); font-weight: 500; }
.rq-urgent span::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid var(--line-strong); background: var(--bg); }
.rq-urgent input:checked + span { border-style: solid; border-color: var(--action); background: color-mix(in oklab, var(--action) 8%, var(--bg)); }
.rq-urgent input:checked + span::before { background: var(--action) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; border-color: var(--action); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: calc(var(--r-sm) + 4px); background: var(--bg); border: 1px solid var(--line-strong); }
.seg span { display: grid; place-items: center; min-height: 38px; border-radius: var(--r-sm); font-weight: 500; font-size: var(--t-small); }
.seg input:checked + span { background: var(--ink); color: var(--bg); }
.rq .btn-row { margin-top: var(--s-2); }
.rq .btn[aria-busy="true"] { opacity: .7; }
.rq-done { padding: var(--s-7) 0; border-top: 2px solid var(--action); display: grid; gap: var(--s-3); justify-items: start; }
.rq-done h3 { font: 500 var(--t-lead)/1.3 var(--font-text); }
@media (max-width: 1023px) { .vd-request .span-8 { margin-top: var(--s-7); } }
@media (max-width: 639px) {
  .rq-row { grid-template-columns: 1fr; }
  .rq .btn-row .btn { width: 100%; justify-content: center; }
}

/* sections that grow past their screens on smaller widths keep their content whole */
@media (max-width: 1023px) {
  #request, #openers, #commercial, #area, #family, #reviews, #doors, #help { height: auto; min-height: 100svh; }
}

/* family facts and mobile scores */
.vd-family__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); margin: var(--s-6) 0 0; padding-top: var(--s-6); border-top: 1px solid var(--line); }
.vd-family__facts > div { display: grid; gap: 4px; align-content: start; }
.vd-family__facts dt { font: var(--display-weight) var(--t-stat)/1 var(--font-display); letter-spacing: -0.03em; color: #ff8f78; }
.vd-family__facts dd { margin: 0; color: var(--muted); font-size: var(--t-small); }


.vd-more { margin: var(--s-6) 0 0; font-weight: 500; }
#commercial .vd-more { margin-top: var(--s-7); }
.vd-family__side { display: grid; gap: var(--s-6); align-content: start; justify-items: start; }
.vd-family__side .vd-warn { justify-self: stretch; }
@media (max-width: 1023px) { .vd-family__side { margin-top: var(--s-7); } .vd-family__side .vd-warn { margin-top: 0; } }
