/* TE Certified — home page. Ticket, cutaway plan, stations. */

/* Opening: ticket left, painted cutaway right in a gutter of three numbered stops */
.opening { padding-block: clamp(1.75rem, 5vh, 2.75rem); }
.opening__grid { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); }
.opening__grid > * { min-width: 0; }
@media (min-width: 60em) {
  .opening__grid { grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.34fr); align-items: stretch; }
}

.ticket p { margin: 0; }
.ticket__row--wide { grid-template-columns: 1fr; }
.ticket__val { line-height: 1.4; }
.ticket__row--call { align-items: center; }
.ticket__num {
  display: inline-block; margin-left: 0.6rem;
  font-family: var(--text); font-size: var(--fs-body); font-weight: 400; line-height: 1.4;
}
.opening .title { font-size: clamp(2.875rem, 1.1rem + 2.2vw, 4.25rem); }
@media (max-width: 63.99em) {
  .opening .title { font-size: clamp(1.875rem, 1.1rem + 3.4vw, 2.375rem); }
}

/* Phone: the ticket is set tight so the call row sits clear of the cookie plate */
@media (max-width: 40em) {
  .opening { padding-block: 1rem 1.75rem; }
  .opening .ticket__row { grid-template-columns: 5.25rem 1fr; gap: 0.6rem; padding: 0.35rem 0.75rem; }
  .opening .ticket__row--wide { grid-template-columns: 1fr; }
  .opening .ticket__row--tall { padding-block: 0.6rem; }
}

/* The cutaway plan: the painting fills the column; three stops sit in the gutter beside it */
.plan {
  position: relative; display: grid; grid-template-columns: 1fr; grid-template-rows: auto auto;
  border: var(--hair) solid var(--ink); background: var(--green);
}
.plan__fig { grid-area: 2 / 1 / 3 / 2; position: relative; margin: 0; overflow: hidden; aspect-ratio: 1672 / 941; }
/* The stage is the painting's own box: lines and nodes are placed in the painting's coordinates */
.plan__stage { position: relative; width: 100%; height: 100%; }
.plan__fig img { width: 100%; height: 100%; object-fit: cover; }
.plan__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.plan__node { position: absolute; transform: translate(-50%, -50%); z-index: 1; }
/* 1: the outlet in the lower hall, then the panel up the wall */
.plan__node--a { left: 57.2%; top: 85%; }
.plan__node--ae { left: 63%; top: 74%; }
/* 2: the kitchen sink, then the trap under it */
.plan__node--b { left: 29%; top: 74.5%; }
.plan__node--be { left: 34%; top: 78%; }
/* 3: the upstairs register, then the air handler a floor below */
.plan__node--c { left: 60%; top: 51%; }
.plan__node--ce { left: 65%; top: 62%; }

.plan__links {
  grid-area: 1 / 1 / 2 / 2; list-style: none; margin: 0; position: relative;
  padding: 0.9rem 0.9rem 0.9rem 1.85rem; display: grid; gap: 0.5rem;
  border-bottom: var(--hair) solid var(--ink);
}
.plan__links::before { content: ""; position: absolute; left: 0.95rem; top: 0.9rem; bottom: 0.9rem; border-left: var(--hair) solid var(--ink); }
.plan__links a {
  display: flex; align-items: center; gap: 0.55rem; min-height: 2.75rem; padding: 0.4rem 0.6rem;
  background: var(--cherry); border: var(--hair) solid var(--ink); text-decoration: none;
  font-size: var(--fs-small); line-height: 1.3;
}
.plan__links a:hover, .plan__links a.is-active, .plan__links a:focus-visible { background: var(--ink); color: var(--cherry); }
.plan__n { flex: none; font-family: var(--display); font-stretch: 150%; font-weight: 500; }
.plan__marker { left: 0; top: 0; z-index: 2; display: none; transform: translate(-50%, -50%); }
.plan.is-landed[data-at="1"] .plan__marker { left: 63%; top: 74%; }
.plan.is-landed[data-at="2"] .plan__marker { left: 34%; top: 78%; }
.plan.is-landed[data-at="3"] .plan__marker { left: 65%; top: 62%; }

