:root {
  --paper: #f1ebdf;
  --paper-deep: #e7dfcf;
  --ink: #15130f;
  --ink-soft: #3a352d;
  --muted: #7a7064;
  --cinnabar: #c8321f;
  --rule: rgba(21, 19, 15, 0.14);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --serif-han: "Noto Serif SC", "Songti SC", serif;
  --serif-lat: "Fraunces", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif-han);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

::selection { background: var(--cinnabar); color: var(--paper); }

a { color: inherit; }

.ik { position: relative; isolation: isolate; }
.ik-defs { position: absolute; width: 0; height: 0; }

/* ---------- Ink blots ---------- */
.ik-ink { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }

.ik-ink__blot {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, var(--ink) 0%, rgba(21, 19, 15, 0.6) 35%, transparent 68%);
  filter: url(#ink-bleed) blur(2px);
  opacity: 0;
  animation: blot-in 3.2s var(--ease-out) forwards, blot-drift 28s ease-in-out infinite alternate;
}

.ik-ink__blot--a {
  width: 62vmax; height: 62vmax;
  top: -22vmax; right: -24vmax;
  --o: 0.09;
  animation-delay: 0.2s, 0s;
}

.ik-ink__blot--b {
  width: 40vmax; height: 40vmax;
  top: 118vh; left: -18vmax;
  --o: 0.06;
  animation-delay: 0.8s, -9s;
}

@keyframes blot-in { to { opacity: var(--o); } }
@keyframes blot-drift {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); }
  100% { transform: translate(-4vmax, 3vmax) rotate(24deg) scale(1.08); }
}

/* ---------- Nav ---------- */
.ik-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem clamp(1.25rem, 4vw, 3.5rem);
  background: linear-gradient(var(--paper) 30%, rgba(241, 235, 223, 0));
  animation: drop-in 1s var(--ease-out) 0.1s both;
}

.ik-logo {
  font-family: var(--serif-lat);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.ik-logo__dot { color: var(--cinnabar); margin: 0 0.15em; }
.ik-logo__han { font-family: var(--serif-han); font-weight: 900; }

.ik-nav__links { display: flex; gap: clamp(1rem, 3vw, 2.5rem); align-items: center; }

.ik-nav__links a {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  position: relative;
}

.ik-nav__links a:not(.ik-nav__cta)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--cinnabar);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease-out);
}
.ik-nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.ik-nav__cta {
  padding: 0.55rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background 0.3s, color 0.3s;
}
.ik-nav__cta:hover { background: var(--ink); color: var(--paper); }

@keyframes drop-in { from { opacity: 0; transform: translateY(-16px); } }

/* ---------- Hero ---------- */
.ik-hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding: 8rem clamp(1.25rem, 6vw, 6rem) 6rem;
}

.ik-kicker {
  display: flex;
  gap: 1.5rem;
  margin: 0 0 2rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  animation: fade-up 1s var(--ease-out) 0.3s both;
}
.ik-kicker span:first-child { color: var(--cinnabar); }
.ik-kicker span + span::before { content: "—"; margin-right: 1.5rem; color: var(--rule); }

.ik-title {
  margin: 0;
  font-weight: 900;
  font-size: clamp(3.4rem, 11.5vw, 10.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.ik-title__line { display: block; white-space: nowrap; }
.ik-title__line + .ik-title__line { padding-left: clamp(0rem, 8vw, 9rem); }

.ik-char {
  display: inline-block;
  opacity: 0;
  animation: ink-rise 1.3s var(--ease-out) both;
  animation-delay: calc(var(--i) * 85ms + 350ms);
}

@keyframes ink-rise {
  0% { opacity: 0; transform: translateY(0.35em) scale(1.08); filter: blur(14px); }
  60% { filter: blur(0); }
  100% { opacity: 1; transform: none; filter: blur(0); }
}

.ik-title__em {
  position: relative;
  font-style: normal;
  color: var(--cinnabar);
}

.ik-title__em::after {
  content: "";
  position: absolute;
  left: -0.04em; right: -0.04em; bottom: 0.02em;
  height: 0.09em;
  background: var(--cinnabar);
  border-radius: 40% 60% 55% 45% / 60% 40% 60% 40%;
  transform: scaleX(0) rotate(-1.5deg);
  transform-origin: left;
  animation: brush 0.9s var(--ease-out) 1.4s forwards;
}

@keyframes brush { to { transform: scaleX(1) rotate(-1.5deg); } }

.ik-hero__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  max-width: 62rem;
}

.ik-lede {
  margin: 0;
  max-width: 26rem;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.9;
  color: var(--ink-soft);
  animation: fade-up 1s var(--ease-out) 1.5s both;
}

.ik-actions {
  display: flex;
  gap: 0.9rem;
  animation: fade-up 1s var(--ease-out) 1.7s both;
}

.ik-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 1rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), color 0.3s;
}

.ik-btn:active { transform: scale(0.97); }

.ik-btn--ink { background: var(--ink); color: var(--paper); }
.ik-btn--ink span { position: relative; z-index: 1; }
.ik-btn--ink::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cinnabar);
  clip-path: circle(0% at 0% 100%);
  transition: clip-path 0.6s var(--ease-out);
}
.ik-btn--ink:hover::before { clip-path: circle(150% at 0% 100%); }

.ik-btn--line { box-shadow: inset 0 0 0 1px var(--ink); }
.ik-btn--line:hover { color: var(--cinnabar); box-shadow: inset 0 0 0 1px var(--cinnabar); }

@keyframes fade-up { from { opacity: 0; transform: translateY(20px); } }

