/* ── ORAVA · kalenteri ─────────────────────────────────────────────────────
   The calendar is the page parents actually come back to, so it gets its own
   layout rather than a section: a fixed date column on the left, the event to
   its right, and — for anything already past — the photographs underneath.
   ─────────────────────────────────────────────────────────────────────── */

.cal-page { padding-top: 62px; }

.cal-head { padding-block: clamp(40px, 6vw, 84px) clamp(30px, 4vw, 50px); }
.cal-head .h1 { margin-top: 14px; letter-spacing: -0.04em; }

.cal-jump { display: flex; flex-wrap: wrap; gap: 7px; margin-top: clamp(28px, 4vw, 44px); }
.cal-jump a {
  font-size: 13px; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line-2); text-decoration: none; color: var(--ink-60);
  transition: background .2s, color .2s, border-color .2s;
  font-variant-numeric: tabular-nums;
}
.cal-jump a:hover { background: var(--orava); border-color: var(--orava); color: #FFF2EA; }
.cal-jump a.now { border-color: var(--orava); color: var(--orava); }

.cal-stats {
  margin-top: clamp(28px, 4vw, 44px); padding-top: 18px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px 26px;
}
.cal-stats div { font-size: 13px; color: var(--ink-60); }
.cal-stats b { display: block; font-weight: 500; font-size: clamp(20px, 2vw, 27px); color: var(--ink); letter-spacing: -0.03em; margin-bottom: 2px; }

.cal-sec { padding-block: clamp(46px, 6vw, 84px); }
.cal-sec.alt { background: var(--paper-2); }
.cal-sec-head { display: flex; align-items: baseline; gap: 16px; padding-bottom: 22px; border-bottom: 2px solid var(--ink); }

/* ── one entry ────────────────────────────────────────────────────────── */
.entry { border-bottom: 1px solid var(--line-2); padding-block: clamp(26px, 3vw, 40px); }
.entry-top { display: grid; grid-template-columns: 7.2rem minmax(0, 1fr) minmax(0, 300px); gap: clamp(18px, 3vw, 44px); align-items: start; }

.e-when { position: sticky; top: 78px; }
.e-day { font-variant-numeric: tabular-nums; font-size: clamp(28px, 2.6vw, 38px); font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.e-mon { font-size: 13px; color: var(--ink-60); margin-top: 5px; }
.e-yr { font-size: 12px; color: var(--ink-30); font-variant-numeric: tabular-nums; }

.e-main h3 { font-size: clamp(21px, 2.2vw, 32px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.08; }
.e-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 9px; font-size: 14px; color: var(--ink-60); }
.e-meta span { display: inline-flex; align-items: center; gap: 6px; }
.e-meta span::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--ink-30); }
.e-meta span:first-child::before { display: none; }
.e-lead { margin-top: 14px; font-size: clamp(15.5px, 1.15vw, 17.5px); line-height: 1.5; max-width: 56ch; }
.e-note { margin-top: 12px; font-size: 15px; color: var(--orava-dk); padding-left: 14px; border-left: 2px solid var(--orava); }

.e-side { display: grid; gap: 12px; align-content: start; }
.e-fact { font-size: 13.5px; line-height: 1.45; }
.e-fact b { display: block; font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-60); font-weight: 500; margin-bottom: 3px; }
.e-tag {
  display: inline-block; font-size: 12px; padding: 4px 10px; border-radius: 999px;
  background: var(--blue-lt); color: var(--blue); justify-self: start;
}
.e-open { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--orava); font-weight: 500; }
.e-open::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ── gallery ──────────────────────────────────────────────────────────── */
.e-gal {
  margin-top: clamp(18px, 2.4vw, 30px);
  display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px;
}
.e-gal figure {
  position: relative; border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 4 / 3;
  background: var(--paper-3); cursor: zoom-in;
}
.e-gal img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.8,.3,1); }
.e-gal figure:hover img { transform: scale(1.05); }
/* the first frame of a past entry runs wide — it is the one that carries the day */
.e-gal figure:first-child { grid-column: span 2; aspect-ratio: 8 / 3; }
@media (max-width: 700px) { .e-gal figure:first-child { grid-column: span 2; aspect-ratio: 3 / 2; } }

.e-lead-img { border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 5 / 4; background: var(--paper-3); }
.e-lead-img img { width: 100%; height: 100%; object-fit: cover; }

/* ── responsive ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .entry-top { grid-template-columns: 4.4rem minmax(0, 1fr); }
  /* wrap rather than scroll sideways: a horizontal scroller here silently
     clipped "Mukaan", which is the one line a parent has to read */
  .e-side { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: flex-start; padding-top: 6px; }
  .e-side .e-fact { flex: 1 1 44%; }
  .e-side .e-lead-img { flex: 0 0 100%; max-width: 260px; }
  .e-when { position: static; }
  .e-day { font-size: 26px; }
  .e-gal { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
}
