/* 첫 화면 머리 칸(작업 R 104번): 작업 G 230번 나 판(앱 #1025 84e7f0a7, docs/handover/전달/작업G_228/proto/g228.css)을 사이트에 옮김
   사용자 11/14 16:06 '첫 화면 잘 바꿨어. 전보다 훨씬 좋다 … 일단 지금 올려 이걸로'. 한 화면(스크롤 없이): 휴대폰 맨 위 · 까망 로고와 한 줄 · 고를 것 네 칸 · 큰 단추
   G 시제품의 html 단위 결(:root 변수 · html.v-b · html.g-fold)을 이 칸(.gh) 안으로 좁혔다. 머리 줄은 사이트 것(.top)을 그대로 두고, 밝은 바탕에서만 글 빛깔을 바꾼다 */
.gh {
  --gh-bg: #F6F5FB; --gh-ink: #15161D; --gh-ink-2: #4A4E5A;
  --gh-card: rgba(255, 255, 255, .74); --gh-card-line: rgba(255, 255, 255, .95); --gh-card-sh: 0 1px 2px rgba(20, 18, 60, .04), 0 10px 30px -12px rgba(60, 40, 160, .18);
  --gh-accent: #4F46E5; --gh-accent-2: #7C3AED; --gh-accent-soft: #EEEBFF; --gh-on-accent: rgb(255, 255, 255);
  --gh-go-1: #4F46E5; --gh-go-2: #7C3AED;   /* 큰 단추 · 고른 칸 아이콘 바탕: 밝게 · 어둡게 같은 값(어두운 바탕의 밝은 보라는 흰 글자 대비가 4.5:1에 못 미쳐서) */
  --gh-sky-1: rgba(255, 255, 255, .95); --gh-sky-2: rgba(167, 139, 250, .30); --gh-sky-3: rgba(96, 165, 250, .22);
  --gh-bezel: #17181F; --gh-bezel-line: rgba(255, 255, 255, .10);
  --gh-glow: radial-gradient(closest-side, rgba(124, 92, 255, .30), rgba(124, 92, 255, 0));
  --gh-top: calc(64px + env(safe-area-inset-top));   /* 사이트 머리 줄(.top, 첫 화면에서는 위에 얹힘) 높이 */
}
@media (prefers-color-scheme: dark) {
  .gh { --gh-bg: #0B0C16; --gh-ink: #ECEDF5; --gh-ink-2: #C3C6D3;
    --gh-card: rgba(255, 255, 255, .07); --gh-card-line: rgba(255, 255, 255, .12); --gh-card-sh: 0 10px 30px -14px rgba(0, 0, 0, .7);
    --gh-accent: #7C6CFF; --gh-accent-2: #A78BFA; --gh-accent-soft: rgba(124, 108, 255, .16);
    --gh-sky-1: rgba(99, 72, 255, .30); --gh-sky-2: rgba(56, 120, 255, .22); --gh-sky-3: rgba(167, 139, 250, .18);
    --gh-bezel: #05060B; --gh-bezel-line: rgba(255, 255, 255, .14); --gh-glow: radial-gradient(closest-side, rgba(124, 92, 255, .45), rgba(124, 92, 255, 0)); }
}
/* 사이트 .hero(어두운 띠 · 흰 글 · 결 무늬 · 위 여백)를 이 칸에서는 풀고 G 바탕으로 */
.hero.gh { padding: 0; color: var(--gh-ink); background: var(--gh-bg); text-align: center; word-break: keep-all; }
.hero.gh::after { content: none; }
.gh img { display: block; }
.gh .gh-d { display: none; }
@media (prefers-color-scheme: dark) { .gh .gh-d { display: block; } .gh .gh-l { display: none; } }

/* 바탕 빛: 흰 빛(밝게) · 보라 빛(어둡게) 덩이가 아주 천천히 흐름 */
.gh-sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.gh-sky i { position: absolute; border-radius: 50%; filter: blur(60px); }
.gh-sky .s1 { width: 90vmax; height: 70vmax; left: 50%; top: -30vmax; transform: translateX(-50%); background: radial-gradient(closest-side, var(--gh-sky-1), transparent); }
.gh-sky .s2 { width: 60vmax; height: 60vmax; left: -20vmax; top: 20vh; background: radial-gradient(closest-side, var(--gh-sky-2), transparent); animation: ghDrift 18s ease-in-out infinite alternate; }
.gh-sky .s3 { width: 60vmax; height: 60vmax; right: -24vmax; top: 45vh; background: radial-gradient(closest-side, var(--gh-sky-3), transparent); animation: ghDrift 22s ease-in-out infinite alternate-reverse; }
@keyframes ghDrift { to { transform: translate(6vmax, -4vmax); } }

/* 무대: 머리 줄 아래 한 화면. 휴대폰은 남는 높이를 채움(폭은 휴대폰 비율로) */
.gh-stage { position: relative; z-index: 1; width: 100%; height: 100vh; height: 100svh; min-height: 560px; display: grid; grid-template-rows: minmax(0, 1fr) auto auto; row-gap: 12px; justify-items: center; padding: calc(var(--gh-top) + 6px) 16px 14px; }
.gh-phone-wrap { position: relative; height: 100%; min-height: 0; aspect-ratio: 390 / 844; max-width: 92vw; }
.gh-glow { position: absolute; left: 50%; top: 46%; width: 190%; aspect-ratio: 1; transform: translate(-50%, -50%); background: var(--gh-glow); pointer-events: none; }
.gh-phone { position: relative; margin: 0; height: 100%; aspect-ratio: 390 / 844; max-width: 100%; border-radius: 13% / 6%; padding: 3.2%; background: var(--gh-bezel); box-shadow: inset 0 0 0 1px var(--gh-bezel-line), 0 30px 60px -24px rgba(30, 20, 90, .55), 0 6px 18px -8px rgba(0, 0, 0, .35); transform-origin: 50% 50%; }
.gh-notch { position: absolute; z-index: 3; left: 50%; top: 2.4%; width: 30%; height: 3.4%; transform: translateX(-50%); border-radius: 999px; background: var(--gh-bezel); }
.gh-screen { position: relative; width: 100%; height: 100%; border-radius: 10.5% / 4.9%; overflow: hidden; background: #000; clip-path: inset(0 round 10.5% / 4.9%); isolation: isolate; }   /* 230번: 바뀔 때 네모 모서리가 비치지 않게 */
.gh-shot, .gh-shot img { position: absolute; inset: 0; width: 100%; height: 100%; }
.gh-shot img { object-fit: cover; object-position: top; }
.gh-shot { opacity: 0; transform: translateY(2%); transition: opacity .38s ease, transform .38s ease; }
.gh-shot.on { opacity: 1; transform: none; }

/* 까망 로고와 '수능 사회·문화의 모든 것'을 같은 높이로 한 줄 */
.gh-intro { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.gh .gh-word { margin: 0; display: flex; justify-content: center; }
.gh .gh-mk { display: flex; font-size: inherit; gap: 0; }
.gh .gh-word img { height: 28px; width: auto; }
.gh-kicker { margin: 0; color: var(--gh-ink); font-size: 1.12rem; font-weight: 800; letter-spacing: -0.01em; line-height: 28px; white-space: nowrap; }

/* 고를 것 네 칸 한 줄(그림 위 · 이름 아래) · 큰 단추 */
.gh-pick { display: grid; justify-items: center; gap: 10px; width: 100%; max-width: 440px; }
.gh-picks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; }
.gh-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; padding: 8px 4px; border: 0; border-radius: 14px; font: inherit; color: var(--gh-ink); cursor: pointer;
  background: var(--gh-card); box-shadow: inset 0 0 0 1px var(--gh-card-line), var(--gh-card-sh); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); -webkit-tap-highlight-color: transparent;
  transition: transform .5s cubic-bezier(.2, .9, .25, 1.15), opacity .35s ease, box-shadow .2s ease; }
