/* apps.klaycreate.com: one stylesheet for the hub and every app.
   Each app page sets --accent, --accent-ink and --app-bg from its app.json. */
:root {
  --bg: #0f1211;
  --bg-deep: #090b0a;
  --surface: rgba(240, 236, 226, 0.05);
  --surface-strong: rgba(240, 236, 226, 0.09);
  --line: rgba(240, 236, 226, 0.12);
  --fg: #f0ece2;
  --muted: #a9afab;
  --accent: #d8b86a;
  --accent-ink: #14171a;
  --app-bg: #0f1211;
  --danger: #ff8a7a;
  --radius: 20px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 700ms;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-deep);
  color: var(--fg);
  font: 16px/1.6 Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
}
body.app {
  background:
    radial-gradient(1100px 560px at 50% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 62%),
    linear-gradient(180deg, var(--app-bg) 0%, var(--bg-deep) 100%);
}
body.hub {
  background:
    radial-gradient(900px 520px at 15% -10%, rgba(216, 184, 106, 0.12), transparent 60%),
    radial-gradient(900px 520px at 95% 0%, rgba(0, 104, 255, 0.1), transparent 60%),
    var(--bg-deep);
}
a {
  color: inherit;
}
.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}
h1,
h2 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.015em;
}
h1 {
  font-size: clamp(2.3rem, 1.4rem + 4vw, 4rem);
  line-height: 1.05;
  margin: 0 0 16px;
}
h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.3rem);
  line-height: 1.15;
  margin: 0 0 24px;
}
.lede {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 36rem;
  margin: 0 0 28px;
}
.eyebrow {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
  margin: 0 0 14px;
}
.note {
  color: var(--muted);
  font-size: 14px;
  margin: 14px 0 0;
}

/* Top bar */
.topbar {
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  font-size: 14px;
}
.brand-link {
  font-weight: 600;
  text-decoration: none;
}
.crumb {
  color: var(--muted);
  text-decoration: none;
}
.crumb::before {
  content: '/';
  margin-right: 10px;
  opacity: 0.5;
}

/* Hub */
.hub-main {
  padding-bottom: 72px;
}
.hub-hero {
  padding: 72px 0 40px;
}
.app-grid {
  display: grid;
  gap: 14px;
}
@media (min-width: 760px) {
  .app-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.app-card {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, var(--app-bg) 70%, transparent), var(--surface));
  box-shadow: 0 0 0 1px var(--line);
  text-decoration: none;
  transition:
    transform 200ms var(--ease),
    box-shadow 200ms var(--ease);
}
.app-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px var(--accent);
}
.app-card:focus-visible,
.store:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.app-card img {
  width: 64px;
  height: 64px;
  border-radius: 15px;
}
.app-card-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.app-card-body b {
  font-size: 17px;
}
.app-card-body span {
  color: var(--muted);
  font-size: 14px;
}
.badge {
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}
.badge.live {
  background: var(--accent);
  color: var(--accent-ink);
}
.badge.soon {
  background: var(--surface-strong);
  color: var(--muted);
}

/* App page */
.redirect {
  display: none;
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 12px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  text-align: center;
  font-weight: 600;
  font-size: 15px;
}
[data-redirecting='true'] .redirect {
  display: block;
}
.app-hero {
  padding: 56px 0 24px;
  display: grid;
  gap: 40px;
  align-items: center;
}
@media (min-width: 860px) {
  .app-hero {
    grid-template-columns: 1.1fr 0.9fr;
    padding: 80px 0 48px;
  }
  .app-hero.no-shot {
    grid-template-columns: 1fr;
    max-width: 720px;
  }
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}
.brand img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.brand span {
  font-weight: 600;
}
.brand small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
}
.hero-shot {
  justify-self: center;
  width: min(78vw, 340px);
  aspect-ratio: 9 / 16;
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.45),
    0 0 0 1px var(--line);
}
.hero-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 20px 10px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  transition:
    transform 200ms var(--ease),
    border-color 200ms var(--ease);
}
.store:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.store svg {
  width: 26px;
  height: 26px;
  flex: none;
}
.store b {
  display: block;
  font-size: 17px;
  line-height: 1.2;
}
.store small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.2;
}
.store.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.store.primary small {
  color: inherit;
  opacity: 0.75;
}
.store[aria-disabled='true'] {
  opacity: 0.55;
  pointer-events: none;
}
section {
  padding: 56px 0;
}
.screens {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(66vw, 250px);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 16px 20px;
  margin: 0 -16px;
  scrollbar-width: none;
}
.screens::-webkit-scrollbar {
  display: none;
}
@media (min-width: 960px) {
  .screens {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
    margin: 0;
    padding: 0;
    gap: 24px;
  }
}
.screens figure {
  margin: 0;
  scroll-snap-align: center;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--line);
}
.screens img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  display: block;
}
.features {
  display: grid;
  gap: 14px;
}
@media (min-width: 720px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 960px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
}
.feature {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}
.feature h3 {
  margin: 10px 0 6px;
  font-size: 1.05rem;
}
.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.glyph {
  font-size: 22px;
}

/* Legal, support and delete pages */
.prose-wrap {
  max-width: 760px;
  padding-top: 48px;
  padding-bottom: 72px;
}
.prose h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 2.8rem);
}
.prose h2 {
  font-size: 1.3rem;
  margin: 2.2rem 0 0.7rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.prose h3 {
  font-size: 1.05rem;
  margin: 1.6rem 0 0.5rem;
}
.prose p,
.prose li {
  color: #d8d6cf;
}
.prose a {
  color: var(--accent);
}
.prose ul {
  padding-inline-start: 1.25rem;
}
.prose li {
  margin-bottom: 0.4rem;
}
.prose details {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 10px 0;
}
.prose summary {
  cursor: pointer;
  font-weight: 600;
}
.button {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 12px;
  border: 0;
  background: var(--accent);
  color: var(--accent-ink) !important;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button.danger {
  background: var(--danger);
  color: #1a0d0b !important;
}
.button:disabled {
  opacity: 0.55;
  cursor: default;
}
.warn {
  border: 1px solid color-mix(in srgb, var(--danger) 55%, transparent);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 1rem 0;
}
.delete-form {
  display: grid;
  gap: 8px;
  max-width: 420px;
  margin: 1rem 0;
}
.delete-form input {
  font: inherit;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--fg);
  margin-bottom: 8px;
}
.msg {
  margin-top: 1rem;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.msg.ok {
  border-color: var(--accent);
}
.msg.err {
  border-color: var(--danger);
  color: var(--danger);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0 40px;
  color: var(--muted);
  font-size: 14px;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

/* Gentle reveal; nothing moves for people who prefer reduced motion. */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .store,
  .app-card {
    transition: none;
  }
}
