/* Raindoku site. Colors, font and tiles from design/assets/design-tokens.json. */
@font-face { font-family: "Grandstander"; src: url("/fonts/Grandstander-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Grandstander"; src: url("/fonts/Grandstander-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --ink: #1f2340; --dim: #5b6185;
  --sky-top: #cfe4ff; --sky-mid: #eef5ff; --sky-bottom: #e3edff;
  --tray: #ffffff; --gold: #ffb703; --hint-bg: #fff6d6;
  --red: #ef4444; --orange: #f97316; --yellow: #f5c400; --green: #22c55e; --blue: #3b82f6; --purple: #8b5cf6;
  --bevel: inset 0 -4px 0 rgba(0,0,0,.18), inset 0 3px 0 rgba(255,255,255,.35);
  --card: 0 8px 24px rgba(31,35,64,.10);
}

* { box-sizing: border-box; }
html { background: var(--sky-mid); }
body {
  margin: 0; min-height: 100vh; position: relative; overflow-x: hidden;
  font: 500 1.0625rem/1.6 "Grandstander", system-ui, sans-serif; color: var(--ink);
  background: linear-gradient(180deg, var(--sky-top) 0, var(--sky-mid) 520px, var(--sky-bottom) 100%);
}
img { max-width: 100%; height: auto; }
a { color: #2557c9; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.6rem; margin: .2em 0 .5em; }
.container { width: min(100% - 2.5rem, 1040px); margin-inline: auto; position: relative; z-index: 1; }

/* Header and footer */
.site-header { padding: 14px 0; position: relative; z-index: 2; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.35rem; }
.brand img { border-radius: 12px; box-shadow: var(--bevel), 0 2px 6px rgba(31,35,64,.15); }
nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .8rem; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 700; }
nav a:hover, nav a[aria-current="page"] { background: var(--tray); box-shadow: var(--card); }
.site-footer { margin-top: 4rem; padding: 2rem 0 2.5rem; color: var(--dim); text-align: center; position: relative; z-index: 1; }
.site-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: .25rem; }
.site-footer p { margin: .5rem 0 0; font-size: .95rem; }

/* Rain of tiles behind the page */
.rain { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.rain span {
  position: absolute; top: -60px; width: 28px; height: 28px; border-radius: 8px; opacity: .22;
  box-shadow: var(--bevel); animation: fall 14s linear infinite;
}
.rain span:nth-child(6n+1) { background: var(--red); }
.rain span:nth-child(6n+2) { background: var(--orange); }
.rain span:nth-child(6n+3) { background: var(--yellow); }
.rain span:nth-child(6n+4) { background: var(--green); }
.rain span:nth-child(6n+5) { background: var(--blue); }
.rain span:nth-child(6n)   { background: var(--purple); }
.rain span:nth-child(1)  { left: 4%;  animation-delay: -2s;  animation-duration: 16s; }
.rain span:nth-child(2)  { left: 13%; animation-delay: -9s;  width: 20px; height: 20px; }
.rain span:nth-child(3)  { left: 22%; animation-delay: -5s;  animation-duration: 18s; }
.rain span:nth-child(4)  { left: 31%; animation-delay: -12s; width: 22px; height: 22px; }
.rain span:nth-child(5)  { left: 42%; animation-delay: -1s;  animation-duration: 17s; }
.rain span:nth-child(6)  { left: 53%; animation-delay: -7s;  width: 20px; height: 20px; }
.rain span:nth-child(7)  { left: 62%; animation-delay: -3s;  animation-duration: 15s; }
.rain span:nth-child(8)  { left: 71%; animation-delay: -10s; width: 24px; height: 24px; }
.rain span:nth-child(9)  { left: 80%; animation-delay: -6s;  animation-duration: 19s; }
.rain span:nth-child(10) { left: 88%; animation-delay: -13s; width: 20px; height: 20px; }
.rain span:nth-child(11) { left: 95%; animation-delay: -4s;  animation-duration: 16s; }
.rain span:nth-child(12) { left: 47%; animation-delay: -11s; width: 18px; height: 18px; }
@keyframes fall {
  from { transform: translateY(0) rotate(0deg); }
  to   { transform: translateY(110vh) rotate(90deg); }
}

/* Home */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 2rem; padding: 2rem 0 1rem; }
.hero h1 { margin: 0; }
.hero h1 img { display: block; width: min(100%, 460px); }
.eyebrow { margin: 0 0 .4rem; color: var(--dim); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .85rem; }
.lead { font-size: 1.4rem; line-height: 1.4; margin: .8rem 0 1.4rem; }
.hero-art { justify-self: center; width: min(100%, 380px); animation: bob 6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px); } }
.badge {
  display: inline-flex; align-items: center; gap: .7rem; min-height: 56px; padding: .5rem 1.2rem .5rem .9rem;
  border-radius: 14px; background: #000; color: #fff; text-decoration: none; box-shadow: var(--card);
}
.badge small { display: block; font-size: .72rem; line-height: 1.1; opacity: .85; }
.badge strong { display: block; font-size: 1.2rem; line-height: 1.15; }
.badge-note { margin: .6rem 0 0; color: var(--dim); font-size: .95rem; }

.section { margin-top: 3.5rem; }
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.shots figure { margin: 0; text-align: center; }
.shots img { border-radius: 28px; box-shadow: 0 0 0 6px var(--tray), var(--card); background: var(--tray); }
.shots figcaption { margin-top: .9rem; font-weight: 700; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; counter-reset: step; }
.steps li, .card { background: var(--tray); border-radius: 18px; padding: 1.2rem 1.3rem; box-shadow: var(--card); }
.steps li { counter-increment: step; position: relative; padding-top: 3.4rem; }
.steps li::before {
  content: counter(step); position: absolute; top: 1rem; left: 1.3rem; width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; color: #fff; font-weight: 700; box-shadow: var(--bevel);
}
.steps li:nth-child(1)::before { background: var(--red); }
.steps li:nth-child(2)::before { background: var(--blue); }
.steps li:nth-child(3)::before { background: var(--purple); }
.doku { background: var(--gold); color: var(--ink); padding: 0 .35em; border-radius: 6px; box-shadow: var(--bevel); font-weight: 700; }
.free { background: var(--hint-bg); border-radius: 22px; padding: 1.6rem 1.8rem; box-shadow: var(--card); }
.free p { margin: .4rem 0 0; }

/* Inner pages */
.page-content { max-width: 760px; }
.page-content h1 { font-size: 2.3rem; margin: 1.2rem 0 .6rem; }
.page-content section { background: var(--tray); border-radius: 18px; padding: .4rem 1.4rem 1rem; margin: 1rem 0; box-shadow: var(--card); }
.page-content h2 { font-size: 1.3rem; margin-top: .8em; }
.page-art { display: block; width: min(60%, 240px); margin: .5rem auto 1rem; animation: bob 6s ease-in-out infinite; }
details { border-top: 1px solid #e3e8f5; padding: .2rem 0; }
details:first-of-type { border-top: 0; }
summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
details p { margin-top: 0; }
.effective { color: var(--dim); }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 1rem; gap: 1rem; }
  .hero h1 img { margin: 0 auto; }
  .hero-art { width: 220px; grid-row: 1; }
  .lead { font-size: 1.2rem; }
  .shots { grid-template-columns: 1fr; max-width: 300px; margin: 0 auto; }
  .steps { grid-template-columns: 1fr; }
  .page-content h1 { font-size: 1.9rem; }
  .page-content section { padding-inline: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .rain span, .hero-art, .page-art { animation: none; }
  .rain { display: none; }
}
