/* Mikey Pipes It, v4: Big Mike and the trade's own colours.
   PVC white, primer purple, gas-valve yellow, black iron, and the orange of his hoodie. */

@font-face { font-family: "TikTok Sans"; src: url("../fonts/tiktoksans-var-latin.woff2") format("woff2"); font-weight: 300 900; font-stretch: 75% 150%; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "TikTok Sans"; src: url("../fonts/tiktoksans-var-latin-ext.woff2") format("woff2"); font-weight: 300 900; font-stretch: 75% 150%; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ground: #F4F4F1;
  --pvc: #FFFFFF;
  --tone: #E7E7E2;
  --ink: #1B1B1D;
  --muted: #5D5A56;
  --orange: #FF6B1F;
  --purple: #6A3FA0;
  --yellow: #FFD21F;

  --bg: var(--ground);
  --surface: transparent;
  --accent: var(--ink);
  --accent-ink: #FFFFFF;

  --font-display: "TikTok Sans", system-ui, sans-serif;
  --font-text: "TikTok Sans", system-ui, sans-serif;
  --step-small: 1rem;
  --margin: clamp(1rem, 2.2vw, 2rem);
  --section: clamp(4.5rem, 9vw, 9rem);
  --radius: 28px;
  --top: 68px;
}

html { scroll-padding-top: calc(var(--top) + 12px); }
html, body { overflow-x: clip; }
img { background: none; }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; }
h3 { font-size: var(--step-lead); line-height: 1.15; }
.head { line-height: 1.02; }
b { font-weight: 700; }
figure { margin: 0; }

.skip { position: absolute; left: var(--margin); top: 12px; z-index: 80; background: var(--yellow); color: var(--ink); padding: 10px 14px; border-radius: 999px; clip-path: inset(50%); }
.skip:focus { clip-path: none; }

/* one button shape: a short length of pipe */
.button { min-height: 3.25rem; padding: 0 1.5rem; border-radius: 999px; font-weight: 700; }
.button-2 { background: var(--pvc); color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background-color: var(--purple); color: #fff; }
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; max-width: none; }

/* ---------- header ---------- */
.top { position: fixed; z-index: 60; left: 0; right: 0; top: 0; height: var(--top); display: flex; align-items: center; gap: 2rem; padding: 0 var(--margin); background: var(--ground); }
.mark { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; text-decoration: none; font-weight: 900; font-stretch: 125%; text-transform: uppercase; }
.mark-sign { display: inline-flex; align-items: center; background: var(--orange); border-radius: 999px; padding: 8px 14px; }
.mark-sign img { height: 28px; width: auto; }
.nav { display: flex; gap: 1.75rem; margin-left: auto; font-weight: 600; }
.top .button { min-height: 2.75rem; padding: 0 1.25rem; }

/* ---------- hero: the sign board and Big Mike ---------- */
.hero { position: relative; }
.stage { position: relative; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); padding: calc(var(--top) + 4px) var(--margin) var(--margin); overflow: clip; }
.board { position: relative; z-index: 1; background: var(--orange); border-radius: var(--radius); overflow: hidden; container-type: inline-size; display: flex; flex-direction: column; }
.sign-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.has3d .sign-canvas { display: block; }
/* the sign is as wide as the board allows, but never so tall that a short screen loses the buttons */
.sign-slot { position: absolute; left: 5cqw; top: 4.5cqw; width: min(90cqw, 96svh); aspect-ratio: 22.04 / 6.64; }
.sign-still { width: 100%; height: 100%; object-fit: contain; }
.has3d .sign-still { visibility: hidden; }
.board-copy { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; margin-top: calc(4.5cqw + min(27.1cqw, 28.9svh) + 1.6cqw); padding: 0 5cqw 4.5cqw; }
.wordmark { font-size: min(18.2cqw, 19.4svh); font-weight: 900; font-stretch: 125%; text-transform: uppercase; line-height: 0.86; letter-spacing: -0.02em; white-space: nowrap; transition: opacity 300ms ease; }
.wm-mikey { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.says { display: grid; gap: 28px; margin-top: 28px; }
.say h2 { font-size: var(--step-head); line-height: 1.02; margin-bottom: 12px; }
.say .lead { max-width: 34ch; font-weight: 500; }
.say .actions { margin-top: 18px; }

.mike-fig { position: relative; z-index: 3; min-width: 0; pointer-events: none; align-self: start; height: calc(100svh - var(--top) - 4px - var(--margin)); }
.mike-fig img { position: absolute; right: 0; bottom: calc(var(--margin) * -1); height: 102%; width: auto; max-width: none; }

/* the scroll sequence: the stage holds still while the sign turns and the captions change.
   Very short screens (a phone on its side) skip it and read as a normal page. */
@media (prefers-reduced-motion: no-preference) and (min-height: 561px) {
  .js .hero { height: 300vh; }
  .js .stage { position: sticky; top: 0; height: 100svh; }
  .js .says { position: relative; display: block; margin-top: auto; min-height: 12.5rem; }
  .js .say { position: absolute; left: 0; right: 0; bottom: 0; opacity: 0; visibility: hidden; transform: translateY(16px); transition: opacity 320ms ease, transform 520ms var(--ease-out), visibility 0s linear 320ms; }
  .js .stage[data-beat="intro"] .say[data-say="intro"],
  .js .stage[data-beat="pvc"] .say[data-say="pvc"],
  .js .stage[data-beat="gas"] .say[data-say="gas"],
  .js .stage[data-beat="mike"] .say[data-say="mike"] { opacity: 1; visibility: visible; transform: none; transition: opacity 320ms ease 120ms, transform 520ms var(--ease-out) 120ms, visibility 0s; }
  .js .stage[data-beat="pvc"] .wordmark,
  .js .stage[data-beat="gas"] .wordmark { opacity: 0; }
  .js .mike-fig img { animation: mike-in 900ms var(--ease-expo) 250ms both; }
}
@keyframes mike-in { from { opacity: 0; transform: translateY(5%); } to { opacity: 1; transform: none; } }

/* ---------- the film ---------- */
.film, .fixes { padding: var(--section) var(--margin) 0; }
.film-head, .fixes-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; margin-bottom: 40px; }
.film-head h2, .fixes-head h2 { grid-column: 1 / 7; }
.film-head .lead, .fixes-head .lead { grid-column: 8 / 13; max-width: none; }
.screen { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--ink); }
.film-video { width: 100%; height: 100%; object-fit: cover; background: var(--ink); cursor: pointer; }
.film-toggle { position: absolute; left: 20px; bottom: 20px; background: var(--pvc); color: var(--ink); }

