:root {
  color-scheme: dark;
  --ink: #07090d;
  --surface: #0c1016;
  --surface-raised: #121720;
  --ivory: #f2eee7;
  --text: #f5f7fb;
  --muted: #a8b0bd;
  --line: #252c37;
  --accent: #4169e1;
  --accent-hover: #5278e8;
  --focus: #8fa8ff;
  --danger: #ff8b8b;
  --radius-card: 14px;
  --radius-control: 10px;
  --shell: min(1480px, calc(100% - 48px));
  --sans: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.drawer-open {
  overflow: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-control);
  background: var(--ivory);
  color: var(--ink);
  transform: translateY(-160%);
  transition: transform 180ms var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
  background: rgb(7 9 13 / 0.88);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.brand {
  justify-self: start;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  width: auto;
  max-width: 208px;
  height: 34px;
  object-fit: contain;
}

.brand-logo[hidden] {
  display: none;
}

.brand-fallback {
  display: none;
  align-items: center;
  gap: 12px;
  color: var(--ivory);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.34em;
}

.brand-fallback.is-visible {
  display: inline-flex;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ivory);
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 36px;
  color: #c9ced7;
  font-size: 15px;
}

.desktop-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 180ms var(--ease);
}

.desktop-nav a:hover {
  color: var(--text);
}

