/* Bydrive guide page (index.html, en/): Bycam's guide page (public/bycam/style.css, itself Byscreen's), unchanged in form.
   The privacy page keeps style.css (Byphoto's), which this file would break. Black
   ground, white type set large, one photographed scene per idea (the real screens composited in), then the practical
   part (steps, price, help) as type on black. Portrait scenes (the store's phone pictures): on a wide screen each sits
   beside its line, sides alternating; on a phone the line comes first and the photo under it. */

:root {
  color-scheme: dark;
  --bg: #000;
  --fg: #F5F5F7;
  --sub: #A1A1A6;
  --dim: #86868B;
  --line: rgba(255, 255, 255, .14);
  --raise: #161617;
  --blue: #0072DE;
  --blue-hover: #1580E4;
  --link: #3D9BFF;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --wide: 1200px;
  --text: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 17px/1.6 "Pretendard Variable", Pretendard, system-ui, sans-serif;
  word-break: keep-all; overflow-wrap: break-word; -webkit-font-smoothing: antialiased;
}
::selection { background: var(--blue); color: #fff; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.icon { width: 18px; height: 18px; flex: none; fill: currentColor; }
html { scrollbar-color: #3A3A3C var(--bg); }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 10; height: 52px;
  display: flex; align-items: center; gap: 28px; padding: 0 max(20px, calc((100% - var(--text)) / 2));
  background: rgba(0, 0, 0, .72); backdrop-filter: saturate(1.8) blur(20px); -webkit-backdrop-filter: saturate(1.8) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.bar .who { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 650; font-size: 16px; letter-spacing: -.01em; margin-right: auto; }
.bar .who img { width: 26px; height: 26px; border-radius: 6px; }
.bar nav { display: flex; gap: 24px; }
.bar nav a, .bar .lang { color: #D2D2D7; font-size: 13px; text-decoration: none; }
.bar nav a:hover, .bar .lang:hover { color: var(--fg); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 26px; border-radius: 999px;
  font: inherit; font-size: 17px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; white-space: nowrap;
  color: #fff; background: var(--blue); border: 1px solid transparent;
  transition: background-color .2s, transform .2s var(--ease);
}
.btn:hover { background: var(--blue-hover); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; color: var(--fg); border-color: rgba(245, 245, 247, .5); }
.btn.ghost:hover { background: rgba(255, 255, 255, .08); }
.btn.small { min-height: 32px; padding: 4px 14px; font-size: 13px; }
.btn .icon { width: 18px; height: 18px; }
.btns { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- scenes: the portrait photo beside its line ---------- */
.scene {
  position: relative; max-width: var(--wide); margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); grid-template-areas: "copy photo"; align-items: center; gap: 0 4%;
}
.scene.flip { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-areas: "photo copy"; }
.scene > img {
  grid-area: photo; display: block; width: 100%; max-width: 560px; height: auto; aspect-ratio: 2 / 3; justify-self: center;
  /* the photo's dark edges melt into the page */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent), linear-gradient(transparent, #000 8%, #000 88%, transparent);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent), linear-gradient(transparent, #000 8%, #000 88%, transparent);
  mask-composite: intersect;
}
.scene .copy { grid-area: copy; position: relative; z-index: 1; }
.scene.flip .copy { text-align: right; }
.h {
  margin: 0; font-weight: 700; letter-spacing: -.04em; line-height: 1.05; text-wrap: balance;
  font-size: clamp(40px, 6vw, 88px);
}
.lead { margin: 18px 0 0; color: var(--sub); font-size: clamp(17px, 1.7vw, 24px); line-height: 1.45; letter-spacing: -.01em; }
.scene .copy .lead { color: rgba(245, 245, 247, .78); }

.s-hero { grid-template-areas: "top photo" "bottom photo"; grid-template-rows: auto auto; align-content: center; }
.s-hero .copy.top { grid-area: top; align-self: end; }
.s-hero .copy.bottom { grid-area: bottom; align-self: start; margin-top: 36px; }
.s-hero .h { font-size: clamp(40px, 5.4vw, 80px); }
.s-hero .spec { margin: 16px 0 0; color: var(--dim); font-size: 14px; }

/* 1080p: the number set huge, as in the store picture */
.s-solo .big-num { display: block; font-size: clamp(96px, 13.5vw, 200px); font-weight: 700; line-height: .86; letter-spacing: -.06em; }

/* the one motion: each scene's line rises in as it comes into view (visible by default without script) */
.js .scene:not(.s-hero) .copy > * { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform 1.1s var(--ease); }
.js .scene.in .copy > * { opacity: 1; transform: none; }
.js .scene.in .copy > :nth-child(2) { transition-delay: .08s; }
.js .scene.in .copy > :nth-child(3) { transition-delay: .16s; }

/* ---------- facts under a scene: plain columns of type ---------- */
.facts { max-width: var(--text); margin: 0 auto; padding: 8px 20px 0; display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 40px; }
.facts > div { border-top: 1px solid var(--line); padding-top: 22px; }
.facts b { display: block; font-size: 20px; font-weight: 650; letter-spacing: -.015em; line-height: 1.35; }
.facts p { margin: 8px 0 0; color: var(--sub); font-size: 16px; line-height: 1.6; }
.facts .tag { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--dim); }
.facts .tag.on { color: var(--link); font-weight: 600; }
.block { padding: 40px 0 140px; }

/* ---------- the practical part: type on black ---------- */
.sect { max-width: var(--text); margin: 0 auto; padding: 120px 20px 0; }
.sect > .h { font-size: clamp(44px, 6vw, 88px); }
.sect > .lead { max-width: 40em; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 64px 48px; margin-top: 64px; }
.steps h3 { margin: 0 0 6px; font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.steps ol { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 12px; align-items: baseline; padding: 18px 0; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.steps li .no { grid-column: 1; grid-row: 1 / span 2; font-size: 28px; font-weight: 300; line-height: 1.05; color: var(--dim); }
.steps li b { grid-column: 2; font-size: 17px; font-weight: 600; line-height: 1.45; }
.steps li span:not(.no) { grid-column: 2; color: var(--sub); font-size: 15px; line-height: 1.55; }
.steps li:target { background: var(--raise); border-radius: 12px; border-top-color: transparent; padding-left: 12px; padding-right: 12px; margin: 0 -12px; }
.steps .get { margin: 4px 0 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; color: var(--dim); font-size: 14px; min-height: 32px; }
.kbd { font-weight: 600; padding: 0 6px; border-radius: 4px; background: #1C1C1E; white-space: nowrap; }

.price { padding-top: 120px; }
.price .big { margin: 0; font-size: clamp(64px, 9vw, 136px); font-weight: 700; letter-spacing: -.05em; line-height: 1; }
.price .then { margin: 24px 0 0; font-size: clamp(24px, 3vw, 44px); font-weight: 700; letter-spacing: -.03em; line-height: 1.25; }
.price-facts { padding: 48px 0 0; }
.price-facts .btns { max-width: var(--text); margin: 56px auto 0; padding: 0 20px; justify-content: center; }

.help { margin-top: 48px; border-bottom: 1px solid var(--line); }
.help details { border-top: 1px solid var(--line); }
.help summary { display: flex; align-items: center; gap: 16px; min-height: 68px; padding: 14px 0; cursor: pointer; list-style: none; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.help summary::-webkit-details-marker { display: none; }
.help summary .icon { margin-left: auto; width: 18px; height: 18px; color: var(--dim); transition: transform .3s var(--ease); }
.help details[open] summary .icon { transform: rotate(180deg); }
.help details p { margin: 0 0 22px; color: var(--sub); max-width: 64ch; }
.contact { display: flex; flex-wrap: wrap; gap: 14px 32px; margin-top: 36px; font-size: 16px; }
.contact a { display: inline-flex; align-items: center; gap: 8px; }

footer.foot { max-width: var(--text); margin: 0 auto; padding: 96px 20px 56px; color: var(--dim); font-size: 12px; line-height: 1.7; }
footer.foot a { color: var(--dim); }

@media (max-width: 1023px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- narrow: the line above each photo, the photo under it ---------- */
@media (max-width: 759px) {
  body { font-size: 16px; }
  .bar { gap: 14px; }
  .bar nav { display: none; }
  .scene, .scene.flip, .s-hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "photo"; padding: 0; }
  .s-hero { grid-template-areas: "top" "photo" "bottom"; }
  .scene .copy, .scene.flip .copy { text-align: center; padding: 72px 20px 4px; }
  .s-hero .copy.top { padding-top: 56px; }
  .s-hero .copy.bottom { margin-top: -8%; padding: 0 20px; }
  .scene > img { max-width: 480px; margin: -2% auto 0; }
  .scene .copy .lead { color: var(--sub); }
  .s-hero .btns, .s-hero .spec { justify-content: center; text-align: center; }
  .s-solo .big-num { font-size: 104px; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts > div { padding: 20px 0; }
  .block { padding: 24px 0 96px; }
  .sect { padding-top: 96px; }
  .steps { grid-template-columns: 1fr; gap: 48px; margin-top: 40px; }
  .price { padding-top: 96px; }
  .btns .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .scene:not(.s-hero) .copy > * { opacity: 1; transform: none; transition: none; }
  .btn, .help summary .icon { transition: none; }
}

/* Bydrive: '바이드라이브' is longer than '바이캠', so below 360px the bar keeps only the icon (the name stays for
   screen readers) and the download button fits. */
@media (max-width: 359px) {
  .bar .who span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
