/* Business page: hero pair of brand tiles, one tinted story card per business, the profit-and-loss account,
   closing block, and the "Plan your tattoos" sheet. Sibling of the apps page: same card grammar, own details. */

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

[data-biz='weekendink'] { --tint: #E8ECF3; --accent: #3A4A6B; --chip: #FFFFFF; }
[data-biz='clothing']   { --tint: #F4EFE7; --accent: #87603D; --chip: #FFFDF9; }

/* ---------- Hero ---------- */
.biz-hero { padding: calc(var(--nav-h) + clamp(64px, 9vw, 120px)) 0 clamp(72px, 9vw, 128px); text-align: center; }
.biz-hero h1 { font-size: var(--t-hero); letter-spacing: -0.045em; }
.biz-hero .lead { max-width: 27em; margin: clamp(18px, 2vw, 26px) auto 0; color: var(--text); }

.pair { display: flex; justify-content: center; gap: clamp(28px, 6vw, 88px); margin-top: clamp(64px, 8vw, 104px); perspective: 900px; }
.tile { display: flex; flex-direction: column; align-items: center; border-radius: 30px; -webkit-tap-highlight-color: transparent; animation: tile-pop 0.95s var(--spring) both; animation-delay: calc(240ms + var(--i) * 110ms); }
.tile .app-icon { --s: clamp(118px, 15vw, 196px); box-shadow: 0 0 0 1px rgba(35, 43, 61, 0.05), 0 26px 44px -22px rgba(35, 43, 61, 0.45); transform: rotate(var(--rest)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.7s var(--spring), box-shadow 0.5s; will-change: transform; }
.tile.wi { --rest: -6deg; }
.tile.cl { --rest: 5deg; }
.tile .app-icon svg { width: 100%; height: 100%; }
.tile .nm { margin-top: clamp(18px, 2vw, 26px); font-size: clamp(16px, 1.4vw, 19px); font-weight: 900; color: var(--ink); letter-spacing: -0.02em; }
.tile .what { margin-top: 2px; font-size: clamp(14px, 1.1vw, 15px); font-weight: 700; color: var(--muted); }
.tile:focus-visible { outline-offset: 8px; }
@media (hover: hover) {
  .tile:hover .app-icon { --rest: 0deg; transform: translateY(-8px) scale(1.04) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); box-shadow: 0 0 0 1px rgba(35, 43, 61, 0.05), 0 34px 54px -24px rgba(35, 43, 61, 0.5); transition-duration: 0.7s, 0.5s; }
  .tile.tracking .app-icon { transition-duration: 0.18s, 0.5s; }
}
.tile:active .app-icon { transform: rotate(var(--rest)) scale(0.95); transition-duration: 0.12s; }
@keyframes tile-pop { from { opacity: 0; transform: translateY(34px) scale(0.72); } to { opacity: 1; transform: none; } }

/* ---------- One story card per business ---------- */
.biz-stack { padding: 0 clamp(10px, 2vw, 24px); }
.anchor { display: block; height: 0; scroll-margin-top: 4px; }
.biz { margin: 0 auto clamp(12px, 2vw, 24px); max-width: 1240px; }
.biz-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.14fr); align-items: center; gap: clamp(36px, 5vw, 72px); padding: clamp(28px, 5vw, 68px); border-radius: clamp(30px, 3.6vw, 48px); background: var(--tint); }
.flip .biz-text { order: 2; }

.biz-id { display: flex; align-items: center; gap: 14px; margin-bottom: clamp(22px, 2.4vw, 30px); }
.biz-id .app-icon { --s: 60px; }
.biz-id .app-icon svg { width: 100%; height: 100%; }
.biz-id b { display: block; font-size: 20px; font-weight: 900; color: var(--ink); letter-spacing: -0.025em; line-height: 1.2; }
.biz-id span:not(.app-icon) { display: block; font-size: 15px; font-weight: 800; color: var(--accent); }

.biz h2 { font-size: clamp(32px, 3.9vw, 50px); }
.biz .lead { margin-top: clamp(16px, 1.6vw, 22px); color: var(--text); }
.biz .more { margin-top: 12px; font-weight: 600; color: var(--muted); }
.biz-demo { border-radius: var(--r-xl); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7), var(--shadow-2); }

