/* ============================================================
   home-directory.css — "Directory list (A–Z)" home paradigm.
   Scoped to `.home-directory` (root class set by
   renderer/home-directory.js); landscape rules under
   `.stage.landscape .home-directory`.
   Colours ONLY via the shared branding vars (--bg/--ink/--accent/…)
   plus the fixed internal tokens already declared in styles.css.
   ============================================================ */

.home-directory {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* Slightly tighter than the circular home's big centred title — the list
   below is the focus. (.home-title base styling comes from styles.css.) */
.home-directory .home-title {
  margin: 20px 0 24px;
}

/* ---------- Search box ---------- */

.home-directory .dir-search {
  flex: 0 0 auto;
  width: 100%;
  margin: 0 0 26px;
  padding: 26px 40px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 36px;
  line-height: 1;
  color: var(--ink);
  background: var(--surface);
  border: 3px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-card);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.home-directory .dir-search::placeholder { color: var(--gray); opacity: 1; }
.home-directory .dir-search:focus { border-color: var(--accent); }
/* Drop the UA "clear" affordance so the field reads as one clean pill. */
.home-directory .dir-search::-webkit-search-decoration,
.home-directory .dir-search::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

/* ---------- Row list ---------- */

.home-directory .dir-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 2px 16px;
}

.home-directory .dir-row {
  display: flex;
  align-items: center;
  gap: 30px;
  width: 100%;
  min-height: 120px;            /* generous, touch-first tap target */
  padding: 18px 34px;
  text-align: left;
  color: var(--ink);
  background: var(--surface);
  border: 0;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: transform 0.14s ease;
  animation: dir-row-in 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
.home-directory .dir-row:active { transform: scale(0.98); }
/* .dir-row sets display:flex, which would otherwise beat the [hidden] UA rule. */
.home-directory .dir-row[hidden] { display: none; }

/* Short staggered reveal for the first rows (guarded by the global
   prefers-reduced-motion rule in styles.css). */
.home-directory .dir-row:nth-child(1) { animation-delay: 0.02s; }
.home-directory .dir-row:nth-child(2) { animation-delay: 0.05s; }
.home-directory .dir-row:nth-child(3) { animation-delay: 0.08s; }
.home-directory .dir-row:nth-child(4) { animation-delay: 0.11s; }
.home-directory .dir-row:nth-child(5) { animation-delay: 0.14s; }
.home-directory .dir-row:nth-child(6) { animation-delay: 0.17s; }
.home-directory .dir-row:nth-child(7) { animation-delay: 0.20s; }
.home-directory .dir-row:nth-child(8) { animation-delay: 0.23s; }

@keyframes dir-row-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.home-directory .dir-row-icon {
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-directory .dir-row-icon svg { width: 100%; height: 100%; display: block; }

.home-directory .dir-row-label {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 42px;
  line-height: 1.05;
  letter-spacing: 0.5px;
  overflow-wrap: anywhere;
}

.home-directory .dir-chevron {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  color: var(--accent);
}
.home-directory .dir-chevron path { fill: none; stroke: currentColor; }

/* ---------- Empty / no-results ---------- */

.home-directory .dir-empty {
  margin: 48px auto;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 40px;
  color: var(--ink);
  opacity: 0.7;
}
.home-directory .dir-empty[hidden] { display: none; }

/* ============================================================
   Landscape (1920×1080) — full-width search over a two-column
   list. main.js adds .landscape on the #stage ancestor.
   ============================================================ */

.stage.landscape .home-directory .home-title { margin: 12px 0 16px; }

.stage.landscape .home-directory .dir-search {
  margin-bottom: 20px;
  padding: 22px 36px;
  font-size: 32px;
}

.stage.landscape .home-directory .dir-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 28px;
  padding-bottom: 12px;
}

.stage.landscape .home-directory .dir-row {
  min-height: 120px;
  gap: 24px;
  padding: 16px 30px;
}
.stage.landscape .home-directory .dir-row-icon { width: 74px; height: 74px; }
.stage.landscape .home-directory .dir-row-label { font-size: 36px; }
