/* ================= 랜딩 무대 =================
 *
 * 이 파일이 정하는 것은 **자리**뿐입니다. 색·그림자·글꼴은 한 줄도 여기서 만들지
 * 않고 styles/tokens.css 의 이름만 씁니다. 단어창·시트·문장 창의 생김새도 여기
 * 없습니다 — 그건 앱의 것을 그대로 링크해 씁니다(../styles/dictionary.css ·
 * ../styles/reader.css). 랜딩에서 보는 Breeze 는 진짜 그 Breeze 여야 합니다.
 *
 * ---- 장면은 여섯, 스크롤에 붙어 움직이는 값은 없습니다 ----
 * 무대 하나가 `sticky` 로 제자리에 서 있고, 그 바깥의 빈 레일만 길게 흐릅니다.
 * 스크롤이 하는 일은 `body[data-state]` 를 0→5 로 넘기는 것 하나뿐입니다.
 *
 *   0  한국어 Hero
 *   1  영어 Hero — 여기서부터 단어와 문장을 누를 수 있습니다
 *   2  같은 문장 + 단어 뜻 미니필
 *   3  같은 문장 + 문장 해석이 이미 열려 있는 순간
 *   4  읽고 싶은 걸, 그대로.   — 가져올 수 있는 것들
 *   5  어디서든, 그대로.       — 두 화면에 같은 단어장
 *
 * 2·3 은 시연이 아니라 **끝난 순간**입니다. 커서가 움직이지도, 창이 열리는 것을
 * 보여 주지도 않습니다 — 눌렀다면 보게 될 화면이 그냥 거기 있습니다.
 *
 * Hero의 두 줄은 중앙에 머물고, 단어와 문장 카드는 선택한 문장 곁에 놓입니다.
 */

/* 랜딩의 큰 문구는 홈 상단 워드마크와 같은 UI 글꼴을 씁니다. */

/* ---- 상단 내비게이션 ----
   Breeze 워드마크와 두 시작 경로만 둡니다. CTA 는 둘 다 같은 크기와 대비로
   보이고, 색 차이로 웹 시작과 App Store 를 구분합니다. */
  .lp-nav{position:fixed; inset:0 0 auto; z-index:110; display:flex; align-items:center;
    justify-content:space-between; gap:16px; padding:18px clamp(20px,4vw,56px);
    padding-top:calc(18px + env(safe-area-inset-top));
    background:color-mix(in srgb,var(--paper) 84%,transparent);
    backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);}
  .lp-wordmark{display:flex; align-items:center; gap:10px; color:var(--settings-ink);
    font:700 32px/44px var(--ui); letter-spacing:-.8px; text-decoration:none; white-space:nowrap;}
  .lp-wordmark img{display:block; width:38px; height:38px; flex:none; border-radius:9px;}
  .lp-actions{display:flex; align-items:center; gap:10px;}
  .lp-cta{min-height:44px; display:inline-flex; align-items:center; justify-content:center;
    padding:0 16px; border:1px solid; border-radius:13px;
    font:700 13px/1 var(--ui); text-decoration:none; white-space:nowrap;
    box-shadow:var(--sentence-glass-shadow-pill);
    transition:transform .16s ease,box-shadow .16s ease;}
  .lp-cta:hover{transform:translateY(-2px); box-shadow:var(--sentence-glass-shadow-pill);}
  .lp-cta-web{background:var(--sentence-glass-action); border-color:var(--sentence-glass-line-soft); color:var(--sentence-glass-ink);}
  .lp-cta-store{background:var(--selection-fill); border-color:var(--sentence-glass-line-soft); color:var(--selection-ink);}

/* ---- 레일과 무대 ----
   레일은 그저 스크롤할 거리입니다. 장면 하나에 화면 하나씩. */
  #rail{position:relative; z-index:1; height:600vh; height:600svh;}
  #stage{position:sticky; top:0; height:100vh; height:100svh; overflow:hidden;}

