/* FARFOLD home (templates/home.html), TASK-155 v9 (docs/design/home-v9-2026-11-14/design-spec.md): hero film → loop → 지금 열어 볼 수
   있는 것 → 시스템 조립 → 검증 기록 한 줄 → FAQ → scope line. Layout only; colours, type and spacing come from
   farfold.css / site-kit tokens. */

/* H1 (TASK-147): a full-width dark film band in both themes — the CEO's instrument film (js/home-hero.js plays it once)
   with the copy on its left over a scrim. The band re-points the kit variables at band-local colours taken from tokens:
   light theme uses its darkest ink as the ground and white text; black theme uses its own ground and text.
   Scrim: a layer of the solid ground token at opacity .88 behind every line of copy (x <= --film-copy-edge), fading out over
   the instrument (no color-mix, so no fallback is needed). Small text on 88% ground over a white pixel stays >= 4.5:1. 1023px and below: the poster above, copy below. */
body[data-page="home"] .home-film {
  --film-ground:var(--color-text-primary); --film-ink:var(--color-surface); --film-copy:var(--color-primary-soft); --film-rule:var(--color-text-muted);
  --kit-ink:var(--film-ink); --kit-paper:var(--film-ground); --kit-copy:var(--film-copy); --kit-rule:var(--film-rule); --kit-rule-strong:var(--film-copy); --kit-accent:var(--film-ink);
  --film-copy-edge:calc(max(var(--kit-gutter), (100% - 1280px) / 2) + min(560px, 52%));
  position:relative;display:block;padding:0;overflow:hidden;background:var(--film-ground);color:var(--film-ink)
}
[data-theme="black"] body[data-page="home"] .home-film {--film-ground:var(--color-bg); --film-ink:var(--color-text-primary); --film-copy:var(--color-text-secondary); --film-rule:var(--color-border-strong)}
.home-film-media {position:absolute;inset:0;z-index:0}
.home-film-media img,.home-film-video {display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:0% 50%}
.home-film-media::after {content:"";position:absolute;inset:0;
  background:linear-gradient(90deg, var(--film-ground) var(--film-copy-edge), transparent calc(var(--film-copy-edge) + 420px));opacity:.88}
.home-film-inner {position:relative;z-index:1;display:flex;align-items:center;min-height:clamp(520px, calc(100vw / 2.4), 720px);padding-block:var(--space-12)}
body[data-page="home"] .home-film .hero-copy {max-width:min(560px, 52%)}
body[data-page="home"] .home-film h1 {font-size:clamp(40px, 3.4vw, 54px);margin:0 0 var(--space-5);color:var(--film-ink);text-wrap:balance;word-break:keep-all}
body[data-page="home"] .hero-sub {font-weight:400;color:var(--film-copy);word-break:keep-all}
/* TASK-157 brand line (copy deck v9b ①): the statement above the H1, read first; type and a thin rule only, no pill */
body[data-page="home"] .home-brand {display:flex;align-items:center;gap:var(--space-3);margin:0 0 var(--space-6);font-size:13px;line-height:1.3;font-weight:600;letter-spacing:0;color:var(--film-ink);word-break:keep-all}
body[data-page="home"] .home-brand::before {content:"";flex:none;width:22px;height:2px;background:var(--film-ink)}
body[data-page="home"] .hero-copy .actions {align-items:center;gap:var(--space-6);margin-top:var(--space-6)}
body[data-page="home"] .home-film .button.primary:hover {background:var(--film-copy);border-color:var(--film-copy)}
body[data-page="home"] .hero-foot {margin-top:var(--space-8)!important}
/* poster only (same query as home-hero.js): no clip */
@media (prefers-reduced-motion: reduce), (max-width: 1023px) {.home-film-video {display:none}}
@media (max-width: 1023px) {
  .home-film-media {position:relative;inset:auto;aspect-ratio:2/1}
  .home-film-media img {object-position:50% 50%}
  .home-film-media::after {background:linear-gradient(180deg, transparent 55%, var(--film-ground) 100%);opacity:1}
  .home-film-inner {min-height:0;padding-block:var(--space-2) var(--space-10)}
  body[data-page="home"] .home-film .hero-copy {max-width:720px}
  body[data-page="home"] .home-film h1 {font-size:42px}
}
@media (max-width: 600px) {
  .home-film-media {aspect-ratio:16/9}
  body[data-page="home"] .home-film h1 {font-size:30px;line-height:1.3;margin-bottom:var(--space-3)}
  body[data-page="home"] .home-brand {font-size:12px;margin-bottom:var(--space-4)}
  body[data-page="home"] .home-brand::before {width:var(--space-6)}
  body[data-page="home"] .hero-copy .actions {flex-wrap:wrap;gap:var(--space-2) var(--space-5)}
  body[data-page="home"] .hero-foot {margin-top:var(--space-6)!important}
}

body[data-page="home"] .section h2 {margin:0 0 var(--space-6)}

