:root {
  /* light "living tissue" palette */
  --bg-top: #f4f1ea;
  --bg-bottom: #e7efe6;
  --text: #16241c;
  --text-muted: #46574d;
  --accent: #4a9d76;

  /* dark palette (revealed on scroll) */
  --dark-bg: #0e1a14;
  --dark-text: #e9efe9;
  --dark-muted: #8fa79a;
}

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

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  min-height: 100%;
  font-family: "Chakra Petch", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background 0.9s ease, color 0.9s ease;
}

/* Dark theme kicks in when the closing section is in view */
body.dark {
  color: var(--dark-text);
  background: linear-gradient(180deg, #12211a 0%, var(--dark-bg) 100%);
}

/* --- Ambient canvas --- */
#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  pointer-events: none;
}

/* --- Nav --- */
.top-nav {
  position: fixed;
  top: 1.6rem;
  right: 2rem;
  z-index: 10;
  display: flex;
  gap: 1.5rem;
}

.top-nav a {
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  color: inherit;
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s ease, color 0.9s ease;
}

.top-nav a:hover {
  opacity: 1;
}

/* --- Content --- */
.content {
  position: relative;
  z-index: 2;
}

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.1rem;
  padding: 0 6vw;
}

.mark {
  width: clamp(150px, 24vw, 280px);
  aspect-ratio: 1 / 1;
  background-color: currentColor;
  -webkit-mask: url("/mitsugen-mark2.svg") no-repeat center / contain;
  mask: url("/mitsugen-mark2.svg") no-repeat center / contain;
  margin-bottom: -1.4rem;
  transition: background-color 0.9s ease;
}

.wordmark {
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(2.2rem, 8.5vw, 6rem);
  line-height: 0.95;
  letter-spacing: 0.06em;
}

.tagline {
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  font-weight: 300;
  color: var(--text-muted);
  max-width: 34ch;
  transition: color 0.9s ease;
}

body.dark .tagline {
  color: var(--dark-muted);
}

.scroll-hint {
  display: block;
  margin-top: 3rem;
  line-height: 0;
  color: var(--text-muted);
  opacity: 0.55;
  animation: pulse 2.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.25; transform: translateY(0); }
  50% { opacity: 0.7; transform: translateY(4px); }
}

.closing {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.4rem;
  padding: 0 6vw;
}

.closing-text {
  font-family: "Chakra Petch", sans-serif;
  font-weight: 500;
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  line-height: 1.3;
  max-width: 24ch;
  font-style: italic;
}

.closing-meta a {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.closing-meta a:hover {
  border-bottom-color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-hint { animation: none; }
}
