/* Action Cloud shop. Brand from the park's deck: charcoal, yellow stencil, hazard stripes.
   The page is one idea: a clothes rack you can drag, with pieces that swing. */
:root {
  --bg: #1B1B1B;
  --bg-2: #262626;
  --bg-3: #333;
  --yellow: #ECC820;
  --yellow-2: #D9B712;
  --ink: #141414;
  --white: #FFFFFF;
  --gray: #B8B8B8;
  --stencil: "Saira Stencil One", Impact, "Arial Narrow", sans-serif;
  --body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --piece: clamp(180px, 19vw, 280px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--white); font-family: var(--body); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }
h1, h2 { margin: 0; font: 400 1em/0.95 var(--stencil); text-transform: uppercase; color: var(--yellow); }
p { margin: 0; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; background: var(--yellow); color: var(--ink); padding: 8px 12px; }

/* ---------- bar ---------- */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 14px var(--gutter); pointer-events: none; }
.bar > * { pointer-events: auto; }
.brand img { height: 46px; width: auto; }
.bag-btn { font-weight: 600; font-size: 15px; background: rgba(27,27,27,.7); backdrop-filter: blur(10px); border: 1.5px solid rgba(255,255,255,.25); border-radius: 999px; padding: 9px 16px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: border-color .15s; }
.bag-btn:hover { border-color: var(--yellow); }
.bag-count { background: var(--yellow); color: var(--ink); border-radius: 999px; min-width: 22px; height: 22px; display: inline-grid; place-items: center; font-size: 13px; padding: 0 6px; }

/* ---------- hero: headline, then the rack ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; isolation: isolate; overflow: hidden; }
.hero-bg { position: absolute; inset: 0 0 auto auto; width: min(70%, 1100px); height: 62%; object-fit: cover; object-position: 50% 28%; z-index: -1; opacity: .5;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%), linear-gradient(180deg, #000 40%, transparent 100%); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, #000 55%), linear-gradient(180deg, #000 40%, transparent 100%); mask-composite: intersect; }
.hero-copy { padding: clamp(84px, 11vh, 130px) var(--gutter) 0; }
.hero h1 { font-size: clamp(54px, 7.3vw, 150px); letter-spacing: -.005em; }
.hero h1 .narrow { display: none; }
.hero-copy p { margin-top: 18px; font-size: clamp(17px, 1.4vw, 21px); color: #E6E6E6; max-width: 30rem; }
@media (max-width: 700px) { .hero h1 { font-size: 15.5vw; } .hero h1 .narrow { display: inline; } .hero-bg { width: 100%; height: 48%; opacity: .38; } }

/* ---------- shelf + rail ---------- */
.rack-wrap { position: relative; padding-bottom: clamp(20px, 4vh, 40px); margin-top: 20px; --rail: 13px; --plank: 30px;
  background: radial-gradient(60% 60% at 50% 60%, rgba(255,255,255,.07), transparent 75%); }

/* shelf: caps and beanies sit on a plywood plank, prices on its front edge */
.shelf { list-style: none; margin: 0 var(--gutter); padding: 0 clamp(8px, 3vw, 48px) var(--plank); position: relative; display: flex; justify-content: flex-end; align-items: flex-end; gap: clamp(6px, 2.4vw, 40px); }
.shelf::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--plank); border-radius: 3px;
  background: repeating-linear-gradient(180deg, #E3CDA4 0 5px, #C9AE7E 5px 6px, #DCC597 6px 11px, #B99B68 11px 12px);
  box-shadow: 0 14px 22px rgba(0,0,0,.55), inset 0 2px 0 rgba(255,255,255,.35); }