/* TASK-155 home v9 (Codex mockup docs/design/home-v9-2026-11-14/mockup.html, home-v9-* rules ported; tokens only).
   Impact by type (CEO 2026-11-14): big step numbers, "손에 남는 것" in a strong weight, at most two mark.key phrases
   (notes-emphasis.css draws them). Motion: link underline only, --motion-dur-micro; none under reduced motion. */
body[data-page="home"] .home-v9-section h2 {font-size:32px;line-height:1.4;font-weight:600;margin:0 0 var(--space-4)}
.home-v9-lead {max-width:760px;margin:0 0 var(--space-8);color:var(--kit-copy);word-break:keep-all}
.home-v9-link {display:inline-block;padding-block:var(--space-3);color:inherit;font-weight:500;text-decoration:underline;
  text-decoration-thickness:1px;text-underline-offset:var(--space-1);transition:text-decoration-thickness var(--motion-dur-micro) var(--motion-ease-move)}
.home-v9-link:hover {text-decoration-thickness:2px}
.home-v9-code {font-family:var(--font-num);font-variant-numeric:tabular-nums;margin-right:var(--space-2);color:var(--kit-copy)}
.home-v9-next {margin:var(--space-2) 0 0;color:var(--kit-copy);word-break:keep-all}

/* loop: three columns, a rule on top, the number large */
.home-v9-loop {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-8);margin:0;padding:0;list-style:none}
.home-v9-loop > li {min-width:0;padding-top:var(--space-6);border-top:2px solid var(--kit-ink)}
/* TASK-169: the process loop has four steps; explore cards sit two by two (both fall back to one column with the rules below) */
@media (min-width:1024px){ #loop .home-v9-loop {grid-template-columns:repeat(4,minmax(0,1fr))} }
.home-explore {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:var(--space-8);margin-top:var(--space-6)}
.home-explore h3 {margin:var(--space-1) 0 var(--space-2);font-size:20px;line-height:1.4;word-break:keep-all}
@media (max-width:1023px){ .home-explore {grid-template-columns:minmax(0,1fr)} }
.ff-site .home-v9-step {display:flex;align-items:baseline;gap:var(--space-4);margin:0 0 var(--space-4);font-size:20px;line-height:1.4;font-weight:600}
.home-v9-number {font-family:var(--font-num);font-variant-numeric:tabular-nums;font-size:48px;line-height:1;font-weight:600;letter-spacing:-.02em;color:var(--kit-ink)}
.home-v9-description {margin:0 0 var(--space-6);color:var(--kit-copy);word-break:keep-all}
.home-v9-keep {margin:0 0 var(--space-2)}
.home-v9-keep dt {font-size:13px;color:var(--kit-copy)}
.home-v9-keep dd {margin:var(--space-1) 0 0;font-size:20px;line-height:1.4;font-weight:700;color:var(--kit-ink);word-break:keep-all}
.home-v9-eg {margin:var(--space-2) 0 0}
.home-v9-eg-label {margin-right:var(--space-2);font-size:13px;color:var(--kit-copy)}

/* open now: course 7 + tools 5, then the series 6 + 6 */
.home-v9-inventory {border-block:1px solid var(--kit-rule);background:var(--color-surface-elevated)}
.home-v9-roadmap {margin:var(--space-8) 0 0}


/* assembly: five equal cells; the step name and its output lead, the still (in its own colours, TASK-157) is a small aside */
.home-v9-assembly {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:var(--space-6);margin:0;padding:0;list-style:none}
.home-v9-cell {min-width:0;padding-top:var(--space-4);border-top:1px solid var(--kit-rule-strong)}
.home-v9-cell > .cover {margin:0 0 var(--space-4)}
.home-v9-cell > .cover img {border-radius:var(--radius-md)}
/* builder clips play by themselves (CEO 2026-11-22); box and reduced-motion still come from site-kit.css .cover--video */
.home-v9-thumb {display:block;width:100%}
.home-v9-thumb video {border-radius:var(--radius-md)}
.ff-site .home-v9-cell h3 {display:flex;align-items:baseline;gap:var(--space-2);margin:0;font-size:20px;line-height:1.4;font-weight:600;word-break:keep-all}
.home-v9-cell .home-v9-number {font-size:28px}
.home-v9-output {margin:var(--space-2) 0 0;font-weight:700;color:var(--kit-ink);word-break:keep-all}
.home-v9-end {max-width:70ch;margin:var(--space-8) 0 0;color:var(--kit-copy);word-break:keep-all}

/* record line */
.home-v9-band {padding-block:var(--space-6);border-block:1px solid var(--kit-rule-strong)}
.home-v9-band-row {display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--space-2) var(--space-6)}
.home-v9-band-row p {flex:1 1 48ch;margin:0;word-break:keep-all}

/* FAQ: title 1 : questions 2 */
.home-v9-faq-grid {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:var(--space-8)}
.home-v9-question {border-top:1px solid var(--kit-rule)}
.home-v9-question summary {padding-block:var(--space-4);cursor:pointer}
.ff-site .home-v9-question h3 {display:inline;font-size:20px;line-height:1.4}
.home-v9-question p {max-width:65ch;margin:0 0 var(--space-6);color:var(--kit-copy);word-break:keep-all}

