/* start.css -- the start page (index.html): searchable work list with a hero panel.
 * Layout follows Alpha's front page (title, intro, searchable list of works with cover images);
 * tokens come from index.css. Works without JavaScript: the list is plain links. */

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

/* ---- header bar (Alpha: slate menubar with logo and links) ---- */
.site-header { background: var(--bar); color: var(--bar-text); }
.site-header-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 56px;
}
.site-logo { font-family: var(--font-head); font-size: 20px; letter-spacing: .03em; color: var(--bar-text); }
.site-logo:hover { color: #fff; text-decoration: none; }
.site-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-nav a { color: var(--bar-text); font-size: 15px; font-weight: 400; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: #fff; text-decoration: none; border-bottom-color: var(--accent); }

.start-main { max-width: 1240px; margin: 0 auto; padding: 0 24px 24px; }

/* ---- intro ---- */
.intro { max-width: 52rem; }
.intro h1 { font-size: 40px; margin: 36px 0 4px; }
.intro h2 { font-size: 22px; text-transform: none; letter-spacing: 0; color: var(--faint); margin: 0 0 18px; }
.intro p { margin: 0 0 12px; }
.intro .notice {
  background: var(--surface); border-left: 3px solid var(--accent); border-radius: var(--radius);
  padding: 10px 14px; font-size: 15px;
}

/* ---- browser: list + hero ---- */
.browser { display: block; margin-top: 28px; }
.js .browser { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }

.searchbar { display: flex; gap: 10px; position: sticky; top: 0; z-index: 2; background: #fff; padding: 10px 0 8px; }
.searchbar input[type="search"] {
  flex: 1; min-width: 0; font: 400 17px var(--font-body); color: var(--text);
  padding: 10px 14px 10px 40px; border: 1px solid var(--surface-2); border-radius: var(--radius);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23607D8B' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") no-repeat 12px 50%;
}
.searchbar input[type="search"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(246,166,35,.25); }
.searchbar select {
  font: 400 15px var(--font-body); color: var(--text); padding: 10px 12px;
  border: 1px solid var(--surface-2); border-radius: var(--radius); background: #fff;
}
.result-count { margin: 4px 0 6px; color: var(--muted); font-size: 14px; }
.no-match { color: var(--muted); padding: 24px 0; }

.works { list-style: none; margin: 0; padding: 0; }
.work { border-bottom: 1px solid var(--line); }
.work:last-child { border-bottom: none; }
.work-link {
  display: flex; gap: 16px; align-items: center; padding: 10px 12px; color: var(--text);
  border-left: 3px solid transparent; border-radius: 0 var(--radius) var(--radius) 0;
}
.work-link:hover { text-decoration: none; background: var(--surface); }
.work.is-active .work-link { background: var(--surface); border-left-color: var(--accent); }
.work-thumb {
  flex: 0 0 auto; width: 64px; height: 64px; object-fit: cover; border-radius: 3px; background: var(--surface);
}
.work-text { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: baseline; min-width: 0; flex: 1; }
.work-title { font-family: var(--font-head); font-size: 20px; line-height: 1.25; color: var(--link); }
.work-link:hover .work-title { color: var(--link-hover); }
.work-year { font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.work-desc {
  grid-column: 1 / -1; margin-top: 3px; font-size: 14px; line-height: 1.4; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.js .work-desc { display: none; }  /* with JS the full text sits in the hero panel */

/* hero panel: large cover image + profile, follows hover / keyboard focus */
.hero {
  position: sticky; top: 12px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.07);
}
.hero img {
  display: block; width: 100%; height: 300px; object-fit: contain; background: #fff;
}
.hero-text { padding: 16px 18px 20px; }
.hero h3 { margin: 0; font-size: 26px; }
.hero-year { margin: 2px 0 10px; color: var(--muted); }
.hero-desc { margin: 0 0 16px; font-size: 15px; line-height: 1.5; max-height: 16em; overflow: auto; }
.button {
  display: inline-block; background: var(--bar); color: #fff; padding: 9px 18px; border-radius: var(--radius);
  font-weight: 500; font-size: 15px;
}
.button:hover { background: #26323a; color: #fff; text-decoration: none; }

/* ---- news ---- */
.news { margin-top: 48px; max-width: 52rem; }
.news h2 { margin-top: 0; }
.news ul { padding-left: 1.1em; }
.news li { margin-bottom: 10px; }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--line); margin-top: 24px; padding: 28px 24px 40px; text-align: center; color: var(--muted); font-size: 14px; }
.sponsors p { margin: 0 0 10px; }
.sponsors .logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 22px 32px; margin: 14px 0 18px; }
.sponsors .logos img { display: block; width: auto; }
.sponsors .muted { color: var(--faint); font-size: 13px; }

/* ---- narrow screens: no hero panel; rows become cards with the cover image ---- */
@media (max-width: 900px) {
  .js .browser { display: block; }
  .hero { display: none; }
  .js .work-desc { display: -webkit-box; }
  .work-thumb { width: 84px; height: 84px; }
  .intro h1 { font-size: 30px; }
  .site-header-inner { padding: 8px 16px; }
  .start-main { padding: 0 16px 16px; }
}
@media (max-width: 520px) {
  .searchbar { flex-wrap: wrap; }
  .searchbar select { width: 100%; }
}

/* the start page's news block is plain text on white (index.css gives .news a grey panel on work pages) */
.start .news { background: none; padding: 0; border-radius: 0; }

@media (max-width: 520px) {
  .site-header-inner { flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 16px; }
  .site-nav { gap: 16px; }
}
