/* welcome.css: the home screen (the first screen after signing in), the strip's account menu and Ayarlar.
   Buket, 11 November: what was made last on top, then the seven studios as before → after cards. */

.home { height: 100%; overflow: auto; background: var(--page); }
.home-in { max-width: 1240px; margin: 0 auto; padding: 22px 32px 48px; }

/* ---------- what was made last ---------- */
.home-recent { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.home-recent-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.home-recent-head h2 { font-size: var(--t-body); }
.home-recent-head a { color: var(--accent); font-size: var(--t-meta); text-decoration: none; }
.home-recent-head a:hover { text-decoration: underline; }
.home-recent-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.home-recent-card { display: grid; gap: 3px; min-width: 0; color: var(--ink); text-decoration: none; }
.home-recent-thumb { display: block; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.home-recent-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.home-recent-card.is-photo .home-recent-thumb img { object-fit: cover; }
.home-recent-card:hover .home-recent-thumb { border-color: var(--accent); }
.home-recent-card b { margin-top: 5px; overflow: hidden; font-size: var(--t-small); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.home-recent-card > span:last-child { color: var(--ink-muted); font-size: var(--t-meta); }

/* ---------- the greeting ---------- */
.home-hello { padding: 30px 0 22px; text-align: center; }
.home-hello h1 { font-size: 30px; letter-spacing: -.02em; }
.home-hello p { margin: 8px 0 0; color: var(--ink-muted); font-size: var(--t-body); }

/* ---------- the studios: Flat is the tall one, so seven cards fill a 4 x 2 grid ---------- */
.home-studios { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.home-studio {
  display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink); text-decoration: none;
  transition: border-color 120ms ease, transform var(--dur-ui) var(--ease-out), box-shadow var(--dur-ui) var(--ease-out);
}
.home-studio:focus-visible { outline-offset: 3px; }
.home-studio.is-tall { grid-row: span 2; }
.home-vis { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #fff; }   /* a pair's halves are 2:3, as its pictures */
.home-studio.is-tall .home-vis { flex: 1; aspect-ratio: auto; min-height: 420px; }
.home-vis img, .home-vis video { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-vis.is-pair { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr); gap: 1px; background: var(--line); }
.home-vis.is-pair img { min-height: 0; background: #fff; }
.home-vis img.is-fit { object-fit: contain; padding: 10px; }
.home-arrow, .home-play {
  position: absolute; display: grid; place-items: center; border-radius: 50%; font-size: var(--t-body); pointer-events: none;
}
.home-arrow { left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px #0000002e; }
.home-play { right: 10px; bottom: 10px; width: 30px; height: 30px; background: #000000a0; color: #fff; font-size: var(--t-label); }
.home-studio-body { display: grid; gap: 4px; padding: 14px 16px 16px; }
.home-studio-body b { font-size: var(--t-body); font-weight: 700; }
.home-studio-body span { color: var(--ink-muted); font-size: var(--t-small); line-height: 1.45; }

/* Flat's card: the photo under its drawing, the line follows the pointer (home.js sets --cut) */
.home-slide { --cut: 50%; }
.home-slide img { position: absolute; inset: 0; object-fit: contain; background: #efefee; }   /* the photo's own ground */
.home-slide img.home-slide-after { clip-path: inset(0 0 0 var(--cut)); background: #fff; }
.home-slide-line { position: absolute; top: 0; bottom: 0; left: var(--cut); width: 2px; margin-left: -1px; background: var(--accent-fill); pointer-events: none; }
.home-slide-knob {
  position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 32px; height: 32px; margin: -16px 0 0 -16px;
  border-radius: 50%; background: var(--accent-fill); color: #fff; font-size: var(--t-meta); letter-spacing: -1px; box-shadow: 0 2px 8px #0000003d;
}
.home-slide-tag { position: absolute; top: 10px; padding: 2px 8px; border-radius: 99px; background: #ffffffe0; color: #1a1c1e; font: 500 var(--t-label) var(--font-meta); pointer-events: none; }
.home-slide-tag.is-left { left: 10px; }
.home-slide-tag.is-right { right: 10px; }
.home-slide.is-easing img, .home-slide.is-easing .home-slide-line { transition: clip-path 420ms var(--ease-out), left 420ms var(--ease-out); }

@media (hover: hover) and (pointer: fine) {
  .home-studio:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
  .home-studio.is-tall:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .home-studio, .home-studio:hover { transition: none; transform: none; }
}

@media (max-width: 1180px) {
  .home-studios { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-recent-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .home-recent-card:nth-child(n + 6) { display: none; }
}
@media (max-width: 1000px) {
  .home-studios { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-studio.is-tall { grid-row: auto; grid-column: 1 / -1; }
  .home-studio.is-tall .home-vis { min-height: 0; height: 360px; flex: none; }
  .home-studio:not(.is-tall) .home-vis { aspect-ratio: 4 / 3; }
}
/* a phone is for looking (PRD-11): what was made, never the studios */
@media (max-width: 620px) {
  .home-in { padding: 16px 14px 24px; }
  .home-hello, .home-studios { display: none; }
  .home-recent { border-bottom: 0; }
  .home-recent-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-recent-card:nth-child(n + 6) { display: grid; }
  .home-item { display: none !important; }
}

/* ---------- the strip's foot: the account behind its initials ---------- */
.avatar { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-fill); color: #fff; font: 700 var(--t-label)/1 var(--font-ui); }
.avatar:empty::before { content: ""; width: 10px; height: 10px; border: 1.5px solid currentColor; border-radius: 50%; }
.profile-menu { width: 270px; color: var(--ink); }
.side-item[aria-expanded="true"]::after { display: none; }
.profile-menu small { margin-left: auto; color: var(--ink-muted); font-size: var(--t-meta); }
.profile-who { display: grid; gap: 1px; margin: 0 0 4px; padding: 8px 8px 10px; border-bottom: 1px solid var(--line); }
.profile-who b { font-size: var(--t-body); }
.profile-who b:empty, .profile-who span:empty { display: none; }
.profile-who span { overflow: hidden; color: var(--ink-muted); font-size: var(--t-meta); text-overflow: ellipsis; }
#signOut { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 7px 7px; }

/* ---------- Ayarlar → Hesap → Tercihler (js/account.js preferenceRows) ---------- */
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.settings-row b { display: block; font-size: var(--t-body); }
.settings-row span { color: var(--ink-muted); font-size: var(--t-meta); }
.profile-menu a[role="menuitem"]:hover { background: var(--wash-2); }
