/* Katerfrei website. Same palette and fonts as the app (lib/core/theme.dart).
   Fonts are served from this site, never from Google (no IP goes elsewhere). */

@font-face { font-family: "Fraunces"; src: url("fonts/Fraunces-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/Figtree-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/Figtree-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/Figtree-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("fonts/Caveat-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #F1F4F0;
  --wall: #E4ECE6;
  --surface: #FFFFFF;
  --line: #D8E1DA;
  --ink: #1E2A33;
  --ink-2: #4E5C65;
  --ink-3: #66737B;
  --pine: #23675B;
  --pine-deep: #174C43;
  --pine-tint: #DDEEE7;
  --ginger: #EE9A3E;
  --ginger-deep: #B45F18;
  --sun: #F6CF5B;
  --night: #1F2440;
  --night-2: #2B3156;
  --dusk: #6C6189;
  --rose: #E47F78;

  --display: "Fraunces", Georgia, serif;
  --ui: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Segoe Print", cursive;

  --gutter: clamp(16px, 5vw, 40px);
  --max: 1120px;
  --radius: 28px;
  --shadow: 0 30px 60px -28px rgba(30, 42, 51, .45);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--pine); text-underline-offset: .18em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--pine-deep); }
:focus-visible { outline: 3px solid var(--ginger); outline-offset: 3px; border-radius: 6px; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.015em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(40px, 5.8vw, 70px); line-height: 1.03; letter-spacing: -.025em; }
h2 { font-size: clamp(30px, 4.2vw, 44px); line-height: 1.08; }
h3 { font-size: 21px; line-height: 1.25; }
.lead { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.55; color: var(--ink-2); max-width: 34em; }
.small { font-size: 14.5px; line-height: 1.5; color: var(--ink-3); }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(72px, 11vw, 128px); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 10px; z-index: 20; }
.skip:focus { left: 8px; }