@media (min-width: 60em) {
  .plan {
    grid-template-columns: minmax(8rem, 9.5rem) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    align-self: stretch;
  }
  .plan__fig { grid-area: 1 / 2 / 2 / 3; aspect-ratio: auto; height: 100%; min-height: 20rem; }
  /* The painting keeps its shape at the column's full height, centred on the three rooms */
  .plan__stage {
    position: absolute; top: 0; left: 50%; height: 100%; width: auto; min-width: 112%;
    aspect-ratio: 1672 / 941; transform: translateX(-45%);
  }
  .plan__fig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .plan__links {
    grid-area: 1 / 1 / 2 / 2; align-content: stretch; align-items: stretch;
    grid-template-rows: repeat(3, minmax(0, 1fr)); padding: 0; gap: 0;
    border-bottom: 0; border-right: var(--hair) solid var(--ink);
  }
  .plan__links::before { display: none; }
  .plan__links li { position: relative; display: grid; place-items: center; padding: 0 1.15rem 0 0.55rem; }
  .plan__links li::after { content: ""; position: absolute; right: 0; top: 50%; width: 1.15rem; border-top: var(--hair) solid var(--ink); }
  .plan__links a { width: 100%; }
  .plan.is-landed .plan__marker { display: block; }
}

/* Stations: two columns on a desk, one on a phone */
.split { display: grid; gap: clamp(1.25rem, 3vw, 2.5rem); }
.split__text > * + * { margin-top: 0; }
@media (min-width: 56em) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .split--figfirst .split__fig { order: -1; }
}
.split__fig { width: 100%; }

/* The walk: a route line down the edge of every room station, numbered at its head */
.station--cherry { --ground: var(--cherry); }
.station--green { --ground: var(--green); }
.station--walk::before {
  content: ""; position: absolute; top: 0; bottom: 0;
  left: calc(max(0px, (100% - var(--max)) / 2) + var(--gut) * 0.5);
  border-left: var(--hair) solid var(--ink);
}
.station__n {
  position: absolute; top: 0.9rem; z-index: 1;
  left: calc(max(0px, (100% - var(--max)) / 2) + var(--gut) * 0.5);
  transform: translateX(-50%);
  width: 1.5rem; height: 1.5rem; display: none; place-items: center;
  background: var(--ground); border: var(--hair) solid var(--ink);
  font-family: var(--display); font-stretch: 150%; font-weight: 500;
  font-size: 0.9rem; line-height: 1;
}
@media (min-width: 56em) { .station__n { display: grid; } }

/* Notice label: where the homeowner spots it */
.symptom {
  display: flex; align-items: center; gap: 0.6rem; margin: 0 0 1.1rem;
  padding: 0.55rem 0.75rem; border: var(--hair) solid var(--pink); font-size: var(--fs-body);
}
.symptom .node { flex: none; }

/* Two labels on one branch */
.fork { position: relative; margin: 0 0 1.1rem; padding-left: 1.5rem; display: grid; gap: 0.5rem; }
.fork::before { content: ""; position: absolute; left: 0.4375rem; top: 0.7rem; bottom: 0.7rem; border-left: var(--hair) solid var(--ink); }
.fork__row { position: relative; margin: 0; font-size: var(--fs-body); line-height: 1.4; }
.fork__row .node { position: absolute; left: -1.5rem; top: 0.4em; }

/* Service stops: symptom on the pink end, service name on the yellow-green end */
.stops { list-style: none; margin: 0 0 1.1rem; padding: 0; border-top: var(--hair) solid var(--ink); }
.stops li {
  display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.75rem;
  padding: 0.7rem 0; border-bottom: var(--hair) solid var(--ink); align-items: baseline;
}
.stops .node { align-self: center; }
.stops a { font-size: var(--fs-body); }
.stops__note { grid-column: 2; font-size: var(--fs-small); line-height: 1.45; }

/* Numbered stops for the service area */
.zones { list-style: none; margin: 0; padding: 0; border-top: var(--hair) solid var(--ink); }
.zones li {
  display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center;
  padding: 0.85rem 0; border-bottom: var(--hair) solid var(--ink); font-size: var(--fs-body);
}
.zones__n {
  width: 2rem; height: 2rem; display: grid; place-items: center;
  border: var(--hair) solid var(--volt); font-family: var(--display); font-stretch: 150%; font-weight: 500;
}
.confirm { font-size: var(--fs-h3); line-height: 1.3; font-family: var(--display); font-stretch: 130%; font-weight: 500; }

/* Service area: both columns start on one line, the block sits tight */
.station--area { padding-block: clamp(2.5rem, 6vh, 4.25rem); }
.split--area { align-items: start; }
.split--area .title { margin-top: 0; margin-bottom: 0.5em; }
.split--area .split__text > p:first-of-type { margin-top: 0; }
@media (min-width: 56em) {
  .split--area { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(1.25rem, 3vw, 3rem); }
  .split--area .zones { align-self: start; }
}

/* Before you call */
.check { margin: 0 0 1.1rem; }
.check__call { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin: 0 0 1.1rem; }
.check__num { font-family: var(--text); font-size: var(--fs-body); line-height: 1.4; }
.next-inline { display: inline-flex; align-items: center; min-height: 2.75rem; }

@media (max-width: 55.99em) {
  .split__fig { max-width: 100%; }
}
