/* ---------- For your business ("Para tu negocio", piece "business") ----------
   Uses only the tokens in site.css (:root), so light and dark themes come for free.
   The section is an editor's bin browser: three bins (tabs, numbered like tracks, the open one
   lit with the tally red), and inside each bin a "program monitor" still of the matching sample
   (viewfinder marks, a blinking tally dot, a playhead running along a scrub bar) next to a shot
   list of four videos with their running times. Switching bins is a hard cut: the monitor wipes in.
   Without scripts (html:not(.js)) the tab row is hidden and the three bins stack.
   site.css's reduced-motion rule switches every animation here off. */

/* ---- Tab row: one bin per trade ---- */
.biz__tabs { display: none; }
.js .biz__tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 0 0 22px; }
.biz__tab {
  position: relative; display: grid; align-content: start; justify-items: start; gap: 3px;
  min-width: 0; min-height: 76px; padding: 14px 10px 12px; text-align: left; cursor: pointer;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 2px;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
/* the tally light: a red bar on top of the open bin */
.biz__tab::before {
  content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 4px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.biz__tab:hover { border-color: var(--ink); }
.biz__tab:hover::before { transform: scaleX(.18); }
.biz__tab.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.biz__tab.is-on::before { transform: scaleX(1); }
.biz__tabno {
  font-family: var(--f-mono); font-stretch: 87.5%; font-size: .75rem; font-weight: 600; letter-spacing: .04em;
  color: var(--accent-ink); font-variant-numeric: tabular-nums;
}
.biz__tab.is-on .biz__tabno { color: inherit; opacity: .7; }
.biz__tabname {
  font-family: var(--f-display); font-stretch: 66%; font-weight: 850; text-transform: uppercase;
  /* "PELUQUERÍA" is about 4.9em wide: sized to fit one third of the phone width, 320 px up */
  font-size: clamp(.85rem, calc((100vw - 106px) / 15.4), 2rem); line-height: .95; letter-spacing: .005em;
  max-width: 100%; overflow-wrap: anywhere;
}
.biz__tabsub { font-size: .8125rem; line-height: 1.2; color: var(--ink-2); }
.biz__tab.is-on .biz__tabsub { color: inherit; opacity: .78; }
@media (min-width: 760px) {
  .js .biz__tabs { gap: 6px; margin-bottom: 28px; }
  .biz__tab { padding: 16px 16px 14px; min-height: 92px; }
  .biz__tabsub { font-size: .875rem; }
}

/* ---- The bins ---- */
.biz__bins { display: grid; gap: 56px; }
.js .biz__bin:not(.is-on) { display: none; }
.biz__bin { display: grid; gap: 22px; align-items: start; min-width: 0; }
.biz__body { min-width: 0; }
@media (min-width: 760px) {
  .biz__bin { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 36px; }
}
@media (min-width: 1000px) {
  .biz__bin { gap: 56px; }
}

/* ---- Program monitor: the sample still, alive ---- */
.biz__monitor {
  --m: rgba(255, 255, 255, .85);
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--screen); color: #fff; border: 1.5px solid var(--ink);
  font-family: var(--f-mono); font-stretch: 87.5%; font-size: .75rem; font-weight: 500; letter-spacing: .03em;
}
.biz__monitor img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform-origin: 62% 42%; animation: biz-push 14s ease-in-out infinite alternate;
}
/* viewfinder corner marks, like the hero player */
.biz__monitor::before {
  content: ""; position: absolute; inset: 10px 10px 16px; z-index: 1; pointer-events: none;
  background:
    linear-gradient(var(--m) 0 0) top left / 14px 1.5px, linear-gradient(var(--m) 0 0) top left / 1.5px 14px,
    linear-gradient(var(--m) 0 0) top right / 14px 1.5px, linear-gradient(var(--m) 0 0) top right / 1.5px 14px,
    linear-gradient(var(--m) 0 0) bottom left / 14px 1.5px, linear-gradient(var(--m) 0 0) bottom left / 1.5px 14px,
    linear-gradient(var(--m) 0 0) bottom right / 14px 1.5px, linear-gradient(var(--m) 0 0) bottom right / 1.5px 14px;
  background-repeat: no-repeat;
}
/* shade top and bottom so the HUD text reads on any frame */
.biz__monitor::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(rgba(0, 0, 0, .45), transparent 26%, transparent 62%, rgba(0, 0, 0, .6));
}
.biz__hud { position: absolute; z-index: 2; line-height: 1; white-space: nowrap; text-shadow: 0 1px 2px rgba(0, 0, 0, .8); }
.biz__hud--tl { top: 17px; left: 18px; display: inline-flex; align-items: center; gap: 7px; max-width: calc(100% - 80px); overflow: hidden; text-overflow: ellipsis; }
.biz__hud--tr { top: 17px; right: 18px; }
.biz__rec { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #FF4B2F; box-shadow: 0 0 6px rgba(255, 75, 47, .8); animation: biz-tally 1.4s steps(1, end) infinite; }
.biz__flag {
  position: absolute; z-index: 2; left: 18px; bottom: 22px; padding: 4px 6px 3px; border-radius: 2px;
  background: rgba(11, 12, 13, .78); color: #ECEBE7; line-height: 1.2; white-space: nowrap;
}
.biz__scrub { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 6px; background: rgba(11, 12, 13, .85); }
.biz__scrub::before {   /* the part already played */
  content: ""; position: absolute; inset: 0; background: rgba(255, 75, 47, .55);
  transform-origin: left; animation: biz-played 9s linear infinite;
}
.biz__head {             /* the playhead */
  position: absolute; top: -5px; bottom: 0; left: 0; width: 2px; background: #FF4B2F;
  animation: biz-scrub 9s linear infinite;
}
.biz__monitor:hover img { animation-play-state: paused; }
/* wider screens: the monitor stays in view while the shot list scrolls past it
   (after the base rule above, which sets position: relative) */
@media (min-width: 760px) {
  .biz__monitor { position: sticky; top: calc(var(--bar-h) + var(--ruler-h) + 20px); }
}
@keyframes biz-push { from { transform: scale(1); } to { transform: scale(1.09) translate(-1.2%, .8%); } }
@keyframes biz-tally { 0% { opacity: 1; } 50% { opacity: .25; } }
@keyframes biz-scrub { from { left: 0; } to { left: calc(100% - 2px); } }
@keyframes biz-played { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---- Bin text ---- */
.biz__title {
  font-family: var(--f-display); font-stretch: 68%; font-weight: 830; text-transform: uppercase;
  font-size: clamp(1.75rem, 6.4vw, 2.75rem); line-height: .93; letter-spacing: 0; margin: 0 0 12px;
  text-wrap: balance;
}
.biz__lead { color: var(--ink-2); margin: 0 0 18px; max-width: 46ch; font-size: 1.0625rem; }

/* the shot list: number, idea, running time */
.biz__ideas { list-style: none; margin: 0; padding: 0; counter-reset: idea; border-top: 1.5px solid var(--ink); }
.biz__ideas li {
  counter-increment: idea; display: grid; grid-template-columns: 2.3em minmax(0, 1fr) auto; gap: 0 10px;
  align-items: baseline; padding: 12px 0; border-bottom: 1px dashed var(--line-strong); font-size: .98rem;
}
.biz__ideas li::before {
  content: counter(idea, decimal-leading-zero);
  font-family: var(--f-mono); font-stretch: 87.5%; font-size: .8125rem; font-weight: 600;
  color: var(--accent-ink); font-variant-numeric: tabular-nums;
}
.biz__idea { color: var(--ink-2); min-width: 0; }
.biz__idea b { color: var(--ink); font-weight: 700; }
.biz__dur {
  font-family: var(--f-mono); font-stretch: 87.5%; font-size: .75rem; font-weight: 500; letter-spacing: .02em;
  padding: 3px 6px 2px; border: 1px solid var(--line-strong); border-radius: 2px; color: var(--ink-2);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}

.biz__see { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 20px 0 0; }
.biz__go { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--accent-ink); text-underline-offset: 3px; }
.biz__play {
  flex: none; position: relative; width: 30px; height: 30px; border-radius: 50%; background: var(--accent);
  transition: transform .18s ease;
}
.biz__play::after {
  content: ""; position: absolute; left: 11px; top: 9px;
  border-left: 10px solid var(--on-accent); border-top: 6px solid transparent; border-bottom: 6px solid transparent;
}
.biz__go:hover .biz__play { transform: scale(1.1); }
.biz__also { color: var(--ink-2); }
.biz__also a { color: var(--ink); font-weight: 650; text-underline-offset: 3px; }
/* The link to the trade's own page ("Más ideas para ... →"), under the sample link */
.biz__local { margin: 4px 0 0; }
.biz__local a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-weight: 700; color: var(--ink); text-underline-offset: 3px;
}
.biz__local a:hover { color: var(--accent-ink); }
.biz__local .arrow { flex: none; color: var(--accent-ink); }

