/* Pixel Gift site styles: page frame, bands, buttons, the range of gifts and shared pieces.
   Colours and fonts come from css/tokens.css. The box maker adds css/app.css. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
body {
  margin: 0; overflow-x: clip;
  background: var(--page); color: var(--on-page);
  font: 400 1.0625rem/1.55 var(--font-body);
  --focus: var(--yellow);
}
img, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 4px; }
p { margin: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; letter-spacing: -.01em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.25rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.375rem; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 20; padding: .6rem 1rem; background: var(--yellow); color: var(--green); font-weight: 700; }
.skip-link:focus { top: 1rem; }
main:focus { outline: none; }

/* ---------- bands ---------- */
.band { padding: clamp(2.75rem, 6vw, 5.5rem) max(5vw, 1rem); }
.band--tight { padding-block: clamp(1.5rem, 3vw, 2.5rem); }
.band--cream { background: var(--surface); color: var(--on-surface); --focus: var(--ink); }
.band--green { background: var(--green); color: var(--cream); --focus: var(--yellow); }
.band--red { background: var(--band); color: var(--on-band); --focus: var(--yellow); border-block: 4px solid var(--maroon); }
.band--cream :is(h1, h2), .band--stage :is(h1, h2) { color: var(--heading-on-surface); }
.wrap { max-width: 77.5rem; margin-inline: auto; }
.wrap--narrow { max-width: 46rem; }
.head { display: grid; gap: .75rem; max-width: 44em; margin-bottom: clamp(1.6rem, 4vw, 2.75rem); }
.lead { font-size: 1.1875rem; font-weight: 500; line-height: 1.5; max-width: 34em; }
.small { font-size: .875rem; opacity: .9; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.6rem;
  padding: .6rem max(5vw, 1rem); background: var(--page); border-bottom: 3px solid var(--red-deep);
}
.site-header__logo img { height: 52px; width: auto; }
.site-nav { margin-right: auto; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: inline-block; padding: .6rem 0; font-weight: 500; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; }
.site-header__tools { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.link-button {
  padding: .6rem 0; background: none; border: 0; font: inherit; font-weight: 500; color: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px;
}

/* ---------- buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem; margin: 3px 8px 8px 3px; padding: .65rem 1.3rem;
  font: 700 1.0625rem/1.2 var(--font-body); color: var(--on-surface); text-decoration: none; text-align: center;
  background: var(--panel); border: 0; border-radius: 0; cursor: pointer;
  box-shadow: var(--pixel-border); transition: transform .12s, box-shadow .12s;
}
.button:hover:not([disabled]) { transform: translate(-2px, -2px); box-shadow: 0 0 0 3px var(--ink), 7px 7px 0 3px var(--ink); }
.button:active:not([disabled]) { transform: translate(3px, 3px); box-shadow: 0 0 0 3px var(--ink), 2px 2px 0 3px var(--ink); }
.button--primary { background: var(--action); color: var(--on-action); }
.button--cream { background: var(--cream); color: var(--green); }
.button--small { min-height: 2.75rem; padding: .5rem 1rem; font-size: 1rem; }
.button[disabled] { opacity: .55; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .6rem; }

/* ---------- launch artwork ---------- */
.launch-photo { margin: 0; }
.launch-photo img { display: block; width: 100%; height: auto; border: 3px solid var(--ink); }
.launch-photo figcaption { margin-top: .5rem; font-size: .875rem; }
.occasion-links { display: flex; gap: .75rem 1.5rem; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.occasion-links a { font-weight: 700; }

/* ---------- hero ---------- */
.hero { display: grid; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.hero__copy { display: grid; gap: 1.4rem; }
.perks { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.perks li { padding: .35rem .75rem; background: var(--red-deep); font-size: .9375rem; font-weight: 500; }

.ribbon {
  display: flex; flex-wrap: wrap; justify-content: space-around; gap: .4rem 1.75rem;
  padding: .9rem max(5vw, 1rem); background: var(--yellow); color: var(--green);
  font: 700 clamp(1.0625rem, 2vw, 1.3rem) var(--font-display); border-block: 4px solid var(--yellow-deep);
}
.ribbon span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: .6rem; background: var(--red); vertical-align: 1px; }

/* ---------- the gift box (concept drawing with a live screen) ---------- */
.giftbox {
  position: relative; margin: 1.2rem 14px 14px 3px; padding: 2.3rem 1.8rem 1.7rem;
  background: var(--cream); color: var(--green);
  box-shadow: 0 0 0 3px var(--ink), 12px 12px 0 3px var(--ink);
}
.giftbox::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1.6rem; transform: translateX(-50%); background: var(--yellow); box-shadow: inset -5px 0 0 var(--yellow-deep); }
.giftbox__bow { position: absolute; z-index: 2; top: -18px; left: 50%; width: 52px; height: 24px; transform: translateX(-50%); image-rendering: pixelated; }
.giftbox__screen { position: relative; z-index: 1; padding: .75rem; background: var(--screen); box-shadow: var(--pixel-ring); }
.giftbox__caption {
  position: relative; z-index: 1; display: inline-block; margin: 1rem 0 0; padding: .2rem .55rem;
  background: var(--paper); color: var(--green); font-size: .8125rem; font-weight: 700; box-shadow: var(--pixel-ring);
}
.giftbox--small { padding: 1.9rem 1.4rem 1.3rem; }
.scene-canvas { width: 100%; height: auto; aspect-ratio: 1; image-rendering: pixelated; }

/* ---------- box cards ---------- */
.box-grid { display: grid; gap: clamp(1.25rem, 2.6vw, 2rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); list-style: none; margin: 0; padding: 0; }
.box-card {
  display: grid; gap: .65rem; align-content: start; margin: 3px 8px 8px 3px; padding: .9rem .9rem 1.2rem;
  background: var(--panel); color: var(--green); box-shadow: var(--pixel-border);
}
.band--green .box-card { box-shadow: 0 0 0 3px var(--green-deep), 8px 8px 0 3px var(--green-deep); }
.box-card__screen { padding: .6rem; background: var(--screen); }
.box-card__name { font-size: 1.6rem; }
.box-card__name a { text-decoration: none; }
.box-card__name a:hover { text-decoration: underline; }
.box-card p { font-size: 1rem; }
.box-card__price { justify-self: start; padding: 0 .5rem; background: var(--yellow); font: 700 1.25rem var(--font-display); }
.box-card__soon { font-weight: 700; color: var(--red-deep); }
.box-card__more { font-weight: 700; justify-self: start; }
.box-card .button { justify-self: start; }

/* ---------- steps ---------- */
.steps { display: grid; gap: clamp(1.25rem, 3vw, 2.25rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { display: grid; gap: .6rem; align-content: start; counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 3rem; height: 3rem;
  background: var(--yellow); color: var(--red-dark); font: 700 1.6rem var(--font-display);
  box-shadow: 0 0 0 3px var(--maroon), 5px 5px 0 3px var(--maroon);
}
.steps p { font-size: 1rem; }

/* ---------- facts, specs, notices ---------- */
.specs { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.25rem; margin: 0 0 1rem; }
.specs dt { color: var(--muted); }
.band--green .specs dt, .band--red .specs dt { color: inherit; opacity: .85; }
.specs dd { margin: 0; font-weight: 700; }
.todo { font-weight: 700; background: var(--note-soft); color: var(--green); padding: 0 .3rem; }
.notice { margin: 3px 8px 1rem 3px; padding: .9rem 1rem; max-width: 38em; background: var(--note-soft); color: var(--green); box-shadow: var(--pixel-border-thin); }
.notice p { margin: 0 0 .6rem; }
.notice p:last-child { margin: 0; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.facts li { display: grid; grid-template-columns: 1.1rem minmax(0, 1fr); gap: .8rem; align-items: baseline; }
.facts li::before { content: ""; width: 12px; height: 12px; background: var(--red); box-shadow: 3px 3px 0 var(--ink); }
.band--red .facts li::before { background: var(--yellow); box-shadow: 3px 3px 0 var(--maroon); }
.crumbs { margin: 0 0 1.25rem; font-weight: 700; }

/* ---------- product page ---------- */
.product { display: grid; gap: clamp(1.75rem, 4vw, 3.5rem); align-items: start; }
.product__text { display: grid; gap: 1.1rem; align-content: start; }
.subhead { font: 700 1.375rem var(--font-display); margin: .75rem 0 0; }

/* ---------- FAQ ---------- */
.faq { max-width: 54rem; }
.faq details { border-bottom: 3px solid var(--ink); }
.band--green .faq details { border-color: var(--cream); }
.faq summary { position: relative; padding: 1.1rem 2.5rem 1.1rem 0; font: 700 1.3rem var(--font-display); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .4rem; top: .8rem; font-size: 1.75rem; }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 1.25rem; max-width: 40em; display: grid; gap: .75rem; }

/* ---------- plain text pages ---------- */
.prose { max-width: 42em; display: grid; gap: 1rem; }
.prose h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 1.25rem; }
.prose ul { margin: 0; padding-left: 1.25rem; display: grid; gap: .35rem; }

/* ---------- closing call to action ---------- */
.close { display: grid; gap: 1.5rem; align-items: center; }

/* ---------- footer ---------- */
.site-footer { display: grid; gap: 1.25rem; padding: 2.25rem max(5vw, 1rem) 2.75rem; border-top: 3px solid var(--red-deep); }
.site-footer__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.site-footer img { height: 60px; width: auto; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; list-style: none; margin: 0; padding: 0; }
.site-footer a { display: inline-block; padding: .4rem 0; font-weight: 500; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer small { font-size: .875rem; opacity: .92; max-width: 60em; }

.noscript { padding: 1rem; font-weight: 700; background: var(--note-soft); color: var(--green); }

/* ---------- wider screens ---------- */
@media (min-width: 46rem) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
  .hero__media { order: 0; }
  .product { grid-template-columns: minmax(0, 26rem) minmax(0, 1fr); }
  .product--hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; }
  .close { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (max-width: 45.99rem) {
  /* Phones: logo and Make a box on the first row, links on the second */
  .site-header { position: static; gap: .25rem 1rem; }
  .site-header__logo { order: 1; }
  .site-header__logo img { height: 44px; }
  .site-header__tools { display: contents; }
  .site-header__tools .button { order: 2; margin-left: auto; }
  .site-header::after { content: ""; order: 3; flex-basis: 100%; height: 0; }
  .site-nav { order: 4; margin-right: 0; }
  .site-header__boxes { order: 5; }
  .site-header [data-pg-motion] { order: 6; }
  .site-nav ul { gap: 0 1rem; }
  .site-nav a, .site-header__boxes, .site-header .link-button { padding: .4rem 0; }
  .ribbon { justify-content: flex-start; }
  .hero__media { max-width: 24rem; }
}
@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}

.head--flush { margin: 0; }
.site-header__boxes { font-weight: 500; text-decoration: none; padding: .6rem 0; }
.site-header__boxes:hover { text-decoration: underline; }

/* ---------- the stage: a cream backdrop between red curtains ---------- */
.band--stage {
  position: relative; overflow: hidden; color: var(--on-surface); --focus: var(--ink);
  padding-inline: max(9vw, 1.75rem);
  border-top: 14px solid var(--red);
  background:
    repeating-linear-gradient(90deg, var(--red) 0 12px, transparent 12px 24px) top / 100% 8px no-repeat,
    var(--surface);
}
.band--stage::before, .band--stage::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: clamp(.9rem, 5vw, 4.25rem);
  background: repeating-linear-gradient(90deg, var(--red) 0 12px, var(--red-deep) 12px 19px, var(--red-dark) 19px 22px);
}
.band--stage::before { left: 0; box-shadow: 3px 0 0 var(--maroon); }
.band--stage::after { right: 0; box-shadow: -3px 0 0 var(--maroon); }
.head--centre { margin-inline: auto; text-align: center; justify-items: center; }

/* ---------- the range: each gift on a red plinth, the middle one centre stage ---------- */
.range { list-style: none; margin: 0; padding: 0; display: grid; gap: 3rem; }
.range__item { display: grid; gap: .55rem; align-content: start; justify-items: center; text-align: center; }
.range__item > p { max-width: 24em; }
.range__plinth { position: relative; width: 100%; padding: 0 2% 30px; }
.range__plinth::after {
  content: ""; position: absolute; left: -4%; right: -4%; bottom: 0; height: 14px; background: var(--red);
  box-shadow: 0 0 0 3px var(--ink), 6px 6px 0 3px var(--ink);
}
.range__item--centre .range__plinth::before {   /* the spotlight */
  content: ""; position: absolute; inset: -14% -12% 6px; z-index: 0;
  background: radial-gradient(closest-side, var(--note-soft) 98%, transparent 100%);
}
.range__plinth > .mock { z-index: 1; margin-inline: auto; }
.range__item--centre .range__plinth { padding-bottom: 40px; }
.range__item--centre .range__plinth::after { height: 24px; background: var(--red-deep); box-shadow: 0 0 0 3px var(--ink), 6px 6px 0 3px var(--ink), inset 0 6px 0 var(--red); }
.range__caption { font-size: .8125rem; font-weight: 700; color: var(--muted); margin-top: .35rem; }
.range__occasion { font: 700 1.0625rem var(--font-display); color: var(--red-deep); }
.range__name { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.range__name a { text-decoration: none; }
.range__name a:hover { text-decoration: underline; }
.range__item--centre .range__name { font-size: clamp(2rem, 3.6vw, 2.8rem); }
.range__price { padding: 0 .5rem; background: var(--yellow); font: 700 1.25rem var(--font-display); }
.range__soon { font-weight: 700; color: var(--red-deep); padding: .65rem 0; }
.range__more { font-weight: 700; padding: .65rem 0; }
.range .actions { justify-content: center; gap: .5rem 1.25rem; }
@media (min-width: 60rem) {
  .range { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr); gap: 0 clamp(1.5rem, 3vw, 3rem); }
  .range__item { grid-row: span 7; grid-template-rows: subgrid; gap: .55rem; }
  .range__plinth { align-self: end; }
  /* the gifts either side stand a little smaller, so the middle one leads */
  .range__item:not(.range__item--centre) .mock { width: 90%; }
  .range__item:not(.range__item--centre) .mock--card { width: calc(90% - 18px); }
  .range__item:not(.range__item--centre) .mock--box { width: 72%; }
  .range__item--centre .mock--box { width: 80%; }
}

/* ---------- drawings of the open gifts, each with a live screen ---------- */
.mock { position: relative; width: 100%; color: var(--green); }
.mock__screen { position: relative; padding: 5px; background: var(--screen); box-shadow: var(--pixel-ring); }
.anim, .mock__screen .scene-canvas, .screen-frame .scene-canvas { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; image-rendering: pixelated; }
.mock__inside { font: 700 clamp(.9rem, 1.5vw, 1.2rem)/1.15 var(--font-display); color: var(--red-deep); text-align: center; text-wrap: balance; }
.mock__heart { width: 28px; height: 24px; image-rendering: pixelated; }
.mock--book, .mock--card {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); padding: 10px;
  box-shadow: 0 0 0 3px var(--ink), 8px 8px 0 3px var(--ink);
}
.mock--book { background: var(--red); }
.mock--card { background: var(--blue); width: calc(100% - 18px); margin-right: 18px; }
.mock__page { display: grid; align-content: center; justify-items: center; gap: .6rem; padding: 10px; background: var(--paper); }
.mock--book .mock__page--left { box-shadow: inset -6px 0 0 var(--cream-deep); }
.mock--book .mock__page + .mock__page { box-shadow: inset 6px 0 0 var(--cream-deep); }
.mock--card .mock__page--left { box-shadow: inset -4px 0 0 var(--cream-deep); }
.mock__level { padding: .1rem .45rem; background: var(--blue); color: var(--yellow); font: 700 .8125rem var(--font-display); }
.mock__buttons { display: flex; gap: 10px; }
.mock__buttons i { width: 12px; height: 12px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--ink); }
.mock__buttons i:nth-child(2) { background: var(--yellow); }
.mock__buttons i:nth-child(3) { background: var(--box-green); }
.mock__tab { position: absolute; right: -18px; top: 38%; width: 18px; height: 22%; background: var(--yellow); box-shadow: 0 0 0 3px var(--ink), 4px 4px 0 3px var(--ink); }
.mock--box { padding-top: 12px; }
.mock__bow { position: absolute; z-index: 2; top: -4px; left: 50%; width: 52px; height: 24px; transform: translateX(-50%); image-rendering: pixelated; }
.mock__lid { padding: 14px; margin-bottom: 10px; background: var(--box-green-deep); box-shadow: 0 0 0 3px var(--ink), 8px 8px 0 3px var(--ink); }
.mock__base {
  position: relative; display: grid; place-items: center; height: clamp(3.75rem, 8vw, 5.5rem);
  background: var(--box-green); box-shadow: 0 0 0 3px var(--ink), 8px 8px 0 3px var(--ink), inset 0 6px 0 var(--box-green-deep);
}
.mock__base::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 18px; transform: translateX(-50%); background: var(--red); box-shadow: inset -4px 0 0 var(--red-deep); }
.mock__envelope { position: relative; display: grid; place-items: center; width: 30%; max-width: 7rem; aspect-ratio: 3 / 2; background: var(--paper); box-shadow: var(--pixel-ring); }
.mock__envelope::before { content: ""; position: absolute; inset: 0 0 45%; background: var(--cream-deep); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.mock__envelope .mock__heart { position: relative; }

/* ---------- the shop window in the hero, and plain screens ---------- */
.window { position: relative; margin: 0 14px 14px 0; padding: 0 12px 12px; background: var(--cream); color: var(--green); box-shadow: 0 0 0 3px var(--ink), 12px 12px 0 3px var(--ink); }
.window__awning {
  height: 30px; margin: 0 -12px 12px; box-shadow: 0 3px 0 var(--ink);
  background: repeating-linear-gradient(90deg, var(--white) 0 24px, var(--red-deep) 24px 48px);
}
.window__glass { padding: 6px; background: var(--green); }
.window figcaption, .screen-frame figcaption { display: inline-block; margin-top: 10px; padding: .15rem .5rem; background: var(--paper); color: var(--green); font-size: .8125rem; font-weight: 700; box-shadow: var(--pixel-ring); }
.screen-frame { width: calc(100% - 10px); max-width: 30rem; margin: 0 10px 10px 0; padding: 10px; background: var(--green); box-shadow: 0 0 0 3px var(--ink), 8px 8px 0 3px var(--ink); }
.product__media { margin: 0; display: grid; justify-items: center; gap: .5rem; }

@media (max-width: 45.99rem) {
  .band--stage { padding-inline: max(6vw, 1.5rem); }
  .range__item--centre { order: -1; }
  .range__plinth::after { left: 0; right: 0; }
}