/* ---------- what Mike fixes: pick a pipe ---------- */
.pipes { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.pipe-tab { display: inline-flex; align-items: center; gap: 12px; min-height: 3.5rem; padding: 0 1.5rem 0 0.9rem; border-radius: 999px; background: var(--tone); color: var(--ink); font-weight: 700; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease; }
.pipe-tab:active { transform: scale(0.97); }
.pipe-tab[aria-selected="true"] { background: var(--ink); color: #fff; }
@media (hover: hover) and (pointer: fine) { .pipe-tab:not([aria-selected="true"]):hover { background: var(--yellow); } }
.swatch { position: relative; flex: none; width: 44px; height: 22px; border-radius: 999px; }
.t-water .swatch { background: var(--orange); }
.t-drains .swatch { background: var(--pvc); }
.t-drains .swatch::after { content: ""; position: absolute; left: 24px; top: 0; bottom: 0; width: 8px; background: var(--purple); }
.t-gas .swatch { background: #3A3A3F; }
.t-gas .swatch::after { content: ""; position: absolute; left: 12px; top: -4px; width: 22px; height: 9px; border-radius: 999px; background: var(--yellow); }

.fix-panel { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; }
.fix-panel + .fix-panel { margin-top: 56px; }
.js .fix-panel[hidden] { display: none; }
.js .fix-panel + .fix-panel { margin-top: 0; }
.fix-pic { grid-column: 1 / 8; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; }
.fix-pic img, .about-pic img, .how-pic img, .call-pic img, .q-pic img { width: 100%; height: 100%; object-fit: cover; }
.fix-text { grid-column: 8 / 13; }
.fix-text h3 { margin-bottom: 14px; }
.first-move { background: var(--yellow); border-radius: var(--radius); padding: 16px 22px; margin-bottom: 24px; max-width: none; }
.items { display: grid; gap: 12px; }
.items li { display: grid; gap: 1px; }
.items span { font-size: var(--step-small); color: var(--muted); }

/* ---------- Big guy, small spaces ---------- */
.about { padding: var(--section) var(--margin) 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: center; }
.about-text { grid-column: 1 / 6; grid-row: 1; display: grid; gap: 22px; justify-items: start; }
.about-pic { grid-column: 6 / 13; grid-row: 1; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; }
.about-note { background: var(--pvc); border-radius: var(--radius); padding: 22px 26px; }
.about-note h3 { margin-bottom: 8px; }

/* ---------- how a call goes: one run of pipe, a primer ring at every step ---------- */
.how { margin-top: var(--section); padding: calc(var(--section) * 0.8) var(--margin); background: var(--purple); color: #fff; }
.how h2 { margin-bottom: 36px; }
.how-pic { aspect-ratio: 2 / 1; border-radius: var(--radius); overflow: hidden; margin-bottom: 44px; }
.how-pic img { object-position: 50% 12%; }
.how .run { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gutter); margin: 0; padding: 50px 0 0; list-style: none; }
.run::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 24px; border-radius: 999px; background: var(--pvc); }
.run li { position: relative; }
.run li::before { content: ""; position: absolute; left: 0; top: -50px; width: 14px; height: 24px; background: var(--yellow); }
.run li:first-child::before { left: 26px; }
.run h3 { margin-bottom: 8px; }
.run p { max-width: 30ch; }

/* ---------- questions ---------- */
.questions { padding: var(--section) var(--margin) 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; }
.q-side { grid-column: 1 / 5; }
.q-pic { margin-top: 28px; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--purple); }
.q-list { grid-column: 6 / 13; display: grid; gap: 10px; }
.q { background: var(--pvc); border-radius: var(--radius); }
.q summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 26px; font-size: var(--step-lead); font-weight: 700; line-height: 1.2; cursor: pointer; list-style: none; }
.q summary::-webkit-details-marker { display: none; }
/* the yellow shut-off: across is closed, in line is open */
.q summary::after { content: ""; flex: none; width: 40px; height: 16px; border-radius: 999px; background: var(--yellow); transition: transform 320ms var(--ease-out); }
.q[open] summary::after { transform: rotate(90deg); }
.q p { padding: 0 26px 24px; max-width: 56ch; }
details:not([open]) > :not(summary) { display: none; }

