/* Aou1ni
   World: a night flight. One fixed sky behind everything, sections float over it.
   Type: Clash Display for display, Satoshi for text.
   Accent: sky blue, used for the "1", the route and small highlights only.
   Radius: squircle tiles 23%, surfaces 28px, controls full round. */

@font-face { font-family: "Clash Display"; src: url("assets/fonts/clash-display-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Clash Display"; src: url("assets/fonts/clash-display-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Clash Display"; src: url("assets/fonts/clash-display-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("assets/fonts/satoshi-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("assets/fonts/satoshi-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("assets/fonts/satoshi-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #070a10;
  --bg-2: #0b1019;
  --text: #eef2f8;
  --text-2: rgba(238, 242, 248, 0.66);
  --text-3: rgba(238, 242, 248, 0.46);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --accent: #8ec5ff;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  --gutter: clamp(18px, 4.5vw, 48px);
  --wrap: 1160px;
  --display: "Clash Display", "Satoshi", system-ui, sans-serif;
  --body: "Satoshi", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection { background: rgba(142, 197, 255, 0.28); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 10px; }

a { color: inherit; text-decoration: none; }
img, video, svg { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.one { color: var(--accent); }

/* ---------- Fixed sky ---------- */

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom, #0c1424 0%, #090d16 45%, var(--bg) 100%);
  overflow: hidden;
}

.sky__map {
  position: absolute;
  inset: -4%;
  will-change: transform;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 40%, #000 45%, transparent 100%);
          mask-image: radial-gradient(120% 90% at 50% 40%, #000 45%, transparent 100%);
}
.sky__map img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 48.97% 28.04%;
}


/* Film grain on a fixed, non-interactive layer. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Floating pill ---------- */

.pill {
  position: fixed;
  z-index: 40;
  top: calc(12px + env(safe-area-inset-top, 0px));
  left: 50%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 6px 6px 18px;
  border-radius: 999px;
  background: rgba(12, 17, 27, 0.62);
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 40px -12px rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
          backdrop-filter: blur(18px) saturate(160%);
  transform: translate(-50%, -140%);
  opacity: 0;
  transition: transform 520ms var(--ease-out), opacity 320ms var(--ease-out);
}
.pill.is-shown { transform: translate(-50%, 0); opacity: 1; }

.pill__mark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  margin-right: 14px;
}
.pill__cta {
  font-weight: 700;
  font-size: 0.875rem;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  touch-action: manipulation;
  transition: transform 160ms var(--ease-out);
}
.pill__cta:active { transform: scale(0.96); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  isolation: isolate;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  -webkit-mask-image: linear-gradient(to bottom, #000 64%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 64%, transparent 100%);
}

/* Darkens only the lower band where the type sits, then hands over to the sky. */
.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(7, 10, 16, 0.9) 0%, rgba(7, 10, 16, 0.5) 24%, rgba(7, 10, 16, 0) 50%);
  pointer-events: none;
}

.hero__copy {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
  padding-bottom: calc(34px + env(safe-area-inset-bottom, 0px));
}

.hero__name {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(5rem, 25vw, 13.5rem);
  line-height: 0.86;
  letter-spacing: -0.045em;
  margin-left: -0.04em;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
.hero__name .char { display: inline-block; will-change: transform; }

.hero__line {
  margin-top: clamp(14px, 2.4vw, 22px);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: clamp(1rem, 1.9vw, 1.25rem);
  letter-spacing: -0.005em;
}
.hero__plane {
  flex: none;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(142, 197, 255, 0.16);
  border: 1px solid rgba(142, 197, 255, 0.35);
}
.hero__plane svg { width: 15px; height: 15px; fill: var(--accent); transform: rotate(45deg); }

/* ---------- Sections ---------- */

.section { position: relative; padding-block: clamp(84px, 13vw, 150px); }
.channels { padding-top: clamp(72px, 11vw, 128px); padding-bottom: clamp(24px, 4vw, 48px); }

.title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.75rem, 11vw, 5.75rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  word-spacing: 0.1em;
  text-wrap: balance;
}
/* SplitText wraps each word in a clipping line so words rise out of it. */
.title .line { overflow: clip; overflow-clip-margin: 0.1em; padding-bottom: 0.06em; }

.lead {
  margin-top: 16px;
  max-width: 34ch;
  color: var(--text-2);
  font-size: clamp(1.0625rem, 1.7vw, 1.1875rem);
  line-height: 1.5;
}

/* ---------- Dock of app icons ---------- */

.dock {
  position: relative;
  margin-top: clamp(32px, 5vw, 56px);
  padding: clamp(22px, 3.4vw, 40px) clamp(12px, 3.4vw, 44px) clamp(16px, 2.6vw, 28px);
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 40px 80px -40px rgba(0, 0, 0, 0.7);
}

.apps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(22px, 4vw, 40px) clamp(6px, 2.6vw, 32px);
}

.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  touch-action: manipulation;
  -webkit-user-select: none;
          user-select: none;
  -webkit-touch-callout: none;
}

.app__tile {
  --size: clamp(60px, 17vw, 96px);
  position: relative;
  width: var(--size);
  height: var(--size);
  display: grid;
  place-items: center;
  border-radius: 23%;
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -2px 6px rgba(0, 0, 0, 0.18),
    0 10px 24px -10px rgba(0, 0, 0, 0.7);
  transition: transform 320ms var(--ease-out);
}
.app__tile svg { width: 46%; height: 46%; fill: currentColor; position: relative; z-index: 1; }

/* Glossy top light on every tile. */
.app__tile::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0) 46%);
  pointer-events: none;
}

