/* ===== Tokens ===== */
:root {
  --red: #e3000b;
  --red-dark: #c00009;
  --yellow: #ffcd03;
  --blue: #006cb7;
  --green: #00a650;
  --ink: #1d1d25;
  --ink-soft: #5b5b6b;
  --line: #ececf1;
  --bg: #ffffff;
  --tint: #fff8e1;
  --white: #ffffff;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 2px 6px rgba(29, 29, 37, .06), 0 8px 24px rgba(29, 29, 37, .08);
  --shadow-hover: 0 4px 10px rgba(29, 29, 37, .08), 0 16px 36px rgba(29, 29, 37, .12);
  --font-display: "Fredoka", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
  --max: 1120px;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; margin: 0 0 .5em; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-display); font-weight: 600; font-size: 1.1rem;
  padding: .75em 1.6em; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--red { background: var(--red); color: var(--white); box-shadow: 0 6px 16px rgba(227, 0, 11, .25); }
.btn--red:hover { background: var(--red-dark); }
.btn--yellow { background: var(--yellow); color: var(--ink); }
.btn--ghost { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--small { font-size: .95rem; padding: .5em 1.2em; }

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .9); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; position: relative; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand__logo { width: auto; height: 46px; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; }
/* Top bar: logo stays left, @BricksDesigner sits in the middle of the bar. */
.nav .brand__name { position: absolute; left: 50%; translate: -50% 0; white-space: nowrap; }

.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a:not(.btn) {
  text-decoration: none; font-weight: 700; color: var(--ink-soft); transition: color .15s;
}
.nav__links a:not(.btn):hover { color: var(--red); }

.nav__toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav__toggle span { display: block; width: 24px; height: 2.5px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }

/* ===== Hero ===== */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.hero { padding: 8px 0 56px; }
/* Pinned under the nav; .page-cover scrolls up over it. */
.hero__stage {
  position: sticky; top: 68px; z-index: 0;
  display: grid; place-items: end center;
  --stage-h: clamp(340px, calc(100svh - 68px - 96px), 800px);
  height: var(--stage-h);
  padding-top: 32px; overflow: hidden;
  background: linear-gradient(180deg, var(--white) 0%, var(--tint) 100%);
}
.page-cover {
  position: relative; z-index: 1; background: var(--bg);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -10px 30px rgba(29, 29, 37, .08);
}
.hero__logo {
  position: relative; width: auto; max-width: 92vw; object-fit: contain; object-position: bottom;
  height: min(calc(var(--stage-h) - 32px), 720px);
  filter: drop-shadow(0 8px 16px rgba(29, 29, 37, .18));
}
.hero__socials {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px;
}
.hero__social {
  display: inline-flex; align-items: center; gap: 10px; padding: .75em 1.4em;
  border-radius: 999px; color: var(--white); text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: 1.1rem;
  box-shadow: 0 6px 16px rgba(29, 29, 37, .15); transition: transform .15s ease, filter .15s ease;
}
.hero__social:hover { transform: translateY(-2px); filter: brightness(1.08); }
.hero__social svg { width: 20px; height: 20px; fill: currentColor; }
/* Scrolling photo collage */
.collage {
  margin: 48px 0 0; display: grid; gap: 16px; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.collage__row { display: flex; gap: 16px; width: max-content; animation: scroll 60s linear infinite; }
.collage__row--reverse { animation-direction: reverse; animation-duration: 70s; }
.collage__item {
  width: 200px; aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); flex-shrink: 0; background: var(--line);
}
.collage__item img { width: 100%; height: 100%; object-fit: cover; }
@keyframes scroll { to { transform: translateX(calc(-100% / 3)); } }

/* ===== Sections ===== */
.section { padding: 88px 0; }
.section--tint { background: var(--tint); }
.section__title { font-size: clamp(2rem, 4.5vw, 2.8rem); margin-bottom: .25em; }
.section__sub { font-size: 1.15rem; margin: 0 0 40px; color: var(--ink-soft); }