/* ---- 두 줄 ----
   중앙 정렬을 유지해 Hero 문구에 시선을 모읍니다. */
  .lp-slot{position:absolute; left:0; right:0; top:50%; transform:translateY(-50%);
    padding:0 clamp(20px,7vw,96px); text-align:center;
    font-family:var(--ui); font-weight:700;
    font-size:clamp(24px,6.2vw,38px); line-height:1.5; letter-spacing:-.035em;}
  #copy{color:var(--ink); text-shadow:none; transition:opacity .5s ease;}
  .lp-line + .lp-line{margin-top:.15em;}
  /* 첫 줄만 제목입니다. 크기는 옆 줄과 같은 슬롯 글꼴을 그대로 씁니다. */
  h1.lp-line{margin:0;font:inherit;letter-spacing:inherit;}
  /* ---- 상표만 남습니다 ----
     한국어가 영어로 바뀔 때, 앞뒤의 말은 흐려졌다 돌아오고 `Breeze` 는 흐려지지
     않습니다. 줄 안에서 자리가 바뀌는 것만 옛 자리에서부터 조용히 미끄러져
     옵니다 — 그 한 줄은 landing.js 에 있습니다. */
  .lp-a,.lp-b{transition:opacity .32s ease;}
  body.lp-swap .lp-a,body.lp-swap .lp-b{opacity:0;}
  .lp-brand{display:inline-block; transition:transform .5s cubic-bezier(.4,0,.2,1);}

/* ---- 눌리는 문장 ----
   문장 위에서 꾹 누르면 iOS 는 가장 가까운 상자를 통째로 골라 버립니다. 읽는
   화면의 낱말(`.w`)이 이미 같은 이유로 선택을 끄고 있어서, 그 사이의 글자에도
   같은 규칙을 겁니다 — 그러지 않으면 문장을 길게 누를 때마다 파랗게 잡힙니다. */
  .lp-sentence{-webkit-user-select:none; user-select:none; -webkit-touch-callout:none;
    -webkit-tap-highlight-color:transparent; border-radius:6px;
    transition:background .2s ease, box-shadow .2s ease;}
  /* 문장이 파랗게 차오르는 것은 앱과 같은 색입니다(`--cue`). */
  .lp-sentence.cued{background:var(--cue); box-shadow:0 0 0 4px var(--cue);}

/* ---- 조작 힌트 ----
   시선을 끌면 안 되는 한 줄입니다. 영어 문장보다 훨씬 작고 흐리게, 조금 늦게
   옵니다. 깜빡이거나 부풀지 않습니다 — 누르라고 조르는 자리가 아닙니다.
   두 줄 바로 아래에 그냥 놓입니다. 자리를 따로 잡지 않으므로 나타날 때
   아무것도 밀지 않습니다. */
  #hint{margin-top:1.5em; font:500 12px/1.6 var(--ui); color:var(--soft2);
    text-shadow:none; opacity:0; transition:opacity .9s ease; pointer-events:none;}
  #hint.on{opacity:1;}

/* 상세창의 실제 left/top/width/height는 선택한 낱말의 위치에서 계산합니다.
   리더의 미니필 → 상세창 형태 전환과 같은 자리 계산을 landing.js가 맡습니다. */
  #panel.anchored{right:auto; bottom:auto; transform:none;}
  #word-modal-scrim{display:none!important;}

/* The shared Reader stylesheet owns the anchored translation material. */
  #sentence-modal{touch-action:auto;}
  #panel #p-know,#panel #p-speak,#panel #p-mark,#panel .stbtn,
  #panel .saved-sense,#panel #p-alts button{pointer-events:none;}
  #panel #p-know,#panel #p-speak{opacity:1;}
  #panel #p-know,#panel #p-speak,#panel #p-mark,#panel .stbtn,
  #panel .saved-sense,#panel #p-ex-fold summary{cursor:default;}
  #panel.anchored{scrollbar-width:none;}
  #panel.anchored::-webkit-scrollbar{display:none;}
  #panel .inner{padding-bottom:18px;}
  #panel #p-defs div{margin-top:4px;}
  #panel #p-defs .pos{color:var(--sentence-glass-secondary); margin-right:7px;}
  #word-peek{z-index:95;}


