/* Tilo — playtilo.app */

@font-face { font-family: "Fredoka"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("/assets/fonts/fredoka-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fredoka"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("/assets/fonts/fredoka-latin.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: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url("/assets/fonts/nunito-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url("/assets/fonts/nunito-latin.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: "Outfit"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/outfit-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/outfit-latin.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; }

/* Themes — the same four palettes as the app (themes.json) */
:root, :root[data-theme="honey"] { --accent: #FFD166; --ear: #F2BE4E; --foot: #E6B54A; --soft: #FFF0D2; --cheek: #F4978E; --cheek-a: .6; }
:root[data-theme="bubblegum"] { --accent: #FF9EC7; --ear: #F58DB9; --foot: #E57FAA; --soft: #FFE3EE; --cheek: #E0568E; --cheek-a: .45; }
:root[data-theme="lavender"]  { --accent: #C4A8FF; --ear: #B597FA; --foot: #A285E8; --soft: #EFE8FF; --cheek: #F4978E; --cheek-a: .55; }
:root[data-theme="powder"]    { --accent: #8EC4F6; --ear: #7CB5EB; --foot: #6AA4DC; --soft: #E3EEF7; --cheek: #F4978E; --cheek-a: .55; }

:root {
  color-scheme: light;
  --bg: #FFFBF3;
  --ink: #33261A;
  --muted: #5C4A36;
  --line: #EFE4D1;
  --on-dark: #FFFBF3;
  --on-dark-2: #E8DCC6;
  --dark-line: #6B5A45;
  --vespera: #123438;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fredoka", "Nunito", system-ui, sans-serif;
  --gutter: 32px;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { max-width: 100%; }
img { display: block; height: auto; }
a { color: var(--ink); }
a:hover { color: #000; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }

.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--ink); color: var(--bg); font-weight: 700; padding: 10px 16px; border-radius: 12px; text-decoration: none; }
.skip-link:focus { top: 16px; color: var(--bg); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* theme fills for SVG parts */
.f-accent { fill: var(--accent); }
.f-ear { fill: var(--ear); }
.f-foot { fill: var(--foot); }
.f-cheek { fill: var(--cheek); fill-opacity: var(--cheek-a); }
.f-accent, .f-ear, .f-foot, .f-cheek { transition: fill .3s ease; }

/* Tilo — "Wave" state, ported from MascotView.cs (WordPath).
   Cycle 3.4 s: arm up 0.3 s (ease-out) · three swings of ±14° in 1.2 s · down 0.3 s · rest 1.6 s.
   The left arm turns 112° about the shoulder (42,118) and shifts 7 out, 15 up (viewBox units).
   Meanwhile the body breathes 2 units over 2 s and the leaf sways ±6° over 3 s. */
.tilo { overflow: visible; }
.tilo-arm-l, .tilo-body, .tilo-leaf { transform-box: view-box; }
.tilo-arm-l { transform-origin: 42px 118px; animation: tilo-wave 3.4s infinite; }
.tilo-body { transform-origin: 100px 190px; animation: tilo-breathe 2s ease-in-out infinite; }
.tilo-leaf { transform-origin: 100px 52px; animation: tilo-leaf 3s ease-in-out infinite; }

@keyframes tilo-wave {
  0%      { transform: none; animation-timing-function: cubic-bezier(.33, 1, .68, 1); }
  8.824%  { transform: translate(-7px, -15px) rotate(112deg); animation-timing-function: ease-out; }
  11.765% { transform: translate(-7px, -15px) rotate(126deg); animation-timing-function: ease-in-out; }
  17.647% { transform: translate(-7px, -15px) rotate(98deg); animation-timing-function: ease-in-out; }
  23.529% { transform: translate(-7px, -15px) rotate(126deg); animation-timing-function: ease-in-out; }
  29.412% { transform: translate(-7px, -15px) rotate(98deg); animation-timing-function: ease-in-out; }
  35.294% { transform: translate(-7px, -15px) rotate(126deg); animation-timing-function: ease-in-out; }
  41.176% { transform: translate(-7px, -15px) rotate(98deg); animation-timing-function: ease-in; }
  44.118% { transform: translate(-7px, -15px) rotate(112deg); animation-timing-function: cubic-bezier(.65, 0, .35, 1); }
  52.941%, 100% { transform: none; }
}
@keyframes tilo-breathe { 0%, 100% { transform: none; } 50% { transform: translateY(-2px); } }
@keyframes tilo-leaf { 0%, 100% { transform: none; } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }

/* Reduced motion / still images: nothing moves, Tilo just holds a raised hand (MascotView.ShowStill). */
.tilo.still .tilo-arm-l { animation: none; transform: translate(-7px, -15px) rotate(112deg); }
.tilo.still .tilo-body, .tilo.still .tilo-leaf { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .tilo-arm-l { animation: none; transform: translate(-7px, -15px) rotate(112deg); }
  .tilo-body, .tilo-leaf { animation: none; }
}

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.soft { background: var(--soft); transition: background-color .3s ease; }
.page { min-height: 100vh; display: flex; flex-direction: column; }
.page > main { flex: 1 0 auto; }

/* header */
.site-header { display: flex; flex-wrap: wrap; gap: 16px 26px; align-items: center; justify-content: space-between; padding-top: 24px; padding-bottom: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 44px; height: 44px; }
.brand b { font-family: var(--font-display); font-weight: 600; font-size: 26px; line-height: 1; }
.header-right { display: flex; align-items: center; gap: 26px; }
.main-nav { display: flex; flex-wrap: wrap; gap: 26px; font-size: 16px; font-weight: 600; }
.main-nav a { text-decoration: none; padding: 6px 0; }
.lang-switch { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 36px; padding: 0 12px; border: 2px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 13px; font-weight: 800; letter-spacing: 1px; }
.lang-switch:hover { border-color: var(--ink); }

/* shared */
.pill { align-self: flex-start; padding: 8px 16px; border-radius: 999px; background: var(--soft); font-size: 14px; font-weight: 700; transition: background-color .3s ease; }
.h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(32px, 4.6vw, 44px); line-height: 1.1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 24px; border-radius: 16px; font-weight: 700; font-size: 16px; text-decoration: none; }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { color: var(--bg); background: #000; }
.btn-soon { background: transparent; color: var(--muted); border: 2px dashed #CDBFA7; cursor: default; }
.btn-soon svg { stroke: var(--muted); }

/* hero */
.hero { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-top: 48px; padding-bottom: 96px; }
.hero-copy { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(40px, 6vw, 72px); line-height: 1.05; }
.lead { margin: 0; font-size: 19px; line-height: 1.6; color: var(--muted); max-width: 480px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.cta-note { font-size: 15px; color: var(--muted); }
.hero-art { flex: 1 1 360px; min-width: 0; display: flex; justify-content: center; position: relative; padding-bottom: 24px; }
.phone { width: min(300px, 72vw); margin: 0; border-radius: 40px; border: 10px solid var(--ink); background: #fff; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(51, 38, 26, .45); }
.phone img { width: 100%; aspect-ratio: 1080 / 2254; object-fit: cover; }
.hero-mascot { position: absolute; right: 0; bottom: -12px; width: 150px; height: 165px; pointer-events: none; }
.hero-mascot svg { display: block; width: 150px; height: 165px; }

/* how it works */
.how { padding-top: 96px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 48px; }
.how .h2 { text-align: center; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.feature { background: var(--bg); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.feature svg { width: 36px; height: 36px; }
.feature h3 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.2; }
.feature p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--muted); }

/* arena */
.arena { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-top: 104px; padding-bottom: 104px; }
.arena-copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.arena-copy p { margin: 0; font-size: 18px; line-height: 1.6; color: var(--muted); }
.steps { flex: 1 1 380px; min-width: 0; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.steps li { display: flex; gap: 16px; align-items: center; padding: 20px 22px; border-radius: 20px; border: 2px solid var(--line); font-size: 17px; font-weight: 600; }
.step-n { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; transition: background-color .3s ease; }

/* themes */
.themes { background: var(--ink); color: var(--on-dark); }
.themes-inner { padding-top: 96px; padding-bottom: 96px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px; }
.themes-inner p { margin: 0; font-size: 18px; color: var(--on-dark-2); max-width: 520px; line-height: 1.6; }
.theme-list { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 0; padding: 0; list-style: none; }
.theme-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 999px; font: 700 16px/1 var(--font-body); cursor: pointer; background: transparent; color: var(--on-dark); border: 2px solid var(--dark-line); }
.theme-btn:hover { border-color: var(--on-dark-2); }
.theme-btn[aria-pressed="true"] { background: var(--on-dark); color: var(--ink); border-color: var(--on-dark); }
.theme-btn:focus-visible { outline-color: var(--on-dark); }
.swatch { width: 20px; height: 20px; border-radius: 50%; }
.swatch-honey { background: #FFD166; }
.swatch-bubblegum { background: #FF9EC7; }
.swatch-lavender { background: #C4A8FF; }
.swatch-powder { background: #8EC4F6; }
html:not(.js) .theme-list { display: none; }

/* footer */
.site-footer { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; padding-top: 40px; padding-bottom: 40px; font-size: 15px; color: var(--muted); }
.by { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.vespera { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--vespera); }
.vespera:hover { color: var(--vespera); }
.vespera svg { width: 34px; height: 32px; }
.vespera-name { display: flex; flex-direction: column; line-height: 1; font-family: "Outfit", sans-serif; }
.vespera-name b { font-weight: 600; font-size: 20px; letter-spacing: .5px; }
.vespera-name small { font-size: 9px; letter-spacing: 3.5px; color: #3E5A5D; margin-top: 3px; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.legal-nav a { color: var(--muted); }
.legal-nav a:hover { color: var(--ink); }

/* 404 */
.not-found { text-align: center; padding-top: 56px; padding-bottom: 96px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.not-found .tilo { width: 140px; height: 154px; }
.not-found h1 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(36px, 6vw, 56px); line-height: 1.1; }
.not-found p { margin: 0; color: var(--muted); font-size: 18px; max-width: 460px; }

/* responsive */
@media (max-width: 760px) {
  :root { --gutter: 20px; }
  .header-right, .main-nav { gap: 18px; }
  .main-nav { font-size: 15px; }
  .hero { padding-top: 24px; padding-bottom: 72px; gap: 40px; }
  .how, .arena { padding-top: 72px; padding-bottom: 72px; }
  .arena { gap: 32px; }
  .themes-inner { padding-top: 72px; padding-bottom: 72px; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  :root { --gutter: 16px; }
  .header-right { width: 100%; justify-content: space-between; }
  .cta-row .btn { width: 100%; }
  .phone { border-width: 8px; border-radius: 32px; }
  .hero-mascot { right: -8px; transform: scale(.75); transform-origin: bottom right; }
  .feature { padding: 22px; }
}
