:root {
  --ink: #122820;
  --ink-soft: #3a524a;
  --brand: #1f6b5a;
  --brand-deep: #0f3d34;
  --brand-soft: #3d8b7a;
  --sand: #eef3f0;
  --paper: #f6f9f7;
  --line: rgba(18, 40, 32, 0.12);
  --gold: #a8893d;
  --font-display: "Instrument Serif", "Noto Sans SC", serif;
  --font-body: "Source Sans 3", "Noto Sans SC", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(61, 139, 122, 0.22), transparent 55%),
    radial-gradient(900px 500px at 90% 8%, rgba(168, 137, 61, 0.14), transparent 50%),
    linear-gradient(165deg, #e5efe9 0%, #f3f7f5 42%, #dde8e3 100%);
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.mist {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
}

.mist-a {
  width: 42vw;
  height: 42vw;
  max-width: 520px;
  max-height: 520px;
  top: 8%;
  right: -8%;
  background: rgba(31, 107, 90, 0.18);
  animation: drift 18s var(--ease) infinite alternate;
}

.mist-b {
  width: 36vw;
  height: 36vw;
  max-width: 420px;
  max-height: 420px;
  bottom: 12%;
  left: -6%;
  background: rgba(168, 137, 61, 0.12);
  animation: drift 22s var(--ease) infinite alternate-reverse;
}

.grid-fade {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(18, 40, 32, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 40, 32, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 20%, transparent 72%);
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-18px, 24px, 0) scale(1.06); }
}

.topbar,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.topbar-brand {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--brand-deep);
  text-decoration: none;
}

.topbar-link {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.topbar-link:hover {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
  min-height: calc(100vh - 5.5rem);
}

.brand {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 7vw, 5.2rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--brand-deep);
}

.headline {
  margin: 0 0 0.9rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  color: var(--ink);
  letter-spacing: 0.01em;
}

.lede {
  margin: 0 0 1.75rem;
  max-width: 28rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
  align-items: center;
}

.cta-primary,
.cta-ghost,
.tool-enter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.cta-primary {
  padding: 0.85rem 1.35rem;
  background: var(--brand-deep);
  color: #f4f7f5;
  border-radius: 4px;
}

.cta-primary:hover {
  background: var(--brand);
  transform: translateY(-2px);
}

.cta-ghost {
  padding: 0.85rem 0.35rem;
  color: var(--brand);
  border-bottom: 1px solid rgba(31, 107, 90, 0.35);
  border-radius: 0;
}

.cta-ghost:hover {
  color: var(--brand-deep);
  border-bottom-color: var(--brand-deep);
  transform: translateY(-1px);
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.trail-map {
  width: min(100%, 420px);
  height: auto;
  filter: drop-shadow(0 18px 40px rgba(15, 61, 52, 0.12));
}

.hub-label {
  fill: #f4f7f5;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.08em;
}

.orbit {
  transform-origin: 210px 210px;
}

.orbit.o1 {
  animation: spin 48s linear infinite;
}

.orbit.o2 {
  animation: spin 64s linear infinite reverse;
}

.trail {
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: draw 2.4s var(--ease) forwards;
}

.trail.t2 { animation-delay: 0.25s; }
.trail.t3 { animation-delay: 0.45s; }

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

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

.tools {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem 1.5rem 5rem;
}

.section-head {
  margin-bottom: 1.75rem;
}

.section-head h2 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 400;
  color: var(--brand-deep);
}

.section-lede {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
}

.tool-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tool-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 1.5rem;
  align-items: center;
  padding: 1.35rem 0;
  border-top: 1px solid var(--line);
}

.tool-item:last-child {
  border-bottom: 1px solid var(--line);
}

.tool-name {
  margin: 0 0 0.2rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
}

.tool-tagline {
  margin: 0 0 0.55rem;
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.tool-summary {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  max-width: 36rem;
}

.tool-enter {
  padding: 0.65rem 1.1rem;
  color: var(--brand-deep);
  border: 1px solid rgba(15, 61, 52, 0.35);
  border-radius: 4px;
  white-space: nowrap;
  align-self: center;
}

.tool-enter:hover {
  background: var(--brand-deep);
  color: #f4f7f5;
  border-color: var(--brand-deep);
  transform: translateY(-2px);
}

.tool-enter.is-soon,
.tool-enter:disabled {
  opacity: 0.45;
  pointer-events: none;
  transform: none;
}

.tool-status {
  display: inline-block;
  margin-left: 0.45rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-soft);
  vertical-align: middle;
}

.site-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.5rem 2.5rem;
  text-align: center;
  border-top: 1px solid var(--line);
}

.footer-brand,
.footer-copyright {
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.icp {
  color: #7a8a84;
  font-size: 0.78rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

.tool-item.reveal {
  transition-delay: var(--stagger, 0ms);
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 1.5rem;
    padding-bottom: 3rem;
    gap: 1.5rem;
  }

  .hero-visual {
    order: -1;
  }

  .trail-map {
    width: min(78vw, 300px);
  }

  .brand {
    font-size: clamp(2.6rem, 12vw, 3.6rem);
  }

  .tool-item {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .tool-enter {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mist, .orbit, .trail, .reveal {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}
