:root {
  --bg: #0e0e0c;
  --fg: #ece8df;
  --muted: rgba(236, 232, 223, 0.45);
  --accent: #9fd8ff; /* ice */
  --pad: clamp(18px, 2.4vw, 40px);
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
}

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

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter Tight", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--bg); }

.page {
  height: 100vh;
  height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: minmax(0, 1fr);
  padding: var(--pad);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--pad);
  font-size: clamp(14px, 1.15vw, 18px);
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Logo — snowflake */
.mark { display: block; width: 34px; height: 34px; overflow: visible; }
.mark path {
  fill: none;
  stroke: var(--fg);
  stroke-width: 2.2;
  stroke-linecap: square;
}
.mark .flake {
  transform-origin: 0 0;
  transition: transform 1.2s var(--ease);
}
.mark .core { fill: var(--accent); transition: transform 0.8s var(--ease); }
.brand:hover .mark .flake { transform: rotate(60deg); }
.brand:hover .mark .core { transform: scale(1.6); }

/* Links with underline sweep */
.link { position: relative; }
.link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s var(--ease);
}
.link:hover::after { transform: scaleX(1); transform-origin: left; }

.apps { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 40px); }
.apps .link::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
  transform: scale(0);
  transition: transform 0.5s var(--ease);
}
.apps .link:hover::before { transform: scale(1); }
.soon, .muted { color: var(--muted); }

/* Wordmark */
.wordmark {
  align-self: center;
  min-width: 0;
  width: 100%;
  clip-path: inset(-50% -50% 0 -50%); /* clip bottom only, for the rise-in */
  white-space: nowrap;
  font-weight: 800;
  line-height: 0.8;
  user-select: none;
}
.wm-inner {
  display: block;
  font-size: 20vw; /* refined by JS */
  letter-spacing: -0.06em;
  line-height: 0.8;
  padding-top: 0.06em;
  text-align: center;
}
.wm-inner .ch {
  display: inline-block;
  transform: translateY(110%);
  animation: rise 1.6s var(--ease) forwards;
  animation-delay: calc(0.2s + var(--i) * 70ms);
}
.wm-inner .ch:last-child { letter-spacing: 0; }
.wordmark.ready .ch { animation: none; transform: none; }
.wm-inner .ch.hot { color: var(--accent); }

/* Intro */
.reveal {
  opacity: 0;
  animation: fade 1.2s var(--ease) 1.1s forwards;
}

/* Grain */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 10;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 0.8s steps(4) infinite;
}

/* Cursor */
.cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: 20;
  width: 12px; height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--fg);
  pointer-events: none;
  mix-blend-mode: difference;
  opacity: 0;
  transition: width 0.5s var(--ease), height 0.5s var(--ease), margin 0.5s var(--ease), opacity 0.3s;
}
.cursor.on { opacity: 1; }
.cursor.big { width: 72px; height: 72px; margin: -36px 0 0 -36px; }

@media (hover: hover) and (pointer: fine) { html, body, a { cursor: none; } }
@media (hover: none) { .cursor { display: none; } }

@keyframes rise { to { transform: translateY(0); } }
@keyframes fade { to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-5%, 3%); }
  50% { transform: translate(4%, -4%); }
  75% { transform: translate(-3%, -2%); }
  100% { transform: translate(2%, 5%); }
}

@media (max-width: 600px) {
  footer.row { flex-direction: column; align-items: flex-start; gap: 14px; }
  .apps { flex-wrap: wrap; gap: 8px 22px; }
}

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