@font-face { font-family: "Bricolage"; src: url("/fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #0B3F52;
  --bg-deep: #08323f;
  --ink: #FBF3E2;
  --accent: #F28C28;
  --accent2: #7FD1C3;
  --paper: #F3E7CF;
  --paper-ink: #0B3F52;
  --muted: color-mix(in srgb, var(--ink) 72%, var(--bg));
  --line: color-mix(in srgb, var(--ink) 16%, transparent);
  --display: "Bricolage", "Arial Narrow", sans-serif;
  --body: "Geist", system-ui, sans-serif;
  --r: 22px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scrollbar-color: var(--accent) var(--bg-deep); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.55 var(--body);
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}
::selection { background: var(--accent); color: #1a1208; }
img, video { max-width: 100%; display: block; }
button, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--accent2); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--accent); color: #1a1208; padding: 10px 16px; border-radius: 999px; z-index: 100; font-weight: 600; }
.skip:focus { top: 12px; }

/* header */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand { font: 800 22px/1 var(--display); letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.cart-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 999px; border: 1.5px solid var(--line); background: transparent; font-weight: 600;
  transition: transform 160ms var(--ease), background-color 200ms ease;
}
.cart-btn:active { transform: scale(0.97); }
.cart-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #1a1208; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .cart-btn:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); } }

/* hero */
.hero {
  display: grid; gap: 28px; align-items: center;
  max-width: 1440px; margin: 0 auto; padding: 28px 16px 44px;
}
.hero-copy h1 {
  margin: 0 0 16px; font: 800 clamp(3.4rem, 17vw, 6rem)/0.92 var(--display);
  letter-spacing: -0.035em; text-wrap: balance;
}
.hero-copy h1 .line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hero-copy h1 .word { display: inline-block; will-change: transform; }
.hero-copy h1 .amp { color: var(--accent); }
.hero-copy p { margin: 0 0 24px; max-width: 30ch; color: var(--muted); font-size: 1.12rem; }
.cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 30px; border-radius: 999px; border: 0;
  background: var(--accent); color: #1a1208; font-weight: 700; font-size: 1.05rem; text-decoration: none; white-space: nowrap;
  box-shadow: 0 10px 26px -10px rgba(242, 140, 40, .55);
  transition: transform 160ms var(--ease), box-shadow 200ms ease;
}
.cta:active { transform: scale(0.97); }
.cta.full { width: 100%; }
@media (hover: hover) and (pointer: fine) { .cta:hover { box-shadow: 0 14px 30px -10px rgba(242, 140, 40, .7); } }

.hero-media { position: relative; }
.frame { position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--bg-deep); box-shadow: 0 30px 60px -28px rgba(0, 0, 0, .6); }
.frame video { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 50%; }
.sticker { position: absolute; width: min(46%, 230px); height: auto; left: -4px; bottom: -22px; rotate: -7deg; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .35)); will-change: transform; }

@media (min-width: 880px) {
  .hero { grid-template-columns: 5fr 7fr; gap: 56px; padding: 56px 32px 72px; min-height: min(86dvh, 820px); }
  .hero-copy h1 { font-size: clamp(5rem, 9vw, 8.2rem); }
  .frame { aspect-ratio: 5 / 4; }
  .sticker { width: min(34%, 300px); left: -36px; bottom: -34px; }
}

/* marquee: the single constant-motion element on the page */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--bg-deep); padding: 18px 0; }
.track { display: flex; width: max-content; gap: 44px; animation: slide 46s linear infinite; font: 800 clamp(2rem, 7vw, 3.6rem)/1 var(--display); letter-spacing: -0.02em; text-transform: uppercase; }
.track span { white-space: nowrap; color: var(--ink); }
.track span:nth-child(even) { color: transparent; -webkit-text-stroke: 1.5px var(--accent); }
@keyframes slide { to { transform: translateX(-50%); } }

