/* ── Tinhinane — pink kawaii corner ────────────────
   direction: playful · tokens first, one radius,
   one accent hue family (pink), sticker shadows   */

:root {
  /* surface + ink */
  --bg: #ffeef6;
  --surface: #fffafd;
  --ink: #4a2340;
  --ink-2: #8a5a7d;
  --line: #f3c6dc;

  /* accents */
  --accent: #d6336c;
  --accent-2: #ff8fc7;
  --accent-ink: #fff7fb;

  /* shape */
  --radius: 20px;
  --shadow: 0 6px 0 rgba(214, 51, 108, .14);
  --shadow-sm: 0 4px 0 rgba(214, 51, 108, .12);

  /* type */
  --font-display: "Baloo 2", "Trebuchet MS", ui-rounded, system-ui, sans-serif;
  --font-body: "Quicksand", "Trebuchet MS", ui-rounded, system-ui, sans-serif;
  --fs-body: clamp(15px, .35vw + 14px, 17px);
  --fs-h1: clamp(38px, 6vw + 10px, 68px);
  --fs-h2: clamp(26px, 3vw + 10px, 42px);

  /* motion + layout */
  --dur: 200ms;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --container: 1120px;
}

* { box-sizing: border-box }

html { scroll-behavior: smooth }

body {
  margin: 0;
  background:
    radial-gradient(60vw 50vh at 85% -5%, #ffd1e8 0%, transparent 60%),
    radial-gradient(50vw 45vh at -10% 30%, #ffe3f1 0%, transparent 55%),
    radial-gradient(40vw 40vh at 50% 110%, #ffdcec 0%, transparent 60%),
    var(--bg);
  color: var(--ink);
  font: var(--fs-body)/1.65 var(--font-body);
  overflow-wrap: anywhere;
}

/* faint polka-dot atmosphere */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(#ffc9e0 1.6px, transparent 1.6px);
  background-size: 26px 26px;
  opacity: .45;
  pointer-events: none;
  z-index: -1;
}

::selection { background: #ffc4dd; color: var(--ink) }

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 24px);
}

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden }

.icon { width: 18px; height: 18px; fill: currentColor; flex: none }
.icon-heart { color: var(--accent) }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: var(--radius);
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px }

/* ── header ─────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 246, 251, .86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px dashed var(--line);
  animation: fade-in .4s var(--ease) both;
}

.nav { display: flex; align-items: center; gap: 18px; padding: 14px 0 }

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  font: 700 22px/1 var(--font-display);
  color: var(--ink);
  text-decoration: none;
}

.nav-links { display: flex; gap: 4px }

.nav-links a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 8px 10px;
  border-radius: var(--radius);
}

.nav-links a:hover {
  color: var(--accent);
  background: #ffe3f0;
}

/* ── buttons ────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font: 700 15px var(--font-body);
  padding: 12px 20px;
  min-height: 44px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), filter var(--dur) var(--ease);
}

.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); filter: brightness(1.06) }
.btn:active { transform: translateY(1px); box-shadow: 0 2px 0 rgba(214, 51, 108, .2) }
.btn:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none }

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--line), var(--shadow-sm);
}
.btn-ghost:hover { background: #fff0f7; filter: none }

.btn-sm { padding: 9px 16px; font-size: 14px; min-height: 40px }
.btn-lg { padding: 15px 28px; font-size: 17px }

/* ── hero ───────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(40px, 7vw, 84px) 0 clamp(32px, 5vw, 64px);
}

.eyebrow {
  margin: 0 0 14px;
  font: 700 12px/1.4 var(--font-body);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0 0 16px;
  font: 800 var(--fs-h1)/1.05 var(--font-display);
  letter-spacing: -.015em;
}

.accent-word {
  color: var(--accent);
  padding-bottom: .12em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8 Q30 2 60 7 T118 6' fill='none' stroke='%23ff8fc7' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") bottom / 100% 10px no-repeat;
}

.lede {
  margin: 0 0 28px;
  max-width: 52ch;
  font-size: clamp(17px, .6vw + 15px, 20px);
  color: var(--ink-2);
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px }

.hero-copy > * { animation: rise-in .55s var(--ease) both }
.hero-copy > :nth-child(1) { animation-delay: .05s }
.hero-copy > :nth-child(2) { animation-delay: .12s }
.hero-copy > :nth-child(3) { animation-delay: .19s }
.hero-copy > :nth-child(4) { animation-delay: .26s }

.hero-art { position: relative; display: flex; justify-content: center; animation: rise-in .6s var(--ease) .2s both }

.cat-card {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(20px, 3vw, 36px);
  text-align: center;
  transform: rotate(-2deg);
  transition: transform var(--dur) var(--ease);
}
.cat-card:hover { transform: rotate(0) }

.cat { display: block; width: min(320px, 60vw); height: auto }

.tag {
  display: inline-block;
  margin: 14px 0 0;
  padding: 6px 14px;
  background: #ffe3f0;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 2px var(--line);
  font: 700 12px/1.4 var(--font-body);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}

.float-heart { position: absolute; color: var(--accent-2); animation: floaty 5s var(--ease) infinite }
.float-heart svg { display: block; width: 100%; height: 100%; fill: currentColor }
.fh1 { width: 26px; height: 26px; top: 4%; left: 2%; animation-delay: .2s }
.fh2 { width: 18px; height: 18px; bottom: 10%; right: 0; color: #ff5fa2; animation-delay: 1.1s }
.fh3 { width: 22px; height: 22px; top: -3%; right: 8%; animation-delay: .6s }

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-6deg) }
  50% { transform: translateY(-14px) rotate(8deg) }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px) }
  to { opacity: 1; transform: none }
}

@keyframes fade-in {
  from { opacity: 0 }
  to { opacity: 1 }
}
/* ── sections ───────────────────────────────────── */