.biz__other { margin: 52px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-2); max-width: 64ch; }
.biz__other b { color: var(--ink); font-weight: 650; }
.biz__other a { color: var(--accent-ink); font-weight: 650; text-underline-offset: 3px; }

/* ---- A hard cut when another bin opens (business.js sets data-cut for one run) ---- */
.biz__bin[data-cut] .biz__monitor { animation: biz-wipe .42s cubic-bezier(.2, .75, .2, 1) both; }
.biz__bin[data-cut] .biz__title,
.biz__bin[data-cut] .biz__lead,
.biz__bin[data-cut] .biz__ideas li { animation: biz-in .36s ease-out both; }
.biz__bin[data-cut] .biz__lead { animation-delay: .04s; }
.biz__bin[data-cut] .biz__ideas li:nth-child(1) { animation-delay: .08s; }
.biz__bin[data-cut] .biz__ideas li:nth-child(2) { animation-delay: .12s; }
.biz__bin[data-cut] .biz__ideas li:nth-child(3) { animation-delay: .16s; }
.biz__bin[data-cut] .biz__ideas li:nth-child(4) { animation-delay: .20s; }
@keyframes biz-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes biz-in { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }

/* ---- A sample card reached from here blinks its outline once, so the eye finds it ---- */
@keyframes biz-flash { 0%, 45% { outline-color: var(--accent); } 100% { outline-color: transparent; } }
.sample[data-biz-flash] { outline: 2px solid transparent; outline-offset: 10px; animation: biz-flash 1.8s ease-out; }