/* ---------- call ---------- */
.call { padding: var(--section) var(--margin); }
.call-board { background: var(--orange); border-radius: var(--radius); padding: clamp(24px, 4vw, 60px); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: center; }
.call-copy { grid-column: 1 / 7; display: grid; gap: 18px; justify-items: start; }
.call-copy .lead { max-width: 30ch; font-weight: 500; }
.tel { font-size: clamp(2.5rem, 0.4rem + 4.6vw, 4.9rem); font-weight: 900; font-stretch: 112%; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; text-decoration: none; }
.area { font-weight: 600; }
.call-pic { grid-column: 7 / 13; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #fff; padding: 44px var(--margin) 36px; }
.foot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; padding: 0; list-style: none; }
.foot-note { margin-top: 28px; max-width: none; font-size: var(--step-small); color: #C9C7C2; }

/* ---------- tablet and phone ---------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .top .button { margin-left: auto; }
}

@media (max-width: 900px) {
  .stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); padding-bottom: 0; }
  .board-copy { flex: none; }
  .says { margin-top: 20px; }
  .mike-fig { align-self: stretch; height: auto; min-height: 320px; }
  .mike-fig img { right: 2%; bottom: -22%; height: 124%; }
  .film-head, .fixes-head { display: block; margin-bottom: 28px; }
  .film-head .lead, .fixes-head .lead { margin-top: 14px; max-width: 46ch; }
  .fix-panel, .about, .questions, .call-board { display: block; }
  .fix-text, .about-pic, .q-list { margin-top: 28px; }
  .about-text { gap: 18px; }
  .how-pic { aspect-ratio: 16 / 10; }
  .how .run { grid-template-columns: minmax(0, 1fr); row-gap: 30px; padding: 0 0 0 48px; }
  .run::before { right: auto; bottom: 0; width: 24px; height: auto; }
  .run li::before { left: -48px; top: 6px; width: 24px; height: 14px; }
  .run li:first-child::before { left: -48px; top: 26px; }
  .run p { max-width: 46ch; }
  .q-pic { display: none; }
  .call-pic { margin-top: 28px; aspect-ratio: 4 / 3; }
}

/* narrow desktops: a slightly smaller Mike, so his pipes stop short of the Y */
@media (min-width: 901px) and (max-width: 1200px) {
  .mike-fig img { height: 88%; right: -4%; }
}

/* tablet: a bigger Mike, from the waist up, fills the space under the board */
@media (min-width: 701px) and (max-width: 900px) {
  .mike-fig img { right: 3%; bottom: -92%; height: 192%; }
}

@media (max-width: 900px) and (prefers-reduced-motion: no-preference) and (min-height: 561px) {
  .js .says { min-height: 15rem; }
}

@media (max-width: 700px) {
  :root { --top: 60px; --radius: 22px; }
  .mark-sign { padding: 7px 12px; }
  .mark-sign img { height: 22px; }
  .top .button { min-height: 2.75rem; padding: 0 1.1rem; }
  .say .lead { max-width: none; }
  .actions .button { flex: 1 1 auto; }
  .film-toggle { left: 12px; bottom: 12px; min-height: 2.75rem; padding: 0 1.1rem; }
  .pipe-tab { min-height: 3.25rem; padding: 0 1.1rem 0 0.7rem; gap: 10px; }
  .swatch { width: 34px; height: 18px; }
  .t-drains .swatch::after { left: 18px; width: 7px; }
  .t-gas .swatch::after { left: 8px; width: 18px; height: 8px; }
  .q summary { padding: 18px 20px; }
  .q p { padding: 0 20px 20px; }
  .tel { font-size: 10.4vw; }
}

@media (max-width: 380px) {
  .top { gap: 0.75rem; }
  .mark { gap: 8px; }
  .mark-sign { padding: 6px 10px; }
  .mark-sign img { height: 18px; }
  .top .button { padding: 0 0.9rem; }
}