.section { padding: clamp(48px, 8vw, 96px) 0 }
.section[id] { scroll-margin-top: 96px }

h2 {
  margin: 0 0 14px;
  font: 800 var(--fs-h2)/1.12 var(--font-display);
  letter-spacing: -.01em;
}

.split {
  display: grid;
  grid-template-columns: 6fr 6fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}

.split-art { display: flex; justify-content: center }

.cat-btn {
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: var(--radius);
  cursor: pointer;
}
.cat-btn:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 6px }
.cat-btn.boing .cat-big { animation: boing .55s var(--ease) }

.cat-big { width: min(300px, 70vw) }

@keyframes boing {
  0% { transform: scale(1) }
  35% { transform: scale(1.07, .93) }
  70% { transform: scale(.97, 1.03) }
  100% { transform: scale(1) }
}

.split-copy p { color: var(--ink-2); font-size: 17px; margin: 0 0 12px }
.split-copy .hint { color: var(--accent); font-weight: 700; margin-bottom: 0 }

/* ── hearts corner ──────────────────────────────── */

.hearts-panel {
  position: relative;
  background: linear-gradient(160deg, #fff2f8, #ffe0ee);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(28px, 6vw, 64px);
  text-align: center;
}

.hearts-panel p { color: var(--ink-2); margin: 0 0 24px; font-size: 17px }

.counter {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 26px;
  padding: 14px 24px;
  background: var(--surface);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
}

.counter-num {
  font: 800 32px/1.1 var(--font-display);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.counter-num.pop { animation: pop .35s var(--ease) }

.counter-label {
  font: 600 12px/1.4 var(--font-body);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

@keyframes pop { 50% { transform: scale(1.25) } }

/* ── footer ─────────────────────────────────────── */

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 2px dashed var(--line);
  background: #fff2f8;
  padding: 26px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
}

.footer-inner p { margin: 0; font-size: 14px; color: var(--ink-2) }

.foot-heart {
  display: inline-block;
  color: var(--accent);
  animation: beat 1.6s var(--ease) infinite;
}
@keyframes beat {
  0%, 100% { transform: scale(1) }
  15% { transform: scale(1.3) }
  30% { transform: scale(1) }
}

/* ── ambient sky + bursts ───────────────────────── */

main, .site-header { position: relative; z-index: 1 }

.sky {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.sky .heart {
  position: absolute;
  bottom: -40px;
  opacity: 0;
  animation: rise var(--dur, 11s) linear infinite;
  animation-delay: var(--delay, 0s);
}
.sky .heart svg { display: block; width: 100%; height: 100%; fill: currentColor }

@keyframes rise {
  0% { transform: translateY(0) translateX(0) rotate(-8deg); opacity: 0 }
  10% { opacity: .75 }
  50% { transform: translateY(-45vh) translateX(var(--sway, 20px)) rotate(10deg) }
  100% { transform: translateY(-95vh) translateX(0) rotate(-6deg); opacity: 0 }
}

.rain-heart {
  position: fixed;
  pointer-events: none;
  z-index: 20;
  animation: rain-up var(--dur, 1.6s) var(--ease) forwards;
}
.rain-heart svg { display: block; width: 100%; height: 100%; fill: currentColor }

@keyframes rain-up {
  0% { transform: translate(-50%, -50%) scale(.5); opacity: 0 }
  15% { opacity: 1 }
  100% {
    transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -140px))) scale(1.05) rotate(var(--rot, 20deg));
    opacity: 0;
  }
}

.spark {
  position: fixed;
  pointer-events: none;
  z-index: 20;
  animation: spark-fly .8s var(--ease) forwards;
}
.spark svg { display: block; width: 100%; height: 100%; fill: currentColor }

@keyframes spark-fly {
  0% { transform: translate(-50%, -50%) scale(.3); opacity: 0 }
  30% { opacity: 1 }
  100% { transform: translate(calc(-50% + var(--dx, 40px)), calc(-50% + var(--dy, -80px))) scale(1.1); opacity: 0 }
}

/* ── responsive ─────────────────────────────────── */

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; gap: 32px }
  .split { grid-template-columns: 1fr; gap: 28px }
  .split-art { order: -1 }
}

@media (max-width: 640px) {
  .nav-links { display: none }
}

/* ── reduced motion ─────────────────────────────── */

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