/* CPoP Studio — Chrome */
:root {
  --bg: #010104;
  --bg-deep: #000000;
  --ink: #e9eefb;
  --muted: #8790a8;
  --line: rgba(255, 255, 255, 0.12);
  --line-bright: rgba(255, 255, 255, 0.26);
  --pop: #7aa2ff;
  --pop-soft: #b9cdff;
  --pop-ink: #0a1020;
  --panel: rgba(6, 9, 20, 0.66);
  --panel-hover: rgba(1, 2, 7, 0.92);
  --max: 56rem;
  --font-display: "Michroma", "Helvetica Neue", sans-serif;
  --font-body: "Sora", "Helvetica Neue", sans-serif;
  --font-serif: "Sora", "Helvetica Neue", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.98rem;
  line-height: 1.55;
  background:
    radial-gradient(60% 45% at 18% 12%, rgba(123, 92, 255, 0.025), transparent 60%),
    radial-gradient(55% 45% at 85% 22%, rgba(79, 214, 255, 0.018), transparent 62%),
    radial-gradient(70% 55% at 62% 108%, rgba(255, 110, 199, 0.015), transparent 60%),
    radial-gradient(120% 90% at 50% 50%, transparent 45%, rgba(0, 0, 0, 0.97)),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  background-color: var(--bg-deep);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

.particle-field {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

.particle-field canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Floating starlight soda can */
.soda-can {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2;
  width: 43px;
  height: 50px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: grab;
  touch-action: none;
  filter:
    drop-shadow(0 0 4px rgba(143, 176, 255, 0.18))
    drop-shadow(0 6px 12px rgba(20, 14, 50, 0.45));
  will-change: transform;
}

.soda-can::before {
  content: "";
  position: absolute;
  inset: -35%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(143, 176, 255, 0.12), rgba(183, 157, 255, 0.04) 45%, transparent 70%);
  opacity: 0.55;
  animation: aura-pulse 4.5s ease-in-out infinite;
}

.soda-can svg {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.soda-can:hover {
  filter:
    drop-shadow(0 0 7px rgba(183, 210, 255, 0.28))
    drop-shadow(0 6px 14px rgba(20, 14, 50, 0.5));
}

.soda-can.is-dragging {
  cursor: grabbing;
  filter:
    drop-shadow(0 0 10px rgba(200, 200, 255, 0.35))
    drop-shadow(0 8px 16px rgba(20, 14, 50, 0.55));
}

@keyframes aura-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.94); }
  50% { opacity: 0.6; transform: scale(1.02); }
}

body > *:not(.particle-field):not(.soda-can) {
  position: relative;
  z-index: 1;
}

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

a {
  color: var(--ink);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--pop);
}

.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.site-header {
  padding: 1.4rem 0 0;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  line-height: 1;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.brand:hover {
  color: var(--pop-soft);
}

.brand-inline {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.8em;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--pop);
}

/* Home */
.home {
  min-height: 100vh;
}

.home-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5.5rem 0 3.5rem;
  min-height: calc(100vh - 5rem);
}

.home-stage .wrap {
  display: grid;
  gap: 3.75rem;
  width: min(100% - 2.5rem, 72rem);
}

.home-brand {
  position: relative;
  width: 100%;
  text-align: center;
  animation: settle 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-brand h1 {
  position: relative;
  z-index: 2;
  margin: 0;
  width: 100%;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 5.2vw, 3.6rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--ink);
  /* Keeps the wordmark crisp where it sits on the galaxy's nucleus. */
  filter: drop-shadow(0 0 14px rgba(2, 3, 10, 0.75));
}