/* shop */
.shop { max-width: 1440px; margin: 0 auto; padding: 64px 16px 32px; }
.shop-head { margin-bottom: 18px; }
.shop-sub { margin: 6px 0 0; color: var(--muted); }
.shop h2, .good h2 { margin: 0 0 4px; font: 800 clamp(2.2rem, 8vw, 3.6rem)/1 var(--display); letter-spacing: -0.03em; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 18px; margin: 0 -16px; scrollbar-width: none; scroll-snap-type: x proximity; }
.filters::-webkit-scrollbar { display: none; }
.filters button {
  flex: none; min-height: 44px; padding: 0 20px; border-radius: 999px; scroll-snap-align: start;
  border: 1.5px solid var(--line); background: transparent; font-weight: 600;
  transition: transform 160ms var(--ease), background-color 200ms ease, color 200ms ease;
}
.filters button:active { transform: scale(0.97); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper-ink); border-color: var(--ink); }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { display: flex; flex-direction: column; align-items: stretch; width: 100%; padding: 0; border: 0; background: none; color: inherit; text-align: left; border-radius: var(--r); }
.tile .pic { display: block; position: relative; overflow: hidden; border-radius: var(--r); background: var(--paper); aspect-ratio: 1 / 1; width: 100%; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease); }
.tile .name { display: block; margin: 12px 4px 0; font-weight: 600; line-height: 1.25; font-size: 0.98rem; text-wrap: balance; }
.tile .from { display: block; margin: 2px 4px 0; color: var(--muted); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.tile:active .pic img { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .tile:hover .pic img { transform: scale(1.04); } }
.empty { color: var(--muted); }

.good { max-width: 1440px; margin: 0 auto; padding: 48px 16px 56px; }
.good dl { display: grid; gap: 28px; margin: 0; }
.good dt { font: 800 1.5rem/1.1 var(--display); letter-spacing: -0.02em; }
.good dd { margin: 6px 0 0; color: var(--muted); max-width: 46ch; }
@media (min-width: 760px) { .good dl { grid-template-columns: repeat(3, 1fr); gap: 48px; } }

.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 24px 16px calc(32px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.foot a { color: var(--ink); }

/* sheets */
.overlay { position: fixed; inset: 0; z-index: 30; background: rgba(4, 22, 29, .62); backdrop-filter: blur(3px); opacity: 0; transition: opacity 220ms ease; }
.overlay.on { opacity: 1; }
.sheet {
  position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper); color: var(--paper-ink); border-radius: 26px 26px 0 0; padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(100%); transition: transform 220ms var(--ease-sheet);
}
.sheet.on { transform: translateY(0); transition-duration: 420ms; }
@media (min-width: 760px) {
  .sheet { left: auto; width: 460px; top: 0; max-height: none; border-radius: 26px 0 0 26px; transform: translateX(100%); }
  .sheet.on { transform: translateX(0); }
}
.sheet[hidden], .overlay[hidden] { display: none; }
.close { position: absolute; top: 10px; right: 10px; z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(251, 243, 226, .92); color: var(--paper-ink); display: grid; place-items: center; transition: transform 160ms var(--ease); }
.close:active { transform: scale(0.94); }
.sheet-media { background: #e9dcc0; aspect-ratio: 1; overflow: hidden; }
.sheet-media img { width: 100%; height: 100%; object-fit: cover; transition: opacity 180ms ease, filter 180ms ease; }
.sheet-media img.swap { opacity: .35; filter: blur(2px); }
.sheet-body { padding: 18px 18px 8px; }
.sheet-body h3 { margin: 0 0 4px; font: 800 1.7rem/1.05 var(--display); letter-spacing: -0.025em; text-wrap: balance; padding-right: 36px; }
.price { margin: 0 0 14px; font-weight: 700; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.swatches, .pills { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0; background: transparent; }
.swatch i { position: absolute; inset: 6px; border-radius: 50%; border: 1.5px solid rgba(11, 63, 82, .35); transition: transform 160ms var(--ease); }
.swatch[aria-checked="true"]::after { content: ""; position: absolute; inset: 1px; border-radius: 50%; border: 2.5px solid var(--paper-ink); }
.swatch:active i { transform: scale(0.92); }
.pill { min-width: 52px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1.5px solid rgba(11, 63, 82, .3); background: transparent; font-weight: 600; transition: transform 160ms var(--ease), background-color 160ms ease; }
.pill[aria-checked="true"] { background: var(--paper-ink); color: var(--paper); border-color: var(--paper-ink); }
.pill:active { transform: scale(0.97); }
.sheet-cta { position: sticky; bottom: 0; padding: 12px 18px 18px; background: linear-gradient(transparent, var(--paper) 30%); }
.sheet .cta { box-shadow: none; }

.lines { list-style: none; padding: 0; margin: 12px 0; }
.lines li { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(11, 63, 82, .14); }
.lines img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; }
.lines .t { font-weight: 600; font-size: 15px; line-height: 1.25; }
.lines .s { color: rgba(11, 63, 82, .75); font-size: 13px; }
.qty { display: flex; align-items: center; gap: 2px; margin-top: 4px; }
.qty button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; font-size: 20px; }
.qty button:active { background: rgba(11, 63, 82, .1); }
.qty span { min-width: 1.4em; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.total { display: flex; justify-content: space-between; font-size: 1.2rem; margin: 14px 0 4px; }
.total strong { font-variant-numeric: tabular-nums; }
.note { color: rgba(11, 63, 82, .75); font-size: 14px; margin: 0 0 14px; }
.empty-cart { color: rgba(11, 63, 82, .8); }
.msg { min-height: 1.4em; font-weight: 600; }
.msg.err { color: #9d2217; }
.msg.ok { color: #1c6b4f; }
.sheet-body { padding-bottom: 20px; }

/* design cards (the default collection view) */
.grid.designs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 760px) { .grid.designs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; } }
.dcard { display: flex; flex-direction: column; width: 100%; padding: 0; border: 0; background: none; color: inherit; text-align: left; border-radius: 28px; }
.dcard .art { display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 5; border-radius: 28px; padding: 9%; overflow: hidden; position: relative; transition: transform 420ms var(--ease), box-shadow 420ms var(--ease); }
.dcard .art img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 14px 14px rgba(11, 63, 82, .22)); transition: transform 520ms var(--ease); }
.dcard .meta { display: block; padding: 14px 6px 0; }
.dcard .dn { display: block; font: 800 1.25rem/1.1 var(--display); letter-spacing: -0.02em; text-wrap: balance; }
.dcard .dm { display: block; margin-top: 4px; color: var(--muted); font-size: .95rem; font-variant-numeric: tabular-nums; }
.dcard:active .art { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) {
  .dcard:hover .art { transform: translateY(-4px); box-shadow: 0 26px 40px -22px rgba(0, 0, 0, .55); }
  .dcard:hover .art img { transform: scale(1.05) rotate(-1.5deg); }
}

