/* The Continental: royal purple and pillar gold, drawn on the same pixel grid as the logo.
   Notched corners and hard drop edges echo the pixel pillar; gold marks what you can act on. */

/* Fonts are served by the shop itself (SIL Open Font License, see fonts/OFL-*.txt), so visitors
   aren't sent to Google. */
@font-face { font-family: "Big Shoulders Display"; src: url("/fonts/big-shoulders-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Big Shoulders Display"; src: url("/fonts/big-shoulders-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/fonts/atkinson-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/fonts/atkinson-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --night: #2B0D40;      /* deepest purple: header, footer, text */
  --royal: #8932B8;      /* the logo's purple */
  --royal-dark: #6E2496;
  --plum: #4A1868;
  --gold: #FED83D;       /* the logo's yellow */
  --gold-deep: #C99A12;
  --lilac: #F4EEF9;      /* page */
  --sheet: #FFFFFF;
  --line: #E2D5EE;
  --mute: #6A587C;
  --green: #1E7F52;
  --danger: #B3261E;

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;

  --px: 4px; /* one logo pixel at UI scale */
  --notch: polygon(0 var(--px), var(--px) var(--px), var(--px) 0, calc(100% - var(--px)) 0, calc(100% - var(--px)) var(--px), 100% var(--px),
    100% calc(100% - var(--px)), calc(100% - var(--px)) calc(100% - var(--px)), calc(100% - var(--px)) 100%, var(--px) 100%, var(--px) calc(100% - var(--px)), 0 calc(100% - var(--px)));

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.75rem;
  --step-3: 2.5rem;
  --step-4: clamp(2.6rem, 6.2vw, 5rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--lilac);
  color: var(--night);
  font: 400 var(--step-0)/1.55 var(--body);
  font-variant-numeric: tabular-nums;
}
h1, h2, h3, h4 { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1; letter-spacing: .01em; }
a { color: inherit; }
abbr { text-decoration: none; border-bottom: 1px dotted currentColor; cursor: help; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--night); padding: .5rem 1rem; z-index: 40; }
.skip:focus { left: 1rem; }
[hidden] { display: none !important; }

/* Pixel buttons: square, with a hard edge underneath that you press into. */
.primary, .add-button, .cart-button, .secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 0; border-radius: 0; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .06s, box-shadow .06s;
}
.primary, .add-button {
  background: var(--gold); color: var(--night);
  padding: .8rem 1.4rem; box-shadow: 0 var(--px) 0 var(--gold-deep);
}
.primary:active, .add-button:active, .cart-button:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--gold-deep); }
.primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.secondary { background: none; color: var(--royal-dark); border: 2px solid currentColor; padding: .55rem 1rem; margin: .25rem .5rem .25rem 0; }
.secondary:hover { background: color-mix(in srgb, var(--royal) 8%, transparent); }

/* ---------------------------------------------------------------- header */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 1.25rem;
  padding: .7rem clamp(1rem, 3vw, 2.5rem);
  background: var(--night); color: var(--lilac);
}
.wordmark { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--gold); flex-shrink: 0; }
.mark { width: 1.7rem; height: 3rem; fill: var(--gold); }
.wm-text { display: flex; flex-direction: column; font-family: var(--display); font-weight: 800; font-size: 1.85rem; line-height: .85; letter-spacing: .03em; }
.wm-small { font-size: .9rem; font-weight: 600; letter-spacing: .12em; color: var(--lilac); opacity: .85; }

.search { position: relative; flex: 1; max-width: 40rem; }
.search-icon { position: absolute; z-index: 1; left: .8rem; top: 50%; width: 1.1rem; height: 1.1rem; transform: translateY(-50%); fill: var(--royal); pointer-events: none; }
.search input {
  width: 100%; padding: .7rem 1rem .7rem 2.6rem; border: 3px solid transparent; border-radius: 0;
  background: var(--sheet); color: var(--night); clip-path: var(--notch);
}
.search input::placeholder { color: var(--mute); }
.search input:focus { outline: none; border-color: var(--gold); }

