@font-face {
  font-family: "DM Sans";
  src: url("./fonts/dm-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans Myanmar";
  src: url("./fonts/noto-sans-myanmar.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+1000-109F, U+200C-200D, U+25CC, U+A9E0-A9FF, U+AA60-AA7F;
}

:root {
  color-scheme: light;
  --ink: #231b35;
  --muted: #5f586e;
  --purple: #5532b7;
  --purple-dark: #43278f;
  --line: #e7e2ee;
  --paper: #faf9fc;
  --font: "DM Sans", "Noto Sans Myanmar", "Myanmar Text", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 400 1rem/1.75 var(--font); }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid #6f47d4; outline-offset: 3px; }

.container { width: min(100% - 3rem, 73.5rem); margin-inline: auto; }
.visually-hidden, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.skip { position: absolute; z-index: 2; top: 0.5rem; left: 0.5rem; background: white; padding: .5rem 1rem; }

.masthead { background: #fff; border-bottom: 1px solid #eeeaf4; }
.header-inner, .footer-inner { display: flex; min-height: 4.5rem; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .72rem; flex-shrink: 0; font-weight: 800; }
.brand-mark {
  position: relative;
  display: block;
  width: 3.4rem;
  height: 1.5rem;
  overflow: hidden;
}
.brand-mark img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 136%;
  height: auto;
  transform: translate(-50%, -50%);
}
.brand-name { font-size: 1.25rem; letter-spacing: -.035em; line-height: 1.1; }
.header-links, .footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 1.65rem; }
.header-links a, .footer-links a { font-size: .925rem; font-weight: 650; }
.header-links a:last-child { color: var(--purple); padding: .34rem .85rem; border-radius: .65rem; border: 1px solid #ded3f4; }
.header-links a:hover, .footer-links a:hover { color: var(--purple); text-decoration: underline; text-underline-offset: .2em; }

.hero {
  background: radial-gradient(ellipse at 78% 24%, #eee4ff 0, transparent 46%), linear-gradient(112deg, #f8f4ff, #f3efff 55%, #f7f4fc);
  border-bottom: 1px solid #eae1f8;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.13fr 1fr;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4.5rem);
  min-height: 29rem;
  padding-block: 3rem;
}
.hero h1 {
  color: #281646;
  font-size: clamp(2.1rem, 4.25vw, 3.75rem);
  font-weight: 700;
  line-height: 1.55;
  margin-bottom: 1rem;
}
.hero h1 span { color: var(--purple); }
.hero p { color: #584968; font-size: 1.08rem; max-width: 33rem; margin-bottom: 1.85rem; line-height: 1.9; }
.primary {
  display: inline-flex;
  align-items: center;
  gap: .54rem;
  background: var(--purple);
  color: #fff;
  border-radius: .72rem;
  min-height: 3.04rem;
  padding: .55rem 1.05rem;
  font-weight: 650;
  box-shadow: 0 5px 12px #5532b72d;
}
.primary:hover { background: var(--purple-dark); }
.primary svg { width: 1.23rem; height: 1.23rem; flex: none; }

.app-orbit {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 1.35;
  max-width: 31rem;
  justify-self: end;
  border-radius: 1.65rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 53% 49%, #8559d6 0, transparent 50%),
    radial-gradient(ellipse at 85% 0%, #a37ae5 0, transparent 59%),
    linear-gradient(136deg, #331660, #5c37a7 66%, #855ec3);
  box-shadow: 0 16px 32px #52298a2d, inset 0 0 0 1px #fff3;
}
.app-orbit::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .22;
  background-image: radial-gradient(#fff 1px, transparent 1px);
  background-size: .85rem .85rem;
  mask-image: radial-gradient(ellipse, transparent 30%, black);
}
.orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid #dac4ff55;
  border-radius: 50%;
}
.ring-outer { width: 72%; }
.ring-inner { width: 52%; }
.orbit-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 29%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) rotate(-8deg);
  border-radius: 26%;
  border: 1px solid #e1d2ff;
  background: linear-gradient(153deg, white, #eadeff);
  box-shadow: 0 12px 24px #1d0a496e;
}
.orbit-center img { width: 110%; height: auto; position: absolute; }

.app-icon { display: block; object-fit: contain; border-radius: 24%; background: #fff; box-shadow: 0 0 0 1px #18102614; }
.app-orbit .orbit-icon {
  position: absolute;
  width: 16%;
  height: auto;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(var(--rotation));
  box-shadow: 0 8px 18px #200e4d75;
}
.orbit-icon-1 { top: 23%; left: 27%; --rotation: -14deg; }
.orbit-icon-2 { top: 23%; left: 72%; --rotation: 14deg; }
.orbit-icon-3 { top: 54%; left: 17%; --rotation: 9deg; }
.orbit-icon-4 { top: 53%; left: 83%; --rotation: -11deg; }
.orbit-icon-5 { top: 81%; left: 32%; --rotation: -10deg; }
.orbit-icon-6 { top: 80%; left: 69%; --rotation: 10deg; }

.catalog { padding-block: 3.1rem 4.25rem; scroll-margin-top: 1.5rem; }
.catalog-top { display: flex; align-items: end; justify-content: space-between; gap: 1.25rem; margin-bottom: 1.25rem; }
.catalog-top h2, .development h2, .information h2 { font-weight: 700; line-height: 1.55; font-size: clamp(1.4rem, 2.7vw, 2.05rem); }
.catalog-top p { color: var(--muted); margin-top: .32rem; }
.search-field {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 min(21rem, 34%);
  color: var(--muted);
}
.search-field svg { width: 1.2rem; height: 1.2rem; position: absolute; left: .85rem; pointer-events: none; }
.search-field input {
  width: 100%;
  height: 3rem;
  padding: .24rem .75rem .24rem 2.52rem;
  border: 1px solid #ddd6e8;
  background: #fff;
  color: var(--ink);
  border-radius: .7rem;
}
.search-field input::placeholder { color: var(--muted); }
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: .85rem; margin-bottom: 1.25rem; }
.filters { display: flex; flex-wrap: wrap; gap: .46rem; }
.filters button {
  min-height: 2.5rem;
  padding: .25rem .85rem;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: white;
  color: #453b55;
  cursor: pointer;
  font-size: .9rem;
}
.filters button:hover { border-color: #9a83cd; }
.filters button[aria-pressed="true"] { background: #eee6fc; border-color: #dfd0f8; color: #482294; font-weight: 700; }
.results { font-size: .9rem; color: var(--muted); flex: none; }

.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.theme-amber { --tint: #fff4e8; --accent: #81430d; }
.theme-blue { --tint: #edf3ff; --accent: #214d9c; }
.theme-green { --tint: #edf8ea; --accent: #2e5925; }
.theme-gold { --tint: #fff5d9; --accent: #775318; }
.theme-red { --tint: #ffeff2; --accent: #8e364a; }
.theme-mint { --tint: #e8f8f4; --accent: #215d51; }
.theme-violet { --tint: #f1edff; --accent: #55319b; }

.app-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.15rem 1rem .95rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: linear-gradient(165deg, var(--tint), #fff 54%);
  box-shadow: 0 2px 5px #2e164507;
}
.card-top { display: flex; align-items: center; gap: .78rem; margin-bottom: .85rem; }
.card-top .app-icon { width: 3.75rem; height: 3.75rem; flex: none; }
.card-title { min-width: 0; }
.app-category { color: var(--accent); font-size: .86rem; font-weight: 650; line-height: 1.6; }
.card-title h3 { font-size: clamp(1.15rem, 2vw, 1.39rem); font-weight: 800; line-height: 1.24; letter-spacing: -.035em; }
.card-title a { text-decoration: underline; text-decoration-color: #c7b7de; text-underline-offset: .16em; }
.card-title a:hover { color: var(--purple); text-decoration-color: currentColor; }
.app-summary { color: var(--muted); margin-bottom: .9rem; line-height: 1.85; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: auto; padding-top: .75rem; border-top: 1px solid var(--line); }
.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  min-height: 2.55rem;
  padding: .2rem .53rem;
  border: 1px solid #e5dfed;
  border-radius: .53rem;
  background: white;
  color: #312541;
  font-size: .845rem;
  font-weight: 700;
  white-space: nowrap;
}
.action:hover { background: #f4effe; border-color: #bca8e6; color: #43238a; }
.action-web { color: var(--purple-dark); }
.action svg, .footer-links svg { width: 1rem; height: 1rem; flex: none; }
.status { padding: .20rem .55rem; border-radius: .5rem; color: #654685; background: #efe8f8; font-size: .875rem; font-weight: 650; }
.card-top .status { margin-left: auto; flex: none; }
.development { border-top: 1px solid var(--line); padding-top: 1.75rem; margin-top: 2.4rem; }
.development h2 { font-size: 1.55rem; margin-bottom: .9rem; }
.app-grid[hidden] + .development { border-top: 0; padding-top: 0; margin-top: 0; }
.empty { background: white; border: 1px dashed #d8cae9; border-radius: .75rem; padding: 2rem 1rem; text-align: center; color: var(--muted); }

.footer { background: #fff; border-top: 1px solid var(--line); }
.footer-inner { padding-block: 1.25rem; }
.footer-brand { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer-brand > span { font-size: .9rem; color: var(--muted); }
.footer-links a { display: inline-flex; gap: .3rem; align-items: center; }

.detail { min-height: 68vh; padding-block: 1.65rem 3.75rem; }
.breadcrumbs { display: flex; align-items: center; gap: .55rem; color: var(--muted); margin-bottom: 1.15rem; font-size: .95rem; }
.breadcrumbs a, .detail-note a, .resources a { color: var(--purple-dark); text-decoration: underline; text-underline-offset: .15em; }
.detail-hero {
  display: flex;
  align-items: start;
  gap: clamp(1rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  padding: clamp(1.15rem, 4vw, 2.6rem);
  background: linear-gradient(135deg, var(--tint), white 85%);
}
.detail-hero .app-icon { width: clamp(3.75rem, 12vw, 7rem); height: auto; flex: none; }
.detail-copy h1 { margin-block: .1rem .45rem; font-size: clamp(1.9rem, 5vw, 3.75rem); font-weight: 800; line-height: 1.14; letter-spacing: -.045em; }
.detail-copy p:not(.app-category) { color: var(--muted); max-width: 45rem; }
.detail-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.12rem; }
.detail-actions .action { min-height: 2.75rem; font-size: .95rem; padding-inline: .7rem; }
.detail-content { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; margin-top: 1rem; }
.information { background: white; padding: clamp(1.1rem, 3vw, 1.6rem); border-radius: .95rem; border: 1px solid var(--line); }
.information:only-child { grid-column: 1 / -1; }
.information h2 { font-size: 1.3rem; margin-bottom: .63rem; }
.features, .resources { margin: 0; padding-inline-start: 1.22rem; }
.features li + li, .resources li + li { margin-top: .34rem; }
.detail-note { margin-top: 1rem; color: var(--muted); }

@media (max-width: 60rem) {
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-inner { min-height: 24rem; }
}

@media (max-width: 45rem) {
  .container { width: calc(100% - 2rem); }
  .header-links, .footer-links { gap: .8rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 1.75rem; min-height: auto; padding-block: 2.1rem; }
  .hero h1 { font-size: clamp(1.9rem, 6vw, 3rem); }
  .hero p { margin-bottom: 1.2rem; }
  .app-orbit { justify-self: start; max-width: 28rem; width: min(100%, 28rem); aspect-ratio: 1.48; }
  .catalog { padding-block: 2.05rem 2.65rem; }
  .catalog-top { flex-direction: column; align-items: stretch; gap: .85rem; margin-bottom: .9rem; }
  .search-field { flex: auto; }
  .filter-bar { align-items: start; flex-direction: column; gap: .6rem; }
  .detail-content { grid-template-columns: 1fr; }
}

@media (max-width: 35rem) {
  .app-grid { grid-template-columns: 1fr; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: .7rem; }
}

@media (max-width: 25rem) {
  .brand { gap: .5rem; }
  .brand-mark { width: 2.85rem; }
  .brand-name { font-size: 1.06rem; }
  .header-inner { gap: .65rem; }
  .header-links { gap: .53rem; }
  .header-links a:last-child { padding-inline: .48rem; }
  .detail-hero { flex-direction: column; }
}