/* Weekend Ink: idea → design → worn, three steps on a hairline */
.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: clamp(26px, 2.8vw, 34px) 0; padding: 18px 0 0; border-top: 1px solid rgba(35, 43, 61, 0.1); list-style: none; }
.flow li { position: relative; padding: 0 14px 0 18px; }
.flow li:first-child { padding-left: 0; }
.flow li + li::before { content: ''; position: absolute; left: -4px; top: 8px; width: 9px; height: 9px; border-top: 2px solid var(--faint); border-right: 2px solid var(--faint); border-radius: 0 2px 0 0; transform: rotate(45deg); }
.flow b { display: block; font-size: clamp(17px, 1.6vw, 21px); font-weight: 900; color: var(--ink); letter-spacing: -0.03em; line-height: 1.15; }
.flow span { display: block; margin-top: 4px; font-size: 14px; font-weight: 700; color: var(--muted); line-height: 1.3; text-wrap: balance; }

/* Clothing: the five jobs behind every piece */
.jobs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: clamp(26px, 2.8vw, 34px) 0 0; padding: 22px 0 0; border-top: 1px solid rgba(35, 43, 61, 0.1); list-style: none; text-align: center; }
.jobs li { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.jobs .ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--chip); box-shadow: 0 0 0 1px rgba(35, 43, 61, 0.05), 0 6px 14px -8px rgba(59, 42, 26, 0.35); color: var(--accent); }
.jobs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.jobs b { font-size: 14px; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; line-height: 1.2; hyphens: manual; -webkit-hyphens: manual; }

/* Steps pop in once their card has revealed */
@media (prefers-reduced-motion: no-preference) {
  html.js .biz-card .flow li, html.js .biz-card .jobs li { opacity: 0; transform: translateY(12px) scale(0.92); transition: opacity 0.5s ease, transform 0.8s var(--spring); transition-delay: calc(450ms + var(--k, 0) * 90ms); }
  html.js .biz-card.in .flow li, html.js .biz-card.in .jobs li { opacity: 1; transform: none; }
  .flow li:nth-child(2), .jobs li:nth-child(2) { --k: 1; }
  .flow li:nth-child(3), .jobs li:nth-child(3) { --k: 2; }
  .jobs li:nth-child(4) { --k: 3; }
  .jobs li:nth-child(5) { --k: 4; }
}

@media (max-width: 860px) {
  .biz-card { grid-template-columns: minmax(0, 1fr); }
  .flip .biz-text { order: 0; }
  .biz-demo, .biz-demo .scene { border-radius: calc(var(--r-xl) - 6px); }
}
@media (max-width: 480px) {
  .biz-card { padding: 26px 20px 20px; }
  .biz h2 { font-size: 34px; }
  .biz .lead { font-size: 19px; }
  .flow { grid-template-columns: minmax(0, 1fr); padding-top: 4px; }
  .flow li, .flow li:first-child { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; }
  .flow li + li { border-top: 1px solid rgba(35, 43, 61, 0.07); }
  .flow li + li::before { display: none; }
  .flow b { flex: none; width: 7.2em; font-size: 16px; }
  .flow span { margin: 0; font-size: 14px; }
  .jobs { gap: 4px; }
  .jobs .ic { width: 44px; height: 44px; border-radius: 14px; }
  .jobs b { font-size: 13px; }
  .biz .btn { width: 100%; }
}

/* ---------- What running it teaches me ---------- */
.ledger { padding: clamp(96px, 12vw, 168px) 0 clamp(40px, 5vw, 64px); }
.ledger-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: 'head acct' 'list acct'; column-gap: clamp(40px, 6vw, 96px); row-gap: clamp(36px, 4vw, 52px); align-items: start; }
.ledger-head { grid-area: head; }
.ledger h2 { font-size: var(--t-h2); }
.ledger .lead { margin-top: clamp(16px, 1.6vw, 22px); color: var(--text); }
.lessons { grid-area: list; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(26px, 3vw, 36px) clamp(24px, 3vw, 40px); margin: 0; padding: clamp(26px, 3vw, 34px) 0 0; border-top: 1px solid var(--line); list-style: none; }
.lessons h3 { font-size: 19px; letter-spacing: -0.025em; }
.lessons p { margin-top: 6px; font-weight: 600; color: var(--muted); hyphens: manual; -webkit-hyphens: manual; }
:lang(de) .biz-card p, :lang(de) .ledger .lead { hyphenate-limit-chars: 10 4 4; }