.nav { display: flex; gap: 1.1rem; }
.nav a { text-decoration: none; opacity: .8; padding: .25rem 0; border-bottom: 3px solid transparent; white-space: nowrap; }
.nav a:hover { opacity: 1; }
.nav a[aria-current="page"] { opacity: 1; border-bottom-color: var(--gold); }
.account { display: flex; align-items: center; gap: .5rem; }
.login .long { margin-left: .3em; }
.nav .short { display: none; }
.account img { width: 2rem; height: 2rem; clip-path: var(--notch); }
.account .name { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.login {
  display: inline-flex; align-items: center; justify-content: center;
  background: #5865F2; color: #fff; padding: .5rem .9rem; text-decoration: none; font-weight: 700; white-space: nowrap;
  box-shadow: 0 var(--px) 0 #3B45B5;
}
.linkish { background: none; border: 0; color: inherit; opacity: .75; text-decoration: underline; cursor: pointer; padding: 0; }
.cart-button { background: var(--gold); color: var(--night); padding: .5rem .85rem; box-shadow: 0 var(--px) 0 var(--gold-deep); }
.cart-button svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }
.cart-button .count { background: var(--night); color: var(--gold); min-width: 1.6rem; padding: 0 .4rem; text-align: center; }

/* Aisles: the categories, one tap away on every screen */
.aisles {
  display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none;
  padding: .55rem clamp(1rem, 3vw, 2.5rem); background: var(--plum);
}
.aisles::-webkit-scrollbar { display: none; }
.aisles button {
  flex-shrink: 0; background: none; border: 0; color: var(--lilac); padding: .35rem .8rem; cursor: pointer; white-space: nowrap; font-weight: 700;
}
.aisles button:hover { background: color-mix(in srgb, var(--lilac) 12%, transparent); }
.aisles button[aria-pressed="true"] { background: var(--gold); color: var(--night); }
.aisles .n { font-weight: 400; opacity: .7; margin-left: .4rem; font-size: var(--step--1); }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem; align-items: end;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 3vw, 2.5rem) 0;
  color: var(--sheet);
  /* a faint 8px block texture, like a wall of purple blocks */
  background:
    repeating-conic-gradient(var(--royal) 0 25%, #8430B1 0 50%) 0 0 / 16px 16px;
}
.hero-copy { padding-bottom: clamp(2.5rem, 6vw, 5rem); max-width: 42rem; }
.hero h1 { font-size: var(--step-4); text-wrap: balance; }
.lede { max-width: 34rem; font-size: var(--step-1); line-height: 1.5; margin: 1.25rem 0 2rem; color: #F3E9FA; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }
.hero .primary { font-size: var(--step-1); }
.ghost-link { color: var(--sheet); font-weight: 700; text-underline-offset: .25em; }

/* The colonnade: three pillars rise into place, block by block, once. */
.colonnade { display: flex; align-items: flex-end; justify-content: center; gap: clamp(1rem, 3vw, 2.5rem); align-self: stretch; }
.pillar { fill: var(--gold); width: 6rem; height: 10.5rem; animation: rise .9s steps(7, end) both; }
/* the outer pillars stand further back, so they take on the wall's purple */
.pillar.p1, .pillar.p3 { fill: #C68CE6; width: 7rem; height: 12.25rem; }
.pillar.p1 { animation-delay: .15s; }
.pillar.p2 { width: 11rem; height: 19.25rem; }
.pillar.p3 { animation-delay: .3s; }
@keyframes rise { from { transform: translateY(100%); } to { transform: none; } }

/* ---------------------------------------------------------------- how it travels */
.promise { background: var(--night); color: var(--lilac); padding: clamp(2.5rem, 5vw, 4rem) clamp(1rem, 3vw, 2.5rem); }
.promise > * { max-width: 72rem; margin-left: auto; margin-right: auto; }
.promise h2 { font-size: var(--step-3); color: var(--gold); margin-bottom: 2.25rem; text-wrap: balance; }
.route { margin: 0 auto 2.5rem; }
.pledges { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin-bottom: 0; }
.pledges li { display: grid; gap: .35rem; padding-top: 1rem; border-top: var(--px) solid var(--royal); }
.pledges strong { font-family: var(--display); font-size: var(--step-2); color: var(--sheet); font-weight: 800; }
.pledges span { color: #D9C9E6; }

/* The route: the order statuses as stations on a line */
.stations { --done: 0; position: relative; display: grid; grid-template-columns: repeat(5, 1fr); list-style: none; margin: 0; padding: 0; }
.stations::before, .stations::after { content: ""; position: absolute; top: 1.05rem; left: 10%; height: var(--px); }
.stations::before { right: 10%; background: color-mix(in srgb, currentColor 25%, transparent); }
.stations::after { width: calc(80% * var(--done) / 4); background: var(--gold); transition: width 1.3s steps(12, end); }
.station { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; font-size: var(--step--1); }
.station .stop {
  width: 2.4rem; height: 2.4rem; display: grid; place-items: center; font-size: 1.1rem;
  background: var(--night); border: 3px solid color-mix(in srgb, currentColor 35%, transparent);
}
.station.passed .stop { border-color: var(--gold); }
.station.here .stop { border-color: var(--gold); background: var(--gold); box-shadow: 0 0 0 var(--px) var(--night), 0 0 0 calc(var(--px) * 2) var(--gold); }

/* ---------------------------------------------------------------- shop */
.shop, .orders { padding: clamp(2rem, 4vw, 3.5rem) clamp(1rem, 3vw, 2.5rem); max-width: 84rem; margin: 0 auto; }
.shop-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.shop-head h2, .orders h2 { font-size: var(--step-3); color: var(--night); }
.units-note { color: var(--mute); font-size: var(--step--1); max-width: 30rem; margin: 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 1.1rem; }
.group-title {
  grid-column: 1 / -1; display: flex; align-items: baseline; gap: .75rem;
  font-size: var(--step-2); color: var(--royal-dark); margin-top: 1.25rem;
  padding-bottom: .4rem; border-bottom: var(--px) solid var(--line);
}
.group-title:first-child { margin-top: 0; }
.group-title .n { font-family: var(--body); font-size: var(--step--1); font-weight: 400; color: var(--mute); }

.tile {
  display: flex; flex-direction: column; gap: .45rem;
  background: var(--sheet); padding: .75rem .75rem 1rem; clip-path: var(--notch);
}
.tile-art {
  display: grid; place-items: center; height: 7.5rem; margin-bottom: .35rem;
  background: repeating-conic-gradient(#F1E8F8 0 25%, #EADDF4 0 50%) 0 0 / 16px 16px;
}
.glyph { display: grid; place-items: center; font-size: 3.6rem; line-height: 1; }
.glyph img { width: 4.5rem; height: 4.5rem; object-fit: contain; image-rendering: pixelated; }
.item-name { font-size: var(--step-0); font-weight: 700; line-height: 1.3; }
.price { margin: 0; font-family: var(--display); font-weight: 800; font-size: var(--step-2); line-height: 1; color: var(--night); }
.price .per { font-family: var(--body); font-weight: 400; font-size: var(--step--1); color: var(--mute); }
.item-note { margin: 0; color: var(--mute); font-size: var(--step--1); }
.pick { display: flex; gap: .4rem; margin-top: auto; padding-top: .4rem; }
.stepper { display: flex; flex: 1; min-width: 0; border: 2px solid var(--line); }
.stepper button { width: 2.1rem; flex-shrink: 0; background: var(--lilac); border: 0; cursor: pointer; font-weight: 700; font-size: 1.1rem; color: var(--royal-dark); }
.stepper button:hover { background: var(--line); }
.stepper input { width: 100%; min-width: 0; border: 0; text-align: center; padding: .4rem 0; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pick select { border: 2px solid var(--line); background: var(--sheet); padding: .35rem .3rem; border-radius: 0; }
.add-button { width: 100%; padding: .65rem 1rem; margin-top: .2rem; }
.add-button.added { background: var(--green); color: var(--sheet); box-shadow: 0 var(--px) 0 #145C3A; }
.empty { grid-column: 1 / -1; padding: 3rem 1.25rem; color: var(--mute); text-align: center; background: var(--sheet); clip-path: var(--notch); }

/* ---------------------------------------------------------------- cart */
.scrim { position: fixed; inset: 0; background: rgba(43, 13, 64, .55); z-index: 20; }
.cart {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 21; width: min(30rem, 100vw);
  display: flex; flex-direction: column; background: var(--sheet);
  animation: slide-in .2s steps(5, end);
}
@keyframes slide-in { from { transform: translateX(100%); } to { transform: none; } }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.5rem; background: var(--night); color: var(--gold); border-bottom: var(--px) solid var(--gold); }
.cart-head h2 { font-size: var(--step-3); }
.close { background: none; border: 0; font-size: 2rem; line-height: 1; cursor: pointer; color: var(--lilac); padding: 0 .25rem; }
.cart-body { flex: 1; overflow-y: auto; padding: .5rem 1.5rem 1.5rem; }
.wb-lines { list-style: none; margin: 0; padding: 0; }
.wb-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem 1rem; padding: .9rem 0; border-bottom: 2px solid var(--line); }
.wb-line .what { font-weight: 700; }
.wb-line .controls { display: flex; gap: .4rem; align-items: center; grid-column: 1; }
.wb-line .controls input { width: 4.5rem; padding: .3rem .4rem; border: 2px solid var(--line); text-align: right; }
.wb-line .controls select { padding: .3rem; border: 2px solid var(--line); background: var(--sheet); border-radius: 0; }
.wb-line .amount { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-family: var(--display); font-weight: 800; font-size: var(--step-1); }
.remove { background: none; border: 0; color: var(--danger); text-decoration: underline; cursor: pointer; padding: 0 .25rem; font-size: var(--step--1); }
.wb-total { display: flex; justify-content: space-between; align-items: baseline; padding: 1.1rem 0 .6rem; font-size: var(--step-1); font-weight: 700; }
.wb-total strong { font-family: var(--display); font-size: var(--step-3); color: var(--royal-dark); }
.wb-hint { color: var(--mute); font-size: var(--step--1); margin: 0 0 1.25rem; }
.field { display: grid; gap: .3rem; margin-bottom: .9rem; }
.field span { font-weight: 700; }
.field small { color: var(--mute); font-weight: 400; }
.field input, .field textarea { width: 100%; padding: .6rem .75rem; border: 2px solid var(--line); border-radius: 0; background: var(--sheet); }
.field input:focus, .field textarea:focus { border-color: var(--royal); outline: none; }
.field textarea { min-height: 4.5rem; resize: vertical; }
.wb-error { background: color-mix(in srgb, var(--danger) 9%, var(--sheet)); color: var(--danger); border-left: var(--px) solid var(--danger); padding: .6rem .8rem; margin-bottom: 1rem; }
.wb-cta { width: 100%; font-size: var(--step-1); margin-top: .25rem; }
.stamp {
  display: inline-block; border: var(--px) solid var(--green); color: var(--green); padding: .3rem .9rem;
  font-family: var(--display); font-weight: 800; font-size: var(--step-2); transform: rotate(-3deg); margin: 1.5rem 0 1rem;
}
.done p { max-width: 26rem; }

/* ---------------------------------------------------------------- my orders */
.order { background: var(--sheet); padding: 1.5rem; margin-top: 1.5rem; clip-path: var(--notch); }
.order-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 1rem; margin-bottom: 1.5rem; }
.order-head h3 { font-size: var(--step-2); color: var(--royal-dark); }
.order-head .when { color: var(--mute); }
.order .stations { color: var(--mute); }
.order .station .stop { background: var(--sheet); }
.order .station.here .stop { background: var(--gold); box-shadow: 0 0 0 var(--px) var(--sheet), 0 0 0 calc(var(--px) * 2) var(--gold); }
.order.cancelled .stations { opacity: .35; }
.order-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1.5rem; margin-top: 1.75rem; }
.order-lines { list-style: none; margin: 0; padding: 0; }
.order-lines li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 2px solid var(--line); }
.order-lines .details { color: var(--mute); font-size: var(--step--1); }
.order-lines s { color: var(--mute); margin-right: .4rem; }
.order-total { display: flex; justify-content: space-between; font-weight: 700; padding-top: .6rem; font-size: var(--step-1); }
.order-side p { margin: 0 0 .75rem; }
.badge { display: inline-block; padding: .1rem .5rem; font-weight: 700; font-size: var(--step--1); }
.badge.paid { background: color-mix(in srgb, var(--green) 14%, var(--sheet)); color: var(--green); }
.badge.owed { background: var(--gold); color: var(--night); }
.badge.cancel { background: color-mix(in srgb, var(--danger) 12%, var(--sheet)); color: var(--danger); }
.muted { color: var(--mute); }
.orders .login, .orders .primary { margin-top: .5rem; }

/* ---------------------------------------------------------------- footer & toast */
.foot {
  display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center;
  padding: 2.5rem clamp(1rem, 3vw, 2.5rem); background: var(--night); color: #D9C9E6;
}
.foot-brand { display: flex; align-items: center; gap: .6rem; color: var(--gold); font-family: var(--display); font-weight: 800; font-size: var(--step-2); }
.foot-brand .mark { width: 1.3rem; height: 2.3rem; }
.foot p { margin: .25rem 0; max-width: 46rem; }
.foot strong { color: var(--gold); }
.foot a { color: var(--sheet); }
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 30;
  background: var(--night); color: var(--lilac); padding: .8rem 1.2rem; border-left: var(--px) solid var(--gold);
  max-width: min(32rem, calc(100vw - 2rem));
}

