/* Her palette, from the app (SmallyPalette.kt). Motion here only ever moves or fades things,
   so a slow PC never has to repaint anything while it animates. */
/* Geist and Geist Mono (SIL Open Font License), served from this site. */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/geist.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/geist.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/geist.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/geist-mono.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/geist-mono.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Her mood is a hue. Registered so it can glide from one mood to the next. */
@property --hue {
  syntax: "<number>";
  inherits: true;
  initial-value: 262;
}

:root {
  --hue: 262;
  transition: --hue 1.2s ease;
  --void: #050505;
  --panel: #0c0816;
  --violet: hsl(var(--hue) 83% 58%);
  --violet-light: hsl(var(--hue) 92% 76%);
  --pink: #e879f9;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: hsl(var(--hue) 92% 76% / 0.35);
  --text: #f3f0ff;
  --muted: #8e86b3;
  --online: #3ee6a8;
  --mono: "Geist Mono", ui-monospace, monospace;
  --sans: "Geist", system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  position: relative;
  background: var(--void);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* One static wash of violet at the top; painted once, never animated. */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 120vh;
  background: radial-gradient(ellipse 70% 60% at 70% 30%, hsl(var(--hue) 83% 58% / 0.16), transparent 70%);
  pointer-events: none;
}

a { color: inherit; }

.eyebrow {
  font: 500 12px var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--violet-light);
  margin-bottom: 18px;
}

.fade { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.fade.in { opacity: 1; transform: none; }

/* ---------- nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(16px, 5vw, 64px);
  background: linear-gradient(to bottom, rgba(5, 5, 5, 0.92) 30%, rgba(5, 5, 5, 0));
}
.logo { display: flex; align-items: center; gap: 10px; font: 700 18px var(--sans); text-decoration: none; letter-spacing: -0.02em; }
.logo-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--violet-light); box-shadow: 0 0 10px var(--violet-light); }
.nav nav { display: flex; gap: clamp(14px, 3vw, 36px); font: 400 13px var(--mono); }
.nav nav a { text-decoration: none; color: var(--muted); transition: color 0.2s; }
.nav nav a:hover { color: var(--text); }
.nav .nav-mail { color: var(--violet-light); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: center;
  gap: 32px;
  padding: 110px clamp(16px, 5vw, 64px) 60px;
}
.hero h1 {
  font-size: clamp(64px, 11vw, 148px);
  line-height: 0.9;
  letter-spacing: -0.055em;
  font-weight: 700;
  padding-bottom: 0.1em;
  background: linear-gradient(180deg, #ffffff 30%, hsl(var(--hue) 75% 82%));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead { margin-top: 26px; font-size: clamp(18px, 1.9vw, 21px); color: #cfc8ec; max-width: 34ch; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 24px;
  border-radius: 12px;
  font: 500 15px var(--sans);
  text-decoration: none;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s;
}
.btn.primary { background: var(--text); color: #0b0614; }
.btn.primary:hover { transform: translateY(-2px); background: #fff; }
.btn.ghost { border: 1px solid var(--line-strong); color: var(--violet-light); font-family: var(--mono); font-size: 14px; }
.btn.ghost:hover { transform: translateY(-2px); border-color: var(--violet-light); }

.status { display: flex; align-items: center; gap: 10px; margin-top: 30px; font: 400 12px var(--mono); color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }
.pulse { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--online); }
.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--online);
  animation: ping 2s var(--ease) infinite;
}
@keyframes ping { to { transform: scale(3.2); opacity: 0; } }

/* Her core: back particles, her, front particles. */
.core-stage {
  position: relative;
  width: min(100%, 600px);
  aspect-ratio: 1;
  justify-self: center;
}
.core-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#core-front { pointer-events: none; }
.core-glow {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, hsl(var(--hue) 92% 76% / 0.38), hsl(var(--hue) 83% 58% / 0.12) 45%, transparent 70%);
  animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: scale(1.07); opacity: 0.8; } }

