:root {
  --ink: #1a2421;
  --ink-soft: #3d4a45;
  --paper: #f2f0e8;
  --mist: #dfe8e2;
  --horizon: #c45c26;
  --horizon-deep: #8f3d12;
  --tunnel: #2a6b5a;
  --tunnel-glow: #5cb89a;
  --line: rgba(26, 36, 33, 0.12);
  --code-bg: #1a2421;
  --code-fg: #e8f0ec;
  --font-display: "Syne", "Zen Kaku Gothic New", sans-serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Sans", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", monospace;
  --max: 42rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  background:
    radial-gradient(ellipse 90% 60% at 70% -10%, rgba(196, 92, 38, 0.28), transparent 55%),
    radial-gradient(ellipse 70% 50% at 10% 20%, rgba(42, 107, 90, 0.18), transparent 50%),
    linear-gradient(165deg, #e8ebe4 0%, var(--paper) 40%, #ebe6dc 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
  mix-blend-mode: multiply;
  z-index: 0;
}

a {
  color: var(--tunnel);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--horizon-deep);
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, 68rem);
  margin-inline: auto;
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-content: end;
  padding: 2rem 0 4rem;
  isolation: isolate;
}

.hero-sky {
  position: absolute;
  inset: -10% -5% 20%;
  z-index: -1;
  background:
    radial-gradient(ellipse 40% 55% at 55% 35%, rgba(255, 214, 170, 0.55), transparent 70%),
    linear-gradient(180deg, transparent 0%, rgba(42, 107, 90, 0.08) 100%);
  pointer-events: none;
}

.hero-beam {
  position: absolute;
  left: 52%;
  top: 8%;
  width: min(28vw, 14rem);
  height: 62%;
  transform: translateX(-50%) rotate(8deg);
  background: linear-gradient(
    180deg,
    rgba(255, 220, 180, 0.55) 0%,
    rgba(92, 184, 154, 0.22) 45%,
    transparent 100%
  );
  filter: blur(2px);
  clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%);
  animation: beam-pulse 6s var(--ease) infinite alternate;
  pointer-events: none;
}

@keyframes beam-pulse {
  from {
    opacity: 0.7;
    transform: translateX(-50%) rotate(8deg) scaleY(1);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) rotate(7deg) scaleY(1.04);
  }
}

.hero-brand {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(4.5rem, 16vw, 9rem);
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: var(--ink);
  animation: rise 0.9s var(--ease) both;
}

.hero-lead {
  margin: 1.25rem 0 0;
  max-width: 28rem;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: var(--ink-soft);
  animation: rise 0.9s var(--ease) 0.12s both;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 2rem;
  animation: rise 0.9s var(--ease) 0.24s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  background: transparent;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

.btn:hover {
  background: var(--ink);
  color: var(--paper);
  color: var(--paper);
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--horizon);
  border-color: var(--horizon);
  color: #fff;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Sections —— */
main {
  padding-bottom: 5rem;
}

.section {
  padding: 3.5rem 0 0;
  max-width: var(--max);
  animation: rise 0.8s var(--ease) both;
}

.section:nth-of-type(1) {
  animation-delay: 0.05s;
}
.section:nth-of-type(2) {
  animation-delay: 0.1s;
}
.section:nth-of-type(3) {
  animation-delay: 0.15s;
}

.section h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2rem);
  letter-spacing: -0.02em;
}

.section > p {
  margin: 0 0 1.25rem;
  color: var(--ink-soft);
}

.rule {
  height: 1px;
  background: var(--line);
  margin: 3.5rem 0 0;
  max-width: var(--max);
}

ul.plain {
  margin: 0;
  padding-left: 1.2rem;
}

ul.plain li {
  margin-bottom: 0.35rem;
}

pre {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  background: var(--code-bg);
  color: var(--code-fg);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.55;
  border-left: 3px solid var(--tunnel-glow);
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

p code,
li code,
td code {
  padding: 0.1em 0.35em;
  background: rgba(42, 107, 90, 0.12);
  color: var(--tunnel);
}

pre code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

.comment {
  color: #8aa89c;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 0.5rem 0 0;
}

th,
td {
  text-align: left;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer {
  margin-top: 4rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  max-width: var(--max);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.footer a {
  color: inherit;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 640px) {
  .hero {
    align-content: center;
    padding-top: 4rem;
  }

  .hero-beam {
    width: 40vw;
    left: 60%;
  }
}
