/* The store uses one locally hosted family. Photographs supply the saturated colors. */
:root {
  color-scheme: dark;
  --paper: #091621;
  --ink: #e0edf7;
  --bg: var(--paper);
  --text: var(--ink);
  --surface: #112535;
  --surface-raised: #192f40;
  --muted: #a5bbcf;
  --line: #2a4050;
  --control-line: #587185;
  --accent: #8acce5;
  --accent-hover: #b1e0ee;
  --marigold: var(--accent);
  --success: #97d2b4;
  --danger: #ffaaa3;
  --font-body: 'DM Sans', Arial, sans-serif;
  --font-display: var(--font-body);
  --gutter: clamp(1.125rem, 5vw, 5rem);
  --content-width: 78rem;
  --space-6: clamp(3rem, 7vw, 5.75rem);
}
body { font-weight: 400; line-height: 1.55; }
@media screen and (forced-colors: none) {
  body:not([data-page="admin"]) {
    /* Fade the printed dots toward the photos and let the blue catch the right edge. */
    --edge-shade: linear-gradient(90deg, var(--bg) 4%, transparent 95%);
    --printed-dots: radial-gradient(circle at 2px 2px, rgb(156 201 229 / 15%) .9px, transparent 1.35px);
    --edge-light: radial-gradient(ellipse 90% 44rem at 100% 3rem, #1c394d, transparent);
    background-color: var(--bg);
    background-image: var(--edge-shade), var(--printed-dots), var(--edge-light);
    background-size: auto, 7px 7px, auto;
    background-repeat: no-repeat, repeat, no-repeat;
  }
}
.cursor-backdrop { display: none; }
@media screen and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) and (forced-colors: none) {
  body.cursor-backdrop-enabled {
    isolation: isolate;
    background-image: var(--edge-shade), var(--edge-light);
    background-size: auto;
    background-repeat: no-repeat;
  }
  .cursor-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
  }
  .cursor-dots {
    position: absolute;
    inset: -14px;
    background: var(--printed-dots) 0 0 / 7px 7px;
    mask-image: linear-gradient(90deg, transparent 4%, black 95%);
    transition: transform 260ms ease-out;
  }
  .cursor-light {
    position: absolute;
    inset: -13rem auto auto -13rem;
    width: 26rem;
    height: 26rem;
    background: radial-gradient(closest-side, rgb(92 188 234 / 19%), rgb(63 151 200 / 8%) 55%, transparent);
    opacity: 0;
    transition: opacity 180ms ease-out;
  }
  .cursor-backdrop.is-tracking .cursor-light { opacity: 1; }
}
h1, h2, h3, h4 { font-family: var(--font-body); font-weight: 500; line-height: 1.12; letter-spacing: -.035em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 2.6vw, 2.45rem); }
h3 { font-size: clamp(1.125rem, 1.65vw, 1.55rem); }
h4 { font-size: 1.125rem; }
::selection, .skip-link { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
button, summary, a { touch-action: manipulation; }

/* A compact wordmark and a single baseline leave the first photograph the most room. */
.site-header { background: var(--bg); color: var(--ink); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 4.1rem; gap: clamp(1.25rem, 3vw, 3rem); }
.wordmark { gap: .55rem; align-self: stretch; }
.business-logo { width: 1.7rem; height: 1.7rem; object-fit: contain; border-radius: 3px; }
.wordmark-text, .footer-wordmark {
  font: 600 1.03rem/1.22 var(--font-body);
  letter-spacing: -.028em;
  text-transform: none;
}
.wordmark-text small, .footer-wordmark span {
  display: inline; margin: 0 0 0 .24em; color: var(--muted);
  font: 400 1em/1.22 var(--font-body); letter-spacing: -.028em; text-transform: none;
}
.desktop-nav { gap: clamp(1rem, 2.6vw, 2.5rem); }
.desktop-nav a, .header-orders, .site-menu summary { font-size: .91rem; font-weight: 500; }
.header-orders { padding-left: clamp(1rem, 2.6vw, 2.5rem); color: var(--accent); }
.desktop-nav a, .footer-links a { color: var(--muted); }
.desktop-nav a:hover, .desktop-nav a[aria-current="page"], .header-orders:hover, .footer-links a:hover {
  color: var(--ink); text-decoration: underline; text-underline-offset: .38em; text-decoration-thickness: 1px;
}
.site-menu summary { color: var(--ink); background: transparent; padding-inline: .25rem; }
.site-menu summary::after { content: ''; width: .45rem; height: .45rem; border: solid currentColor; border-width: 0 1px 1px 0; transform: translateY(-2px) rotate(45deg); }
.site-menu[open] summary::after { transform: translateY(2px) rotate(225deg); }
.menu-panel { border: 1px solid var(--line); padding: .5rem .85rem; background: var(--surface); color: var(--ink); }
.menu-panel a { font-weight: 500; }
.menu-panel a:hover, .menu-panel a[aria-current="page"] { background: var(--surface-raised); color: var(--accent); }
.site-footer { background: #08131c; color: var(--ink); border-top: 1px solid var(--line); }
.footer-top { align-items: center; padding-block: clamp(1.25rem, 3vw, 2.5rem); }
.footer-wordmark { display: inline-block; }
.footer-links { display: flex; gap: 0 clamp(1rem, 2vw, 2rem); flex-wrap: wrap; }
.footer-links a, .footer-bottom { font-size: .875rem; }
.footer-bottom { padding-block: 1rem; border-color: var(--line); color: var(--muted); }

.btn, .outline-button, .copy-button, .card-action, .icon-button, .motion-toggle {
  color: var(--ink); background: transparent; border: 1px solid var(--control-line);
  border-radius: .35rem; font-weight: 500; line-height: 1.35;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn:hover:not(:disabled), .outline-button:hover:not(:disabled), .copy-button:hover:not(:disabled),
.card-action:hover, .icon-button:hover:not(:disabled), .motion-toggle:hover:not(:disabled) {
  background: var(--surface-raised); color: var(--ink); border-color: var(--accent);
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); color: var(--bg); }
.text-link, .filter-reset { color: var(--accent); font-weight: 500; }
.field { gap: .32rem; }
input, textarea, select, .admin-page input:not([type="checkbox"]), .admin-page select, .admin-page textarea {
  min-height: 44px; border-radius: .35rem; border-color: var(--control-line); background-color: var(--surface);
  color: var(--ink); padding-block: .62rem;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
select {
  appearance: auto; padding-right: .75rem; background-image: none;
}
input[type="checkbox"], input[type="radio"] { min-height: 1.25rem; accent-color: var(--accent); }
input:user-invalid, textarea:user-invalid { border-color: var(--danger); }
button:disabled, fieldset:disabled button { color: var(--muted); background: var(--surface); }
.filter-btn { background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: .45rem .18rem; font-size: .92rem; font-weight: 500; }
.filter-btn[aria-pressed="true"] { color: var(--accent); background: transparent; border-color: var(--accent); }
.tablist { gap: .18rem 1.15rem; }
.empty-state, .notice, .loading-block { border: 0; border-radius: .35rem; background: var(--surface); }
.empty-state h1, .empty-state h2 { font-size: clamp(1.375rem, 2.8vw, 2rem); }
.toast { color: var(--bg); background: var(--accent-hover); }

/* Shop and archive are photographic indexes. Captions have a baseline below each image. */
.collection-masthead, .product-masthead, .payment-intro, .admin-intro,
.utility-title, .utility-body, .catalog-footer { border-color: var(--line); border-width: 1px; }
.collection-masthead {
  padding-block: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 2.5vw, 2rem);
}
.collection-masthead h1, .product-masthead h1, .payment-intro h1, .admin-intro h1, .utility-title h1 {
  font-size: clamp(2rem, 4.2vw, 3.35rem); text-transform: none; line-height: 1.08;
  font-weight: 500; letter-spacing: -.045em;
}
.gallery-tools { padding-block: 1rem; }
.gallery-tools:has(.photo-filters:not([open])) { padding-block: .25rem; }
.photo-filters > summary { width: fit-content; padding-block: .75rem; min-height: 44px; font-size: .95rem; color: var(--accent); }
.photo-filters[open] > summary { margin-bottom: .5rem; }
.gallery-search-row { grid-template-columns: minmax(9rem, 24rem) minmax(8rem, 13rem) max-content; }
.gallery-tools .tablist:not(:empty) { margin-top: .5rem; }
.shop-layout { grid-template-columns: minmax(12rem, .54fr) minmax(0, 2.5fr); gap: clamp(1.5rem, 4vw, 4rem); }
.catalog-search-row { gap: 1rem; }
.catalog-source, .gallery-count, #catalog-count, .listing-photo-count { font-size: .875rem; color: var(--muted); font-weight: 400; }
.results-line, .gallery-count { padding-block: .85rem; }
.catalog-grid { gap: clamp(2rem, 4.5vw, 4rem) clamp(1rem, 3vw, 2.85rem); }
.product-image, .product-photo-open, .product-main-photo, .product-thumbnails button, .angle-thumbnail { background-color: var(--surface); }
.product-image { border-radius: .22rem; }
.card-title, .gallery-controller .card-title { font-size: clamp(1.2rem, 2.25vw, 1.85rem); font-weight: 500; letter-spacing: -.035em; line-height: 1.15; }
.card-price { font-weight: 500; font-size: 1.1rem; }
.card-description { font-size: .95rem; }
.catalog-grid .product-card:only-child { align-items: center; }
.catalog-grid .product-card:only-child .product-image { aspect-ratio: 1.12; }
.catalog-grid .card-action { margin-top: 1rem; }
.catalog-footer { padding-block: 2rem; }
.product-info h2, .payment-page h2, .login-heading h2, .admin-toolbar h2 {
  font-size: clamp(1.35rem, 2.3vw, 2rem); line-height: 1.15; font-weight: 500;
}
.gallery-controller[data-layout-id="build-wolverine"] .product-image img { object-position: 50% 37%; }
.gallery-controller[data-layout-id="build-itachi"] .product-image img { object-position: 50% 27%; }
.gallery-controller[data-layout-id="build-chicago-white-sox"] .product-image img { object-position: 50% 34%; }
.gallery-controller[data-layout-id="build-venom"] .product-image img { object-position: 50% 60%; }
.gallery-controller .card-meta { padding-block: .8rem 0; }
.gallery-controller .build-category { border: 0; padding: 0; margin-top: .25rem; }
.gallery-controller .build-category span + span { color: var(--muted); }
.gallery-controller .card-actions { margin-top: .25rem; }
.gallery-controller .build-detail-link { font-size: .9rem; color: var(--accent); }
.gallery-controller[data-design] .gallery-angles { display: none; }
.gallery-controller[data-design] .product-image { cursor: pointer; }
.gallery-controller[data-design] .card-action {
  padding-inline: 0; background: none; border: 0; color: var(--accent); font: inherit;
  font-size: .9rem; text-decoration: underline; text-underline-offset: .22em; cursor: pointer;
}

.product-page { column-gap: clamp(1.5rem, 5vw, 4.5rem); }
.product-masthead { align-items: baseline; padding-block: .35rem 1rem; }
.product-price { font-size: 1.375rem; font-weight: 500; }
.product-description { max-width: 49ch; }
.breadcrumbs { font-size: .875rem; }
.product-specs dd { font-weight: 500; }
.product-info .product-specs { margin-block: 1.25rem; }
.product-thumbnails button { width: 3.5rem; height: 3.5rem; }
.product-thumbnails [aria-pressed="true"] { outline-color: var(--accent); }
.product-thumbnails { gap: .6rem; }

/* Transaction screens keep the full instructions, using the same quiet scale. */
.payment-workflow { color: var(--ink); background: var(--surface); border-radius: .35rem; padding: clamp(1.25rem, 3vw, 2.25rem); }
.payment-workflow .payment-warning { border-color: var(--line); }
.payment-warning strong { color: var(--accent-hover); }
.pay-row h3 { font-weight: 500; font-size: clamp(1.12rem, 1.7vw, 1.45rem); }
.order-payment-details { border-color: var(--line); }
.admin-tab.active { background: var(--surface-raised); color: var(--accent); }
.admin-page input[type="checkbox"] { accent-color: var(--accent); }
.stat dd { font-weight: 500; font-size: 1.65rem; }

/* Native fragment links keep their focus, URL and history behavior. */
@media screen and (prefers-reduced-motion: no-preference) {
  html:has(:target):not(:has(.motion-paused, .skip-link:focus)) {
    scroll-behavior: smooth;
  }

  /* Individual translate/scale preserve the artwork's rotation and photo crops. */
  body:not(.motion-paused) :where(a[href], button:enabled, summary, input:is([type="submit"], [type="button"]):enabled):not([aria-disabled="true"]) {
    transition-property: translate, scale, opacity, color, background-color, border-color;
    transition-duration: 200ms;
    transition-timing-function: cubic-bezier(.2, .7, .25, 1);
  }

  body:not(.motion-paused) :where(a[href], button:enabled, summary, input:is([type="submit"], [type="button"]):enabled):active:not([aria-disabled="true"]) {
    translate: 0 1px;
    scale: .985;
    opacity: .86;
    transition-duration: 80ms;
  }
}

@media screen and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body:not(.motion-paused) :where(a[href], button:enabled, summary, input:is([type="submit"], [type="button"]):enabled):hover:not(:active, [aria-disabled="true"]) {
    translate: 0 -1px;
    opacity: .94;
  }
}
@media (max-width: 58rem) {
  .shop-layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
}
@media (max-width: 48rem) {
  .header-inner { min-height: 3.55rem; }
  .gallery-search-row { grid-template-columns: minmax(0, 1fr) auto; }
  .gallery-search-row .field:first-child { grid-column: 1 / -1; }
  .catalog-grid .product-card:only-child .product-image { aspect-ratio: 4 / 3; }
  .product-masthead { align-items: start; gap: .6rem; }
  .footer-top { display: grid; gap: .65rem; }
}
@media (max-width: 26rem) {
  .wordmark-text { font-size: .95rem; }
  .business-logo { width: 1.5rem; height: 1.5rem; }
}