/* The account: a handwritten T-account, drawn when it scrolls in */
.taccount { grid-area: acct; align-self: center; margin: 0; padding: clamp(28px, 3.4vw, 44px) clamp(24px, 3vw, 40px) clamp(30px, 3.4vw, 42px); }
.taccount figcaption { font-size: 15px; font-weight: 800; color: var(--muted); text-align: center; }
.t { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 18px; }
.side { display: flex; flex-direction: column; padding: 0 clamp(14px, 2vw, 26px) 0 0; }
.side.cr { padding: 0 0 0 clamp(14px, 2vw, 26px); }
.col { display: block; padding-bottom: 12px; font-size: 18px; font-weight: 900; color: var(--ink); letter-spacing: -0.02em; text-align: center; }
.side ul { margin: 16px 0 0; padding: 0; list-style: none; }
.side li { font-family: var(--hand); font-size: clamp(22px, 1.9vw, 26px); font-weight: 600; line-height: 1.1; color: var(--ink); letter-spacing: 0; padding: 5px 0; hyphens: manual; -webkit-hyphens: manual; }
.side li.profit { margin-top: 10px; padding-top: 12px; border-top: 2px solid var(--ink); color: var(--blue); font-weight: 700; }
.note { margin-top: 2px; font-family: var(--hand); font-size: clamp(18px, 1.6vw, 21px); font-weight: 500; line-height: 1.1; color: var(--peri); letter-spacing: 0; transform: rotate(-3deg); transform-origin: 0 50%; }
.sum { display: block; margin-top: auto; padding-top: 18px; }
.sum::after { content: ''; display: block; height: 6px; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.bar { position: absolute; background: var(--ink); border-radius: 2px; }
.bar.h { left: 0; right: 0; top: 40px; height: 2.5px; transform-origin: 0 50%; }
.bar.v { left: calc(50% - 1.25px); top: 40px; bottom: 0; width: 2.5px; transform-origin: 50% 0; }

@media (prefers-reduced-motion: no-preference) {
  html.js .taccount .bar.h { transform: scaleX(0); transition: transform 0.7s var(--out) 0.35s; }
  html.js .taccount .bar.v { transform: scaleY(0); transition: transform 0.8s var(--out) 0.75s; }
  html.js .taccount .sum { opacity: 0; transition: opacity 0.5s ease 1.75s; }
  html.js .taccount.in .sum { opacity: 1; }
  html.js .taccount .side li, html.js .taccount .note { opacity: 0; translate: -10px 0; transition: opacity 0.45s ease, translate 0.6s var(--out); transition-delay: calc(0.6s + var(--n) * 0.12s); }
  html.js .taccount.in .bar { transform: none; }
  html.js .taccount.in .side li, html.js .taccount.in .note { opacity: 1; translate: 0 0; }
}

@media (max-width: 860px) {
  .ledger-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'head' 'acct' 'list'; }
}
@media (max-width: 480px) {
  .lessons { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .taccount { padding: 24px 18px 28px; }
  .side { padding-right: 12px; }
  .side.cr { padding-left: 12px; }
  .side li { font-size: 21px; }
  .col { font-size: 16px; }
}

/* ---------- Closing ---------- */
.biz-end { padding: clamp(88px, 10vw, 128px) 0; }
.biz-end h2 { font-size: var(--t-h2); text-align: center; }
.end-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto; gap: clamp(14px, 2vw, 24px); margin-top: clamp(36px, 4.6vw, 60px); }
.end-card { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(28px, 3.6vw, 44px); border-radius: var(--r-xl); background: var(--snow); }
.end-card h3 { margin-top: 14px; font-size: var(--t-h3); line-height: 1.15; }
.end-card p { margin-top: 10px; font-weight: 600; color: var(--muted); }
.end-card .link { margin-top: auto; padding-top: 26px; }
.end-card.finance, .end-card.apps { transition: transform 0.5s var(--spring), box-shadow 0.4s, background 0.3s; }
@media (hover: hover) { .end-card.finance:hover, .end-card.apps:hover { transform: translateY(-4px); background: var(--white); box-shadow: var(--shadow-2); } }
@media (hover: hover) { .end-card:hover .link::after { transform: translateX(3px); } }
.end-card .icons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.end-card .icons .app-icon { --s: 44px; transition: transform 0.5s var(--spring); }
@media (hover: hover) { .end-card.apps:hover .icons .app-icon { transform: translateY(-3px); } }
@media (hover: hover) { .end-card.apps:hover .icons .app-icon:nth-child(2) { transition-delay: 0.04s; } }
@media (hover: hover) { .end-card.apps:hover .icons .app-icon:nth-child(3) { transition-delay: 0.08s; } }
@media (hover: hover) { .end-card.apps:hover .icons .app-icon:nth-child(4) { transition-delay: 0.12s; } }
.end-card.contact { grid-column: 2; grid-row: 1 / span 2; background: var(--ink); }
.end-card .status { hyphens: manual; -webkit-hyphens: manual; }
.end-card.contact h3 { margin-top: 0; font-size: clamp(28px, 3vw, 40px); line-height: 1.08; color: var(--white); }
.end-card.contact p { color: rgba(255, 255, 255, 0.72); }
.end-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 32px; }
.end-card.contact .btn { padding: 0 20px; background: var(--white); color: var(--ink); box-shadow: none; }
.end-card.contact .btn.soft { background: rgba(255, 255, 255, 0.12); color: var(--white); }
@media (hover: hover) { .end-card.contact .btn.soft:hover { background: rgba(255, 255, 255, 0.2); } }
@media (max-width: 760px) {
  .end-grid { grid-template-columns: minmax(0, 1fr); }
  .end-card.contact { grid-column: auto; grid-row: auto; }
  .end-card { padding: 28px 24px; }
  .end-card.contact h3 { font-size: var(--t-h3); }
  .end-btns .btn { flex: 1 1 auto; }
  .end-card .icons .app-icon { --s: 40px; }
}

