:root {
  --bg: #080d16;
  --surface: rgba(12, 18, 31, 0.8);
  --surface-strong: rgba(17, 24, 39, 0.92);
  --border: rgba(148, 163, 184, 0.22);
  --text: #e7edf7;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-heading: "Lora", Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
}

.background {
  position: fixed;
  inset: 0;
  background: radial-gradient(80% 120% at 50% -10%, rgba(56, 189, 248, 0.2), transparent 60%),
    radial-gradient(60% 100% at 100% 0%, rgba(99, 102, 241, 0.15), transparent 70%);
  pointer-events: none;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 1220px;
  margin: 0 auto;
  padding: 44px 20px 28px;
}

.hero {
  text-align: center;
  margin-bottom: 30px;
}

/* Same asset as <link rel="icon"> — app-style tile, sized to match suite icons */
.brand-mark {
  display: block;
  width: 96px;
  height: 96px;
  margin: 0 auto 14px;
  border-radius: 18px;
  object-fit: contain;
  box-shadow:
    0 10px 28px rgba(2, 6, 23, 0.5),
    0 0 32px rgba(56, 189, 248, 0.22);
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
}

h1 {
  margin: 10px 0 10px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.02;
}

.subhead {
  margin: 0 auto;
  max-width: 680px;
  color: #c9d7ec;
  font-size: 16px;
  line-height: 1.55;
}

.hero-auth {
  margin-top: 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
}

.hero-auth-guest .hero-actions,
.hero-auth-user .hero-actions {
  margin: 0;
}

.signed-in-email {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

button.hero-cta {
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.hero-cta:hover {
  transform: translateY(-1px);
}

.hero-cta--primary {
  color: #0a1628;
  background: linear-gradient(180deg, #7dd3fc, #38bdf8);
  box-shadow: 0 8px 28px rgba(56, 189, 248, 0.35);
}

.hero-cta--primary:hover {
  box-shadow: 0 10px 32px rgba(56, 189, 248, 0.45);
}

.hero-cta--secondary {
  color: var(--text);
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border);
}

.hero-cta--secondary:hover {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(30, 41, 59, 0.85);
}

.apps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 960px) {
  .apps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 440px) {
  .apps {
    grid-template-columns: 1fr;
  }
}

.app-card {
  display: block;
  text-decoration: none;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--surface-strong));
  padding: 18px 16px 16px;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

/* Subtle wash matching each suite icon palette */
.app-card--upload {
  background: linear-gradient(
      180deg,
      rgba(59, 130, 246, 0.14),
      rgba(99, 102, 241, 0.06)
    ),
    linear-gradient(180deg, var(--surface), var(--surface-strong));
}

.app-card--resources {
  background: linear-gradient(
      180deg,
      rgba(201, 36, 71, 0.13),
      rgba(225, 29, 72, 0.05)
    ),
    linear-gradient(180deg, var(--surface), var(--surface-strong));
}

.app-card--studio {
  background: linear-gradient(
      180deg,
      rgba(124, 58, 237, 0.14),
      rgba(168, 85, 247, 0.06)
    ),
    linear-gradient(180deg, var(--surface), var(--surface-strong));
}

.app-card--cid {
  background: linear-gradient(
      180deg,
      rgba(25, 155, 160, 0.14),
      rgba(45, 212, 191, 0.06)
    ),
    linear-gradient(180deg, var(--surface), var(--surface-strong));
}

.app-card--broll {
  background: linear-gradient(
      180deg,
      rgba(233, 116, 38, 0.14),
      rgba(249, 115, 22, 0.06)
    ),
    linear-gradient(180deg, var(--surface), var(--surface-strong));
}

.app-card--shoots {
  background: linear-gradient(
      180deg,
      rgba(52, 147, 96, 0.14),
      rgba(34, 197, 94, 0.06)
    ),
    linear-gradient(180deg, var(--surface), var(--surface-strong));
}

.app-card--compass {
  background: linear-gradient(
      180deg,
      rgba(234, 179, 8, 0.16),
      rgba(245, 158, 11, 0.07)
    ),
    linear-gradient(180deg, var(--surface), var(--surface-strong));
}

/* Clearance brand: #d12700 */
.app-card--clearance {
  background: linear-gradient(
      180deg,
      rgba(209, 39, 0, 0.2),
      rgba(209, 39, 0, 0.06)
    ),
    linear-gradient(180deg, var(--surface), var(--surface-strong));
  border-color: rgba(209, 39, 0, 0.35);
  box-shadow: 0 0 0 1px rgba(209, 39, 0, 0.12);
}