/* 넓은 화면에서도 Hero의 두 문장을 한 덩어리로 중앙에 놓습니다. */
  @media (min-width:1000px){
    .lp-slot{width:min(100%,1040px); left:50%; right:auto; transform:translate(-50%,-50%);
      padding:0 clamp(32px,7vw,112px); font-size:clamp(34px,3.4vw,50px);}
    #hint{font-size:12.5px;}
  }

  @media (max-width:520px){
    .lp-nav{gap:7px; padding-left:12px; padding-right:12px;}
    .lp-wordmark{gap:6px; font-size:23px; line-height:34px;}
    .lp-wordmark img{width:28px; height:28px; border-radius:7px;}
    .lp-actions{gap:6px;}
    .lp-cta{min-height:44px; padding:0 9px; font-size:11px; border-radius:12px;}
  }


/* 첫 화면에서만 페이지가 아래로 이어짐을 조용히 알립니다. */
  #scrollcue{position:fixed; left:0; right:0; bottom:0; height:clamp(110px,18svh,170px);
    z-index:95; display:none; align-items:flex-end; justify-content:center;
    padding-bottom:clamp(23px,4svh,40px); pointer-events:none;
    color:var(--soft); font:500 12px/1.4 var(--ui); letter-spacing:.04em; opacity:0;}
  #scrollcue::before{content:""; position:absolute; inset:0;
    background:linear-gradient(to top,color-mix(in srgb,var(--brand) 9%,transparent),transparent 82%);}
  #scrollcue span{position:relative; z-index:1;}
  body[data-state="0"] #scrollcue{display:flex; animation:lp-hero-cue .9s ease .4s both;}
  @keyframes lp-hero-cue{from{opacity:0} to{opacity:1}}

/* ================= 셋째·넷째 장면 =================
   무대는 그대로 하나입니다. 두 장면도 같은 sticky 무대 안에서 열리고, 큰 한 줄은
   앞선 네 장면과 같은 자리(`.lp-slot`)에 앉습니다. 바뀌는 것은 그 옆(넓은 화면)
   또는 그 아래(좁은 화면)에 무엇이 서 있는가뿐입니다. */
  .lp-scene{position:absolute; inset:0; opacity:0; pointer-events:none;
    transition:opacity .7s ease;}
  body[data-state="4"] #scene3,
  body[data-state="5"] #scene4{opacity:1;}
  /* 두 줄은 제 할 말을 끝냈습니다. 자리를 비우되 옮기지는 않습니다. */
  body[data-state="4"] #copy,
  body[data-state="5"] #copy{opacity:0; pointer-events:none;}
  .lp-head{color:var(--ink); word-break:keep-all;}
  .lp-subcopy{position:absolute; left:0; right:0; top:calc(50% + 35px);
    margin:0; padding:0 clamp(20px,7vw,96px); text-align:center;
    color:var(--soft); font:500 clamp(13px,1.2vw,16px)/1.6 var(--ui); word-break:keep-all;}
  /* 넓은 화면에서 큰 한 줄은 왼쪽 절반을 다 쓰지 않습니다 — 오른쪽에 설 것이
     첫 두 장면의 단어창(340px)보다 넓기 때문입니다. 왼쪽 끝은 두 줄과 같은
     자리에 그대로 두고 폭만 줄입니다. */
  @media (min-width:1000px){
    .lp-head{left:0; right:auto; width:40vw; transform:translateY(-50%); padding:0 clamp(20px,4vw,56px);}
    .lp-subcopy{left:0; right:auto; width:40vw; top:calc(50% + 42px); padding:0 clamp(20px,4vw,56px);}
  }

