:root {
  color-scheme: light;
  --bg: #f7f4ee;
  --ink: #1f1b16;
  --muted: #5c534b;
  --accent: #ff784f;
  --accent-deep: #e64a3b;
  --teal: #146b6e;
  --surface: rgba(255, 255, 255, 0.82);
  --glass: rgba(255, 255, 255, 0.4);
  --line: rgba(31, 27, 22, 0.12);
  --shadow: 0 24px 60px rgba(28, 23, 18, 0.12);
  --radius: 22px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Space Grotesk", "Noto Sans SC", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
}

button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.orb {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(0px);
  opacity: 0.6;
  mix-blend-mode: multiply;
  animation: float 12s ease-in-out infinite;
}

.orb-a {
  background: radial-gradient(circle at 30% 30%, #ffd87a, rgba(255, 216, 122, 0));
  top: -120px;
  left: -80px;
}

.orb-b {
  background: radial-gradient(circle at 60% 40%, #ff8a80, rgba(255, 138, 128, 0));
  right: -140px;
  top: 120px;
  animation-delay: -3s;
}

.orb-c {
  background: radial-gradient(circle at 40% 50%, #91c4ff, rgba(145, 196, 255, 0));
  bottom: -160px;
  left: 40%;
  animation-delay: -6s;
}

.grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(31, 27, 22, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 27, 22, 0.08) 1px, transparent 1px);
  background-size: 120px 120px;
  opacity: 0.2;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) translateX(0px);
  }
  50% {
    transform: translateY(30px) translateX(-10px);
  }
}

.hero {
  padding: 42px 72px 60px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(255, 120, 79, 0.2);
}

.nav-links {
  display: flex;
  gap: 20px;
  font-weight: 500;
  color: var(--muted);
}

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

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 48px;
}

.hero-copy h1 {
  font-family: "Fraunces", "Songti SC", serif;
  font-size: clamp(2.6rem, 2.2rem + 1.6vw, 3.6rem);
  margin-bottom: 18px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 12px;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 28px;
}

.cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.primary,
.glass,
.ghost {
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 30px rgba(230, 74, 59, 0.35);
}

.primary:hover {
  transform: translateY(-2px);
}

.glass {
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
}

.ghost {
  background: transparent;
  border: 1px solid var(--line);
}

.hero-metrics {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.metric {
  font-size: 2rem;
  font-weight: 700;
}

.metric-label {
  font-size: 0.9rem;
  color: var(--muted);
}

.hero-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card-header {
  display: flex;
  gap: 10px;
}

.pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(20, 107, 110, 0.15);
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 600;
}

.pill.light {
  background: rgba(255, 120, 79, 0.15);
  color: var(--accent-deep);
}

.card-body h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.card-body p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.stack {
  display: grid;
  gap: 10px;
}

.stack-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  color: var(--muted);
}

.status {
  font-weight: 600;
}

.status.ok {
  color: var(--teal);
}

.card-footer {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.section {
  padding: 72px;
}

.section.alt {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-family: "Fraunces", "Songti SC", serif;
  font-size: 2rem;
}

.section-desc {
  max-width: 460px;
  color: var(--muted);
  line-height: 1.7;
}

.project-grid,
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 18px 40px rgba(31, 27, 22, 0.08);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 220px;
}

.card h3 {
  font-size: 1.2rem;
}

.card p {
  color: var(--muted);
  line-height: 1.6;
}

.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(31, 27, 22, 0.08);
}

.card-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel h3 {
  font-size: 1.3rem;
}

.form-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.mode-switch {
  display: flex;
  gap: 8px;
}

.mode-switch .ghost.active {
  border-color: var(--accent);
  color: var(--accent-deep);
  box-shadow: 0 0 0 2px rgba(255, 120, 79, 0.15);
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

input {
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.7);
}

.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.hint {
  font-size: 0.85rem;
  color: var(--muted);
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.oauth-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.merge-box,
.token-box {
  border-radius: 16px;
  padding: 16px;
  background: rgba(20, 107, 110, 0.1);
  color: var(--teal);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.token-box {
  background: rgba(255, 120, 79, 0.1);
  color: var(--accent-deep);
}

.token-box code {
  background: rgba(255, 255, 255, 0.6);
  padding: 6px 10px;
  border-radius: 10px;
}

.footer {
  padding: 40px 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 16px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  z-index: 20;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.hide {
  opacity: 0;
  transform: translateY(8px);
}

@media (max-width: 980px) {
  .hero {
    padding: 32px 24px 50px;
  }

  .section,
  .footer {
    padding: 48px 24px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .nav-links {
    flex-wrap: wrap;
  }

  .hero-metrics {
    gap: 16px;
  }
}