/* ---------- Payment: the A1 track under the process clips (pay-track.html) ----------
   Same frame as a .clip (paper, hairline, an ink head strip), but the head carries an audio
   waveform in tally red, so it reads as the track that runs under the three video steps. */
.paytrack { display: grid; margin-top: 10px; background: var(--paper); border: 1px solid var(--line); }
.paytrack__head {
  position: relative; display: flex; align-items: center; gap: 10px; margin: 0; min-height: 40px; padding: 8px 12px;
  overflow: hidden; background: var(--ink); color: var(--paper);
  font-family: var(--f-mono); font-stretch: 87.5%; font-size: .75rem; font-weight: 500; letter-spacing: .02em;
}
.paytrack__head > span { position: relative; z-index: 1; }
.paytrack__head > span:first-child { padding: 1px 5px; border: 1px solid currentColor; }
.paytrack__wave { position: absolute; top: 6px; bottom: 6px; right: 10px; width: min(62%, 320px); height: calc(100% - 12px); color: var(--accent); }
.paytrack__body { padding: 18px 20px 22px; }
.paytrack__body .h3 { margin-bottom: 8px; }
.paytrack__body p { margin: 0; color: var(--ink-2); max-width: 62ch; }
.paytrack__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; }
.paytrack__tags li {
  padding: 4px 8px 3px; border: 1px solid var(--line-strong); border-radius: 2px; color: var(--ink);
  font-family: var(--f-mono); font-stretch: 87.5%; font-size: .75rem; font-weight: 500; letter-spacing: .02em;
}
@media (min-width: 900px) {
  /* side by side, the head a short track label on the left like a timeline's track header */
  .paytrack { margin-top: 4px; grid-template-columns: minmax(180px, 3fr) minmax(0, 7fr); }
  .paytrack__head { align-items: flex-start; padding: 12px; }
  .paytrack__wave { top: auto; bottom: 12px; left: 12px; right: 12px; width: auto; height: 34px; }
  .paytrack__body { padding: 20px 24px 22px; }
}

/* ---------- Other trades (#ideas): the shot list that used to be its own section ----------
   Sits under the bins; calm.css draws its ideas as clip tags in a bin. */
.biz__more { margin: 52px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.biz__more-title {
  margin: 0 0 8px; font-family: var(--f-display); font-stretch: 68%; font-weight: 830; text-transform: uppercase;
  font-size: clamp(1.6rem, 5.6vw, 2.4rem); line-height: .93; letter-spacing: 0; text-wrap: balance;
}
.biz__more-sub { margin: 0 0 22px; color: var(--ink-2); max-width: 52ch; }
.biz__more .shotlist li { background: var(--paper); }
.biz__more + .biz__other { margin-top: 36px; }
@media (min-width: 1000px) {
  .biz__more { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 56px; align-items: start; }
  .biz__more-title, .biz__more-sub { grid-column: 1; }
  .biz__more .shots { grid-column: 2; grid-row: 1 / span 3; }
}