/* ---- 셋째 장면: 글과 책이 한 줄로 천천히 흐릅니다 ---- */
  .lp-shelf{position:absolute; left:0; right:0; top:26svh; bottom:14svh;
    overflow:hidden; pointer-events:none;
    mask-image:linear-gradient(to right,transparent,#000 7%,#000 93%,transparent);}
  .lp-carousel-track{display:flex; align-items:center; width:max-content; height:100%;}
  .lp-carousel-track.ready{animation:lp-carousel 30s linear infinite;}
  .lp-carousel-set{display:flex; align-items:center; gap:16px; height:100%; padding-right:16px;}
  @keyframes lp-carousel{to{transform:translateX(-50%);}}
  .lp-card{flex:none; margin:0!important; transform:none!important;}
  .lp-shelf .bookcard{width:190px; height:238px; padding:20px 20px 0;}
  .lp-shelf .bookcard .bt{font-size:18px;}
  .lp-shelf .casual{width:150px; height:238px; border-radius:15px; overflow:hidden;}
  .lp-shelf .casual .thumb{height:100%; aspect-ratio:auto; box-sizing:border-box; border-radius:inherit;}
  .lp-shelf .casual::after{content:""; position:absolute; inset:45% 0 0;
    background:linear-gradient(transparent,rgba(0,0,0,.62)); pointer-events:none;}
  .lp-shelf .casual .ct{position:absolute; z-index:1; left:14px; right:14px; bottom:25px;
    margin:0; color:#fff; text-shadow:0 1px 5px rgba(0,0,0,.4);}
  .lp-shelf .casual .cm{position:absolute; z-index:1; left:14px; bottom:10px;
    margin:0; color:rgba(255,255,255,.88);}
  .lp-card-b{box-shadow:var(--shadow);}
  /* 앱이 파일을 받는 자리에 적어 둔 그 한 줄입니다. 조작 힌트와 같은 세기 —
     카드가 이미 말한 것을 확인해 줄 뿐이라 더 클 이유가 없습니다. */
  .lp-note{position:absolute; left:0; right:0; bottom:7svh; text-align:center;
    font:600 12px/1.6 var(--ui); letter-spacing:.14em; color:var(--soft2);}
  @media (min-width:1000px){
    /* 넓은 화면에서는 단어창이 서던 그 오른쪽에 섭니다. 왼쪽 끝은 큰 한 줄이
       끝나는 자리보다 뒤이고, 오른쪽 끝은 단어창과 같은 여백입니다. */
    .lp-shelf{left:clamp(410px,41vw,780px); right:clamp(20px,5vw,64px); top:0; bottom:0;}
    .lp-note{left:clamp(410px,41vw,780px); right:clamp(20px,5vw,64px); bottom:11svh;}
  }
  @media (max-width:420px){
    .lp-shelf .bookcard{width:clamp(108px,35vw,146px); height:186px; padding:16px 13px 0;}
    .lp-shelf .bookcard .bt{font-size:clamp(13px,4vw,16.5px);}
    .lp-shelf .casual{width:clamp(95px,30vw,136px); height:186px;}
    .lp-carousel-set{gap:10px; padding-right:10px;}
  }

/* Production Memory screenshots in the original two-device composition. */
  .lp-devices{position:absolute; left:0; right:0; top:21svh;
    display:flex; flex-direction:column; align-items:center; gap:16px; pointer-events:none;}
  .lp-device{display:flex; flex-direction:column; align-items:center; max-width:100%;}
  .lp-glass{background:var(--home-background); border:1px solid var(--sentence-glass-line-soft);
    box-shadow:var(--shadow-card); overflow:hidden; padding:0;}
  .lp-glass picture,.lp-glass img{display:block; width:100%; height:auto;}
  .lp-mac .lp-glass{width:min(360px,86vw); aspect-ratio:16/10; border-radius:9px;}
  .lp-foot{width:114%; height:6px; border-radius:0 0 6px 6px; background:var(--line2); opacity:.85;}
  .lp-phone .lp-glass{width:min(252px,68vw); border-radius:22px;}
  .lp-support-link{letter-spacing:0; min-height:44px; display:flex; justify-content:center; align-items:center;}
  body[data-state="5"] .lp-support-link{pointer-events:auto;}
  @media (min-width:1000px){
    .lp-devices{left:41vw; right:clamp(20px,4vw,56px); top:80px; bottom:100px; justify-content:center;}
    #scene4 .lp-note{left:41vw; right:clamp(20px,4vw,56px); bottom:4svh;}
  }
  @media (min-width:1280px){
    .lp-devices{flex-direction:row; gap:clamp(18px,2vw,32px);}
    .lp-mac .lp-glass{width:clamp(300px,23vw,360px);}
    .lp-phone .lp-glass{width:clamp(220px,17vw,252px);}
  }

  /* 좁은 화면에서는 제목, 카드와 두 기기를 화면 높이에 맞춰 순서대로 놓습니다. */
  @media (max-width:999px){
    #scene3 .lp-head,#scene4 .lp-head{top:clamp(108px,19svh,165px); transform:none;}
    #scene3 .lp-subcopy{top:clamp(150px,19svh + 45px,210px);}
    #scene3 .lp-shelf{top:clamp(215px,35svh,290px); bottom:clamp(58px,10svh,90px);}
    #scene3 .lp-note{bottom:clamp(24px,5svh,42px);}
    #scene4 .lp-subcopy{top:clamp(150px,19svh + 45px,210px);}
    #scene4 .lp-devices{top:clamp(215px,35svh,290px); gap:12px; bottom:74px; justify-content:center;}
    #scene4 .lp-mac .lp-glass{width:min(330px,22svh,calc(100vw - 40px));}
    #scene4 .lp-phone .lp-glass{width:min(220px,22svh,62vw);}
    #scene4 .lp-note{bottom:12px;}

  }

/* 움직임을 줄여 달라고 설정한 사람에게는 장면이 그냥 바뀝니다. */
  @media (prefers-reduced-motion:reduce){
    .lp-carousel-track.ready{animation:none!important;}
    #copy,.lp-a,.lp-b,.lp-brand,.lp-sentence,#hint,.lp-scene{transition:none!important;}
    /* 움직이는 것들은 전부 끄고, 말하려던 것만 남깁니다 — 아래로 이어진다는
       표시는 제자리에 서 있고, 넷째 장면의 두 단어장은 처음부터 같습니다. */
    #scrollcue{animation:none!important; opacity:.78;}

  }

.dictionary-credit{position:relative;padding:24px;text-align:center;font:11px/1.5 var(--ui);color:var(--soft);}
.dictionary-credit a{color:inherit;}

/* Native Reader tokens supply the UI, while the landing keeps its paper stage. */
.lp-demo-note{color:var(--sentence-glass-muted);font:400 11px/1.5 var(--ui);margin:12px 0;}
.lp-cta:focus-visible,.lp-sentence .w:focus-visible{outline:2px solid var(--sentence-glass-muted);outline-offset:3px;}

@media(max-width:359px){.lp-wordmark{font-size:21px;gap:5px;}.lp-wordmark img{width:26px;height:26px;}.lp-cta{padding:0 7px;font-size:10.5px;}.lp-actions{gap:5px;}}

/* Compact truthful support copy lives after the six-scene rail. */
.lp-support{position:relative; max-width:760px; margin:0 auto; padding:40px 24px 12px;
  scroll-margin-top:96px; color:var(--settings-ink); font:400 14px/1.8 var(--ui); word-break:keep-all;}
.lp-support h2{margin:0 0 16px; font:700 22px/1.5 var(--ui);}
.lp-support p{margin:12px 0;}
.lp-support a{color:inherit; text-underline-offset:3px;}
.lp-support-link:focus-visible,.lp-support a:focus-visible{outline:2px solid var(--sentence-glass-muted);outline-offset:3px;}
@media(max-height:500px) and (min-width:600px){
  #scene3 .lp-head,#scene4 .lp-head{left:0;right:auto;top:45%;width:40vw;transform:translateY(-50%);padding:0 20px;font-size:28px;}
  #scene3 .lp-subcopy,#scene4 .lp-subcopy{left:0;right:auto;top:calc(45% + 35px);width:40vw;padding:0 20px;font-size:12px;}
  #scene3 .lp-shelf{left:43vw;right:12px;top:100px;bottom:58px;}
  #scene3 .lp-note,#scene4 .lp-note{left:43vw;right:12px;bottom:8px;}
  #scene4 .lp-devices{left:43vw;right:12px;top:100px;bottom:58px;flex-direction:row;gap:16px;}
  #scene4 .lp-mac .lp-glass{width:min(27vw,230px);}
  #scene4 .lp-phone .lp-glass{width:120px;}
  .lp-shelf .bookcard,.lp-shelf .casual{height:170px;}
}
@media(max-height:600px) and (max-width:599px){
  #scene3 .lp-head,#scene4 .lp-head{top:94px;font-size:22px;}
  #scene3 .lp-subcopy,#scene4 .lp-subcopy{top:130px;font-size:12px;}
  #scene3 .lp-shelf{top:185px;bottom:60px;}
  #scene4 .lp-devices{top:185px;bottom:74px;}
  #scene4 .lp-mac{display:none;}
  #scene4 .lp-phone .lp-glass{width:min(62vw,calc((100svh - 260px)*390/720));}
}
