/* The home page: a scrapbook of paper cut-outs on a meadow-coloured desk.
   Shared colours come from site.css; this file adds the paper, tape and stitching. */
:root {
  --paper: #fffaf1; --paper-edge: #f3e3cf; --tape: rgba(170, 205, 236, .72); --tape-pink: rgba(246, 176, 196, .72);
  --mint: #cfeedd; --butter: #ffe9a8; --sky: #cfe8fb; --lilac: #e6dafb; --peach: #ffd9c7;
  --stitch: #efb8c8; --title: #e06b8b; --accent-shadow: #c24a6a; --line: #d9c3ae; --goal: #fde0e8; --home: #fff1c4; --photo-dim: none; --shadow: 0 2px 0 var(--paper-edge), 0 10px 24px rgba(120, 90, 70, .12);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --paper: #2f2826; --paper-edge: #1d1817; --tape: rgba(120, 160, 200, .55); --tape-pink: rgba(220, 130, 160, .55); --mint: #2f4a3e; --butter: #4d4428; --sky: #2a4153; --lilac: #3b3350; --peach: #4e3a32; --stitch: #8d5868; --title: #f29ab2; --shadow: 0 2px 0 #171211, 0 10px 24px rgba(0, 0, 0, .35); --accent-shadow: #b85a74; --line: #6e5b52; --goal: #5a3240; --home: #4d4428; --photo-dim: brightness(.86); }
}
:root[data-theme="dark"] { --paper: #2f2826; --paper-edge: #1d1817; --tape: rgba(120, 160, 200, .55); --tape-pink: rgba(220, 130, 160, .55); --mint: #2f4a3e; --butter: #4d4428; --sky: #2a4153; --lilac: #3b3350; --peach: #4e3a32; --stitch: #8d5868; --title: #f29ab2; --shadow: 0 2px 0 #171211, 0 10px 24px rgba(0, 0, 0, .35); --accent-shadow: #b85a74; --line: #6e5b52; --goal: #5a3240; --home: #4d4428; --photo-dim: brightness(.86); }

body.home {
  font-family: "Huninn", "jf-openhuninn", "Zen Maru Gothic", "Yuanti TC", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  background-color: var(--bg);
  background-image: radial-gradient(circle at 12px 12px, rgba(224, 107, 139, .10) 2px, transparent 2.5px);
  background-size: 28px 28px;
}
.home main { max-width: 1040px; padding: 28px 16px 64px; }
.home img { max-width: 100%; height: auto; display: block; }
.home h2 { font-size: 26px; color: var(--title); margin: 0 0 6px; letter-spacing: .04em; }
.home .lead { color: var(--muted); margin: 0 0 22px; }
.home section { margin: 56px 0 0; }

/* Paper pieces: cream card, stitched inside, a strip of tape on top. */
.paper { position: relative; background: var(--paper); border-radius: 14px; box-shadow: var(--shadow); padding: 22px; }
.paper::after { content: ""; position: absolute; inset: 7px; border: 2px dashed var(--stitch); border-radius: 10px; pointer-events: none; opacity: .7; }
.tape::before { content: ""; position: absolute; top: -12px; left: 50%; width: 92px; height: 24px; transform: translateX(-50%) rotate(-3deg); background: repeating-linear-gradient(90deg, var(--tape) 0 10px, rgba(255, 255, 255, .35) 10px 14px); border-radius: 3px; z-index: 2; }
.tape.pink::before { background: repeating-linear-gradient(90deg, var(--tape-pink) 0 10px, rgba(255, 255, 255, .35) 10px 14px); }
.tilt-l { transform: rotate(-1.4deg); }
.tilt-r { transform: rotate(1.2deg); }

/* Hero */
.hero-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 36px; align-items: center; margin-top: 18px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { width: 84px; height: 84px; filter: drop-shadow(0 4px 6px rgba(120, 90, 70, .18)); }
.brand h1 { font-size: 44px; color: var(--title); letter-spacing: .06em; margin: 0; }
.brand .en { margin: 2px 0 0; font-size: 15px; letter-spacing: .08em; color: var(--muted); }
.tagline { font-size: 21px; margin: 20px 0 10px; line-height: 1.6; }
.tagline mark { background: linear-gradient(transparent 58%, var(--butter) 58%); color: inherit; padding: 0 2px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 22px; padding: 0; list-style: none; }
.pills li { padding: 5px 12px; border-radius: 999px; font-size: 14px; background: var(--mint); }
.pills li:nth-child(2) { background: var(--sky); }
.pills li:nth-child(3) { background: var(--lilac); }
.pills li:nth-child(4) { background: var(--peach); }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 12px 20px; min-height: 44px; border-radius: 999px; font-weight: 700; text-decoration: none; background: var(--accent); color: var(--accent-ink); box-shadow: 0 3px 0 var(--accent-shadow); transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--accent-shadow); }
.btn:active { transform: translateY(1px); box-shadow: 0 2px 0 var(--accent-shadow); }
.btn.ghost { background: var(--paper); color: var(--ink); box-shadow: 0 3px 0 var(--paper-edge); border: 2px solid var(--stitch); }
.photo { padding: 12px 12px 40px; margin: 0; }
.photo figcaption { position: absolute; left: 0; right: 0; bottom: 11px; text-align: center; font-size: 14px; color: var(--muted); }
.photo img { border-radius: 8px; }