/* ---------- Plan your tattoos (the sheet itself is .gsheet in base.css) ---------- */
.planner .gs-form { gap: 16px; }
.planner .gfield input[type='date'] { line-height: 26px; padding-right: 44px; }
.gdate > .gd-box { position: relative; display: block; margin: 0; font-size: inherit; font-weight: inherit; color: inherit; }
.gd-box .gd-ph { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 17px; font-weight: 600; color: var(--faint); letter-spacing: -0.01em; pointer-events: none; }
.gdate:not(.empty) .gd-ph, .gdate input:focus ~ .gd-ph { display: none; }
.gd-box svg { position: absolute; right: 14px; top: 50%; width: 20px; height: 20px; margin-top: -10px; fill: none; stroke: var(--muted); stroke-width: 1.9; stroke-linecap: round; pointer-events: none; }
.gdate.empty input:not(:focus), .gdate.empty input:not(:focus)::-webkit-datetime-edit { color: transparent; -webkit-text-fill-color: transparent; }
.gdate input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: auto; height: auto; margin: 0; opacity: 0; cursor: pointer; }
.planner .gfield input::-webkit-date-and-time-value { text-align: left; }
.planner .gfield input[type='number'] { -moz-appearance: textfield; }
.planner .gfield input::-webkit-inner-spin-button, .planner .gfield input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.planner .gfield textarea { min-height: 112px; }
.gs-alt .copy { min-height: 44px; padding: 0 8px; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 800; color: var(--blue); cursor: pointer; }
.gs-alt .copy::after { display: none; }
.gs-alt .copy .l-done { display: inline-flex; align-items: center; gap: 8px; color: #1F6B41; }
.gs-alt .copy .l-done[hidden] { display: none; }
.gs-alt .copy .l-done::before { content: ''; width: 12px; height: 7px; margin-top: -4px; border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(-45deg); }

/* The tattoo on a real arm: three forearm photos (one per skin tone) cross-fade; the canvas above them holds only the
   ink, already wrapped around the forearm in business.js, and multiplies onto the skin so its texture shows through */
.try { display: grid; gap: 12px; }
.try[hidden] { display: none; }
.try-stage { position: relative; aspect-ratio: 16 / 10; border-radius: 20px; overflow: hidden; background: #E3E3E2; isolation: isolate; transition: box-shadow 0.2s; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.try-stage.drag { box-shadow: inset 0 0 0 3px var(--sky); }
.try-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.22s ease; pointer-events: none; }
.try-photo.on { opacity: 1; }
.try-ink { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; mix-blend-mode: multiply; outline: 0; }
.try.has .try-ink { cursor: grab; touch-action: none; }
.try.has .try-ink.grab { cursor: grabbing; }
.try-ink:focus-visible { box-shadow: inset 0 0 0 3px var(--sky); border-radius: 20px; }
.try-ink.in { animation: try-in 0.42s var(--spring); }
@keyframes try-in { from { opacity: 0; transform: scale(1.06); } }
.try-add { position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; }
.try-add[hidden], .try:not([data-design='logo']) .try-add, .try:not([data-design='logo']) .try-x { display: none; }
.try-add input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.try-add span { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px 0 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.94); box-shadow: 0 0 0 1px rgba(35, 43, 61, 0.08), 0 8px 20px -10px rgba(35, 43, 61, 0.5); color: var(--ink); font-size: 16px; font-weight: 800; white-space: nowrap; cursor: pointer; transition: transform 0.3s var(--spring); }
.try-add b { font-weight: inherit; }
.try-add span svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.try-add input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }
.try-add:active span { transform: scale(0.95); }
.try.has .try-add { left: auto; top: auto; right: 10px; bottom: 10px; transform: none; }
.try.has .try-add span { min-height: 44px; padding: 0 16px 0 13px; font-size: 15px; }
.try-x { position: absolute; z-index: 3; top: 4px; right: 4px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.try-x[hidden] { display: none; }
.try-x::before { content: ''; position: absolute; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, 0.94); box-shadow: 0 2px 8px -2px rgba(35, 43, 61, 0.4); }
.try-x svg { position: relative; width: 13px; height: 13px; fill: none; stroke: var(--ink); stroke-width: 2.8; stroke-linecap: round; }
.try-field[hidden] { display: none; }
.try-min { margin: -4px 0 0; font-size: 14px; font-weight: 800; color: var(--muted); }
.try-min[hidden] { display: none; }
.try-ctl { display: flex; align-items: center; gap: 14px; }
.tones { display: flex; flex: none; }
.tones label { position: relative; display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; }
.tones input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.tones i { width: 28px; height: 28px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(35, 43, 61, 0.12); transition: box-shadow 0.2s, transform 0.3s var(--spring); }
.tones input:checked + i { box-shadow: inset 0 0 0 1px rgba(35, 43, 61, 0.12), 0 0 0 2.5px var(--white), 0 0 0 4.5px var(--ink); }
.tones input:focus-visible + i { outline: 3px solid var(--sky); outline-offset: 5px; }
.size { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.size input { --fill: 40%; flex: 1; min-width: 0; height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.size input:disabled { cursor: default; opacity: 0.4; }
.size input::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--ink) var(--fill), var(--mist) var(--fill)); }
.size input::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: #fff; box-shadow: 0 0.5px 4px rgba(0, 0, 0, 0.12), 0 6px 13px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.06); }
.size input::-moz-range-track { height: 6px; border-radius: 3px; background: var(--mist); }
.size input::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--ink); }
.size input::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0.5px 4px rgba(0, 0, 0, 0.12), 0 6px 13px rgba(0, 0, 0, 0.12); }
.size output { flex: none; min-width: 3.4em; text-align: right; font-size: 15px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }

/* iOS keeps the layout viewport when the keyboard opens; business.js measures what the keyboard covers (--kb) and the
   sheet sits above it, so the focused field is never underneath */
@media (max-width: 560px) {
  .planner { margin-bottom: var(--kb, 0px); max-height: calc(100dvh - 20px - var(--kb, 0px)); }
  .planner.kb { border-radius: var(--r-xl); }
}

@media (prefers-reduced-motion: reduce) {
  .tile { animation: none; }
  .tile .app-icon { transition: none; }
  .try-ink.in { animation: none; }
  .try-photo { transition: none; }
}
@media print { .pair, .planner { display: none !important; } }
