/* Hayuzen: the look of the home, Hayuzen X2 and Mitavya pages.
   A fixed field of ink dots (ink.js) sits behind the page; each full-height scene has its words on
   one side and leaves the other side to the dots. Privacy pages use site.css. */
@font-face { font-family: "Bricolage"; src: url("/fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Mukta"; src: url("/fonts/mukta-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Mukta"; src: url("/fonts/mukta-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Kalam"; src: url("/fonts/kalam.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@view-transition { navigation: auto; }

:root {
  --ground: #070b2e;      /* deep ink blue: calm, trusted, and it lets warm colours come forward */
  --ink: #f4f1ff;
  --soft: #b9b6d6;
  --line: rgba(255, 255, 255, .16);
  --a: #7c5cff;           /* violet */
  --b: #ff8fb8;           /* warm pink */
  --button: #ffb347; --button-ink: #1d0f00;   /* saffron: the complement of the blue ground, so the eye goes to it */
  --display: "Bricolage", "Segoe UI", system-ui, sans-serif;
  --body: "Mukta", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --hand: "Kalam", "Segoe Print", cursive;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
.x2 { --ground: #000000; --ink: #eef1f7; --soft: #a7b0c0; --a: #2f6bff; --b: #8fb0ff; --button: #ffffff; --button-ink: #000000; }
.mv { --ground: #fffdfa; --ink: #111111; --soft: #5f5a5c; --line: #ecd9df; --a: #c9285f; --b: #e8457f; --button: #111111; --button-ink: #ffffff; color-scheme: light; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 1.125rem/1.6 var(--body); overflow-x: hidden; }
.mv body, body.mv { background-image: repeating-linear-gradient(180deg, transparent 0 35px, rgba(201, 40, 95, .09) 35px 36px); }
h1, h2, h3, p, ul, ol { margin: 0; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.035em; line-height: 1; text-wrap: balance; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1.5px; text-decoration-color: var(--b); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--b); outline-offset: 4px; border-radius: 6px; }

canvas[data-ink] { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: 0; pointer-events: none; }
.no-ink canvas[data-ink] { display: none; }

/* Top bar */
.bar { position: fixed; z-index: 5; inset: 0 0 auto 0; display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
  padding: 18px max(22px, env(safe-area-inset-right)) 18px max(22px, env(safe-area-inset-left)); }
.bar::before { content: ""; position: absolute; inset: 0 0 -24px 0; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(0, 0, 0, .5), transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.mv .bar::before { background: linear-gradient(var(--ground) 30%, transparent); }
.brand { font: 700 .95rem var(--display); letter-spacing: .32em; text-decoration: none; }
.bar nav { display: flex; gap: 6px 22px; flex-wrap: wrap; font-size: 1rem; }
.bar nav a { text-decoration: none; color: var(--soft); padding: 4px 0; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .35s var(--ease), color .2s; }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--ink); background-size: 100% 1.5px; }

/* Scenes */
main { position: relative; z-index: 1; }
.scene { min-height: 100vh; min-height: 100svh; display: grid; align-items: center;
  padding: 96px max(22px, env(safe-area-inset-right)) 72px max(22px, env(safe-area-inset-left)); }
.scene > .copy { width: min(100%, 31rem); margin-inline: max(0px, calc((100vw - 1180px) / 2 - 22px)); }
.scene[data-side="left"] > .copy { justify-self: end; }
.scene[data-side="center"] { align-items: end; }
.scene[data-side="center"] > .copy { justify-self: center; text-align: center; width: min(100%, 40rem); margin-inline: 0; padding-bottom: 6vh; }
.scene.plain { min-height: 0; display: block; padding-block: 72px; }

/* Words arrive with their scene (only once the dots are running). */
.ink .scene > .copy > * { opacity: 0; transform: translateY(14px); filter: blur(6px); transition: opacity .7s var(--ease), transform .7s var(--ease), filter .7s var(--ease); }
.ink .scene.on > .copy > * { opacity: 1; transform: none; filter: none; }
.ink .scene.on > .copy > :nth-child(2) { transition-delay: .07s; }
.ink .scene.on > .copy > :nth-child(3) { transition-delay: .14s; }
.ink .scene.on > .copy > :nth-child(4) { transition-delay: .21s; }
.ink .scene.on > .copy > :nth-child(n+5) { transition-delay: .28s; }

h1 { font-weight: 800; font-size: clamp(2.9rem, 7.2vw, 6.2rem); line-height: .95; }
h1.long { font-size: clamp(2.2rem, 4.6vw, 3.9rem); line-height: 1.02; }
h2 { font-weight: 800; font-size: clamp(2.3rem, 5vw, 4.2rem); }
h3 { font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em; line-height: 1.2; }
.copy > p { margin-top: 22px; color: var(--soft); max-width: 34em; }
.copy > p strong, .copy li strong { color: var(--ink); font-weight: 600; }
.hand { font-family: var(--hand); font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.2; color: var(--b); margin: 0 0 10px !important; }
.mv .hand { color: var(--a); }
.hint { font-size: .95rem; opacity: .8; }
.hint .touch, .no-ink .hint { display: none; }
@media (hover: none) { .hint .mouse { display: none; } .hint .touch { display: inline; } }

/* The headline soaks in like ink, once, as the dots gather. */
.ink h1 { animation: soak 1.6s var(--ease) .25s both; }
@keyframes soak { from { font-weight: 200; letter-spacing: .01em; opacity: 0; } 40% { opacity: 1; } to { font-weight: 800; } }

.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 30px; }
.scene[data-side="center"] .acts { justify-content: center; }
.btn { display: inline-flex; align-items: center; min-height: 50px; padding: 12px 24px; border-radius: 999px; background: var(--button); color: var(--button-ink);
  font-weight: 600; text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
a.btn:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 12px 34px -10px var(--button); }
.btn.soon { background: none; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.tag { display: inline-block; font-size: .85rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--a); color: #fff; vertical-align: middle; margin-left: 8px; letter-spacing: 0; }

.list { list-style: none; padding: 0; margin-top: 26px; display: grid; gap: 18px; }
.list li { padding-left: 18px; border-left: 2px solid var(--a); color: var(--soft); }
.list h3 { color: var(--ink); margin-bottom: 2px; }
.copy.wide { width: min(100%, 36rem); }
.feats { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; margin-top: 26px; }
.feats h3 { font-size: 1.08rem; margin-bottom: 3px; }
.feats p { font-size: .98rem; line-height: 1.45; color: var(--soft); }
.feats div { padding-top: 12px; border-top: 1.5px solid var(--line); }
@media (max-width: 420px) { .feats { grid-template-columns: 1fr; } }
.steps { margin-top: 22px; padding-left: 1.3em; color: var(--soft); display: grid; gap: 8px; font-size: 1rem; }
.small { font-size: .95rem; }

/* The page you write on (home) */
.write { margin-top: 26px; display: block; }
.write input { width: 100%; font: 400 1.5rem var(--hand); color: var(--ink); background: rgba(255, 255, 255, .06); border: 1.5px solid var(--line); border-radius: 18px; padding: 14px 20px; text-align: center; }
.write input::placeholder { color: var(--soft); opacity: .8; }
.write input:focus { outline: none; border-color: var(--b); box-shadow: 0 0 0 4px color-mix(in srgb, var(--b) 25%, transparent); }

/* Mitavya's screens */
.phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 3vw, 36px); max-width: 980px; margin: 0 auto; }
.phones img { width: 100%; height: auto; border-radius: clamp(16px, 3vw, 34px); box-shadow: 0 30px 60px -30px rgba(201, 40, 95, .45), 0 0 0 1px var(--line); background: #fff; transition: transform .5s var(--ease); }
.phones img:nth-child(1) { transform: rotate(-3deg) translateY(18px); }
.phones img:nth-child(3) { transform: rotate(3deg) translateY(18px); }
.phones img:hover { transform: translateY(-8px); }
.note { text-align: center; margin: 44px auto 0; color: var(--soft); max-width: 30em; }

/* Plain pictures, only when the dots can't run */
.still { display: none; }
.no-ink .still { display: block; width: min(60vw, 260px); height: auto; margin: 0 0 28px; border-radius: 22%; }
.no-ink .still.wide { border-radius: 0; width: min(80vw, 420px); }

footer { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 28px; font-size: .95rem; color: var(--soft);
  padding: 26px max(22px, env(safe-area-inset-right)) 30px max(22px, env(safe-area-inset-left)); border-top: 1px solid var(--line); }
footer a { color: var(--ink); }

@media (max-width: 820px), (max-aspect-ratio: 1/1) {
  .scene { align-items: end; padding-top: 47vh; padding-top: 47svh; padding-bottom: 9vh; }
  .scene.plain { padding-top: 72px; }
  /* Long words scroll over the dots on a phone, so they get a soft backing. */
  .scene > .copy { padding: 20px; margin: -20px !important; width: calc(100% + 40px) !important; max-width: none; border-radius: 26px;
    background: rgba(0, 0, 0, .42); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .mv .scene > .copy { background: rgba(255, 253, 250, .86); }
  .ink .scene:not(.on) > .copy { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .scene > .copy { transition: background .5s; }
  .scene > .copy, .scene[data-side="left"] > .copy { justify-self: start; margin-inline: 0; }
  .scene[data-side="center"] > .copy { padding-bottom: 0; justify-self: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ink .scene > .copy > * { opacity: 1; transform: none; filter: none; }
}