.cart-button {
  justify-self: end;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.cart-count {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.hero {
  position: relative;
  min-height: min(68dvh, 720px);
  margin-top: 24px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background:
    radial-gradient(circle at 74% 32%, rgb(65 105 225 / 0.44), transparent 38%),
    linear-gradient(130deg, #101723, #080b11 60%);
  box-shadow: 0 32px 90px rgb(0 18 64 / 0.18);
}

.hero-media,
.hero-scrim {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media img.is-missing {
  display: none;
}

.hero-scrim {
  background: linear-gradient(90deg, rgb(4 7 12 / 0.96) 0%, rgb(4 7 12 / 0.72) 42%, rgb(4 7 12 / 0.12) 78%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 690px;
  padding: clamp(40px, 7vw, 96px);
}

.eyebrow {
  margin: 0 0 18px;
  color: #c7d2ff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.catalog h2,
.brand-note h2,
.drawer-header h2 {
  margin: 0;
  color: var(--ivory);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.05;
}

.hero h1 {
  max-width: 10ch;
  font-size: clamp(54px, 7.4vw, 108px);
  letter-spacing: -0.045em;
}

.hero-content > p:not(.eyebrow) {
  max-width: 540px;
  margin: 24px 0 32px;
  color: #c7ccd5;
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.55;
}

.primary-button,
.add-button,
.notify-button,
.checkout-button {
  min-height: 48px;
  border-radius: var(--radius-control);
  cursor: pointer;
  transition:
    transform 180ms var(--ease),
    background-color 180ms var(--ease),
    border-color 180ms var(--ease);
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.primary-button:hover,
.add-button:hover {
  background: var(--accent-hover);
}

.primary-button:active,
.add-button:active,
.notify-button:active,
.cart-button:active {
  transform: scale(0.98);
}

.catalog {
  padding-block: 96px 120px;
}

.catalog-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 24px;
}

.catalog h2,
.brand-note h2 {
  font-size: clamp(38px, 5vw, 66px);
  letter-spacing: -0.035em;
}

.catalog-heading p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.filters {
  display: flex;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.filter-button {
  min-height: 44px;
  padding: 8px 15px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition:
    background-color 180ms var(--ease),
    color 180ms var(--ease);
}

.filter-button:hover {
  color: var(--text);
}

.filter-button.is-active {
  background: var(--ivory);
  color: var(--ink);
}

.results-count {
  margin: 0 0 20px;
  color: #858e9c;
  font-size: 14px;
}

.bundle-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.bundle-card {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: 0 16px 44px rgb(0 20 64 / 0.08);
  transition:
    transform 260ms var(--ease),
    border-color 260ms var(--ease),
    background-color 260ms var(--ease);
}

.bundle-card:hover {
  transform: translateY(-4px);
  border-color: #3c4656;
  background: var(--surface-raised);
}

.bundle-card[hidden] {
  display: none;
}

.bundle-card-featured {
  grid-column: span 2;
  grid-row: span 2;
}

.bundle-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 22%, rgb(65 105 225 / 0.42), transparent 30%),
    linear-gradient(145deg, #1b2432, #0c1016 65%);
}

.bundle-card-featured .bundle-image {
  aspect-ratio: auto;
  min-height: 440px;
  flex: 1;
}

.bundle-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms var(--ease);
}

.bundle-image img.is-missing {
  display: none;
}

.bundle-card:hover .bundle-image img:not(.is-missing) {
  transform: scale(1.025);
}

.file-placeholder {
  position: absolute;
  inset: auto 14px 14px;
  display: none;
  color: #8995a6;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.file-placeholder.is-visible {
  display: block;
}

.bundle-image::before,
.hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 0 46%, rgb(255 255 255 / 0.045) 46% 47%, transparent 47% 100%),
    radial-gradient(circle at 30% 85%, rgb(255 255 255 / 0.07), transparent 34%);
}

.status-label {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 9px;
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: 7px;
  background: rgb(7 9 13 / 0.78);
  color: var(--ivory);
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.bundle-body {
  min-height: 210px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.bundle-card-featured .bundle-body {
  min-height: 190px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.bundle-copy h3 {
  margin: 0;
  color: var(--ivory);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
}

.bundle-card-featured .bundle-copy h3 {
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 400;
}

.bundle-copy p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.bundle-purchase {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.bundle-card-featured .bundle-purchase {
  flex-direction: column;
  align-items: end;
}

.price {
  color: var(--ivory);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.add-button,
.notify-button {
  min-width: 112px;
  padding: 10px 14px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.notify-button {
  border-color: #465061;
  background: transparent;
  color: var(--ivory);
}

.notify-button:hover {
  border-color: #77849a;
  background: rgb(255 255 255 / 0.05);
}

.brand-note {
  margin-bottom: 120px;
  padding: clamp(32px, 5vw, 72px);
  display: grid;
  grid-template-columns: 0.6fr 1.4fr;
  gap: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background:
    radial-gradient(circle at 8% 0%, rgb(65 105 225 / 0.2), transparent 34%),
    var(--surface);
}

.brand-note > p {
  margin: 7px 0 0;
  color: #b8c6ff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-note div > p {
  max-width: 650px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #090c11;
}

.footer-grid {
  min-height: 260px;
  padding-block: 56px;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 48px;
  align-items: start;
}

.footer-wordmark {
  color: var(--ivory);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.32em;
}

.footer-grid > div > p {
  max-width: 390px;
  margin: 16px 0 0;
  color: var(--muted);
}

.footer-links {
  display: grid;
  justify-items: start;
  gap: 12px;
  color: #c9ced7;
}

.footer-links a {
  min-height: 32px;
}

.footer-links a:hover {
  color: var(--text);
}

.copyright {
  grid-column: 1 / -1;
  margin: 24px 0 0;
  color: #747e8d;
  font-size: 14px;
}

.cart-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 50;
  width: min(430px, 100%);
  padding: 28px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--surface);
  box-shadow: -20px 0 80px rgb(0 0 0 / 0.5);
  transform: translateX(105%);
  visibility: hidden;
  transition:
    transform 320ms var(--ease),
    visibility 320ms;
}

.cart-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.drawer-header p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.drawer-header h2 {
  font-size: 38px;
}

.drawer-close {
  min-width: 60px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.cart-items {
  overflow-y: auto;
  padding-block: 20px;
}

.empty-cart {
  color: var(--muted);
}

.cart-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line span {
  color: var(--ivory);
}

.remove-button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
}

.drawer-footer {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.drawer-footer > div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.checkout-button {
  width: 100%;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.checkout-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  border: 0;
  background: rgb(0 0 0 / 0.62);
  opacity: 0;
  visibility: hidden;
  cursor: pointer;
  transition:
    opacity 240ms var(--ease),
    visibility 240ms;
}

.drawer-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  max-width: min(360px, calc(100% - 48px));
  padding: 13px 16px;
  border: 1px solid #3b4658;
  border-radius: var(--radius-control);
  background: #151b25;
  color: var(--text);
  box-shadow: 0 18px 48px rgb(0 0 0 / 0.34);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition:
    opacity 180ms var(--ease),
    transform 180ms var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .bundle-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bundle-card-featured {
    grid-column: span 2;
  }
}

@media (max-width: 860px) {
  :root {
    --shell: min(100% - 32px, 760px);
  }

  .desktop-nav {
    display: none;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .hero {
    min-height: 620px;
  }

  .hero-scrim {
    background: linear-gradient(0deg, rgb(4 7 12 / 0.97) 0%, rgb(4 7 12 / 0.7) 60%, rgb(4 7 12 / 0.12) 100%);
  }

  .catalog {
    padding-block: 72px 88px;
  }

  .catalog-heading {
    align-items: start;
    flex-direction: column;
  }

  .filters {
    width: 100%;
    overflow-x: auto;
  }

  .filter-button {
    flex: 1 0 auto;
  }

  .bundle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bundle-card-featured {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .brand-note {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  :root {
    --shell: calc(100% - 24px);
  }

  .site-header {
    backdrop-filter: blur(12px);
  }

  .header-inner {
    min-height: 64px;
  }

  .brand-logo {
    max-width: 150px;
    height: 28px;
  }

  .brand-fallback {
    gap: 8px;
    font-size: 14px;
    letter-spacing: 0.22em;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
    font-size: 17px;
  }

  .cart-button > span:first-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .hero {
    min-height: 580px;
    margin-top: 12px;
  }

  .hero-content {
    padding: 28px 24px 40px;
  }

  .hero h1 {
    font-size: clamp(50px, 16vw, 72px);
  }

  .catalog {
    padding-block: 64px 72px;
  }

  .catalog-heading {
    gap: 28px;
  }

  .catalog h2,
  .brand-note h2 {
    font-size: 40px;
  }

  .bundle-grid {
    grid-template-columns: 1fr;
  }

  .bundle-card-featured {
    grid-column: auto;
  }

  .bundle-card-featured .bundle-image {
    min-height: 310px;
  }

  .bundle-card-featured .bundle-body {
    min-height: 220px;
    display: flex;
    align-items: stretch;
  }

  .bundle-card-featured .bundle-purchase {
    flex-direction: row;
    align-items: center;
  }

  .brand-note {
    margin-bottom: 72px;
    padding: 28px 24px;
    gap: 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .copyright {
    grid-column: auto;
  }

  .cart-drawer {
    padding: 22px;
  }

  .toast {
    right: 12px;
    bottom: 12px;
    max-width: calc(100% - 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header,
  .status-label {
    backdrop-filter: none;
    background: var(--ink);
  }
}
