/* =====================================================================
   STORE — tile layout (design 5)
   Black & white, square corners, Instrument Sans.
   ===================================================================== */

:root {
  --ink: #000;
  --paper: #fff;
  --muted: #f0f0f0;
  --line: 1px solid var(--ink);
  --gutter: 48px;
  --gap: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; display: block; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.wrap { padding-inline: var(--gutter); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------------------------------------------------------------
   Logo — /images/logo.png, fitted inside a fixed box
   --------------------------------------------------------------------- */
.logo {
  --logo-w: 200px;
  --logo-h: 174px;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.logo img {
  width: var(--logo-w);
  height: var(--logo-h);
  object-fit: contain;
  object-position: left center;
}
.logo--footer { --logo-w: 120px; --logo-h: 64px; }

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */
.btn,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  font-size: 15px;
  font-weight: 600;
}
.btn { background: var(--ink); color: var(--paper); }
.btn-outline { border: var(--line); }
.btn:hover, .btn-outline:hover { text-decoration: underline; text-underline-offset: 4px; }

.tile--hero .btn { background: var(--paper); color: var(--ink); }
.tile--hero .btn-outline { border-color: var(--paper); }

.badge {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.price-was { text-decoration: line-through; opacity: .5; font-weight: 400; }

/* ---------------------------------------------------------------------
   Header
   --------------------------------------------------------------------- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 88px;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  font-weight: 500;
}
.site-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-nav .cart { font-weight: 700; }
.menu-toggle { display: none; }

/* ---------------------------------------------------------------------
   Tile grid
   --------------------------------------------------------------------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  padding-bottom: var(--gap);
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 22px;
  border: var(--line);
  overflow: hidden;
}

.tile--hero {
  grid-column: span 2;
  grid-row: span 2;
  background: var(--ink);
  color: var(--paper);
}
.tile--hero .eyebrow { font-size: 15px; font-weight: 500; }
.tile--hero .hero-body { display: flex; flex-direction: column; gap: 24px; }
.tile--hero h1 {
  font-size: clamp(48px, 6.6vw, 96px);
  font-weight: 700;
  line-height: .92;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.tile--product { padding: 0; }
.tile--product:hover .tile-bar span:first-child { text-decoration: underline; text-underline-offset: 4px; }
/* Product images are 1600x1200, so every product tile shows a 4:3 picture */
.tile-media { position: relative; flex-grow: 1; min-height: 0; }
.tile--product .tile-media { flex-grow: 0; aspect-ratio: 4 / 3; }
.tile--product .tile-bar { flex-grow: 1; }
.tile-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Image by default, video plays while the cursor is over the product */
.hover-video { background: var(--ink); overflow: hidden; }
.hover-video img,
.hover-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hover-video video { opacity: 0; transition: opacity .2s ease; }
.hover-video.is-playing video { opacity: 1; }
.hover-video .badge { z-index: 1; }

/* ---------------------------------------------------------------------
   Product page
   --------------------------------------------------------------------- */
.product {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  padding-bottom: 64px;
}
.product-media {
  grid-column: span 8;
  position: relative;
  aspect-ratio: 4 / 3;
  border: var(--line);
  overflow: hidden;
}
.product-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.product-info {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px;
  border: var(--line);
}
.product-info h1 {
  font-size: clamp(44px, 5vw, 72px);
  font-weight: 700;
  line-height: .92;
  letter-spacing: -.045em;
}
.product-info h1.is-long { font-size: clamp(32px, 3.4vw, 52px); }
.product-info .price { font-size: 36px; font-weight: 700; letter-spacing: -.02em; }
.product-info p { font-size: 17px; line-height: 1.55; }
.product-info .btn { width: 100%; }
/* Product details: one description line, then label/value rows */
.product-info .product-desc { font-size: 18px; font-weight: 600; line-height: 1.35; }
.product-specs { margin: 0; border-top: var(--line); }
.product-specs div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: var(--line); font-size: 15px; }
.product-specs dt { opacity: .6; }
.product-specs dd { margin: 0; font-weight: 600; text-align: right; }
.product-specs a { text-decoration: underline; text-underline-offset: 3px; }
.product-specs a:hover { opacity: .6; }
.back-link { display: inline-block; padding: 8px 0 20px; font-size: 15px; font-weight: 500; }
.back-link:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 1100px) {
  .product-media, .product-info { grid-column: span 12; }
}
.tile-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-top: var(--line);
  font-size: 16px;
  font-weight: 600;
}

