/* The Bright Box — custom logo T-shirt page. Builds on assets/site.css (tokens, top bar,
   sheet, side panel, chips, summary, faq, footer); only what this page adds lives here. */

/* ---------- hero: the shirt on the sheet, the order on the side ---------- */
.tee-sheet { padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.tee-sheet h1 { max-width: 16ch; }
.tee-stage { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--gutter); align-items: center; margin-top: clamp(1.25rem, 2.5vw, 2rem); text-align: left; }
.tee-main, .tee-loupe { position: relative; }
.tee-main canvas, .tee-main img { width: 100%; height: auto; aspect-ratio: 4 / 5; }
.tee-loupe canvas, .tee-loupe img { width: 100%; height: auto; aspect-ratio: 1; background: var(--paper-2); }
.tee-main figcaption, .tee-loupe figcaption { margin-top: 0.6rem; }
.js .tee-canvas:not([hidden]) + figcaption { transition: opacity var(--t-ui) ease; }
.tee-main canvas.is-fresh, .tee-loupe canvas.is-fresh { animation: tee-ink 420ms var(--ease-out); }
@keyframes tee-ink { from { opacity: 0.55; } to { opacity: 1; } }

.tee-side .price { display: flex; align-items: baseline; gap: 0.5rem; }
.tee-per { font-size: var(--step-body); letter-spacing: 0; }
.tee-logo-row { display: grid; grid-template-columns: 76px 1fr; gap: 1rem; align-items: center; }
.tee-logo-thumb { display: grid; place-items: center; width: 76px; height: 76px; background: var(--paper-2); padding: 6px; }
.tee-logo-thumb img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.tee-logo-name { font-weight: 600; line-height: 1.3; }
.tee-logo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-top: 0.6rem; }
.tee-logo-actions .button { min-height: 2.75rem; padding: 0 1rem; }
.tee-note { margin-top: 0.75rem; }
.tee-status:empty { display: none; }
.tee-status { margin-top: 0.5rem; padding: 0.6rem 0.75rem; background: var(--paper-2); }

.tee-swatches { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.tee-swatches button { position: relative; aspect-ratio: 1; padding: 4px; background: var(--paper-2); transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.tee-swatches button img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-ui) var(--ease-out); }
.tee-swatches button[aria-pressed="true"] { background: var(--ink); }
.tee-swatches button:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .tee-swatches button:hover img { transform: scale(1.06); } }

.tee-width-label { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; margin-bottom: 0.5rem; }
.tee-width-label output { font-weight: 600; }
.tee-range { width: 100%; accent-color: var(--ink); min-height: 2.75rem; }
.tee-dpi { margin-top: 0.4rem; }
.tee-dpi.is-warn, .tee-dpi.is-bad { padding: 0.6rem 0.75rem; background: var(--yellow); }
.tee-dpi.is-bad { background: var(--ink); color: var(--paper); }

.tee-sizes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tee-sizes label { display: grid; gap: 0.3rem; font-weight: 600; font-size: var(--step-small); }
.tee-sizes input { width: 100%; min-height: 2.75rem; padding: 0.4rem 0.6rem; background: var(--paper-2); border: 0; border-radius: 0; font-size: max(1rem, var(--step-body)); text-align: center; transition: background-color var(--t-hover) ease; }
.tee-sizes input:focus { background: #e9e9e2; }
.tee-sizes input.has-qty { background: var(--yellow); }
.tee-quote { width: 100%; margin-top: 0.6rem; min-height: 3.5rem; }
.tee-cart { margin-top: 0.4rem; }
.tee-cart li + li { margin-top: 0.2rem; }

/* ---------- what we print: the file on the black field ---------- */
.tee-print { margin-top: 0; background: var(--black); color: var(--on-black); padding-block: clamp(5rem, 9vw, 9rem); }
.tee-print .grid { align-items: center; row-gap: 3rem; }
.tee-print-sheet { grid-column: 1 / 7; background: var(--paper); padding: clamp(1rem, 2.5vw, 2rem); }
.tee-print-sheet canvas { display: block; width: 100%; height: auto; }
.tee-print-sheet img { width: 100%; height: auto; aspect-ratio: 1; }
.tee-print-sheet img { object-fit: contain; padding: 10%; background: var(--paper-2); }
.tee-print-text { grid-column: 8 / 13; }
.tee-print-text h2 { font-size: var(--step-head); }
.tee-print-text .lead { margin-top: 1.25rem; }
.tee-specs { display: grid; grid-template-columns: auto 1fr; gap: 0.9rem 1.5rem; margin-top: 2.25rem; }
.tee-specs dt { color: #c9c9c9; }
.tee-specs dd { font-weight: 600; }
.tee-print-actions { margin-top: 2.25rem; display: grid; gap: 1rem; justify-items: start; }
.tee-dpi-dark { color: var(--on-black); max-width: 46ch; }
.tee-dpi-dark.is-warn, .tee-dpi-dark.is-bad { color: var(--yellow); }

/* ---------- sample order ---------- */
.tee-sample { padding-top: var(--section); }
.tee-sample-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; }
.tee-sample-head h2 { grid-column: 1 / 7; font-size: var(--step-head); }
.tee-sample-head p { grid-column: 7 / 13; }
.tee-sample-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); margin-top: 3rem; align-items: start; }
.tee-sample-shirts { grid-column: 1 / 9; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
.tee-sample-shirts img { width: 100%; height: auto; aspect-ratio: 800 / 920; object-fit: cover; }
.tee-sample-shirts figcaption { margin-top: 0.5rem; }
.tee-sheet-strip { grid-column: 9 / 13; position: sticky; top: 1rem; background: var(--yellow); padding: clamp(1rem, 2vw, 1.5rem); }
.tee-sheet-strip img { width: 100%; height: auto; }
.tee-sheet-strip figcaption { margin-top: 1rem; }
.tee-sheet-title { font-size: var(--step-lead); font-weight: 600; line-height: 1.2; margin-bottom: 0.4rem; }
.tee-outputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem var(--gutter); margin-top: 5rem; padding: clamp(2rem, 4vw, 3.5rem); background: var(--paper-2); }
.tee-outputs h3 { margin-bottom: 0.75rem; }

