/* asantara.me, one-page fullscreen */
.wm { --rise: 1555px; --wm-shift: -0.2847%; }
:root {
  --bg: #f3f2f0;
  --ink: #111319;
  --ghost: #dcdbdb;
  --g: clamp(16px, 2.65vw, 40px);
  /* wordmark width: wide screens use a share of the width, tall screens fill the gutters */
  --wm-w: min(60vw, 132svh, calc(100vw - 2 * var(--g)));
  --ease-enter: cubic-bezier(.22, .61, .36, 1);
}

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

html,
body { height: 100%; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

.stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 320px;
  overflow: hidden;
  display: grid;
  grid-template-rows: 42fr auto 58fr;
  padding: 0 var(--g);
  padding-left: max(var(--g), env(safe-area-inset-left));
  padding-right: max(var(--g), env(safe-area-inset-right));
}

/* ---------- ghost icon ---------- */
.ghost {
  position: absolute;
  z-index: 0;
  color: var(--ghost);
  width: var(--gh-w);
  left: var(--gh-x);
  top: var(--gh-y);
  --gh-w: min(62vw, 118svh);
  --gh-x: 35vw;
  --gh-y: 19svh;
  pointer-events: none;
  will-change: transform;
}

.ghost svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* ---------- wordmark ---------- */
.wm {
  grid-row: 2;
  position: relative;
  z-index: 1;
  margin: 0;
  width: var(--wm-w);
  line-height: 0;
  color: var(--ink);
  will-change: transform;
  /* hit area for hover is the static box, not the moving letters */
  cursor: default;
  touch-action: manipulation;
}

.wm svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: hidden;
  /* viewBox carries a little horizontal padding; pull it back so ink aligns to the gutter */
  transform: translateX(var(--wm-shift, 0%));
}

.wm path { fill: currentColor; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- motion states (only when JS runs and motion is allowed) ---------- */
.js .wm .ch { transform: translateY(var(--rise)); }
.js.intro-done .wm .ch { transform: none; }
.wm .twin { transform: translateY(var(--rise)); }
.js .ghost .stroke { stroke-dashoffset: 1.02; }

/* ---------- tall screens: phones and tablets in portrait ---------- */
@media (max-aspect-ratio: 11/10) {
  :root { --wm-w: calc(100vw - 2 * var(--g)); }
  .stage { grid-template-rows: 44fr auto 56fr; }
  .ghost {
    --gh-w: min(104vw, 66svh);
    /* leaf tip sits on the right gutter; the bowl bleeds a little off the left and bottom */
    --gh-x: calc(100vw - var(--g) - var(--gh-w) * 0.993);
    --gh-y: 46svh;
  }
}

/* ---------- squat landscape (phones turned sideways) ---------- */
@media (min-aspect-ratio: 16/9) and (max-height: 520px) {
  .stage { grid-template-rows: 46fr auto 54fr; }
}

@media (prefers-reduced-motion: reduce) {
  .ghost,
  .wm { will-change: auto; }
}

/* ---------- 404 ---------- */
.nf {
  grid-row: 2;
  position: relative;
  z-index: 1;
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.6;
}

.nf p { margin: 1.4em 0 0; max-width: 34em; }

.nf a {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 1px;
  transition: background-size .38s var(--ease-enter);
}

.nf a:hover { background-size: 0% 1px; }
.nf a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.nf .wm { width: min(28vw, 60svh, calc(100vw - 2 * var(--g))); }