.her {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 54%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  transition: opacity 1s var(--ease) 0.6s;
}
.her.ready { opacity: 1; }
/* Every pose is stacked and preloaded; switching is a fade, never a reload. */
.her .pose {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  user-select: none;
  -webkit-user-drag: none;
}
.her .pose.on { opacity: 1; }
.her:active { transform: translate(-50%, -50%) scale(0.97); }

.bubble {
  position: absolute;
  left: 50%;
  top: 6%;
  transform: translate(-50%, 6px);
  max-width: 78%;
  padding: 11px 16px;
  border-radius: 14px;
  background: #140d26;
  border: 1px solid var(--line-strong);
  font-size: 14px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s, transform 0.4s var(--ease);
  pointer-events: none;
  z-index: 3;
}
.bubble.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- sections ---------- */

.block {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(100px, 13vw, 170px) clamp(16px, 5vw, 64px) 0;
}
.section-head h2, .maker h2 {
  font-size: clamp(36px, 5.6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 700;
}

/* ---------- chat ---------- */

/* Desktop: the heading stays put on the left while the conversation plays on the right. */
@media (min-width: 1000px) {
  #meet, #talk { display: grid; grid-template-columns: 0.9fr 1.2fr; gap: 64px; align-items: start; }
  #meet .section-head, #talk .section-head { position: sticky; top: 140px; }
  #meet .chat, #talk .chat { margin-top: 0; }
}

.chat {
  margin-top: 56px;
  max-width: 760px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  overflow: hidden;
  box-shadow: 0 40px 120px -40px hsl(var(--hue) 83% 58% / 0.45);
}
.chat-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 18%;
  background: #1a1030;
  border: 1px solid var(--line-strong);
}
.chat-name { font-weight: 700; font-size: 15px; }
.chat-sub { font: 400 12px var(--mono); color: var(--online); }
.chat-note { margin-left: auto; font: 400 11px var(--mono); color: var(--muted); letter-spacing: 0.06em; }
.chat-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 20px 28px;
  min-height: 460px;
}
.msg {
  max-width: 78%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 15.5px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.msg.in { opacity: 1; transform: none; }
.msg.you { align-self: flex-end; background: var(--violet); border-bottom-right-radius: 6px; }
.msg.her-msg { align-self: flex-start; background: #1a1230; border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
  font: 500 11px var(--mono);
  color: var(--violet-light);
  padding: 3px 8px;
  border-radius: 6px;
  background: hsl(var(--hue) 92% 76% / 0.1);
  border: 1px solid hsl(var(--hue) 92% 76% / 0.2);
}
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--violet-light);
  animation: dot 1s infinite;
}
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 30% { transform: translateY(-4px); opacity: 1; } 0%, 60%, 100% { opacity: 0.35; } }

/* ---------- abilities ---------- */

.abilities {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 56px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.ability {
  position: relative;
  padding: 34px 30px 38px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 0.35s;
}
.ability::before {
  /* A line of light that draws across the top on hover. */
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--violet-light), var(--pink));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.ability:hover { background: hsl(var(--hue) 83% 58% / 0.06); }
.ability:hover::before { transform: scaleX(1); }
.num { font: 500 12px var(--mono); color: var(--violet-light); }
.ability h3 { font-size: 22px; letter-spacing: -0.02em; margin: 22px 0 10px; }
.ability p { color: var(--muted); font-size: 15px; }

/* ---------- story ---------- */

