:root {
  --text: #fff8ed;
  --muted: rgba(255, 248, 237, .78);
  --soft: rgba(255, 248, 237, .58);
  --line: rgba(255, 255, 255, .18);
  --card: rgba(18, 13, 19, .82);
  --card-soft: rgba(255, 255, 255, .075);
  --gold: #ffd08a;
  --gold2: #ffe3b2;
  --purple: #b887ff;
  --purple2: #dfc5ff;
  --shadow: 0 16px 42px rgba(0, 0, 0, .28);
  --radius: 30px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0e0910;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    url("images/background-desktop.webp"),
    #0e0910;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

body.page-book::before {
  background-image:
    url("images/background-book-desktop.webp");
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10, 7, 10, .18), rgba(8, 6, 10, .88));
}

body.page-book::after {
  background:
    linear-gradient(180deg, rgba(10, 7, 10, .16), rgba(8, 6, 10, .90));
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
}

.wrap {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 38px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 30px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 950;
  letter-spacing: -.03em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--gold), var(--purple));
  box-shadow: 0 0 24px rgba(255, 208, 138, .25);
  flex: 0 0 auto;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.top-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  font-weight: 800;
}

.top-nav a:hover,
.top-nav a.active {
  color: #201009;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
}

main {
  padding: 56px 0 86px;
}

.hero {
  max-width: 900px;
  margin: 0 auto 58px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .075);
  color: var(--muted);
  font-weight: 850;
  font-size: 14px;
  margin-bottom: 22px;
}

h1 {
  margin: 0;
  font-size: clamp(52px, 8vw, 104px);
  line-height: .9;
  letter-spacing: -.075em;
  text-shadow: 0 12px 34px rgba(0, 0, 0, .32);
}

.subtitle {
  max-width: 720px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.6;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.card {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}

.card-img-pad {
  padding: 18px 18px 0;
}

.image-shell {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(0, 0, 0, .16);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
}

.image-square img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
}

.image-pack img {
  aspect-ratio: 1696 / 2528;
  object-fit: contain;
  object-position: center;
  background: rgba(0, 0, 0, .12);
}

.card-body {
  padding: 28px;
}

.kicker {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .075);
  color: var(--soft);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 16px;
}

.card h2,
.card h3 {
  margin: 0;
  line-height: .98;
  letter-spacing: -.055em;
}

.card h2 {
  font-size: clamp(34px, 4vw, 56px);
}

.card h3 {
  font-size: clamp(30px, 3.4vw, 46px);
}

.card p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.58;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: 950;
  text-align: center;
}

.btn-gold {
  color: #201009;
  border-color: transparent;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
}

.btn-purple {
  color: #160923;
  border-color: transparent;
  background: linear-gradient(135deg, var(--purple), var(--purple2));
}

.btn-ghost {
  background: rgba(255, 255, 255, .085);
}

.disabled {
  opacity: .52;
  cursor: not-allowed;
  pointer-events: none;
  background: rgba(255,255,255,.10);
}

.info-panel,
.support {
  margin-top: 64px;
  padding: clamp(30px, 5vw, 54px);
  border-radius: 36px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: center;
}

.info-panel h2,
.support h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 56px);
  line-height: .96;
  letter-spacing: -.06em;
}

.info-panel p,
.support p {
  max-width: 680px;
  margin: 18px auto 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 17px;
}

footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 34px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

footer a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.mobile-nav {
  display: none;
}

/* HOME */

.home-grid .card {
  display: flex;
  flex-direction: column;
}

.home-grid .card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.home-grid .btn {
  width: fit-content;
  margin-top: 32px;
}

/* BOOK */

.edition-block {
  margin-top: 58px;
}

.edition-head {
  text-align: center;
  margin-bottom: 24px;
}

.edition-head h2 {
  margin: 0;
  font-size: clamp(36px, 4vw, 58px);
  line-height: .96;
  letter-spacing: -.06em;
}

/* GALLERY */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.wallpaper-card {
  padding: 12px;
}

.wallpaper-card img {
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 16px;
  background: rgba(0, 0, 0, .16);
}

.top-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* MOBILE LAYOUT */

