:root {
  --bg: #f7f9f8;
  --ink: #151718;
  --muted: #666f73;
  --line: rgba(35, 43, 45, 0.16);
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --mint: #b7f3e7;
  --rose: #ead7eb;
  --gold: #e7c36b;
  --blue: #76a8ef;
  --shadow: 0 22px 70px rgba(54, 74, 77, 0.16);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 24% 12%, rgba(234, 215, 235, 0.82), transparent 26rem),
    radial-gradient(circle at 84% 78%, rgba(183, 243, 231, 0.82), transparent 30rem),
    linear-gradient(180deg, #fbfbfa 0%, var(--bg) 100%);
}

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

button,
input {
  font: inherit;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.36;
  background-image:
    radial-gradient(#0f1517 0.65px, transparent 0.65px),
    radial-gradient(#0f1517 0.45px, transparent 0.45px);
  background-position: 0 0, 18px 24px;
  background-size: 36px 36px, 52px 52px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 3vw, 2.4rem);
  background: rgba(247, 249, 248, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(18px);
}

.language-switcher {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

.language-switcher button {
  min-width: 2.4rem;
  min-height: 2rem;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.language-switcher button.active,
.language-switcher button:hover,
.language-switcher button:focus-visible {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 6px 16px rgba(54, 74, 77, 0.1);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 3rem;
  height: 3rem;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(20, 33, 34, 0.12);
  border-radius: 50%;
  box-shadow: 0 8px 28px rgba(62, 119, 114, 0.2);
}

.top-nav {
  display: flex;
  gap: 0.35rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  color: var(--muted);
  border-radius: 999px;
  font-size: 0.92rem;
}

.top-nav i {
  color: #238b80;
  font-size: 0.95rem;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  color: var(--ink);
  background: #fff;
}

.hero {
  min-height: calc(100vh - 4.2rem);
  display: grid;
  place-items: center;
  padding: 4rem 1rem 7rem;
}

.hero-inner {
  width: min(860px, 100%);
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.85rem;
  font-size: clamp(3.9rem, 11vw, 9rem);
  line-height: 0.86;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(91, 211, 197, 0.45), 0 8px 0 rgba(0, 0, 0, 0.05);
}

.hero-copy {
  max-width: 620px;
  margin: 0 auto 1.5rem;
  color: #485257;
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-actions,
.quick-links,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
}

.button,
.quick-links a,
.tag {
  display: inline-flex;
  min-height: 2.45rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.6rem 1rem;
  font-weight: 800;
  font-size: 0.86rem;
  letter-spacing: 0;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.button:hover,
.quick-links a:hover,
.tag:hover,
.market-item:hover {
  transform: translateY(-1px);
}

.primary {
  color: #10201f;
  background: linear-gradient(135deg, var(--mint), #fdfefe);
  box-shadow: 0 10px 28px rgba(69, 147, 139, 0.2);
}

.secondary,
.quick-links a,
.tag {
  color: #2f393d;
  background: rgba(255, 255, 255, 0.76);
}

.workspace {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(540px, 640px) minmax(0, 1fr);
  gap: 1.4rem;
  margin: 0;
  padding: 1.5rem clamp(1rem, 3vw, 2.4rem) 6rem;
  align-items: start;
}

.main-panel {
  grid-column: 2;
  padding: clamp(1rem, 3vw, 1.7rem);
}

.side-panel {
  grid-column: 1;
  grid-row: 1;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(118, 219, 205, 0.42);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.side-panel {
  position: sticky;
  top: 5.6rem;
  max-height: calc(100vh - 6.6rem);
  overflow: auto;
  padding: 1rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.side-panel::-webkit-scrollbar {
  display: none;
}

.section-head,
.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.section-head h2,
.side-head h2,
.guide h2 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.05;
}

.search-box {
  width: min(280px, 100%);
}

.search-box input {
  width: 100%;
  min-height: 2.6rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  background: rgba(255, 255, 255, 0.85);
}

.search-box input:focus {
  border-color: rgba(46, 145, 133, 0.55);
  box-shadow: 0 0 0 4px rgba(183, 243, 231, 0.45);
}

.featured {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
}

.featured-media,
.modal-image {
  min-height: 320px;
  background: linear-gradient(135deg, #111719, #243c3d 45%, #0b1011);
}

.featured-media {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
}

.featured-media > *,
.modal-image > * {
  grid-area: 1 / 1;
}

.featured-media img,
.modal-image img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-media.image-loaded img,
.modal-image.image-loaded img {
  display: block;
}

.featured-media.image-loaded .fallback-art,
.modal-image.image-loaded .fallback-art {
  display: none;
}

.fallback-art {
  display: grid;
  width: min(45%, 260px);
  aspect-ratio: 1;
  place-items: center;
  color: #f9ffff;
  overflow: hidden;
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(118, 168, 239, 0.55), rgba(183, 243, 231, 0.7)),
    radial-gradient(circle at 50% 42%, #ffffff, transparent 46%);
  box-shadow: inset 0 0 60px rgba(255, 255, 255, 0.28), 0 0 70px rgba(118, 168, 239, 0.28);
}

.fallback-art::before {
  content: "";
  width: 100%;
  height: 100%;
  background: url("assets/secret-pharmacy-logo.png") center / cover no-repeat;
}

.featured-body {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem;
}

.featured-body h3 {
  margin-bottom: 0.4rem;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
}

.featured-body p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.quick-links {
  margin: 1.2rem 0;
  padding: 1rem;
  border: 1px dashed rgba(34, 49, 50, 0.28);
  border-radius: var(--radius);
}

.product-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.3rem 0 0;
}

.market-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.market-item {
  width: 100%;
  min-height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(35, 43, 45, 0.22);
  border-radius: var(--radius);
  color: #343b3f;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 7px 18px rgba(54, 74, 77, 0.08);
  text-align: left;
  cursor: pointer;
}

.market-item strong {
  overflow-wrap: anywhere;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.market-item small {
  color: var(--muted);
  white-space: nowrap;
}

.market-item.active {
  border-color: rgba(48, 151, 139, 0.62);
  background: linear-gradient(135deg, rgba(183, 243, 231, 0.68), rgba(255, 255, 255, 0.9));
}

.guide {
  padding: 1rem 1rem 6rem;
}

.guide-inner {
  width: 100%;
  margin: 0 auto;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

.guide-grid article {
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 32px rgba(54, 74, 77, 0.08);
}

.guide-grid h3 {
  margin-bottom: 0.5rem;
}

.guide-grid p {
  color: var(--muted);
  line-height: 1.65;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 14, 15, 0.68);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  width: min(640px, 100%);
  max-height: min(720px, calc(100vh - 2rem));
  overflow: auto;
  padding: 1.35rem;
  border: 1px solid rgba(183, 243, 231, 0.62);
  border-radius: var(--radius);
  background: rgba(244, 248, 247, 0.92);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.36);
}

.modal-card h2 {
  padding-right: 2.5rem;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
}

.modal-image {
  display: grid;
  place-items: center;
  min-height: auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
}

.modal-content {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.modal-content p {
  color: #3f484c;
  line-height: 1.65;
}

.icon-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.84);
  color: var(--muted);
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 880px) {
  .site-header {
    align-items: stretch;
    flex-direction: column;
  }

  .top-nav {
    justify-content: space-between;
  }

  .top-nav a {
    flex: 1;
    text-align: center;
  }

  .language-switcher {
    justify-content: center;
  }

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

  .main-panel,
  .side-panel {
    grid-column: auto;
  }

  .side-panel {
    position: static;
    max-height: none;
    order: -1;
  }

  .section-head,
  .featured-body {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }

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

@media (max-width: 640px) {
  .market-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .hero {
    min-height: 78vh;
    padding-top: 3rem;
  }

  .hero-actions .button,
  .featured-body .button {
    width: 100%;
  }

  .featured-media {
    min-height: 220px;
  }

  .market-item {
    align-items: flex-start;
    flex-direction: column;
  }
}