.sit { position: relative; flex: 0 1 clamp(84px, 11vw, 168px); }
.sit-cap { flex-basis: clamp(96px, 12.5vw, 190px); }
.sit .cloth { filter: drop-shadow(0 5px 4px rgba(0,0,0,.6)); margin-bottom: -3px; transform-origin: 50% 100%; }
.sit .piece:hover .cloth, .sit .piece:focus-visible .cloth { transform: translateY(-10px) rotate(-3deg); }
.sit .label { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); height: var(--plank); margin: 0; flex-direction: row; align-items: center; gap: 6px; white-space: nowrap; font-size: 12px; color: #2A2112; }
.sit .label b { font-size: 12px; color: #2A2112; }
@media (max-width: 760px) { .shelf { justify-content: space-between; } .sit .label b { display: none; } .sit .label { font-weight: 700; } }

/* rail: a steel tube; hanger hooks go over it */
.rail { height: var(--rail); margin-top: clamp(26px, 4vh, 44px); border-radius: 2px;
  background: linear-gradient(#F2F2F2 0%, #BDBDBD 22%, #7C7C7C 62%, #3C3C3C 100%); box-shadow: 0 8px 14px rgba(0,0,0,.5); }
.track { list-style: none; position: relative; z-index: 1; margin: calc(-1 * (var(--rail) + 24px)) 0 0; padding: 20px var(--gutter) 24px; display: flex; gap: clamp(8px, 2vw, 30px); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: pan-x pan-y; }
.track::-webkit-scrollbar { display: none; }
.track.grabbing { cursor: grabbing; }
.track.grabbing .piece { pointer-events: none; }

.hang { flex: 0 0 var(--piece); transform-origin: 50% 11px; will-change: transform; }
.piece { display: flex; flex-direction: column; align-items: center; width: 100%; padding: 0; background: none; border: 0; cursor: pointer; text-align: center; }
.cloth { display: block; width: 100%; filter: drop-shadow(0 22px 18px rgba(0,0,0,.55)); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.cloth img { display: block; width: 100%; height: auto; }
.hang .piece:hover .cloth, .hang .piece:focus-visible .cloth { transform: translateY(4px) scale(1.03); transform-origin: 50% 0; }
.label { display: flex; flex-direction: column; gap: 2px; margin-top: 16px; font-size: 14px; color: var(--gray); }
.label b { color: var(--white); font-weight: 600; font-size: 15px; }

.rack-top { display: flex; align-items: center; justify-content: space-between; padding: 6px var(--gutter) 0; }
.hint { font-size: 14px; color: var(--gray); }
.arrows { display: flex; gap: 8px; }
.arrows button { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.25); background: transparent; cursor: pointer; font-size: 18px; transition: background .15s, color .15s, border-color .15s; }
.arrows button:hover { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }

/* ---------- tape ---------- */
.tape { background: var(--yellow); color: var(--ink); overflow: hidden; border-block: 10px solid transparent; border-image: repeating-linear-gradient(-45deg, var(--ink) 0 14px, var(--yellow) 14px 28px) 10; }
.tape-run { display: flex; width: max-content; animation: run 28s linear infinite; }
.tape span { font: 400 clamp(18px, 2vw, 26px)/1 var(--stencil); text-transform: uppercase; letter-spacing: .04em; padding: 10px 0; white-space: pre; }
@keyframes run { to { transform: translateX(-50%); } }

/* ---------- ramps ---------- */
.ramps { position: relative; isolation: isolate; min-height: min(86svh, 760px); display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding: clamp(64px, 10vw, 120px) var(--gutter); overflow: hidden; }
.ramps-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.ramps::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(27,27,27,.25) 0%, rgba(27,27,27,.92) 78%); }
.ramps h2 { font-size: clamp(44px, 6.6vw, 120px); max-width: 12ch; }
.ramps-copy p { margin-top: 20px; font-size: clamp(17px, 1.5vw, 21px); max-width: 30rem; color: #EDEDED; }
.count { font: 400 clamp(72px, 13vw, 220px)/0.8 var(--stencil); color: var(--yellow); }
.count span { color: rgba(255,255,255,.45); font-size: .42em; }

/* ---------- contact ---------- */
.bar-right { display: flex; align-items: center; gap: 10px; }
.bar-link { font-weight: 600; font-size: 15px; text-decoration: none; padding: 9px 14px; border-radius: 999px; background: rgba(27,27,27,.7); backdrop-filter: blur(10px); }
.bar-link:hover { color: var(--yellow); }
.lang { font: 600 14px var(--body); color: var(--white); background: rgba(27,27,27,.7); backdrop-filter: blur(10px); border: 1.5px solid rgba(255,255,255,.25); border-radius: 999px; padding: 9px 10px; cursor: pointer; }
.lang:hover { border-color: var(--yellow); }
.lang option { background: #262626; color: #fff; }
@media (max-width: 520px) { .bar-link { display: none; } }
.btn-inline { display: inline-block; width: auto; margin-top: 24px; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,.3); width: auto; }
.btn-ghost:hover { background: var(--white); color: var(--ink); }
.btn[disabled] { opacity: .6; cursor: progress; }

.contact { padding: clamp(72px, 10vw, 140px) var(--gutter); display: grid; gap: 48px; grid-template-columns: minmax(0, 1fr); scroll-margin-top: 40px; }
@media (min-width: 960px) { .contact { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 72px; align-items: start; } .contact-copy { position: sticky; top: 110px; } }
.contact h2 { font-size: clamp(42px, 5.6vw, 96px); max-width: 11ch; }
.contact-copy p { margin-top: 20px; font-size: clamp(17px, 1.4vw, 20px); color: #E0E0E0; max-width: 30rem; }
.form { display: grid; gap: 20px; max-width: 620px; }
.hp { position: absolute; left: -9999px; }
.topics { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.topics legend, .field label { font-size: 14px; font-weight: 600; color: var(--gray); padding: 0; margin-bottom: 8px; display: block; }
.topic { position: relative; }
.topic input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.topic span { display: block; padding: 12px 18px; border: 1.5px solid #5A5A5A; border-radius: 999px; font-weight: 600; font-size: 15px; transition: background .15s, color .15s, border-color .15s; }
.topic input:checked + span { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.topic input:focus-visible + span { outline: 3px solid var(--white); outline-offset: 2px; }
.row { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.field input, .field textarea { width: 100%; font: inherit; color: var(--white); background: var(--bg-2); border: 1.5px solid #4A4A4A; border-radius: 12px; padding: 14px 16px; }
.field textarea { resize: vertical; min-height: 120px; }
.field input:hover, .field textarea:hover { border-color: #7A7A7A; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--yellow); outline-offset: 0; border-color: var(--yellow); }
.field [aria-invalid="true"] { border-color: #FF8A6E; }
.help { font-size: 14px; color: var(--gray); margin-top: 8px; }
.err { font-size: 14px; color: #FF9A80; font-weight: 600; margin-top: 6px; }
.err:empty { display: none; }
.form-status { font-size: 15px; color: #FF9A80; min-height: 1.4em; }
.form-status a { color: var(--yellow); }
.sent { max-width: 620px; background: var(--bg-2); border-radius: 22px; padding: 40px; }
.sent h3 { margin: 0 0 10px; font: 400 clamp(32px, 4vw, 48px)/1 var(--stencil); text-transform: uppercase; color: var(--yellow); }
.sent p { margin-bottom: 24px; color: #E0E0E0; }

.foot { padding: 28px var(--gutter); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; font-size: 15px; color: var(--gray); }
.foot img { height: 40px; width: auto; }
.foot p { display: flex; gap: 22px; flex-wrap: wrap; }
.foot a:hover { color: var(--yellow); }

/* ---------- dialogs ---------- */
dialog { border: 0; padding: 0; color: var(--white); background: var(--bg-2); max-width: none; max-height: none; }
dialog::backdrop { background: rgba(0,0,0,.62); backdrop-filter: blur(6px); }
.x { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #383838; font-size: 26px; line-height: 1; cursor: pointer; z-index: 2; }
.x:hover { background: var(--yellow); color: var(--ink); }
.btn { display: block; width: 100%; font-weight: 700; font-size: 17px; background: var(--yellow); color: var(--ink); border: 0; border-radius: 999px; padding: 17px 26px; cursor: pointer; transition: background .15s, transform .1s; }
.btn:hover { background: var(--yellow-2); }
.btn:active { transform: scale(.98); }

.sheet { width: min(980px, 100vw - 32px); max-height: calc(100dvh - 32px); border-radius: 22px; overflow: hidden; }
.sheet[open] { display: grid; grid-template-columns: 1.1fr 1fr; grid-template-rows: minmax(0, 1fr); }
/* left: the piece, with a front/back switch under it when the product has both sides */
.p-media { display: flex; flex-direction: column; min-height: 0; background: radial-gradient(closest-side, #4A4A4A, var(--bg-2)); }
.p-art { flex: 1 1 auto; display: grid; place-items: center; padding: 40px 40px 16px; min-height: 360px; }
.p-art { perspective: 900px; }
.p-art img { width: min(100%, 420px); height: auto; max-height: 60vh; object-fit: contain; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease-out; filter: drop-shadow(0 26px 22px rgba(0,0,0,.5)); }
.p-views { display: flex; justify-content: center; gap: 8px; padding: 0 24px 28px; }
.view { min-width: 92px; height: 44px; padding: 0 18px; background: rgba(27,27,27,.55); border: 1.5px solid #6A6A6A; border-radius: 999px; font-weight: 600; font-size: 14px; cursor: pointer; }
.view:hover { border-color: var(--white); }
.view[aria-pressed="true"] { background: var(--white); color: var(--ink); border-color: var(--white); }
/* right: details; scrolls on its own when the spec and size chart make it long */
.p-info { padding: 56px 40px 40px; display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow-y: auto; }
.p-info > * { flex-shrink: 0; }
.p-info h2 { font-size: clamp(34px, 3.6vw, 48px); }
.p-price { font-size: 22px; font-weight: 700; }
.p-blurb { color: var(--gray); font-size: 15px; margin-bottom: 6px; }
.swatches { display: flex; align-items: center; gap: 10px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; background: var(--c); border: 2px solid #5A5A5A; cursor: pointer; padding: 0; }
.swatch[aria-pressed="true"] { border-color: var(--white); box-shadow: 0 0 0 3px var(--bg-2), 0 0 0 5px var(--yellow); }
.color-name { font-size: 14px; color: var(--gray); margin-left: 4px; }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.size { min-width: 52px; height: 46px; padding: 0 12px; background: transparent; border: 1.5px solid #5A5A5A; border-radius: 999px; font-weight: 600; font-size: 14px; cursor: pointer; }
.size:hover { border-color: var(--white); }
.size[aria-checked="true"] { background: var(--white); color: var(--ink); border-color: var(--white); }
.p-hint { min-height: 1.4em; font-size: 14px; color: #FF9A80; font-weight: 600; }
.p-spec { display: grid; gap: 12px; margin-top: 6px; padding-top: 24px; border-top: 1px solid #454545; }
.p-spec h3 { margin: 0; font: 600 13px/1.3 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--gray); }
.spec-list { margin: 0 0 12px; display: grid; gap: 8px; font-size: 15px; }
.spec-list div { display: grid; grid-template-columns: 6.2rem minmax(0, 1fr); gap: 12px; }
.spec-list dt { color: var(--gray); }
.spec-list dd { margin: 0; }
.chart { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.chart th, .chart td { padding: 9px 6px; text-align: right; border-bottom: 1px solid #454545; }
.chart th:first-child { text-align: left; padding-left: 0; }
.chart td:last-child, .chart thead th:last-child { padding-right: 0; }
.chart thead th { font-weight: 600; font-size: 13px; color: var(--gray); vertical-align: bottom; }
.chart tbody th { font-weight: 700; }
.spec-note { font-size: 13px; line-height: 1.5; color: var(--gray); }
@media (max-width: 760px) {
  .sheet { width: 100vw; margin: auto 0 0; border-radius: 22px 22px 0 0; max-height: 92svh; overflow-y: auto; }
  .sheet[open] { grid-template-columns: 1fr; grid-template-rows: auto; }
  /* the sheet itself scrolls here, so keep the close button in reach */
  .sheet .x { position: sticky; top: 14px; justify-self: end; margin: 14px 14px -58px 0; }
  .p-art { min-height: 0; padding: 28px 28px 8px; } .p-art img { width: min(62%, 260px); }
  .p-views { padding: 8px 20px 14px; }
  .p-info { padding: 20px 20px 28px; overflow: visible; }
}

.drawer { width: min(420px, 100vw); height: 100dvh; margin: 0 0 0 auto; }
.drawer[open] { display: flex; flex-direction: column; }
.bag-head { padding: 22px 24px; border-bottom: 1px solid var(--bg-3); position: relative; }
.bag-head h2 { font-size: 32px; }
.bag-items { list-style: none; margin: 0; padding: 4px 24px; overflow-y: auto; flex: 1; }
.bag-items li { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--bg-3); }
.thumb { background: var(--bg-3); border-radius: 10px; padding: 6px; }
.thumb img { width: 100%; height: auto; display: block; }
.line-name { font-weight: 600; } .line-meta { font-size: 14px; color: var(--gray); margin-bottom: 6px; } .line-price { font-weight: 700; }
.qty { display: inline-flex; align-items: center; gap: 10px; }
.qty button { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--gray); background: transparent; line-height: 1; cursor: pointer; }
.bag-empty { padding: 32px 24px; flex: 1; color: var(--gray); }
.bag-foot { padding: 20px 24px 28px; border-top: 1px solid var(--bg-3); }
.total { display: flex; justify-content: space-between; font-weight: 700; font-size: 20px; margin-bottom: 16px; }
.notice { font-size: 14px; margin-top: 14px; background: var(--bg-3); border-radius: 10px; padding: 10px 12px; }
.notice a { color: var(--yellow); }
[hidden] { display: none !important; }

/* ---------- motion ---------- */
.piece:active .cloth { transform: scale(.95); }
@media (prefers-reduced-motion: no-preference) {
  /* load: headline rises, pieces drop onto the rail, shelf items pop up */
  .hero h1 { animation: rise .7s cubic-bezier(.2,.8,.2,1) both; }
  .hero-copy p { animation: rise .7s .12s cubic-bezier(.2,.8,.2,1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(40px); clip-path: inset(0 0 100% 0); } to { clip-path: inset(-20% 0 -20% 0); } }
  .hang .piece { animation: drop .7s calc(var(--i, 0) * 70ms + 150ms) cubic-bezier(.3,1.35,.5,1) both; }
  @keyframes drop { from { opacity: 0; transform: translateY(-70px); } }
  .sit .piece { animation: pop .55s calc(var(--i, 0) * 90ms + 500ms) cubic-bezier(.3,1.6,.5,1) both; transform-origin: 50% 100%; }
  @keyframes pop { from { opacity: 0; transform: scale(.4) translateY(20px); } }
  .sit .piece:hover .cloth { animation: wobble .6s ease-in-out; }
  @keyframes wobble { 30% { rotate: -6deg; } 60% { rotate: 5deg; } 85% { rotate: -2deg; } }

  /* product panel: the piece flies in bigger, then floats; colour changes spin it */
  ::view-transition-group(piece) { animation-duration: .6s; animation-timing-function: cubic-bezier(.3,1.3,.4,1); }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .3s; }
  .p-art img { animation: float 4.5s ease-in-out infinite alternate; }
  @keyframes float { from { translate: 0 6px; rotate: -1.2deg; } to { translate: 0 -10px; rotate: 1.2deg; } }
  .p-art img.swap { animation: swap .5s cubic-bezier(.3,1.3,.4,1), float 4.5s .5s ease-in-out infinite alternate; }
  @keyframes swap { from { opacity: 0; scale: .7; rotate: -14deg; } }
  .p-info > * { animation: rise-s .45s cubic-bezier(.2,.8,.2,1) both; }
  .p-info > :nth-child(2) { animation-delay: .05s; } .p-info > :nth-child(3) { animation-delay: .1s; } .p-info > :nth-child(4) { animation-delay: .15s; }
  .p-info > :nth-child(5) { animation-delay: .2s; } .p-info > :nth-child(6) { animation-delay: .25s; }
  @keyframes rise-s { from { opacity: 0; transform: translateY(18px); } }

  .drawer[open] { animation: slide .32s cubic-bezier(.2,.8,.2,1); }
  @keyframes slide { from { transform: translateX(100%); } }
  .bag-count.bump { animation: bump .45s cubic-bezier(.3,1.6,.5,1); }
  @keyframes bump { 40% { scale: 1.6; } }

  /* scroll: the ramp photo drifts and the headline slides in as the section enters */
  @supports (animation-timeline: view()) {
    .ramps-bg { animation: drift linear both; animation-timeline: view(); scale: 1.2; }
    @keyframes drift { from { translate: 0 -8%; } to { translate: 0 8%; } }
    .ramps-copy, .count { animation: enter linear both; animation-timeline: view(); animation-range: entry 10% cover 40%; }
    @keyframes enter { from { opacity: 0; translate: 0 60px; } }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tape-run { animation: none; }
  .cloth, .p-art img { transition: none; }
}