/* ── header ───────────────────────────────────────── */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--pine); font: 600 25px/1 var(--display); letter-spacing: -.02em; }
.brand svg { width: 22px; height: 22px; }
.top nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 28px); font-weight: 600; font-size: 15.5px; }
.top nav a { color: var(--ink-2); text-decoration: none; }
.top nav a:hover { color: var(--ink); }
.top nav .pill { color: #fff; background: var(--pine); padding: 10px 18px; border-radius: 999px; box-shadow: 0 3px 0 var(--pine-deep); }
.top nav .pill:hover { color: #fff; background: var(--pine-deep); }
@media (max-width: 520px) { .top nav .hide-sm { display: none; } }

/* ── hero: the day slider ─────────────────────────── */
.hero {
  --tint: #E6E3EC;
  background: linear-gradient(180deg, var(--tint) 0%, var(--paper) 100%);
  transition: background-color .9s ease;
  padding-bottom: clamp(56px, 8vw, 96px);
}
.hero[data-stage="2"] { --tint: #E2E7EE; }
.hero[data-stage="3"] { --tint: #E3EEF0; }
.hero[data-stage="4"] { --tint: #DDEDF2; }
.hero[data-stage="5"] { --tint: #F6EAD5; }
/* Phones: title, then Karl (the hook stays in the first screen), then the
   text. Wide screens: text left, Karl right. */
.hero-grid { display: grid; column-gap: clamp(28px, 5vw, 64px); row-gap: 24px; grid-template-columns: 1fr; grid-template-areas: "title" "room" "copy"; padding-top: clamp(8px, 3vw, 40px); }
.hero-title { grid-area: title; }
.hero-copy { grid-area: copy; }
.room-card { grid-area: room; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr .95fr; grid-template-areas: "title room" "copy room"; row-gap: 22px; }
  .hero-title { align-self: end; }
  .hero-copy { align-self: start; }
}
.hero-copy .lead { margin-bottom: 30px; }
@media (max-width: 899px) { .room { aspect-ratio: 1 / 1; } }

.room-card { position: relative; }
.room {
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: 600px;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--wall);
  box-shadow: var(--shadow);
  isolation: isolate;
}
.room .layers, .room .layer { position: absolute; inset: 0; }
.room .layer { animation: fade-in .8s ease both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
/* Karl's idle life (same as design/karl-animated.html and the app) */
.alive .k-body { transform-origin: 120px 230px; animation: breathe 3.6s ease-in-out infinite; }
.alive .k-head { transform-origin: 120px 150px; animation: headbob 3.6s ease-in-out infinite; }
.alive .k-tail { transform-origin: 162px 214px; animation: tail 3.2s ease-in-out infinite; }
.alive .k-eyes:not(.k-static) { transform-origin: 120px 99px; animation: blink 5.2s infinite; }
.alive .k-ear-r { transform-origin: 150px 62px; animation: twitch 7.5s infinite; }
.alive .k-fx { animation: twinkle 2.4s ease-in-out infinite; }
.hungover .k-head, .hungover .k-body { animation-duration: 5.5s; }
.hungover .k-tail { animation: tail-slow 6s ease-in-out infinite; }
.hop svg { animation: hop .55s cubic-bezier(.3, 1.6, .5, 1); transform-origin: 50% 100%; }
.s-rain { animation: rain .55s linear infinite; }
.s-clouds { animation: drift 14s ease-in-out infinite; }
.s-sun { animation: pulse 4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.012, 1.035); } }
@keyframes headbob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(2px) rotate(.8deg); } }
@keyframes tail { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(9deg); } }
@keyframes tail-slow { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(3deg); } }
@keyframes blink { 0%, 91%, 97%, 100% { transform: scaleY(1); } 94% { transform: scaleY(.06); } }
@keyframes twitch { 0%, 86%, 100% { transform: rotate(0); } 88% { transform: rotate(13deg); } 90% { transform: rotate(-4deg); } 92% { transform: rotate(8deg); } 94% { transform: rotate(0); } }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes hop { 0% { transform: scale(1, 1); } 30% { transform: scale(1.06, .9); } 60% { transform: translateY(-18px) scale(.96, 1.06); } 100% { transform: none; } }
@keyframes rain { from { transform: translate(0, -16px); } to { transform: translate(-5px, 16px); } }
@keyframes drift { 0%, 100% { transform: translateX(-6px); } 50% { transform: translateX(8px); } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.08); opacity: 1; } }
.room .tap { position: absolute; left: 50%; bottom: 8%; width: 46%; height: 42%; transform: translateX(-50%); cursor: pointer; z-index: 4; border: 0; background: none; padding: 0; }
.room .heart { position: absolute; z-index: 5; pointer-events: none; color: var(--rose); font-size: 24px; animation: float 1.4s ease-out forwards; }
@keyframes float { from { transform: translate(-50%, 0) scale(.6); opacity: 0; } 20% { opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), -120px) scale(1.1); opacity: 0; } }
.day-badge {
  position: absolute; z-index: 3; left: 18px; top: 18px;
  background: rgba(255, 255, 255, .92); border-radius: 18px; padding: 10px 16px 11px;
  box-shadow: 0 10px 24px -14px rgba(30, 42, 51, .5);
  max-width: calc(100% - 36px);
}
.day-badge b { display: block; font: 600 26px/1.05 var(--display); color: var(--ginger-deep); }
.day-badge span { display: block; font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.35; }