.gh-chip .ic { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--gh-accent); background: var(--gh-accent-soft); }
.gh-chip svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gh-chip b { font-size: .82rem; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.gh-chip[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--gh-accent), var(--gh-card-sh); }
.gh-chip[aria-pressed="true"] .ic { color: var(--gh-on-accent); background: linear-gradient(135deg, var(--gh-go-1), var(--gh-go-2)); }
.gh-chip:focus-visible, .gh-go:focus-visible { outline: 2px solid var(--gh-accent); outline-offset: 3px; }
.hero.gh .gh-go { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 220px; min-height: 46px; margin: 0; padding: 0 20px 0 24px; border: 0; border-radius: 14px; font-size: .98rem; font-weight: 800; color: var(--gh-on-accent); text-decoration: none; white-space: nowrap;
  background: linear-gradient(135deg, var(--gh-go-1), var(--gh-go-2)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 12px 26px -12px rgba(79, 70, 229, .7); transition: opacity .5s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.gh-go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .gh-chip:hover { transform: translateY(-2px); } .hero.gh .gh-go:hover { filter: brightness(1.06); } }

/* 펼치기 전: 모여 작게 숨음(차르르륵, js/home-gh.js가 .gh-fold를 붙였다 뗌) */
.gh-fold .gh-chip { opacity: 0; transform: translate(var(--fx, 0), var(--fy, 30px)) scale(.6); }
.hero.gh.gh-fold .gh-go { opacity: 0; transform: translateY(10px); }
.gh-fold .gh-intro > * { opacity: 0; transform: translateY(10px); }
.gh-fold .gh-phone-wrap { opacity: 0; transform: translateY(24px) scale(.97); }
.gh-intro > *, .gh-phone-wrap { transition: opacity .6s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }

/* 사이트 머리 줄: 첫 화면에서는 이 칸 위에 얹힘. 밝은 바탕이면 글 · 로고를 진하게(어두운 바탕은 사이트 그대로) */
@media not all and (prefers-color-scheme: dark) {
  .pg-home:has(.gh) .top-nav a { color: #4A4E5A; }
  .pg-home:has(.gh) .top-nav .top-cta { color: #15161D; background: rgba(255, 255, 255, .74); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .95), 0 1px 2px rgba(20, 18, 60, .04), 0 10px 30px -12px rgba(60, 40, 160, .18); }
  .pg-home:has(.gh) .top-nav a:focus-visible { color: #15161D; background: rgba(79, 70, 229, .08); }
  .pg-home:has(.gh) .mk-top-user { background: url(/brand/logo-user/mark-light-h144.png) center / contain no-repeat; }
  .pg-home:has(.gh) .mk-top-user img { opacity: 0; }
}

/* 넓은 화면: 같은 짜임에 여백만 넓게 */
@media (min-width: 900px) {
  .gh .gh-word img { height: 34px; }
  .gh-kicker { font-size: 1.36rem; line-height: 34px; }
  .gh-chip { min-height: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .gh-sky i { animation: none; }
  .gh-chip, .gh-intro > *, .gh-phone-wrap, .hero.gh .gh-go, .gh-shot { transition: none; }
}