/* ---------------------------------------------------------------- smaller screens */
@media (max-width: 1000px) {
  .bar { flex-wrap: wrap; row-gap: .6rem; }
  .search { order: 5; flex-basis: 100%; max-width: none; }
  .nav { margin-left: auto; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .colonnade { justify-content: center; }
  .hero-copy { padding-bottom: 0; }
  .pillar.p2 { width: 6.5rem; height: 11.4rem; }
  .pillar.p1, .pillar.p3 { width: 4.25rem; height: 7.4rem; }
  .pledges { grid-template-columns: 1fr; gap: 1.25rem; }
  .order-body { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .wm-text { font-size: 1.5rem; }
  .mark { width: 1.4rem; height: 2.45rem; }
  .bar { position: static; gap: .6rem .5rem; padding-left: 1rem; padding-right: 1rem; }
  .cart-button { padding: .45rem .6rem; }
  .wordmark { gap: .45rem; }
  .nav a[data-nav="shop"], .login .long, .nav .long { display: none; }
  .bar .nav { gap: .75rem; }
  .nav .short { display: inline; }
  .account .name { display: none; }
  .login { padding: .4rem .7rem; font-size: var(--step--1); }
  .cart-label { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .tile { padding: .55rem .55rem .8rem; }
  .tile-art { height: 5.5rem; }
  .glyph { font-size: 2.8rem; }
  .glyph img { width: 3.4rem; height: 3.4rem; }
  .price { font-size: var(--step-1); }
  .pick { flex-direction: column; }
  .pick select { width: 100%; }
  .station { font-size: .7rem; }
  .station .stop { width: 2rem; height: 2rem; font-size: .95rem; }
  .stations::before, .stations::after { top: .85rem; }
}
@media (max-width: 400px) {
  .wm-text { font-size: 1.3rem; }
  .mark { width: 1.2rem; height: 2.1rem; }
  .login { padding: .4rem .55rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