.slider { margin-top: 22px; }
.slider label { display: block; font-weight: 600; font-size: 15px; color: var(--ink-2); margin-bottom: 6px; }
.slider input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: none; margin: 0; cursor: pointer; }
.slider input[type="range"]::-webkit-slider-runnable-track { height: 10px; border-radius: 99px; background: linear-gradient(90deg, #8F86A8, #9EC5DC 45%, var(--sun)); }
.slider input[type="range"]::-moz-range-track { height: 10px; border-radius: 99px; background: linear-gradient(90deg, #8F86A8, #9EC5DC 45%, var(--sun)); }
.slider input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; margin-top: -11px; border-radius: 50%; background: var(--surface); border: 4px solid var(--pine); box-shadow: 0 4px 10px -3px rgba(30, 42, 51, .45); }
.slider input[type="range"]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 4px solid var(--pine); box-shadow: 0 4px 10px -3px rgba(30, 42, 51, .45); }
.ticks { position: relative; height: 22px; font-size: 13px; font-weight: 600; color: var(--ink-3); margin: 0 16px; }
.ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }

/* store area */
.get { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.get .badge img { height: 52px; width: auto; }
.soon { display: inline-flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 18px; padding: 14px 18px; font-weight: 600; box-shadow: 0 0 0 1.5px var(--line) inset; }
.soon svg { width: 22px; height: 22px; color: var(--pine); flex: none; }
.get-note { margin-top: 12px; }

/* ── a check-in as a chat ─────────────────────────── */
.split { display: grid; gap: clamp(32px, 6vw, 80px); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split.flip > :first-child { order: 2; } }
.split h2 { margin-bottom: 18px; }
.chat { display: flex; flex-direction: column; gap: 10px; max-width: 440px; }
.msg { max-width: 82%; padding: 12px 16px; border-radius: 20px; line-height: 1.45; font-size: 16.5px; }
.msg.karl { background: var(--surface); border-bottom-left-radius: 6px; box-shadow: 0 6px 18px -12px rgba(30, 42, 51, .35); }
.msg.you { align-self: flex-end; background: var(--pine); color: #fff; border-bottom-right-radius: 6px; font-weight: 600; }
.chat .who { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--ink-3); margin-bottom: 2px; }
.chat .who .face { width: 40px; height: 40px; border-radius: 50%; background: var(--pine-tint); overflow: hidden; }

/* ── two ways ─────────────────────────────────────── */
.ways { display: grid; gap: clamp(36px, 5vw, 56px); grid-template-columns: 1fr; margin-top: clamp(36px, 5vw, 56px); }
@media (min-width: 860px) { .ways { grid-template-columns: 1fr 1fr; } }
.way h3 { margin: 18px 0 8px; font-size: 24px; }
.way p { color: var(--ink-2); max-width: 30em; }
.figure { background: var(--surface); border-radius: 22px; padding: 20px; box-shadow: 0 0 0 1.5px var(--line) inset; }
.figure .cap { font-size: 13.5px; font-weight: 600; color: var(--ink-3); margin-top: 12px; }
.days { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.days i { aspect-ratio: 1; border-radius: 7px; background: var(--wall); }
.days i.done { background: var(--pine); }
.days i.today { background: var(--surface); box-shadow: 0 0 0 2.5px var(--ginger) inset; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 132px; }
.bars div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.bars i { width: 100%; border-radius: 8px 8px 4px 4px; background: var(--ginger); }
.bars div:first-child i { background: #C9D2CC; }
.bars span { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.also { margin-top: clamp(32px, 4vw, 44px); color: var(--ink-2); max-width: 46em; }

/* ── craving band (night) ─────────────────────────── */
.night { background: var(--night); color: #E9EAF3; }
.night h2 { color: #fff; }
.night .lead { color: #C3C6DA; }
.night a { color: var(--sun); }
.tools { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.tools li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 18px 0; border-top: 1px solid rgba(255, 255, 255, .12); }
.tools li:last-child { border-bottom: 1px solid rgba(255, 255, 255, .12); }
.tools b { display: block; color: #fff; font-size: 17.5px; }
.tools span { color: #C3C6DA; font-size: 15.5px; }
.tools .ic { width: 44px; height: 44px; border-radius: 14px; background: var(--night-2); display: grid; place-items: center; color: var(--sun); }
.tools .ic svg { width: 22px; height: 22px; }
.pond { position: relative; aspect-ratio: 1; max-width: 420px; width: 100%; margin-inline: auto; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #33407A, var(--night-2) 70%); overflow: hidden; }
.pond .fish { position: absolute; width: 46px; color: var(--ginger); }
.pond .karl { position: absolute; left: 50%; bottom: -4%; width: 44%; transform: translateX(-50%); }

/* ── receipt ──────────────────────────────────────── */
.receipt {
  position: relative;
  max-width: 380px; width: 100%; margin-inline: auto;
  background: var(--surface);
  padding: 30px 28px 34px;
  font-variant-numeric: tabular-nums;
  box-shadow: var(--shadow);
  transform: rotate(-1.2deg);
  --notch: radial-gradient(circle at 10px 0, transparent 9px, var(--surface) 9.5px);
}
.receipt::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; background: var(--notch); background-size: 20px 10px; }
.receipt h3 { font-family: var(--ui); font-weight: 700; font-size: 15px; text-align: center; margin-bottom: 4px; }
.receipt .sub { text-align: center; font-size: 13.5px; color: var(--ink-3); margin-bottom: 18px; }
.receipt dl { margin: 0; border-top: 2px dashed var(--line); padding-top: 14px; }
.receipt dl div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.receipt dt { color: var(--ink-2); }
.receipt dd { margin: 0; font-weight: 700; }
.receipt .total { border-top: 2px dashed var(--line); margin-top: 10px; padding-top: 14px; }
.receipt .total dd { font: 600 26px/1 var(--display); color: var(--pine); }

/* ── privacy ──────────────────────────────────────── */
.facts { display: grid; gap: 0; grid-template-columns: 1fr; margin: 30px 0 0; }
@media (min-width: 760px) { .facts { grid-template-columns: 1fr 1fr; column-gap: 48px; } }
.facts div { padding: 20px 0; border-top: 1.5px solid var(--line); }
.facts dt { font-weight: 700; font-size: 17.5px; margin-bottom: 4px; }
.facts dd { margin: 0; color: var(--ink-2); }

/* ── lent postcard ────────────────────────────────── */
.lent { background: var(--pine); color: #E6F2EE; }
.lent h2 { color: #fff; }
.lent .lead { color: #CFE5DE; }
.postcard {
  position: relative;
  background: #FFFDF8;
  color: var(--ink);
  border-radius: 6px;
  padding: 28px 30px 30px;
  max-width: 440px; width: 100%; margin-inline: auto;
  transform: rotate(2deg);
  box-shadow: 0 30px 60px -26px rgba(0, 0, 0, .55);
}
.postcard .stamp { position: absolute; right: 22px; top: 22px; width: 64px; height: 76px; border: 3px dotted var(--ginger); border-radius: 4px; display: grid; place-items: center; background: #FFF4E2; }
.postcard .stamp svg { width: 44px; }
.postcard h3 { font-size: 22px; margin-bottom: 14px; max-width: 70%; }
.postcard p { font: 400 27px/1.25 var(--hand); color: var(--ink-2); margin: 0; }

/* ── FAQ ──────────────────────────────────────────── */
.faq > * { max-width: 780px; }
.faq h2 { margin-bottom: 26px; }
.faq details { border-top: 1.5px solid var(--line); }
.faq details:last-of-type { border-bottom: 1.5px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 44px 20px 0; position: relative; font-weight: 700; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; border-right: 2.5px solid var(--pine); border-bottom: 2.5px solid var(--pine); transform: translateY(-70%) rotate(45deg); transition: transform .2s ease; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details > div { padding: 0 0 22px; color: var(--ink-2); max-width: 40em; }

/* ── footer ───────────────────────────────────────── */
.foot { background: var(--wall); padding-block: 48px 40px; font-size: 15px; color: var(--ink-2); }
.foot-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.4fr 1fr; } }
.foot nav { display: flex; flex-wrap: wrap; gap: 10px 22px; font-weight: 600; }
.foot nav a { color: var(--ink); }
.foot .note { max-width: 36em; }

/* ── text pages (legal, help) ─────────────────────── */
.doc { max-width: 720px; padding-block: clamp(24px, 5vw, 56px) clamp(64px, 9vw, 112px); }
.doc { overflow-wrap: break-word; }
.doc a { overflow-wrap: anywhere; }
.doc h1 { font-size: clamp(32px, 5.4vw, 52px); margin-bottom: 14px; hyphens: auto; }
.doc h2 { font-size: clamp(24px, 3vw, 30px); margin: 2.2em 0 .6em; }
.doc h3 { font-family: var(--ui); font-weight: 700; font-size: 18px; letter-spacing: 0; margin: 1.6em 0 .4em; }
.doc ul, .doc ol { padding-left: 1.3em; margin: 0 0 1em; }
.doc li { margin-bottom: .4em; }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 15.5px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-top: 1.5px solid var(--line); }
.doc th { font-weight: 700; }
.doc .stand { color: var(--ink-3); font-size: 15px; }
.doc address { font-style: normal; }
.box { background: var(--surface); border-radius: 20px; padding: 20px 22px; box-shadow: 0 0 0 1.5px var(--line) inset; margin: 0 0 1.2em; }
.box > :last-child { margin-bottom: 0; }
.todo { background: #FFF1B8; color: #6A4A00; padding: 0 .3em; border-radius: 4px; font-weight: 600; }
.lines { list-style: none; padding: 0 !important; }
.lines li { padding: 14px 0; border-top: 1.5px solid var(--line); margin: 0 !important; }
.lines b { display: block; }
.tel { font: 600 22px/1.3 var(--display); color: var(--ink); text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
