/* Kaivo site: the app's sticker look. Thick ink outlines, hard offset shadows, retro windows, the tie-dye swirl. */
@font-face { font-family: "Bagel Fat One"; src: url("/fonts/BagelFatOne.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "VT323"; src: url("/fonts/VT323.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Silkscreen"; src: url("/fonts/Silkscreen.ttf") format("truetype"); font-display: swap; }

:root {
  --ink: #1b0b2c; --cream: #fff4dc; --yellow: #ffe600; --pink: #ff3d9a; --cyan: #19e5ff; --violet: #7a5cff; --orange: #ff8a1f; --red: #ff3b3b;
  --display: "Bagel Fat One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --retro: "VT323", ui-monospace, monospace;
  --pixel: "Silkscreen", ui-monospace, monospace;
  --read: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ink); color: var(--cream); font-family: var(--retro); font-size: 22px; line-height: 1.15;
  padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 4px solid var(--yellow); outline-offset: 3px; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

/* the swirl: rings in the app's ten colours, wobbled by an SVG filter, turning slowly */
.swirl-bg { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.swirl-bg::before {
  content: ""; position: absolute; inset: -60%;
  background: repeating-radial-gradient(circle at 50% 50%, #b6ff2f 0 5vw, #30ff7f 5vw 10vw, #30fff0 10vw 15vw, #2f90ff 15vw 20vw, #3a30ff 20vw 25vw, #b030ff 25vw 30vw, #ff2fc8 30vw 35vw, #ff2f6a 35vw 40vw, #ff7a2a 40vw 45vw, #ffe033 45vw 50vw);
  filter: url(#wob); animation: spin 90s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.svg-defs { position: absolute; width: 0; height: 0; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 20; background: var(--ink); border-bottom: 4px solid var(--ink); padding-top: env(safe-area-inset-top, 0px); }
.bar .wrap { display: flex; align-items: center; gap: 14px; padding-block: 10px; flex-wrap: wrap; }
.brand { font-family: var(--display); font-size: 30px; color: var(--yellow); text-decoration: none; text-shadow: 3px 3px 0 var(--pink); -webkit-text-stroke: 1px var(--ink); letter-spacing: .01em; }
.bar nav { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.bar nav a { font-family: var(--pixel); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; text-decoration: none; padding: 8px 12px; border: 3px solid var(--cream); border-radius: 10px; color: var(--cream); }
.bar nav a:hover, .bar nav a[aria-current="page"] { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }

/* hero */
.hero { position: relative; isolation: isolate; border-bottom: 6px solid var(--ink); overflow: hidden; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: center; padding-block: 48px 64px; }
.logo {
  font-family: var(--display); font-size: clamp(76px, 19vw, 176px); line-height: .9; margin: 0; color: #fff; letter-spacing: .01em; transform: rotate(-4deg); transform-origin: left center;
  -webkit-text-stroke: .075em var(--ink); paint-order: stroke fill;
  text-shadow: .03em .03em 0 var(--ink), .06em .06em 0 var(--ink), .09em .09em 0 var(--ink), .12em .12em 0 var(--ink), .15em .15em 0 var(--ink), .18em .18em 0 var(--ink), .21em .21em 0 var(--ink);
}
.tag { display: inline-block; margin-top: 26px; background: var(--yellow); color: var(--ink); border: 4px solid var(--ink); border-radius: 12px; padding: 8px 16px; font-family: var(--display); font-size: clamp(16px, 3.4vw, 24px); transform: rotate(-2deg); box-shadow: 6px 6px 0 var(--ink); }
.lede { margin: 26px 0 0; max-width: 28ch; font-size: clamp(26px, 5vw, 34px); color: #fff; text-shadow: 3px 3px 0 var(--ink), -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink); }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.btn { font-family: var(--display); font-size: 22px; color: var(--ink); background: var(--cream); border: 4px solid var(--ink); border-radius: 14px; padding: 12px 22px; text-decoration: none; box-shadow: 0 6px 0 var(--ink); cursor: pointer; display: inline-block; }
.btn.primary { background: var(--yellow); }
.btn:hover { background: #fff27a; }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.btn[aria-disabled="true"] { opacity: .75; cursor: default; }
.soon { font-family: var(--pixel); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; background: var(--ink); color: var(--cyan); padding: 3px 8px; border-radius: 6px; margin-left: 8px; vertical-align: middle; }
.phone { position: relative; justify-self: center; width: min(300px, 70vw); transform: rotate(4deg); }
.phone .frame { border: 6px solid var(--ink); border-radius: 36px; overflow: hidden; background: var(--ink); box-shadow: 10px 12px 0 var(--ink); }
.phone .frame img, .shots .frame img { width: 100%; height: auto; aspect-ratio: 400 / 869; object-fit: cover; }
.cat { position: absolute; width: 22%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 4px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); background: #fff; }
.cat.l { left: -10%; bottom: 6%; } .cat.r { right: -9%; top: 8%; }
.spark { position: absolute; width: 26px; height: 26px; background: #fff; clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); animation: tw 2.2s ease-in-out infinite; z-index: 1; }
@keyframes tw { 0%, 100% { transform: scale(.2) rotate(0); opacity: .2; } 50% { transform: scale(1) rotate(45deg); opacity: 1; } }

/* five sparkles, placed in the hero */
.spark:nth-of-type(1) { left: 6%; top: 14%; width: 30px; height: 30px; }
.spark:nth-of-type(2) { left: 46%; top: 8%; width: 22px; height: 22px; animation-delay: .7s; }
.spark:nth-of-type(3) { left: 90%; top: 34%; width: 26px; height: 26px; animation-delay: 1.4s; }
.spark:nth-of-type(4) { left: 30%; top: 88%; width: 20px; height: 20px; animation-delay: .3s; }
.spark:nth-of-type(5) { left: 70%; top: 92%; width: 28px; height: 28px; animation-delay: 1.1s; }
.gift-text { margin: 0 0 12px; font-size: 24px; }

/* retro window */
.win { background: var(--cream); color: var(--ink); border: 4px solid var(--ink); border-radius: 12px; box-shadow: 6px 8px 0 var(--ink); overflow: hidden; }
.win > header { display: flex; align-items: center; gap: 6px; background: var(--pink); border-bottom: 4px solid var(--ink); padding: 6px 12px; }
.win > header h2, .win > header h1 { margin: 0; flex: 1; font-family: var(--display); font-weight: 400; font-size: 22px; color: var(--cream); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; }
.win > header i { width: 16px; height: 16px; border: 3px solid var(--ink); border-radius: 3px; background: var(--yellow); } .win > header i:nth-of-type(2) { background: var(--cyan); } .win > header i:nth-of-type(3) { background: var(--cream); }
.win .body { padding: 18px 20px 22px; }
.win.cyan > header { background: var(--cyan); } .win.violet > header { background: var(--violet); } .win.orange > header { background: var(--orange); }

section.block { padding-block: 54px 12px; }
h2.title { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 6vw, 48px); margin: 0 0 22px; color: var(--yellow); text-shadow: 4px 4px 0 var(--pink); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; }
.grid { display: grid; gap: 22px; }
.g3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.steps { counter-reset: s; display: grid; gap: 14px; }
.steps li { list-style: none; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; font-size: 24px; }
.steps li::before { counter-increment: s; content: counter(s); font-family: var(--display); font-size: 24px; width: 40px; height: 40px; display: grid; place-items: center; background: var(--yellow); border: 3px solid var(--ink); border-radius: 50%; box-shadow: 3px 3px 0 var(--ink); }
.steps { margin: 0; padding: 0; }

.card3d { background: var(--cream); border: 4px solid var(--ink); border-radius: 14px; box-shadow: 6px 8px 0 var(--ink); padding: 12px; color: var(--ink); text-align: center; transition: transform .2s; }
.card3d:hover { transform: rotate(-2deg) translateY(-4px); }
.card3d img { border-radius: 8px; margin-bottom: 8px; width: 100%; height: auto; aspect-ratio: 5 / 7; object-fit: contain; }
.card3d b { font-family: var(--display); font-weight: 400; font-size: 22px; display: block; }
.card3d span { font-size: 21px; }

.mode { display: grid; gap: 10px; align-content: start; }
.mode .btnname { font-family: var(--display); font-size: 22px; justify-self: start; background: var(--yellow); border: 3px solid var(--ink); border-radius: 10px; padding: 4px 12px; box-shadow: 0 4px 0 var(--ink); }
.mode.b2 .btnname { background: var(--cyan); } .mode.b3 .btnname { background: var(--pink); color: #fff; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; }
.mode p { margin: 0; font-size: 23px; }

.shots { display: flex; gap: 22px; overflow-x: auto; padding: 8px 4px 26px; scroll-snap-type: x mandatory; }
.shots figure { margin: 0; flex: 0 0 min(240px, 62vw); scroll-snap-align: center; }
.shots .frame { border: 5px solid var(--ink); border-radius: 30px; overflow: hidden; box-shadow: 7px 9px 0 var(--ink); background: var(--ink); }
.shots figcaption { font-family: var(--pixel); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; text-align: center; margin-top: 14px; color: var(--cyan); }

.gifts { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }
.gifts img { width: 74px; height: 74px; object-fit: contain; background: #fff7e4; border: 3px solid var(--ink); border-radius: 12px; padding: 4px; box-shadow: 3px 4px 0 var(--ink); }

details { background: var(--cream); color: var(--ink); border: 4px solid var(--ink); border-radius: 12px; box-shadow: 4px 6px 0 var(--ink); padding: 10px 16px; }
details + details { margin-top: 14px; }
summary { cursor: pointer; font-family: var(--display); font-size: 21px; }
details p { margin: 10px 0 4px; font-size: 23px; }

footer { margin-top: 64px; border-top: 6px solid var(--ink); background: #2a1650; padding-block: 32px calc(32px + env(safe-area-inset-bottom, 0px)); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
footer a { font-family: var(--pixel); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
footer small { flex-basis: 100%; font-size: 20px; opacity: .8; }

/* legal and support pages */
.page { position: relative; isolation: isolate; }
.page .swirl-bg { height: 260px; bottom: auto; border-bottom: 6px solid var(--ink); }
.page .wrap { position: relative; z-index: 1; padding-top: 36px; }
.doc { font-family: var(--read); font-size: 17px; line-height: 1.6; }
.doc h2 { font-family: var(--display); font-weight: 400; font-size: 24px; margin: 28px 0 8px; }
.doc h3 { font-size: 18px; margin: 18px 0 4px; }
.doc p, .doc li { max-width: 68ch; }
.doc ul { padding-left: 1.2rem; }
.doc .updated { font-family: var(--pixel); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; }
.doc th, .doc td { border: 2px solid var(--ink); padding: 8px 10px; text-align: left; vertical-align: top; }
.doc th { background: #ffe9b8; }
.draft { background: var(--yellow); color: var(--ink); border: 4px dashed var(--ink); border-radius: 10px; padding: 10px 14px; font-family: var(--read); font-size: 15px; margin: 0 0 18px; }
.tablewrap { overflow-x: auto; }

@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; padding-block: 32px 48px; }
  .phone { transform: rotate(3deg); margin-top: 18px; }
  .bar nav { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .swirl-bg::before, .spark { animation: none; }
  html { scroll-behavior: auto; }
  .card3d, .card3d:hover { transition: none; transform: none; }
}