/* product-type tabs inside the sheet */
.tabs { display: flex; gap: 6px; margin: 0 0 14px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin-inline: -2px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid rgba(11, 63, 82, .25); background: transparent; font-weight: 600; font-size: .95rem; transition: transform 160ms var(--ease), background-color 160ms ease; }
.tabs button[aria-checked="true"] { background: var(--paper-ink); color: var(--paper); border-color: var(--paper-ink); }
.tabs button:active { transform: scale(0.97); }
.perks { margin: 4px 0 0; color: rgba(11, 63, 82, .78); font-size: .92rem; }

/* sticky cart bar */
.cartbar {
  position: fixed; z-index: 25; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px; width: min(560px, calc(100% - 24px)); min-height: 60px; padding: 0 8px 0 10px;
  border: 0; border-radius: 999px; background: var(--ink); color: var(--paper-ink); font-weight: 600; text-align: left;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .6);
  transform: translate(-50%, 140%); transition: transform 460ms var(--ease-sheet);
}
.cartbar.on { transform: translate(-50%, 0); }
.cartbar .cb-count { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #1a1208; font-weight: 800; font-variant-numeric: tabular-nums; }
.cartbar .cb-text { flex: 1; }
.cartbar .cb-text strong { margin-left: 6px; font-variant-numeric: tabular-nums; }
.cartbar .cb-go { display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border-radius: 999px; background: var(--paper-ink); color: var(--paper); }
.cartbar:active { transform: translate(-50%, 0) scale(0.985); }
.cartbar[hidden] { display: none; }
body.has-bar .foot { padding-bottom: 96px; }

/* toast */
.toast {
  position: fixed; z-index: 45; left: 50%; top: calc(76px + env(safe-area-inset-top)); width: min(440px, calc(100% - 24px));
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 8px; border-radius: 18px;
  background: var(--paper); color: var(--paper-ink); box-shadow: 0 20px 44px -14px rgba(0, 0, 0, .6);
  transform: translate(-50%, -24px); opacity: 0; transition: transform 380ms var(--ease), opacity 220ms ease;
}
.toast.on { transform: translate(-50%, 0); opacity: 1; }
.toast[hidden] { display: none; }
.toast img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.toast span { flex: 1; font-weight: 600; font-size: .95rem; line-height: 1.25; }
.toast button { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--paper-ink); color: var(--paper); font-weight: 600; }

/* fly-to-cart clone */
.fly { position: fixed; z-index: 60; pointer-events: none; border-radius: 18px; object-fit: cover; box-shadow: 0 16px 30px -10px rgba(0, 0, 0, .5); }
.cart-btn.bump { animation: bump 560ms var(--ease); }
@keyframes bump { 0% { transform: scale(1); } 30% { transform: scale(1.14) rotate(-3deg); } 60% { transform: scale(.97) rotate(1deg); } 100% { transform: scale(1); } }

/* order confirmed */
.done { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(4, 22, 29, .78); backdrop-filter: blur(6px); opacity: 0; transition: opacity 260ms ease; }
.done.on { opacity: 1; }
.done[hidden] { display: none; }
.done canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.done-card { position: relative; width: min(460px, 100%); padding: 32px 24px 24px; border-radius: 28px; background: var(--paper); color: var(--paper-ink); text-align: center; transform: translateY(18px) scale(.97); transition: transform 520ms var(--ease); }
.done.on .done-card { transform: none; }
.done h3 { margin: 12px 0 6px; font: 800 2rem/1.05 var(--display); letter-spacing: -0.03em; }
.done p { margin: 0 0 8px; color: rgba(11, 63, 82, .82); }
.done .ref { font-size: .85rem; word-break: break-all; font-variant-numeric: tabular-nums; margin-bottom: 18px; }
.check { width: 84px; height: 84px; color: #1c8a5e; }
.check circle { stroke-dasharray: 150; stroke-dashoffset: 150; }
.check path { stroke-dasharray: 44; stroke-dashoffset: 44; }
.done.on .check circle { animation: draw 700ms var(--ease) 120ms forwards; }
.done.on .check path { animation: draw 520ms var(--ease) 560ms forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .cartbar, .toast, .done, .done-card { transition-duration: 1ms; }
  .cart-btn.bump { animation: none; }
  .check circle, .check path { stroke-dashoffset: 0; animation: none !important; }
  html { scroll-behavior: auto; }
  .track { animation: none; }
  .sheet, .sheet.on, .overlay { transition-duration: 1ms; }
  .tile img, .cta, .cart-btn { transition: none; }
}