/* Soft brand-colored reflection on the dock surface. */
.app__tile::after {
  content: "";
  position: absolute;
  left: 12%; right: 12%; bottom: -16%;
  height: 40%;
  border-radius: 50%;
  background: var(--glow, transparent);
  filter: blur(16px);
  opacity: 0.5;
  z-index: -1;
  transition: opacity 380ms var(--ease-out), transform 380ms var(--ease-out);
}

.app__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color 200ms var(--ease-out);
}

.app:active .app__tile { transform: scale(0.9); transition-duration: 120ms; }

@media (hover: hover) and (pointer: fine) {
  .app:hover .app__tile { transform: translateY(-6px) scale(1.04); }
  .app:hover .app__tile::after { opacity: 0.9; transform: translateY(6px) scale(1.1); }
  .app:hover .app__label { color: var(--text); }
}

.app__tile--ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); --glow: #e1306c; }
.app__tile--tt { background: #0d0d10; --glow: #25f4ee; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10), inset 0 1px 0 rgba(255,255,255,0.2), 0 10px 24px -10px rgba(0,0,0,0.7); }
.app__tile--tt svg { filter: drop-shadow(-1.5px -1px 0 #25f4ee) drop-shadow(1.5px 1px 0 #fe2c55); }
.app__tile--yt { background: linear-gradient(180deg, #ff3b30, #e00000); --glow: #ff2a1f; }
.app__tile--sc { background: #fffc00; --glow: #fffc00; }
.app__tile--sc svg path { stroke: #111; stroke-width: 1.3; paint-order: stroke; stroke-linejoin: round; }
.app__tile--x  { background: #0d0d10; --glow: #9aa4b2; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12), inset 0 1px 0 rgba(255,255,255,0.2), 0 10px 24px -10px rgba(0,0,0,0.7); }
.app__tile--x svg { width: 40%; height: 40%; }
.app__tile--dc { background: linear-gradient(180deg, #6d78ff, #5865f2); --glow: #5865f2; }
.app__tile--tw { background: linear-gradient(180deg, #a36bff, #9146ff); --glow: #9146ff; }
.app__tile--mail { background: linear-gradient(160deg, #cfe6ff, #5a9dff); --glow: #6aa8ff; color: #0a1a2e; }

/* Desktop: one row, like a real dock. Icons magnify toward the pointer (main.js). */
@media (min-width: 900px) {
  .dock {
    width: fit-content;
    margin-inline: auto;
    padding: 30px 30px 22px;
    border-radius: 36px;
  }
  .apps {
    grid-template-columns: repeat(8, auto);
    gap: 0 22px;
    align-items: end;
  }
  .app__tile { --size: 84px; transform-origin: 50% 100%; }
  .app__label { font-size: 0.875rem; }
  .mail { width: min(100%, 520px); margin-inline: auto; }
}
/* GSAP drives the tile transform here, so CSS stays out of its way. */
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .app__tile { transition: none; }
  .app:hover .app__tile { transform: none; }
}

/* Email row under the dock. */
.mail {
  margin-top: clamp(24px, 3.4vw, 34px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 7px 7px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}
.mail__address {
  font-weight: 500;
  font-size: clamp(0.9375rem, 1.6vw, 1.0625rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.mail__copy {
  flex: none;
  display: grid;
  min-width: 92px;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.875rem;
  touch-action: manipulation;
  transition: transform 160ms var(--ease-out), background-color 200ms var(--ease-out);
}
.mail__copy:active { transform: scale(0.96); }
.mail__copy-label {
  grid-area: 1 / 1;
  place-self: center;
  transition: opacity 200ms var(--ease-out), transform 260ms var(--ease-out), filter 200ms var(--ease-out);
}
.mail__copy-label[data-state="done"] { opacity: 0; transform: translateY(8px); filter: blur(2px); }
.mail__copy.is-done { background: var(--accent); }
.mail__copy.is-done [data-state="idle"] { opacity: 0; transform: translateY(-8px); filter: blur(2px); }
.mail__copy.is-done [data-state="done"] { opacity: 1; transform: none; filter: none; }

/* ---------- Flight band ---------- */

.flight {
  position: relative;
  height: clamp(170px, 24vw, 260px);
  pointer-events: none;
}
.flight__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.flight__route {
  fill: none;
  stroke: rgba(238, 242, 248, 0.24);
  stroke-width: 1.5;
  stroke-dasharray: 2 9;
  stroke-linecap: round;
}
.flight__flown {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
}
.flight__plane path { fill: var(--text); }

/* ---------- Side quests ---------- */

.quests { padding-top: clamp(16px, 3vw, 40px); }

.rail {
  margin-top: clamp(28px, 4.5vw, 52px);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(78vw, 340px);
  gap: 14px;
  padding-inline: var(--gutter);
  scroll-padding-inline: var(--gutter);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }

.quest {
  position: relative;
  scroll-snap-align: start;
  aspect-ratio: 4 / 5.2;
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
}
.quest__media { position: absolute; inset: -9% 0; z-index: -2; }
.quest__media img { width: 100%; height: 100%; object-fit: cover; }
.quest::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(7, 10, 16, 0.92) 0%, rgba(7, 10, 16, 0.4) 38%, rgba(7, 10, 16, 0) 62%);
}
.quest__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 22px 24px; }
.quest__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.125rem, 8vw, 2.75rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.quest__text { margin-top: 8px; color: rgba(238, 242, 248, 0.82); font-size: 0.975rem; max-width: 28ch; }

.rail-dots { display: flex; justify-content: center; gap: 6px; margin-top: 18px; }
.rail-dots span {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: rgba(238, 242, 248, 0.25);
  transition: transform 300ms var(--ease-out), background-color 300ms var(--ease-out);
}
.rail-dots span.is-on { transform: scale(1.5); background: var(--text); }

@media (min-width: 900px) {
  .rail {
    width: min(100% - 2 * var(--gutter), var(--wrap));
    margin-inline: auto;
    padding-inline: 0;
    overflow: visible;
    grid-auto-flow: row;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 20px;
    align-items: end;
  }
  .quest { aspect-ratio: auto; height: 520px; }
  .quest:nth-child(2) { height: 440px; }
  .quest:nth-child(3) { height: 480px; }
  .rail-dots { display: none; }
}

@media (hover: hover) and (pointer: fine) {
  .quest__media img { transition: transform 900ms var(--ease-out); }
  .quest:hover .quest__media img { transform: scale(1.05); }
}

/* ---------- Footer ---------- */

.footer { padding: clamp(40px, 8vw, 96px) 0 calc(28px + env(safe-area-inset-bottom, 0px)); overflow: hidden; }
.footer__word {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(5.5rem, 27vw, 20rem);
  line-height: 0.82;
  letter-spacing: -0.05em;
  margin-left: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(238, 242, 248, 0.3);
  white-space: nowrap;
}
.footer__word .one { -webkit-text-stroke-color: rgba(142, 197, 255, 0.75); }
@media (min-width: 900px) { .footer__word { -webkit-text-stroke: 2px rgba(238, 242, 248, 0.4); } }
.footer__word .char { display: inline-block; }
.footer__row {
  margin-top: clamp(20px, 3vw, 32px);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-3);
  font-size: 0.875rem;
}
.footer__row a { color: var(--text-2); }

/* ---------- Motion start states (only when motion runs) ---------- */

.anim .hero__name,
.anim .hero__line,
.anim [data-reveal],
.anim [data-split],
.anim .app,
.anim .footer__word { visibility: hidden; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .app__tile, .app__tile::after, .pill, .mail__copy-label { transition: none; }
}