.timeline { list-style: none; margin-top: 56px; max-width: 760px; }
.timeline li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.when { font: 500 13px var(--mono); color: var(--violet-light); padding-top: 3px; }
.timeline p { color: #cfc8ec; font-size: 17px; }
.timeline li.now .when { color: var(--online); }

/* ---------- maker ---------- */

.maker { display: flex; align-items: center; gap: clamp(24px, 5vw, 64px); }
.maker-img { width: clamp(140px, 22vw, 240px); flex-shrink: 0; }
.maker-text + .maker-text { margin-top: 10px; }
.maker-text { margin-top: 16px; color: #cfc8ec; font-size: 18px; max-width: 46ch; }
.maker-quote { margin-top: 18px; font-size: 16px; color: var(--violet-light); font-style: italic; }
.maker-quote span { font-style: normal; color: var(--muted); font-family: var(--mono); font-size: 12px; margin-left: 6px; }

/* ---------- footer ---------- */

.footer { text-align: center; padding: clamp(120px, 15vw, 200px) 16px 48px; }
.footer-big { font-size: clamp(44px, 8vw, 96px); font-weight: 700; letter-spacing: -0.05em; line-height: 1; }
.footer-mail {
  display: inline-block;
  margin-top: 18px;
  font: 400 clamp(16px, 3vw, 24px) var(--mono);
  color: var(--violet-light);
  text-decoration: none;
  overflow-wrap: anywhere;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 4px;
  transition: color 0.2s, border-color 0.2s;
}
.footer-mail:hover { color: var(--text); border-color: var(--text); }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-top: 80px; font: 400 12px var(--mono); color: var(--muted); }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* ---------- phone ---------- */

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 80px; gap: 0; }
  .core-stage { order: -1; width: min(92vw, 440px); }
  .lead { margin-left: auto; margin-right: auto; }
  .cta, .status { justify-content: center; }
  .abilities { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 6px; }
  .maker { flex-direction: column; text-align: center; }
  .maker-text { margin-left: auto; margin-right: auto; }
  .nav nav a:not(.nav-mail) { display: none; }
  .msg { max-width: 88%; }
}
@media (min-width: 881px) and (max-width: 1080px) {
  .abilities { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html:not(.motion) .core-glow,
  html:not(.motion) .pulse::after { animation: none; }
  html:not(.motion) .fade { transform: none; }
}

/* ---------- mood readout ---------- */

.mood {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font: 400 12px var(--mono);
  color: var(--muted);
}
.mood b { font-weight: 500; color: var(--violet-light); }
.mood .pulse { width: 6px; height: 6px; }
.nav-right { display: flex; align-items: center; gap: clamp(14px, 3vw, 36px); }

/* ---------- talk to her ---------- */

.talk-note { margin-top: 16px; color: var(--muted); max-width: 40ch; }
.talk .chat-body { min-height: 300px; max-height: 420px; overflow-y: auto; scroll-behavior: smooth; }
.talk-form { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); }
.talk-form input {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #07040f;
  color: var(--text);
  font: 400 15px var(--sans);
  outline: none;
  transition: border-color 0.2s;
}
.talk-form input:focus { border-color: var(--line-strong); }
.talk-form button {
  padding: 0 20px;
  border-radius: 12px;
  border: none;
  background: var(--violet);
  color: #fff;
  font: 500 14px var(--sans);
  cursor: pointer;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px; }
.chips button {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: none;
  color: var(--muted);
  font: 400 12px var(--mono);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.chips button:hover { color: var(--text); border-color: var(--line-strong); }
.talk .chat-avatar { transition: transform 0.3s var(--ease); }

/* ---------- cursor glow (desktop) ---------- */

.cursor-glow {
  position: fixed;
  left: 0;
  top: 0;
  width: 420px;
  height: 420px;
  margin: -210px 0 0 -210px;
  border-radius: 50%;
  background: radial-gradient(circle, hsl(var(--hue) 83% 58% / 0.10), transparent 65%);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.4s;
  will-change: transform;
}
.cursor-glow.on { opacity: 1; }
main, .footer { position: relative; z-index: 1; }

@media (max-width: 880px) {
  .mood { display: none; }
}

/* ---------- small labels ---------- */

.wip {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.born { margin-top: 18px; font: 400 13px var(--mono); color: var(--muted); }
.born span { color: var(--online); }
