:root {
  color-scheme: dark;
  font-family: Inter, 'Segoe UI', system-ui, sans-serif;
  color: #eef2f8;
  background: #0d111b;
  --muted: #aab6cc;
  --accent: #bcf4d2;
  --edge: #2a354b;
  --surface: #151d2e;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.wrap { width: min(1176px, calc(100% - 72px)); margin-inline: auto; }

.site-header { min-height: 80px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; gap: 13px; align-items: center; font-size: 20px; font-weight: 720; letter-spacing: -.035em; }
.brand-icon { display: inline-block; position: relative; width: 29px; height: 27px; }
.brand-icon::before, .brand-icon::after { position: absolute; width: 21px; height: 15px; content: ''; border: 1.5px solid var(--accent); border-radius: 4px; transform: rotate(-9deg); }
.brand-icon::before { left: 0; top: 8px; opacity: .65; }
.brand-icon::after { left: 5px; top: 3px; background: #1e3936; }
.header-link { display: flex; align-items: center; gap: 12px; font-size: .92rem; font-weight: 560; color: var(--muted); }
.header-link:hover { color: var(--accent); }

.hero { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: 49% 51%; min-height: 414px; align-items: center; border: 1px solid #303f58; border-radius: 28px; background: linear-gradient(114deg, #182136 2%, #202b47 62%, #23413f 100%); }
.hero-copy { position: relative; z-index: 2; padding: 50px 0 56px clamp(34px, 5vw, 65px); }
.hero-topics { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin: 0 0 20px; font-size: .73rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); }
.hero-topics span { width: 3px; height: 3px; background: #91cdbb; transform: rotate(45deg); }
h1 { margin: 0; font-size: clamp(3rem, 6vw, 5.35rem); font-weight: 755; line-height: 1.03; letter-spacing: -.071em; }
h1 em { color: var(--accent); font-style: normal; }
.hero-copy > p:not(.hero-topics) { max-width: 34ch; margin: 22px 0 28px; color: #c1cce0; font-size: clamp(.95rem, 1.2vw, 1.09rem); line-height: 1.65; }
.hero-action { width: fit-content; display: flex; align-items: center; gap: 22px; padding: 12px 16px; background: var(--accent); color: #132a22; font-size: .9rem; font-weight: 750; border-radius: 9px; }
.hero-action:hover { background: #dcffe8; }
.hero-art { position: absolute; z-index: 1; inset: 0 0 0 45%; overflow: hidden; background-image: radial-gradient(#c1ded635 1px, transparent 1px); background-size: 20px 20px; mask-image: linear-gradient(to right, transparent, #000 18%); }
.hero-halo { position: absolute; inset: 0; background: radial-gradient(ellipse at 67% 43%, #95e6c049, #7f88c218 51%, transparent 73%); }
.hero-art img { position: absolute; width: 76%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; border: 1px solid #b2d3db6e; box-shadow: 0 24px 65px #0c10247a; }
.hero-back { top: 13%; right: 13%; transform: rotate(-10deg); }
.hero-front { top: 33%; right: 7%; transform: rotate(8deg); }

.catalog { padding-block: 49px 72px; scroll-margin-top: 20px; }
.catalog-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
h2 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.37rem); font-weight: 735; letter-spacing: -.055em; }
#result-count { margin: 6px 0 0; color: var(--muted); font-size: .88rem; }
.search { display: flex; align-items: center; gap: 12px; min-height: 46px; width: min(100%, 305px); padding-inline: 15px; border: 1px solid var(--edge); border-radius: 10px; color: var(--muted); background: #121a29; }
.search:focus-within { border-color: var(--accent); }
.search-icon { width: 12px; height: 12px; flex: 0 0 12px; border: 1.5px solid currentColor; border-radius: 50%; position: relative; }
.search-icon::after { content: ''; position: absolute; width: 5px; height: 1.5px; right: -4px; bottom: -2px; transform: rotate(45deg); background: currentColor; }
.search input { padding-block: 10px; width: 100%; color: #eef2f8; background: transparent; border: none; outline: none; font-size: .92rem; }
.search input::placeholder { color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.filters button, .empty button { padding: 8px 14px; border: 1px solid var(--edge); border-radius: 100px; background: var(--surface); color: #c3cde1; font-size: .83rem; font-weight: 620; }
.filters button:hover, .empty button:hover { border-color: #91b8aa; }
.filters button[aria-pressed='true'] { color: var(--accent); background: #233a39; border-color: #51756f; }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.deck-card { display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; border: 1px solid var(--edge); background: var(--surface); transition: border-color .2s, transform .2s; }
.deck-card:hover { transform: translateY(-3px); border-color: #607b87; }
.deck-cover { display: grid; place-items: center; aspect-ratio: 1.95; overflow: hidden; padding: 18px 24px 0; background: radial-gradient(ellipse at 50% 90%, #a2c8b999, transparent 70%), linear-gradient(140deg, #34495d, #294952); }
.deck-cover[data-cover='aws-2'] { background: radial-gradient(ellipse at 50% 90%, #9cafff8f, transparent 70%), linear-gradient(140deg, #263859, #414b7b); }
.deck-cover[data-cover='aws-3'] { background: radial-gradient(ellipse at 50% 90%, #dcc19a7d, transparent 74%), linear-gradient(140deg, #544653, #584f48); }
.deck-cover[data-cover='orderhub'] { background: linear-gradient(145deg, #2b4e56, #466457); }
.deck-cover[data-cover='redis'] { background: linear-gradient(145deg, #322d53, #60446d); }
.deck-cover:focus-visible { outline-offset: -4px; }
.deck-cover img { display: block; width: 100%; height: auto; border-radius: 7px 7px 0 0; box-shadow: 0 10px 23px #07111f54; }
.deck-body { display: flex; flex: 1; flex-direction: column; padding: 20px; }
.deck-body .deck-label { margin: 0 0 8px; color: #9fcee2; font-size: .75rem; font-weight: 650; letter-spacing: .045em; }
h3 { margin: 0; font-size: clamp(1.1rem, 2vw, 1.34rem); font-weight: 730; line-height: 1.23; letter-spacing: -.03em; }
h3 a:hover { color: var(--accent); }
.deck-body > p { margin: 10px 0 16px; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.deck-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 13px; border-top: 1px solid var(--edge); }
.deck-actions a { padding: 6px 0; color: var(--accent); font-size: .85rem; font-weight: 690; }
.deck-actions a:hover { text-decoration: underline; text-underline-offset: 4px; }
.deck-actions a span { padding-inline: 3px; }
.deck-actions .download { padding: 6px 9px; border: 1px solid #3b4861; border-radius: 7px; color: #d1dbed; }
.empty { padding: 24px; text-align: center; color: var(--muted); border: 1px dashed var(--edge); border-radius: 13px; }

@media (max-width: 915px) {
  .wrap { width: calc(100% - 46px); }
  .hero { min-height: 367px; }
  .hero-copy { padding-block: 40px; }
  .hero-back { top: 24%; }
  .hero-front { top: 41%; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 610px) {
  .wrap { width: calc(100% - 32px); }
  .site-header { min-height: 66px; }
  .hero { min-height: 0; grid-template-columns: 1fr; border-radius: 20px; }
  .hero-copy { padding: 31px 24px 20px; }
  .hero-copy > p:not(.hero-topics) { margin: 16px 0 20px; }
  .hero-art { position: relative; inset: auto; height: clamp(145px, 46vw, 245px); mask-image: linear-gradient(to bottom, transparent, #000 15%); }
  .hero-art img { width: min(70%, 360px); }
  .hero-back { top: 8%; right: 19%; }
  .hero-front { top: 24%; right: 12%; }
  .catalog { padding-block: 32px 50px; }
  .catalog-heading { align-items: stretch; flex-direction: column; gap: 15px; }
  .search { width: 100%; }
  .filters { margin: 15px 0; }
  .card-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
