:root {
  --bg:      #161310;
  --bg-warm: #1e1712;
  --ink:     #ede3cb;
  --ink-dim: rgba(237, 227, 203, 0.62);
  --ink-faint: rgba(237, 227, 203, 0.32);
  --border:  rgba(237, 227, 203, 0.14);
  --accent:  #e89050;
  --accent-soft: rgba(232, 144, 80, 0.16);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body {
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
  background:
    radial-gradient(900px 600px at 50% 0%, rgba(232, 144, 80, 0.07), transparent 70%),
    radial-gradient(700px 500px at 50% 110%, rgba(232, 144, 80, 0.05), transparent 70%),
    var(--bg);
  position: relative;
  overflow-x: hidden;
}

/* subtle grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 0.95 0 0 0 0 0.85 0 0 0 0.05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.7;
  mix-blend-mode: overlay;
  z-index: 0;
}

main {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  text-align: center;
  display: grid;
  gap: clamp(2rem, 5vh, 3.5rem);
}

/* ── MARK ── */
.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  justify-self: center;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.015);
  animation: fade-in 600ms ease both;
}
.mark__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(232, 144, 80, 0.7);
  animation: breathe 2.4s ease-in-out infinite;
}
.mark__name { color: var(--ink); font-weight: 500; letter-spacing: 0.24em; }
.mark__ver  { color: var(--ink-faint); }

@keyframes breathe {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.88); }
}

/* ── HERO ── */
.hero {
  display: grid;
  gap: clamp(1.4rem, 3vh, 2rem);
  animation: fade-up 800ms 120ms cubic-bezier(.2,.7,.2,1) both;
}

h1 {
  font-family: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.6rem, 8.5vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
h1 em {
  font-style: italic;
  color: var(--accent);
  font-size: 1.02em;
}

.sub {
  max-width: 46ch;
  margin: 0 auto;
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  line-height: 1.65;
  color: var(--ink-dim);
  letter-spacing: 0.005em;
  text-wrap: pretty;
}
.sub .mono {
  color: var(--ink);
  background: var(--accent-soft);
  padding: 0.05em 0.45em;
  border-radius: 0.3em;
  font-size: 0.92em;
  letter-spacing: 0.04em;
}

/* ── CTA ── */
.cta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.3rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 220ms cubic-bezier(.2,.7,.2,1),
    box-shadow 220ms cubic-bezier(.2,.7,.2,1),
    background 220ms ease,
    border-color 220ms ease,
    color 220ms ease;
  will-change: transform;
  border: 1px solid transparent;
}

.btn__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.btn__arrow {
  display: inline-block;
  transition: transform 220ms cubic-bezier(.2,.7,.2,1);
  font-family: "JetBrains Mono", monospace;
  font-weight: 400;
  margin-left: 0.1rem;
}

.btn--primary {
  background: var(--accent);
  color: #1b1107;
  border-color: var(--accent);
  box-shadow:
    0 1px 0 rgba(255, 220, 180, 0.35) inset,
    0 -1px 0 rgba(0, 0, 0, 0.25) inset,
    0 8px 22px -8px rgba(232, 144, 80, 0.55);
}
.btn--primary:hover,
.btn--primary:focus-visible {
  outline: none;
  transform: translateY(-2px);
  background: #f2a066;
  box-shadow:
    0 1px 0 rgba(255, 220, 180, 0.45) inset,
    0 -1px 0 rgba(0, 0, 0, 0.25) inset,
    0 14px 30px -10px rgba(232, 144, 80, 0.7);
}
.btn--primary:hover .btn__arrow,
.btn--primary:focus-visible .btn__arrow {
  transform: translateX(4px);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
  border-color: var(--border);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  outline: none;
  transform: translateY(-2px);
  border-color: rgba(237, 227, 203, 0.38);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.btn:active { transform: translateY(0); }

/* ── FOOTER ── */
.foot {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  animation: fade-in 900ms 500ms ease both;
}
.foot__sep { color: var(--ink-faint); }

/* ── ANIMATIONS ── */
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); filter: blur(6px); }
  to   { opacity: 1; transform: none;              filter: blur(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 520px) {
  h1 { font-size: clamp(2.2rem, 11vw, 3.4rem); }
  .btn { width: 100%; justify-content: center; }
  .cta { flex-direction: column; }
  .foot { font-size: 0.62rem; gap: 0.4rem; }
}

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