@media (max-width: 760px) {
  body {
    padding-bottom: 94px;
  }

  .wrap {
    width: min(100% - 28px, 1120px);
  }

  .site-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 22px 0 8px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
  }

  .top-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
    width: 100%;
  }

  .top-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 8px;
    border-radius: 17px;
    font-size: 12px;
    background: rgba(255, 255, 255, .075);
    color: rgba(255, 248, 237, .72);
  }

  .top-nav a.active {
    color: #201009;
    background: linear-gradient(135deg, var(--gold), var(--gold2));
  }

  main {
    padding: 30px 0 56px;
  }

  .hero {
    text-align: left;
    margin: 0 0 30px;
  }

  .eyebrow {
    margin-bottom: 15px;
    font-size: 13px;
    padding: 9px 14px;
  }

  h1 {
    font-size: clamp(40px, 11vw, 56px);
    line-height: .92;
    letter-spacing: -.065em;
  }

  .subtitle {
    margin: 16px 0 0;
    font-size: 16px;
    line-height: 1.52;
  }

  .grid-2 {
    gap: 12px;
  }

  .home-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    max-width: 520px;
    margin: 0 auto;
  }

  .home-grid .card {
    display: flex;
    flex-direction: column;
    border-radius: 24px;
  }

  .home-grid .card-img-pad {
    padding: 12px 12px 0;
  }

  .home-grid .image-shell {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 18px;
  }

  .home-grid .image-shell img {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 1 / 1;
    object-fit: cover;
  }

  .home-grid .card-body {
    padding: 18px;
  }

  .home-grid .kicker {
    font-size: 10px;
    padding: 7px 10px;
    margin-bottom: 10px;
  }

  .home-grid .card h2 {
    font-size: 30px;
  }

  .home-grid .card p {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.45;
  }

  .home-grid .btn {
    width: 100%;
    min-height: 42px;
    padding: 0 14px;
    font-size: 13px;
    margin-top: 16px;
  }

  .pack-grid,
  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .card {
    border-radius: 22px;
  }

  .card-img-pad {
    padding: 10px 10px 0;
  }

  .image-shell {
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
  }

  .card-body {
    padding: 12px;
  }

  .kicker {
    font-size: 9px;
    padding: 6px 8px;
    margin-bottom: 8px;
  }

  .card h2 {
    font-size: 24px;
  }

  .card h3 {
    font-size: 21px;
  }

  .card p {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.4;
  }

  .pack-grid .card p {
    display: none;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 12px;
  }

  .btn {
    width: 100%;
    min-height: 38px;
    padding: 0 10px;
    font-size: 12px;
  }

  .edition-block {
    margin-top: 38px;
  }

  .edition-head {
    text-align: left;
    margin-bottom: 14px;
  }

  .edition-head h2 {
    font-size: 34px;
  }

  .info-panel,
  .support {
    margin-top: 34px;
    padding: 24px 18px;
    border-radius: 26px;
    text-align: left;
  }

  .info-panel p,
  .support p {
    font-size: 15px;
  }

  .top-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .wallpaper-card {
    border-radius: 20px;
    padding: 9px;
  }

  .wallpaper-card img {
    border-radius: 14px;
  }

  footer {
    display: none;
  }

  .mobile-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 999;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
    padding: 8px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(18, 13, 19, .96);
    box-shadow: 0 12px 34px rgba(0, 0, 0, .36);
  }

  .mobile-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 8px;
    border-radius: 18px;
    color: rgba(255, 248, 237, .72);
    font-size: 12px;
    font-weight: 950;
    text-align: center;
    background: rgba(255, 255, 255, .075);
  }

  .mobile-nav a.active {
    color: #201009;
    background: linear-gradient(135deg, var(--gold), var(--gold2));
  }
}

/* REAL PHONE BACKGROUNDS ONLY */

@media (max-width: 480px) {
  body::before {
    background-image:
      url("images/background-mobile.webp");
  }

  body.page-book::before {
    background-image:
      url("images/background-book-mobile.webp");
  }
}

@media (max-width: 380px) {
  .book-grid .card p {
    display: none;
  }

  .card h3 {
    font-size: 19px;
  }

  .pack-grid .card h2 {
    font-size: 21px;
  }

  .btn {
    font-size: 11px;
  }
}