/* Brushed-metal wordmark: one plain vertical silver, no colour bands */
.home-brand .fizzy-text {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, #ffffff 0%, #d7deef 52%, #9fadc9 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* One column: every app is a full-width row, grouped under its heading */
.home-catalog {
  display: grid;
  gap: 1.75rem;
  width: min(100%, 34rem);
  margin-inline: auto;
  animation: settle 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.home-apps {
  position: relative;
  z-index: 2;
  width: 100%;
}

.home-apps-label {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
}

.apps-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.apps-list a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.7rem;
  padding: 1.05rem 1.15rem;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: var(--panel);
  backdrop-filter: blur(12px);
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

/* The panel holds still and catches the light: it sinks darker, the top edge
   picks up a highlight. No colour — just the bevel. Only the arrow moves. */
.apps-list a:hover,
.apps-list a:focus-visible {
  color: inherit;
  outline: none;
  background: var(--panel-hover);
  border-color: var(--line);
  border-top-color: rgba(255, 255, 255, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}

.apps-list a:focus-visible {
  border-color: rgba(255, 255, 255, 0.6);
}

.apps-list img {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 0.9rem;
  box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow 0.22s ease;
}

.apps-list a:hover img,
.apps-list a:focus-visible img {
  box-shadow: 0 0 0 1px var(--line-bright);
}

.app-copy {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.app-name {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Platform / status marker beside the app name */
.app-tag {
  padding: 0.12rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.5rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.app-blurb {
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.45;
}

.app-index {
  display: none;
}

.app-arrow {
  color: var(--muted);
  font-size: 1.1rem;
  transition: transform 0.22s ease, color 0.22s ease;
}

.apps-list a:hover .app-arrow,
.apps-list a:focus-visible .app-arrow {
  color: var(--ink);
  transform: translateX(4px);
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* App page */
.app-hero {
  padding: 3.25rem 0 2.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.15rem;
}

.app-hero-icon {
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 1.5rem;
  box-shadow:
    0 0 0 1px var(--line-bright),
    0 12px 28px rgba(4, 8, 22, 0.55);
}

.app-hero h1 {
  margin: 0;
  width: 100%;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 4.4vw, 2.5rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.app-hero .lede {
  margin: 0;
  max-width: 30rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* Title block: app name with its platform line tucked underneath */
.app-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.app-platform {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* Holds whichever call to action an app has: badge, download, or coming soon */
.app-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  min-height: 3.35rem;
}

.app-hero .note {
  margin: -0.55rem 0 0;
  max-width: 30rem;
}

.button.is-disabled {
  color: var(--muted);
  border-color: var(--line);
  background: var(--panel);
  cursor: default;
}

.button.is-disabled:hover {
  transform: none;
  border-color: var(--line);
  color: var(--muted);
  background: var(--panel);
}

.app-store-badge-link {
  display: inline-flex;
  line-height: 0;
  transition: transform 0.2s ease;
}

.app-store-badge-link:hover {
  transform: translateY(-2px);
}

.app-store-badge {
  display: block;
  height: 3.35rem;
  width: auto;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.2rem;
  border-radius: 0.85rem;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.button-primary {
  background: #e6ecfb;
  color: var(--pop-ink);
}

.button-primary:hover {
  background: #ffffff;
  color: var(--pop-ink);
  transform: translateY(-2px);
}

.button-ghost {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line-bright);
  backdrop-filter: blur(12px);
}

.button-ghost:hover {
  background: var(--panel-hover);
  border-color: var(--pop);
  color: var(--ink);
  transform: translateY(-2px);
}

.note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.app-store-note {
  margin-bottom: 3rem;
  text-align: center;
}

.support-actions {
  justify-content: flex-start;
  margin: 1.25rem 0 2rem;
}

/* A grid rather than wrapping flex, so the row breaks the same way on every
   app page regardless of how long each label happens to be */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
  justify-items: start;
  gap: 1.4rem 1.75rem;
  margin: 0 0 2rem;
  padding: 1.5rem 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.facts li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
}

.facts li::before {
  content: none;
}

.fact-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.7rem;
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--line);
  color: var(--pop);
}

.fact-icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.fact-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  text-align: left;
}

.fact-text strong {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
}

.fact-text span {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.3;
}

/* Legal / support */
.page-title {
  padding: 2.4rem 0 0.7rem;
}

.page-title-icon {
  width: 6rem;
  height: 6rem;
  margin-bottom: 1rem;
  border-radius: 1.5rem;
  box-shadow:
    0 0 0 1px var(--line-bright),
    0 12px 28px rgba(4, 8, 22, 0.55);
}

.page-title h1 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3.6vw, 1.8rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-transform: uppercase;
}

.page-title .meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.prose {
  padding: 0.35rem 0 3.25rem;
  max-width: 36rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.68;
}

.prose h2 {
  margin: 1.85rem 0 0.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose ul {
  padding-left: 1.15rem;
}

.prose li + li {
  margin-top: 0.3rem;
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

/* Michroma is a display face — mid-sentence it just breaks the line rhythm */
.prose .brand-inline {
  font-family: var(--font-body);
  font-size: inherit;
  letter-spacing: 0.02em;
  text-transform: none;
}

.prose a:not(.button) {
  color: var(--pop);
}

.faq details {
  margin-bottom: 0.5rem;
  padding: 0.9rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--panel);
  backdrop-filter: blur(12px);
  font-family: var(--font-body);
  transition: border-color 0.2s ease;
}

.faq details:hover {
  border-color: var(--line-bright);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  float: right;
  color: var(--pop);
  font-weight: 700;
}

.faq details[open] summary {
  margin-bottom: 0.4rem;
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  margin: 0;
  padding-right: 1.5rem;
  color: var(--muted);
}

/* Release notes */
.releases {
  padding: 0 0 3.5rem;
  scroll-margin-top: 1.5rem;
}

.releases-head h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2.6vw, 1.25rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.releases-head .note {
  margin: 0 0 1.4rem;
  max-width: 34rem;
}

/* Long changelogs must scroll inside the table, never the page */
.releases-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: var(--panel);
  backdrop-filter: blur(12px);
}

.releases-table {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.releases-table th,
.releases-table td {
  padding: 1rem 1.15rem;
  vertical-align: top;
}

.releases-table thead th {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

.releases-table tbody tr + tr {
  border-top: 1px solid var(--line);
}

.release-version {
  width: 9rem;
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}

.release-platform {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 400;
}

.release-date {
  width: 8rem;
  color: var(--muted);
  white-space: nowrap;
}

.release-body {
  color: var(--muted);
  line-height: 1.6;
}

.release-body h3 {
  margin: 0 0 0.35rem;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
}

.release-body p,
.release-body ul {
  margin: 0 0 0.5rem;
}

.release-body ul {
  padding-left: 1.05rem;
}

.release-body li + li {
  margin-top: 0.2rem;
}

.release-body :last-child {
  margin-bottom: 0;
}

.release-body code,
.prose code {
  padding: 0.08em 0.35em;
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.07);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.86em;
}

.release-links {
  width: 8.5rem;
  white-space: nowrap;
}

.release-links a {
  display: inline-block;
  margin: 0 0.6rem 0.3rem 0;
  color: var(--pop);
  font-size: 0.82rem;
  text-decoration: none;
}

.release-links a:hover {
  color: var(--pop-soft);
  text-decoration: underline;
}

/* Stands in for the table when an app publishes its notes on its own site */
.releases-elsewhere {
  padding: 1.6rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: var(--panel);
  backdrop-filter: blur(12px);
  text-align: center;
}

.releases-elsewhere p {
  margin: 0 auto 1.1rem;
  max-width: 32rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

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

.releases-empty a {
  color: var(--pop);
}

.pill {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--line-bright);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.52rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  vertical-align: 0.12em;
}

.releases-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.2rem;
}

/* `display` here would otherwise beat the hidden attribute */
.releases-pager[hidden] {
  display: none;
}

.releases-pager .note {
  margin: 0;
}

.releases-pager button {
  cursor: pointer;
  font-family: inherit;
}

.releases-pager button:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
  border-color: var(--line);
  background: var(--panel);
}

.site-footer {
  margin-top: auto;
  padding: 1.35rem 0 1.85rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.4rem;
  justify-content: space-between;
  align-items: center;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--pop);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.15rem;
}

@media (prefers-reduced-motion: reduce) {
  .home-brand,
  .home-catalog,
  .home-apps {
    animation: none;
  }

  .soda-can::before {
    animation: none;
  }

  .apps-list a,
  .apps-list img,
  .app-arrow,
  .button,
  .app-store-badge-link {
    transition: none;
  }
}