.tile--bundle { grid-column: span 2; background: var(--muted); }
.tile--bundle .label { font-size: 15px; font-weight: 500; }
.bundle-body { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.bundle-body p {
  max-width: 380px;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.bundle-price { font-size: 48px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }

.apps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  margin: 0;
  padding-top: 0;
  padding-bottom: 64px;
  list-style: none;
}
.apps li {
  display: flex;
  align-items: center;
  min-height: 120px;
  padding: 22px;
  border: var(--line);
  font-size: 22px;
  font-weight: 700;
}

/* ---------------------------------------------------------------------
   Placeholder artwork — replace with real product images (<img> in .tile-media)
   --------------------------------------------------------------------- */
.art-leak { background: radial-gradient(40% 55% at 70% 40%, rgba(255,255,255,.95), rgba(255,255,255,0) 70%), radial-gradient(35% 45% at 25% 70%, rgba(255,255,255,.55), rgba(255,255,255,0) 70%), #000; }
.art-lut { background: linear-gradient(90deg, #000 0 16.6%, #262626 16.6% 33.3%, #4d4d4d 33.3% 50%, #808080 50% 66.6%, #b3b3b3 66.6% 83.3%, #e6e6e6 83.3%); }
.art-cut { background: linear-gradient(118deg, #fff 0 49.5%, #000 50.5%); }
.art-grain {
  background-color: #9a9a9a;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/><feComponentTransfer><feFuncA type='table' tableValues='0 .9'/></feComponentTransfer></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.art-film { background: #000; }
.art-film::before,
.art-film::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 12%;
  background: repeating-linear-gradient(90deg, #fff 0 18px, transparent 18px 30px);
}
.art-film::before { top: 6%; }
.art-film::after { bottom: 6%; }
.art-paper { background: repeating-linear-gradient(90deg, #b5b5b5 0 3px, #a1a1a1 3px 9px); }
.art-glass { background: linear-gradient(135deg, rgba(255,255,255,0) 0 38%, rgba(255,255,255,.75) 42%, rgba(255,255,255,0) 46% 58%, rgba(255,255,255,.45) 61%, rgba(255,255,255,0) 64%), linear-gradient(180deg, #d9d9d9, #8c8c8c); }
.art-luma { background: linear-gradient(90deg, #000 0 30%, #fff 70%); }

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 88px;
  border-top: var(--line);
  font-size: 14px;
}
.site-footer nav { display: flex; gap: 24px; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------------------------------------------------------------------
   Tablet
   --------------------------------------------------------------------- */
@media (max-width: 1100px) {
  :root { --gutter: 32px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; }
  .tile--hero { grid-row: span 2; min-height: 480px; }
  .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-header .logo { --logo-w: 160px; --logo-h: 140px; }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
  }
  .menu-toggle .icon-close { display: none; }
  .menu-toggle[aria-expanded="true"] .icon-open { display: none; }
  .menu-toggle[aria-expanded="true"] .icon-close { display: block; }
  .site-header { flex-wrap: wrap; }
  .site-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-bottom: 16px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 14px 0; border-top: var(--line); font-size: 18px; }
}

/* ---------------------------------------------------------------------
   Phone
   --------------------------------------------------------------------- */
@media (max-width: 640px) {
  :root { --gutter: 16px; --gap: 10px; }
  .site-header .logo { --logo-w: 120px; --logo-h: 104px; }
  .tile { padding: 16px; }
  .tile--hero { grid-row: auto; gap: 56px; min-height: 420px; }
  .tile--hero .eyebrow { font-size: 14px; }
  .tile--product { padding: 0; }
  .tile-bar { flex-direction: column; gap: 2px; padding: 10px 12px; font-size: 14px; }
  .badge { height: 22px; padding: 0 8px; font-size: 10px; }
  .bundle-body { flex-direction: column; align-items: flex-start; gap: 14px; }
  .bundle-body p { font-size: 22px; }
  .bundle-price { font-size: 40px; }
  .tile--bundle { gap: 24px; }
  .apps li { min-height: 64px; padding: 16px; font-size: 16px; }
  .site-footer { flex-direction: column; align-items: flex-start; padding-block: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------------
   Image and video protection
   Blocks long-press save on phones, dragging, and the right-click menu
   (the right-click part is in store.js)
   --------------------------------------------------------------------- */
img, video {
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}
a { -webkit-touch-callout: none; }

/* Current page in the menu */
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }

/* ---------------------------------------------------------------------
   Category pages
   --------------------------------------------------------------------- */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 24px 0 32px;
  border-bottom: var(--line);
  margin-bottom: var(--gap);
}
.page-head h1 {
  font-size: clamp(48px, 7vw, 112px);
  font-weight: 700;
  line-height: .9;
  letter-spacing: -.05em;
}
.page-head .count { font-size: 15px; font-weight: 500; padding-bottom: 8px; }
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  padding-bottom: 64px;
}
.tile--empty {
  justify-content: center;
  align-items: center;
  border-style: dashed;
  text-align: center;
  gap: 8px;
}
.tile--empty { min-height: 300px; }
.tile--empty strong { font-size: 20px; }
.tile--empty span { font-size: 15px; }

@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .tile--empty { min-height: 180px; }
}

/* ---------------------------------------------------------------------
   Product videos: no controls, click to pause; text can't be selected
   --------------------------------------------------------------------- */
.product-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--ink); }
.product-media--wide { aspect-ratio: 16 / 9; }
.page-video { padding-bottom: 64px; }
.page-images { display: grid; gap: 24px; padding-bottom: 64px; }
.page-images img { display: block; width: 100%; height: auto; background: var(--ink); border: var(--line); }
.page-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; background: var(--ink); border: var(--line); }
video[data-clickpause] { cursor: pointer; }
video[data-clickpause]:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
body { -webkit-user-select: none; user-select: none; }

/* "What's included" label pointing down to the bottom video */
.included { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px 0 32px; text-align: center; }
.included h2 { margin: 0; font-size: clamp(32px, 4vw, 56px); font-weight: 700; letter-spacing: -.035em; line-height: 1; }
.included-arrow { animation: nudge 1.6s cubic-bezier(.45, 0, .55, 1) infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .included-arrow { animation: none; } }

/* Product detail: the bottom video (or images) with the description in a column beside it */
.detail { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 32px; align-items: start; padding-bottom: 72px; }
.detail .page-video, .detail .page-images { padding-bottom: 0; }
.detail-text { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 20px; }
.detail-text h2 { margin: 0; font-size: 32px; letter-spacing: -.03em; line-height: 1; }
.detail-text p { margin: 0; font-size: 17px; line-height: 1.5; }
.detail-text dl { margin: 0; border-top: var(--line); }
.detail-text dl div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: var(--line); font-size: 15px; }
.detail-text dt { font-weight: 700; }
.detail-text dd { margin: 0; text-align: right; }
.detail--solo .detail-text { grid-column: 1; position: static; }
@media (max-width: 760px) { .detail { grid-template-columns: minmax(0, 1fr); } .detail-text { position: static; } }