/* ---------- Seal ---------- */
.ik-seal {
  position: absolute;
  top: clamp(7rem, 18vh, 11rem);
  right: clamp(1.25rem, 7vw, 7rem);
  width: clamp(120px, 15vw, 200px);
  aspect-ratio: 1;
}

.ik-seal__ring {
  position: absolute;
  inset: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  fill: var(--ink);
  opacity: 0;
  animation: fade-in 1.2s ease 2s forwards, spin 36s linear 2s infinite;
}

.ik-seal__stamp {
  position: absolute;
  inset: 27%;
  display: grid;
  place-items: center;
  background: var(--cinnabar);
  color: var(--paper);
  border-radius: 10%;
  box-shadow: inset 0 0 0 4px var(--cinnabar), inset 0 0 0 6px var(--paper);
  font-weight: 900;
  font-size: clamp(2.2rem, 4.2vw, 3.6rem);
  opacity: 0;
  animation: stamp 0.7s cubic-bezier(0.5, 0, 0.3, 1.4) 1.8s forwards;
  -webkit-mask-image: radial-gradient(circle at 30% 70%, #000 60%, rgba(0, 0, 0, 0.82) 100%);
          mask-image: radial-gradient(circle at 30% 70%, #000 60%, rgba(0, 0, 0, 0.82) 100%);
}

.ik-seal__stamp span { transform: translateY(-0.04em); }

@keyframes stamp {
  0% { opacity: 0; transform: scale(2.6) rotate(-24deg); }
  70% { opacity: 1; transform: scale(0.9) rotate(-5deg); }
  100% { opacity: 1; transform: scale(1) rotate(-7deg); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { to { opacity: 1; } }

/* ---------- Scroll cue ---------- */
.ik-scroll {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  width: 1px;
  height: 64px;
  background: var(--rule);
  animation: fade-in 1s ease 2.4s both;
}
.ik-scroll span {
  position: absolute;
  left: -2px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--cinnabar);
  animation: drip 2.2s cubic-bezier(0.7, 0, 0.3, 1) infinite;
}
@keyframes drip {
  0% { top: 0; opacity: 0; }
  20% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* ---------- Marquee ---------- */
.ik-marquee {
  position: relative;
  z-index: 2;
  margin: 2rem -2vw 0;
  padding: 1.35rem 0;
  background: var(--ink);
  color: var(--paper);
  transform: rotate(-2deg);
  overflow: hidden;
}

.ik-marquee__track {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 2.2rem;
  font-size: clamp(1.6rem, 3.4vw, 2.8rem);
  font-weight: 700;
  animation: marquee 30s linear infinite;
}
.ik-marquee:hover .ik-marquee__track { animation-play-state: paused; }
.ik-marquee__track i { font-style: normal; font-size: 0.6em; color: var(--cinnabar); }

@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Craft ---------- */
.ik-craft { padding: clamp(6rem, 14vw, 11rem) clamp(1.25rem, 6vw, 6rem); }

.ik-h2 {
  margin: 0 0 clamp(3rem, 7vw, 5rem);
  font-size: clamp(2.2rem, 5.5vw, 4.4rem);
  font-weight: 900;
  line-height: 1.15;
}

.ik-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  border-top: 1px solid var(--ink);
}

.ik-card {
  position: relative;
  padding: 2.25rem 2rem 3rem;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
  isolation: isolate;
  transition: color 0.5s var(--ease-out);
  transition-delay: 0s;
}
.ik-card + .ik-card { border-left: 1px solid var(--rule); }

.ik-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.6s var(--ease-out);
}
.ik-card:hover { color: var(--paper); }
.ik-card:hover::before { transform: scaleY(1); }

.ik-card__num {
  font-family: var(--serif-lat);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--cinnabar);
}

.ik-card__title {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin: 4.5rem 0 1rem;
  font-size: clamp(2.2rem, 3.6vw, 3rem);
  font-weight: 900;
}
.ik-card__title small {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.5s;
}
.ik-card:hover .ik-card__title small { color: var(--cinnabar); }

.ik-card p { margin: 0; max-width: 20rem; line-height: 1.9; opacity: 0.8; }

/* ---------- Quote ---------- */
.ik-quote {
  display: grid;
  place-items: center;
  padding: clamp(5rem, 12vw, 10rem) clamp(1.25rem, 6vw, 6rem) clamp(7rem, 14vw, 12rem);
  text-align: center;
}

.ik-quote blockquote { margin: 0; }

.ik-quote p {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 6rem);
  font-weight: 700;
  line-height: 1.35;
}

.ik-quote mark {
  color: inherit;
  background: linear-gradient(transparent 62%, rgba(200, 50, 31, 0.85) 62%, rgba(200, 50, 31, 0.85) 90%, transparent 90%) no-repeat 0 0 / 0% 100%;
  transition: background-size 1.2s var(--ease-out) 0.6s;
}
.ik-quote .is-visible mark { background-size: 100% 100%; }

.ik-quote cite {
  display: block;
  margin-top: 2rem;
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.ik-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 2rem clamp(1.25rem, 6vw, 6rem);
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ---------- Scroll reveal ---------- */
[data-reveal-target="item"] {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 130ms);
}
[data-reveal-target="item"].is-visible { opacity: 1; transform: none; }
.ik-card.is-visible { transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out), color 0.5s var(--ease-out); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .ik-nav__links a:not(.ik-nav__cta) { display: none; }
  .ik-title { font-size: 15vw; }
  .ik-seal { top: 6.5rem; right: 1rem; width: 104px; }
  .ik-seal__stamp { font-size: 1.8rem; }
  .ik-card + .ik-card { border-left: 0; }
  .ik-kicker span + span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  html { scroll-behavior: auto; }
}