/* Server status ticket */
.status-ticket { display: grid; grid-template-columns: auto 1fr; gap: 16px 24px; align-items: center; margin-top: 44px; }
.status-ticket .status-head { font-size: 15px; }
.status-ticket .counts { margin: 0; }
.status-ticket .note { grid-column: 1 / -1; margin: 0; }

/* Meet the bunnies */
.meet { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; }
.meet .bubble { position: relative; background: var(--paper); border-radius: 18px; padding: 18px 20px; box-shadow: var(--shadow); }
.meet .bubble::after { content: ""; position: absolute; left: -12px; top: 32px; border: 12px solid transparent; border-right-color: var(--paper); border-left: 0; }
/* The screenshots keep their own light colours; at night they are toned down a little. */
.home figure img, .phone-frame img { filter: var(--photo-dim); }
.diagram .grid { stroke: var(--line); }
.diagram .goal { fill: var(--goal); }
.diagram .home { fill: var(--home); }
.diagram .goal-label { fill: var(--title); }
.diagram .home-label { fill: var(--muted); }

/* How to play: three steps with small board drawings */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding: 0; margin: 0; list-style: none; }
.step { text-align: center; padding-top: 26px; }
.step .num { position: absolute; top: -16px; left: 18px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--butter); color: var(--ink); box-shadow: 0 2px 0 var(--paper-edge); z-index: 3; }
.step h3 { margin: 10px 0 6px; font-size: 18px; }
.step p { margin: 0; font-size: 15px; color: var(--muted); }
.step svg { width: 100%; max-width: 220px; height: auto; margin: 0 auto; display: block; }
.jump-rules { margin-top: 18px; font-size: 15px; }

/* The two ways to play */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.mode h3 { margin: 14px 0 4px; font-size: 20px; }
.mode p { margin: 0; color: var(--muted); font-size: 15px; }
.mode img { border-radius: 8px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.mp-note { margin-top: 26px; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
.mp-note b.big { font-size: 30px; color: var(--title); }

/* Cards */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px; padding: 0; list-style: none; }
.card-item { display: grid; grid-template-columns: 78px 1fr; gap: 14px; align-items: center; padding: 14px; }
.card-item img { width: 78px; border-radius: 8px; transform: rotate(-3deg); transition: transform .2s ease; }
.card-item:hover img { transform: rotate(2deg) scale(1.05); }
.card-item h3 { margin: 0 0 2px; font-size: 17px; }
.card-item .cost { font-size: 13px; color: var(--muted); }
.card-item p { margin: 4px 0 0; font-size: 14px; line-height: 1.55; }

/* Ways to play together */
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 0; margin: 0 0 24px; list-style: none; }
.ways li { padding: 20px; }
.ways .icon { font-size: 30px; line-height: 1; }
.ways h3 { margin: 8px 0 4px; font-size: 18px; }
.ways p { margin: 0; font-size: 15px; color: var(--muted); }

/* Phone */
.phone-wrap { display: grid; grid-template-columns: 260px 1fr; gap: 36px; align-items: center; }
.phone-frame { padding: 12px; border-radius: 36px; background: #3a2f2a; box-shadow: var(--shadow); }
.phone-frame img { border-radius: 26px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery a { display: block; text-decoration: none; color: var(--muted); }
.gallery figure { margin: 0; }
.gallery a:hover .paper { transform: rotate(0) translateY(-3px); }
.gallery .paper { transition: transform .2s ease; padding: 10px 10px 34px; }
.gallery img { border-radius: 6px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 9px; text-align: center; font-size: 13px; }

/* Platforms and footer */
.site-foot { margin-top: 56px; text-align: center; color: var(--muted); font-size: 14px; }
.site-foot nav { display: flex; justify-content: center; gap: 18px; margin-bottom: 8px; }

/* Floating paper confetti in the hero */
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: -1; }
.confetti span { position: absolute; width: 14px; height: 14px; opacity: .55; animation: drift 9s ease-in-out infinite; }
.confetti .star { clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.confetti .heart { clip-path: path("M7 13 C-4 5 2 -2 7 3 C12 -2 18 5 7 13 Z"); }
@keyframes drift { 50% { transform: translateY(-10px) rotate(14deg); } }
.intro { position: relative; isolation: isolate; }

@media (prefers-reduced-motion: reduce) {
  .confetti span, .btn, .card-item img, .gallery .paper { animation: none; transition: none; }
}

@media (max-width: 860px) {
  .hero-grid, .meet, .modes, .phone-wrap { grid-template-columns: 1fr; }
  .steps, .ways { grid-template-columns: 1fr; gap: 30px; }
  .cards-grid, .gallery { grid-template-columns: 1fr 1fr; }
  .phone-wrap .phone-frame { max-width: 240px; margin: 0 auto; }
  .meet .bubble::after { display: none; }
}
@media (max-width: 520px) {
  .brand h1 { font-size: 34px; }
  .brand img { width: 64px; height: 64px; }
  .tagline { font-size: 18px; }
  .home h2 { font-size: 22px; }
  .cards-grid, .gallery { grid-template-columns: 1fr; }
  .status-ticket { grid-template-columns: 1fr; }
  .tilt-l, .tilt-r { transform: none; }
}
