:root {
  color-scheme: dark;
  --bg: #08110f;
  --panel: rgba(16, 31, 27, 0.78);
  --line: rgba(222, 242, 235, 0.12);
  --text: #f2f7f5;
  --muted: #9bb0aa;
  --mint: #8ce0bc;
  --mint-dark: #0b281f;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    var(--bg);
  background-size: 46px 46px;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, a { font: inherit; }

button:focus-visible, a:focus-visible {
  outline: 3px solid var(--mint);
  outline-offset: 4px;
}

[hidden] { display: none !important; }

.glow {
  position: fixed;
  z-index: -1;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  filter: blur(110px);
  opacity: .15;
}

.glow-one { top: -16rem; left: -10rem; background: #3edaa0; }
.glow-two { right: -14rem; bottom: -18rem; background: #885eff; }

.site-header, footer, main {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.02em;
}

.brand strong { color: var(--mint); }

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(140, 224, 188, .35);
  border-radius: 11px;
  background: rgba(140, 224, 188, .1);
  color: var(--mint);
  font-weight: 800;
}

.account {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: .875rem;
}

.text-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

main { min-height: calc(100vh - 170px); }

.auth-panel {
  width: min(760px, 100%);
  margin: clamp(70px, 12vh, 140px) auto;
  padding: clamp(30px, 7vw, 72px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(20, 39, 34, .9), rgba(10, 22, 19, .75));
  box-shadow: 0 30px 90px rgba(0, 0, 0, .28);
  text-align: center;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--mint);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 20px;
  font-size: clamp(2.5rem, 6vw, 5.25rem);
  line-height: .98;
  letter-spacing: -.065em;
}

.auth-panel h1 { font-size: clamp(2.4rem, 5vw, 4.3rem); }

.lede {
  max-width: 690px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.65;
}

.auth-panel .lede { margin-inline: auto; }

.auth-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.primary-button, .secondary-button {
  min-width: 138px;
  border-radius: 999px;
  padding: 13px 22px;
  cursor: pointer;
  font-weight: 750;
}

.primary-button {
  border: 1px solid var(--mint);
  background: var(--mint);
  color: var(--mint-dark);
}

.secondary-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
}

.fine-print, .app-auth-note {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: .8rem;
}

.error {
  margin: 22px auto 0;
  color: #ffb3ad;
  font-size: .9rem;
}

.spinner {
  width: 42px;
  height: 42px;
  margin: 28px auto 0;
  border: 3px solid var(--line);
  border-top-color: var(--mint);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.workspace { padding: clamp(60px, 9vw, 112px) 0 70px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 50px;
  align-items: center;
}

.hero-orbit {
  position: relative;
  width: 220px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.hero-orbit::before {
  content: "";
  position: absolute;
  inset: 32px;
  border: 1px dashed rgba(140, 224, 188, .3);
  border-radius: 50%;
}

.hero-orbit b {
  width: 76px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: var(--mint);
  box-shadow: 0 0 60px rgba(140, 224, 188, .22);
  color: var(--mint-dark);
  font-size: 1.3rem;
}

.hero-orbit span {
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--mint);
}

.hero-orbit span:nth-child(1) { top: 23px; left: 52px; }
.hero-orbit span:nth-child(2) { right: 8px; bottom: 78px; background: #9a7aff; }
.hero-orbit span:nth-child(3) { bottom: 22px; left: 54px; background: #ff9f7f; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 88px 0 24px;
}

.section-heading h2 { margin-bottom: 0; font-size: 1.45rem; }
.section-heading p { margin-bottom: 0; color: var(--muted); font-size: .9rem; }

.app-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.app-card {
  position: relative;
  min-height: 285px;
  grid-column: span 2;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.app-card:nth-last-child(-n+2) { grid-column: span 3; }

.app-card::after {
  content: "";
  position: absolute;
  right: -35px;
  bottom: -50px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--accent);
  filter: blur(65px);
  opacity: .1;
}

.app-card:hover {
  z-index: 1;
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: rgba(20, 39, 34, .94);
}

.coral { --accent: #ff9f7f; }
.violet { --accent: #a98dff; }
.blue { --accent: #72bbff; }
.green { --accent: #78d9a6; }
.amber { --accent: #ffc96f; }

.app-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 33px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  font-size: .8rem;
  font-weight: 850;
  letter-spacing: .04em;
}

.status {
  position: absolute;
  top: 26px;
  right: 24px;
  color: #8bc9aa;
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.status::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.status.preview { color: #e2b96c; }
.app-card h3 { margin-bottom: 10px; font-size: 1.2rem; letter-spacing: -.02em; }
.app-card p { color: var(--muted); font-size: .88rem; line-height: 1.55; }

.open-link {
  position: absolute;
  bottom: 23px;
  color: var(--accent);
  font-size: .82rem;
  font-weight: 750;
}

footer {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: #748880;
  font-size: .75rem;
}

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .hero-orbit { display: none; }
  .app-card, .app-card:nth-last-child(-n+2) { grid-column: span 3; }
  .account #user-email { display: none; }
}

@media (max-width: 560px) {
  .site-header, footer, main { width: min(100% - 24px, 1180px); }
  .site-header { min-height: 72px; }
  .workspace { padding-top: 54px; }
  .auth-panel { margin-top: 42px; border-radius: 22px; }
  .auth-actions { flex-direction: column; }
  .app-grid { display: block; }
  .app-card { display: block; margin-bottom: 14px; }
  .section-heading { display: block; margin-top: 60px; }
  .section-heading p { margin-top: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .app-card { transition: none; }
  .spinner { animation-duration: 1.8s; }
}