/* ---------- the shirt ---------- */
.tee-shirt { padding-top: var(--section); }
.tee-shirt .grid { align-items: start; row-gap: 3rem; }
.tee-shirt-text { grid-column: 1 / 6; }
.tee-shirt-text h2 { font-size: var(--step-head); }
.tee-facts { margin-top: 1.75rem; padding-left: 1.1em; }
.tee-facts li + li { margin-top: 0.4rem; }
.tee-table-wrap { margin-top: 2.5rem; overflow-x: auto; }
.tee-table { width: 100%; border-collapse: collapse; font-size: var(--step-body); }
.tee-table caption { text-align: left; font-weight: 600; margin-bottom: 0.75rem; }
.tee-table th, .tee-table td { padding: 0.55rem 0.5rem; text-align: center; }
.tee-table thead th { background: var(--ink); color: var(--paper); font-weight: 600; }
.tee-table tbody tr:nth-child(odd) { background: var(--paper-2); }
.tee-table tbody th { text-align: left; font-weight: 600; white-space: nowrap; }
.tee-models { grid-column: 7 / 13; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tee-model-big { grid-column: 1 / -1; overflow: clip; }
.tee-models img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.tee-model-big img { aspect-ratio: 16 / 13; object-position: 50% 20%; }

/* ---------- phone menu: whole links are 44px touch targets ---------- */
.tee-page .top-links-phone { row-gap: 0; }
.tee-page .top-links-phone a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .tee-model-big img { animation: drift linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .tee-main canvas.is-fresh, .tee-loupe canvas.is-fresh { animation: none; }
}

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .tee-print-sheet { grid-column: 1 / 7; }
  .tee-print-text { grid-column: 7 / 13; }
  .tee-sample-shirts { grid-column: 1 / -1; }
  .tee-sheet-strip { grid-column: 1 / -1; position: static; margin-top: 2rem; display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); align-items: center; }
  .tee-sheet-strip figcaption { margin-top: 0; }
  .tee-outputs { grid-template-columns: 1fr; }
  .tee-shirt-text, .tee-models { grid-column: 1 / -1; }
  .tee-sample-head h2, .tee-sample-head p { grid-column: 1 / -1; }
  .tee-sample-head p { margin-top: 1.25rem; }
}

/* ---------- phone ---------- */
@media (max-width: 700px) {
  .tee-stage { grid-template-columns: 1fr; }
  .tee-loupe { width: 72%; margin-inline: auto; }
  .tee-swatches { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
  .tee-sizes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tee-print-sheet, .tee-print-text { grid-column: 1 / -1; }
  .tee-specs { grid-template-columns: 1fr; gap: 0.2rem; }
  .tee-specs dd + dt { margin-top: 0.8rem; }
  .tee-sample-shirts { gap: 16px 8px; }
  .tee-sheet-strip { grid-template-columns: 1fr; }
  .tee-outputs { margin-top: 3rem; }
  .tee-models { grid-template-columns: 1fr 1fr; }
  .tee-table { font-size: 0.875rem; }
  .tee-table th, .tee-table td { padding: 0.5rem 0.2rem; }
  .tee-table tbody th { padding-left: 0.4rem; }
}