/* ===== Merch ===== */
.merch__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.merch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.product {
  background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.product__img { aspect-ratio: 1; display: grid; place-items: center; background: #e9e7e1; position: relative; }
.product__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.product__img { overflow: hidden; }
.option-label { margin-top: 12px; font-size: .85rem; font-weight: 700; color: var(--ink-soft); }
.option-label strong { color: var(--ink); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.swatch {
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; padding: 0;
  background: var(--swatch); border: 2px solid var(--white);
  box-shadow: 0 0 0 1px rgba(29, 29, 37, .2); transition: box-shadow .15s;
}
.swatch:hover { box-shadow: 0 0 0 2px var(--ink-soft); }
.swatch.is-selected { box-shadow: 0 0 0 2px var(--ink); }
.product__details { font-size: .9rem; color: var(--ink-soft); }
.product__body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.product__name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; margin: 0; }
.product__price { font-weight: 800; color: var(--ink); margin-top: 4px; }
.product__btn { margin-top: 14px; align-self: flex-start; }
.order-row { display: flex; gap: 12px; margin-top: 2px; }
.order-field { display: flex; flex-direction: column; }
.order-field--grow { flex: 1; min-width: 0; }
.select {
  margin-top: 6px; padding: 8px 32px 8px 12px; border-radius: 10px; border: 2px solid var(--line);
  font: 700 .95rem var(--font-body); color: var(--ink); cursor: pointer; width: 100%;
  appearance: none; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235b5b6b' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 12px center;
}
.select:focus { outline: none; border-color: var(--ink-soft); }
.shipping { display: grid; gap: 8px; margin-top: 6px; }
.shipping__note { margin: 0; font-size: .9rem; color: var(--ink-soft); }
.shipping__note--error { color: var(--red); font-weight: 700; }
.ship-option {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer;
  border: 2px solid var(--line); border-radius: 12px; transition: border-color .15s;
}
.ship-option:has(input:checked) { border-color: var(--ink); }
.ship-option input { accent-color: var(--ink); margin: 0; }
.ship-option__name { flex: 1; font-weight: 800; font-size: .95rem; line-height: 1.3; }
.ship-option__name small { display: block; font-weight: 600; color: var(--ink-soft); font-size: .85rem; }
.ship-option__price { font-weight: 800; }
.product__total { margin: 14px 0 0; font-size: 1.05rem; }
.product__total:empty { display: none; }
.product__total span { color: var(--ink-soft); font-size: .85rem; }
.product__btn[data-buy]:disabled { opacity: .6; cursor: wait; transform: none; }
.product__error { margin: 8px 0 0; font-size: .9rem; font-weight: 700; color: var(--red); }
.product__error:empty { display: none; }
.order-success {
  margin: 0 0 24px; padding: 16px 20px; border-radius: var(--radius-sm);
  background: var(--white); box-shadow: var(--shadow); font-weight: 800;
}
.sizes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.size {
  min-width: 42px; padding: 6px 10px; border-radius: 10px; cursor: pointer;
  font: 700 .85rem var(--font-body); color: var(--ink);
  background: var(--white); border: 2px solid var(--line); transition: border-color .15s, background .15s;
}
.size:hover { border-color: var(--ink-soft); }
.size.is-selected { border-color: var(--ink); background: var(--ink); color: var(--white); }
.size.is-soldout { color: #b4b4bf; text-decoration: line-through; }
.size.is-soldout.is-selected { background: #b4b4bf; border-color: #b4b4bf; color: var(--white); }
.product__btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }


/* ===== Track my order ===== */
.track-open {
  display: block; margin: 28px auto 0; padding: 6px 12px; border: 0; background: none; cursor: pointer;
  font: 700 .95rem var(--font-body); color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px;
}
.track-open:hover { color: var(--ink); }
.track {
  width: min(440px, calc(100vw - 32px)); max-height: calc(100svh - 32px); padding: 32px 28px 28px;
  border: 0; border-radius: var(--radius); box-shadow: var(--shadow-hover); color: var(--ink);
}
.track::backdrop { background: rgba(20, 20, 26, .55); }
.track__close {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: #f3f3f6; cursor: pointer; font: 600 1.4rem/1 var(--font-display); color: var(--ink);
}
.track__title { font-size: 1.7rem; margin-bottom: 16px; }
.track__form { display: grid; gap: 12px; }
.track__field { display: flex; flex-direction: column; }
.track__input {
  margin-top: 6px; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line);
  font: 600 1rem var(--font-body); color: var(--ink);
}
.track__input:focus { outline: none; border-color: var(--ink-soft); }
.track__submit { margin-top: 4px; }
.track__submit:disabled { opacity: .6; cursor: wait; transform: none; }
.track__result:not(:empty) { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.track__status { padding: 14px 16px; border-radius: 12px; background: var(--tint); }
.track__status--fulfilled { background: #e6f6ec; }
.track__status--canceled, .track__status--failed { background: #fde8e8; }
.track__status strong { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.track__status p { margin: 2px 0 0; color: var(--ink-soft); }
.track__meta { margin: 12px 0 4px; font-size: .9rem; color: var(--ink-soft); }
.track__items { margin: 0; padding-left: 18px; font-weight: 700; }
.track__shipment { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; font-weight: 700; }
.track__shipment small { flex-basis: 100%; color: var(--ink-soft); font-weight: 600; }
.track__error { margin: 0; color: var(--red); font-weight: 700; }

/* ===== Contact page ===== */
.contact {
  padding: 72px 0 96px; min-height: calc(100svh - 68px - 160px);
  background: linear-gradient(180deg, var(--white) 0%, var(--tint) 100%);
}
.contact__card {
  max-width: 560px; margin: 0 auto; padding: 44px 32px; text-align: center;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
}
.contact__logo { width: 96px; height: auto; margin: 0 auto 12px; }
.contact__title { font-size: clamp(2.2rem, 6vw, 3rem); margin-bottom: .2em; }
.contact__text { font-size: 1.15rem; color: var(--ink-soft); margin: 0 0 28px; }
.contact__email { max-width: 100%; white-space: nowrap; font-size: clamp(.9rem, 4.2vw, 1.15rem); padding: .75em 1.2em; }
.contact__copy {
  display: block; margin: 16px auto 0; padding: 6px 12px; border: 0; background: none; cursor: pointer;
  font: 700 .95rem var(--font-body); color: var(--ink-soft); text-decoration: underline;
}
.contact__copy:hover { color: var(--ink); }
.nav__links a[aria-current="page"] { color: var(--red); }

/* ===== Footer ===== */
.footer { position: relative; z-index: 1; background: var(--bg); padding: 48px 0 28px; border-top: 1px solid var(--line); }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer__note { margin: 10px 0 0; color: var(--ink-soft); font-size: .95rem; }
.footer__socials { display: flex; gap: 10px; }
.footer__socials a {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: #f3f3f6; color: var(--ink); transition: background .15s, color .15s;
}
.footer__socials a:hover { background: var(--red); color: var(--white); }
.footer__socials svg { width: 20px; height: 20px; fill: currentColor; }
.disclaimer { margin-top: 24px; font-size: .8rem; color: var(--ink-soft); opacity: .7; }

/* ===== Responsive ===== */
@media (min-width: 761px) and (max-width: 960px) {
  .nav .brand__name { position: static; translate: none; }
}
@media (max-width: 960px) {
  .merch { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 18px;
    background: var(--white); border-bottom: 1px solid var(--line); padding: 20px 20px 24px;
    display: none;
  }
  .nav.is-open .nav__links { display: flex; }
  .nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

  .hero { padding-bottom: 44px; }
  .hero__stage { --stage-h: max(300px, calc(100svh - 68px - 150px)); }
  .collage { margin: 40px 0 0; gap: 12px; }
  .collage__row { gap: 12px; }
  .collage__item { width: 140px; border-radius: 16px; }
  .section { padding: 64px 0; }
  .merch__head { flex-direction: column; gap: 0; margin-bottom: 8px; }
  .merch { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .container { padding: 0 16px; }
  .hero__socials { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero__social { justify-content: center; padding: .7em 1em; font-size: 1rem; }
  .merch { gap: 12px; }
  .product__body { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .collage__row { flex-wrap: wrap; width: auto; justify-content: center; }
}
