/* Home page only (loaded by index.html). Uses the shared palette tokens from style.css, so light and dark stay in step. */

/* ---- hero ---- */
.home-hero { padding: 64px 0 36px; max-width: 760px; }
.home-hero h1 { font: 700 clamp(36px, 5vw, 56px)/1.08 var(--serif); letter-spacing: -0.02em; margin: 0 0 18px; color: var(--text); }
.home-hero p { font: 18px/1.6 var(--sans); color: var(--muted); margin: 0; max-width: 56ch; }

/* ---- section header ---- */
.home-section { display: flex; align-items: center; gap: 16px; padding: 8px 0 22px; }
.home-section h2 { margin: 0; font: 600 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }

/* ---- story cards ---- */
.story-list { display: flex; flex-direction: column; gap: 28px; padding-bottom: 72px; }
.story-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
              box-shadow: 0 1px 2px rgba(20, 20, 60, .04); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.story-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: 0 16px 40px rgba(20, 20, 60, .10); }
.story-card a { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); height: 100%; color: inherit; text-decoration: none; }
.story-card a:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; border-radius: 20px; }
/* desktop: every card is the same height, whatever its title or summary length */
@media (min-width: 761px) {
  .story-card { height: 360px; display: flex; flex-direction: column; }
  .story-card a { flex: 1; min-height: 0; }
  .story-body { min-height: 0; overflow: hidden; }
}

.story-art { position: relative; min-height: 300px; background: #f7f6f5; border-right: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.story-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 22px; box-sizing: border-box; display: block; }
@media (prefers-color-scheme: dark) { .story-art { background: #1b1c1f; } }

.story-body { display: flex; flex-direction: column; padding: 34px 36px 30px; min-width: 0; }
.story-body h3 { font: 700 clamp(22px, 2.1vw, 28px)/1.2 var(--serif); letter-spacing: -0.01em; margin: 0 0 14px; color: var(--text); }
.story-summary { font: 15.5px/1.65 var(--sans); color: var(--muted); margin: 0 0 22px;
                 display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.story-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.story-author { display: inline-flex; align-items: center; gap: 10px; font: 600 14px/1.2 var(--sans); color: var(--text); }
.story-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
                display: grid; place-items: center; font: 700 11px/1 var(--sans); letter-spacing: .02em; }
.story-read { font: 600 14px/1 var(--sans); color: var(--accent); }
.story-card a:hover .story-read { text-decoration: underline; text-underline-offset: 4px; }

/* ---- narrow screens: image above text ---- */
@media (max-width: 760px) {
  .home-hero { padding: 40px 0 28px; }
  .story-card a { grid-template-columns: 1fr; }
  .story-art { min-height: 0; aspect-ratio: 16 / 10; border-right: 0; border-bottom: 1px solid var(--line); }
  .story-body { padding: 24px 22px 24px; }
}
@media (prefers-reduced-motion: reduce) { .story-card, .story-card:hover { transition: none; transform: none; } }