.app-card--pulse {
  background: linear-gradient(
      180deg,
      rgba(217, 70, 239, 0.12),
      rgba(244, 114, 182, 0.06)
    ),
    linear-gradient(180deg, var(--surface), var(--surface-strong));
}

/* Icon only — no outer frame; PNGs bring their own shape/color */
.card-visual {
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  line-height: 0;
}

.app-tile-icon {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 14px;
  filter: drop-shadow(0 6px 18px rgba(2, 6, 23, 0.45));
}

.app-icon-fallback {
  display: none;
  font-size: 80px;
  line-height: 1;
  place-items: center;
  width: 1em;
  height: 1em;
  filter: drop-shadow(0 4px 12px rgba(2, 6, 23, 0.4));
}

.app-icon-fallback.is-visible {
  display: inline-grid;
}

.app-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.45);
}

.app-card--upload:hover {
  border-color: rgba(96, 165, 250, 0.4);
}

.app-card--resources:hover {
  border-color: rgba(251, 113, 133, 0.4);
}

.app-card--studio:hover {
  border-color: rgba(192, 132, 252, 0.4);
}

.app-card--cid:hover {
  border-color: rgba(45, 212, 191, 0.4);
}

.app-card--broll:hover {
  border-color: rgba(251, 146, 60, 0.4);
}

.app-card--shoots:hover {
  border-color: rgba(74, 222, 128, 0.4);
}

.app-card--compass:hover {
  border-color: rgba(250, 204, 21, 0.45);
}

.app-card--clearance:hover {
  border-color: rgba(209, 39, 0, 0.55);
  box-shadow:
    0 10px 24px rgba(2, 6, 23, 0.45),
    0 0 28px rgba(209, 39, 0, 0.18);
}

.app-card--pulse:hover {
  border-color: rgba(232, 121, 249, 0.4);
}

.app-card h2 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.3;
  color: var(--text);
  font-family: var(--font-heading);
}

.app-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.app-link-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.footer {
  margin-top: 22px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.footer p {
  margin: 0;
}

.footer .muted {
  margin-top: 4px;
  opacity: 0.8;
}

/* Sticky shop promo — peeks from right edge; hover = fully flush (no gap off screen edge) */
.shop-ribbon {
  position: fixed;
  z-index: 50;
  /* Upper hero band, above the app icon grid */
  top: clamp(96px, 14vh, 160px);
  right: 0;
  display: block;
  text-decoration: none;
  color: inherit;
  /* ~80px visible at rest so “Check out the” + most of “Shop!” is almost readable */
  transform: translateX(calc(100% - 80px)) rotate(-2deg);
  transform-origin: right center;
  transition:
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.3s ease;
  filter: drop-shadow(-6px 8px 18px rgba(0, 0, 0, 0.4));
}

.shop-ribbon:hover,
.shop-ribbon:focus-visible {
  /* 0 = right edge of ribbon aligns with viewport; avoid negative X (that left a gap on the right) */
  transform: translateX(0) rotate(0deg);
  filter: drop-shadow(-8px 12px 22px rgba(0, 0, 0, 0.45));
}

.shop-ribbon:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.shop-ribbon__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 22px 16px 18px;
  min-width: 132px;
  background: linear-gradient(155deg, #fef3c7 0%, #fbbf24 42%, #d97706 100%);
  border-radius: 14px 0 0 14px;
  border: 2px solid rgba(255, 255, 255, 0.65);
  border-right: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    -2px 0 0 rgba(120, 53, 15, 0.12);
}

.shop-ribbon__line1 {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #78350f;
  line-height: 1.2;
}

.shop-ribbon__line2 {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 700;
  line-height: 1;
  color: #1c1917;
}

@media (max-width: 600px) {
  .shop-ribbon {
    top: auto;
    bottom: max(20px, env(safe-area-inset-bottom, 0px));
    transform: translateX(calc(100% - 72px)) rotate(-2deg);
  }

  .shop-ribbon:hover,
  .shop-ribbon:focus-visible {
    transform: translateX(0) rotate(0deg);
  }

  .shop-ribbon__body {
    min-width: 118px;
    padding: 12px 18px 14px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shop-ribbon {
    transition-duration: 0.15s;
  }
}