@media (prefers-reduced-motion: reduce) {.home-v9-link {transition:none}}
@media (max-width: 1023px) {
  body[data-page="home"] .home-v9-section h2 {font-size:24px}
  .home-v9-loop {grid-template-columns:minmax(0,1fr);gap:var(--space-6)}
  .home-v9-loop > li {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);column-gap:var(--space-6)}
  .home-v9-loop .home-v9-step {grid-column:1;grid-row:1 / 4}
  .home-v9-loop > li > :not(.home-v9-step) {grid-column:2}
  .home-v9-assembly {grid-template-columns:minmax(0,1fr)}
  .home-v9-cell {display:grid;grid-template-columns:128px minmax(0,1fr);gap:var(--space-6);align-items:start}
  .home-v9-cell > .cover {margin:0}
  .home-v9-faq-grid {grid-template-columns:minmax(0,1fr);gap:var(--space-6)}
}
@media (max-width: 600px) {
  .home-v9-loop > li {display:block}
  .home-v9-number {font-size:40px}
  .home-v9-cell {grid-template-columns:96px minmax(0,1fr);gap:var(--space-4)}
  .ff-site .home-v9-cell h3,.ff-site .home-v9-question h3 {font-size:16px}
  .home-v9-cell .home-v9-number {font-size:22px}
}

/* the scope line (TASK-154) */
.home-scope {margin-top:var(--space-6);max-width:760px;line-height:1.7;word-break:keep-all}
.home-scope-wrap {padding-block:0 var(--space-10)}
.home-scope-wrap .home-scope {margin:0;font-size:14px;color:var(--kit-copy)}

/* CEO 2026-11-29 questions section: numbered kicker, question, one line, link at the bottom */
body[data-page="home"] .home-questions-lead { max-width:640px; margin-top:var(--space-3); color:var(--color-text-secondary); }
body[data-page="home"] .home-questions .ff-guides-card { display:flex; flex-direction:column; }
body[data-page="home"] .home-questions .ff-guides-card .text-link { margin-top:auto; padding-top:var(--space-3); font-weight:600; }
body[data-page="home"] .home-q-no { margin-right:8px; color:var(--color-primary); font-weight:700; }
body[data-page="home"] .home-questions-close { margin-top:var(--space-8); font-size:17px; line-height:1.7; }
/* CEO 2026-12-02 "너비를 초기화면 크기에 맞추고", then "상단 메뉴바 배경은 그대로 유지": from 1024px the film fills the rest of
   the first screen below the plain menu bar. --nav-h is the bar's measured height from home-hero.js (81px fallback). */
@media (min-width: 1024px) {
  .home-film-inner { min-height:calc(100vh - var(--nav-h, 81px)); min-height:calc(100svh - var(--nav-h, 81px)) }
}

/* CEO 2026-12-05 "여기 디자인 개선": questions as a 2×2 grid of padded cards — big number, kicker, question, one line, link at the foot */
body[data-page="home"] .home-questions-lead { margin-bottom:var(--space-8); }
body[data-page="home"] .home-questions { gap:var(--space-4); margin-top:0; }
body[data-page="home"] .home-questions .ff-guides-card { position:relative; gap:var(--space-2); min-height:232px; padding:var(--space-6) var(--space-6) var(--space-5);
  border:1px solid var(--color-border-strong); border-radius:var(--radius-md); background:var(--color-surface);
  transition:border-color var(--motion-dur-micro) var(--motion-ease-move), transform var(--motion-dur-micro) var(--motion-ease-move); }
body[data-page="home"] .home-questions .ff-guides-card:hover { border-color:var(--color-primary); transform:translateY(-2px); }
body[data-page="home"] .home-questions .ff-guides-kicker { display:flex; align-items:baseline; gap:var(--space-3); margin:0; font-size:12px; color:var(--color-text-secondary); }
body[data-page="home"] .home-q-no { font-size:32px; line-height:1; font-weight:800; letter-spacing:0; color:var(--color-primary); font-variant-numeric:tabular-nums; }
body[data-page="home"] .home-questions h3 { margin:var(--space-3) 0 0; font-size:21px; line-height:1.45; }
body[data-page="home"] .home-questions .small { font-size:14.5px; line-height:1.65; }
body[data-page="home"] .home-questions .ff-guides-card .text-link { align-self:flex-start; }
body[data-page="home"] .home-questions .ff-guides-card .text-link::after { content:""; position:absolute; inset:0; border-radius:inherit; } /* whole card clickable */
body[data-page="home"] .home-questions-close { display:block;
  margin-top:var(--space-8); padding:var(--space-5) var(--space-6); border-left:3px solid var(--color-primary); background:var(--color-surface); border-radius:var(--radius-sm); }
@media (prefers-reduced-motion: reduce) { body[data-page="home"] .home-questions .ff-guides-card:hover { transform:none; } }
@media (max-width:640px) { body[data-page="home"] .home-questions .ff-guides-card { min-height:0; padding:var(--space-5); } body[data-page="home"] .home-q-no { font-size:26px; } }
