/*
 * 명함 사이트 — elab-studio.xyz
 *
 * 재료는 본사이트(elab-studio.com)에서 가져온다 — Pretendard, --g50 바탕,
 * 9단 회색, -0.24px 자간, 알약 버튼, 흰 판이 호버에 검어지는 뒤집힘.
 *
 * 형태는 본사이트를 따르지 않는다. 본사이트의 서브페이지는 읽으러 오는
 * 페이지라 72px 제목과 큰 푸터가 있지만, 명함은 건네받는 물건 하나다.
 * 그래서 이 페이지에는 머리도 없고, 큰 글자는 명함 위의 이름 하나뿐이고,
 * 전부 한 화면에 들어온다. 받는 사람이 하는 일은 셋이다 —
 * 보고, 저장하고, 스튜디오로 넘어간다.
 */

/*
 * 본사이트는 Pretendard를 common 서브셋과 나머지 두 파일로 쪼개 쓴다.
 * 이 페이지에는 한글 음절과 라틴 말고 나오는 글자가 없어서 common 한
 * 파일(521KB)만 가져왔다.
 */
@font-face {
  font-family: "Pretendard Variable";
  src: url("/fonts/PretendardVariable.common.v1.woff2") format("woff2-variations");
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+20A0-20CF, U+2100-214F, U+2190-21FF, U+2460-24FF, U+25A0-25FF,
    U+2600-26FF, U+3000-303F, U+3130-318F, U+AC00-D7A3, U+FF01-FF5E, U+FFE0-FFE6;
}

/*
 * 색.
 *
 * 아래 --g* 9단은 본사이트 globals.css의 회색 그대로다. 값의 출처이고,
 * 화면에 직접 쓰이지는 않는다.
 *
 * 실제로 쓰는 것은 그 아래의 "자리 이름"이다 — 바탕, 판, 글자, 흐린 글자.
 * 밝고 어두운 두 벌이 이 이름들만 갈아 끼우므로, 규칙을 쓰는 쪽은 어느
 * 모드인지 알 필요가 없다.
 *
 * 본사이트에는 다크모드가 없다(색을 한 벌만 유지하면 대비를 한 번만
 * 검증하면 된다는 이유였다). 이 사이트만 두 벌을 가진다 — 명함은 늦은 밤
 * 폰으로 QR을 찍어 열리는 일이 많고, 그때 흰 화면이 그대로 얼굴에 켜진다.
 */
:root {
  --g50: #fafafa; --g100: #f5f5f5; --g200: #e5e5e5; --g300: #eaeaea;
  --g400: #b5b5b5; --g600: #666; --g700: #444; --g800: #222; --g900: #111;

  --ground: var(--g50);      /* 마당 */
  --surface: #ffffff;        /* 마당 위에 놓인 판 — 명함, 스튜디오 줄 */
  --text: var(--g900);
  --muted: var(--g600);
  --faint: var(--g400);      /* 가운뎃점 같은 장식 */
  --line: var(--g300);
  --chip: var(--g200);       /* 알약·태그 바탕 */
  --chip-text: var(--g700);
  --invert-bg: var(--g900);  /* 주된 버튼, 그리고 판이 뒤집힐 때 */
  --invert-text: #ffffff;

  /* 명함 한 장의 폭. 이 페이지의 모든 줄이 이 폭에 맞춰 선다. */
  --card: 560px;

  --font-sans:
    "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--faint) transparent; }

/*
 * 어두운 한 벌.
 *
 * 밝은 모드에서 판(#fff)이 마당(#fafafa)보다 밝듯이, 여기서도 판이 마당보다
 * 밝다 — 명함이 책상 위에 놓인 관계는 그대로다. 두 면의 차이를 밝은 쪽보다
 * 조금 더 벌렸다(1.18 대 1.04). 어두운 면끼리는 같은 수치라도 덜 갈라져
 * 보이기 때문이다.
 *
 * 대비는 전부 재 봤다 — 본문 15.11:1, 흐린 글자 6.16:1, 태그 8.66:1.
 */
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0b0b0d;
    --surface: #1e1e22;
    --text: #f4f4f5;
    --muted: #9d9da3;
    --faint: #6a6a70;
    --line: #2b2b30;
    --chip: #26262b;
    --chip-text: #c4c4c8;
    --invert-bg: #f4f4f5;
    --invert-text: #111111;
  }
}


body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-sans);
  /* 본사이트와 같은 절대값 자간. em이 아니라 px인 것도 그쪽을 따른 것이다. */
  letter-spacing: -0.24px;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

h1, h2, p, ul, dl, dd, figure { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--invert-bg); color: var(--invert-text); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 4px; }

.tnum { font-variant-numeric: tabular-nums; }
.nb { white-space: nowrap; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--invert-bg); color: var(--invert-text); padding: 12px 16px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ── 판 ───────────────────────────────────────────────────────────────
 *
 * 명함 한 장이 책상 가운데 놓인 모양. 화면이 남으면 위아래로 가운데 온다.
 */

.stage {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100svh;
  padding: 56px 20px;
}
.sheet { width: 100%; max-width: var(--card); }

/* ── 명함 ─────────────────────────────────────────────────────────────
 *
 * 흰 판이 --g50 마당 위에 놓인다. 본사이트 .lp-core-card와 같은 방식이라
 * 테두리도 그림자도 쓰지 않는다 — 바탕과의 명도 차이가 가장자리를 만든다.
 */

.cardwrap { perspective: 1800px; }

.card {
  position: relative;
  aspect-ratio: 90 / 50;
  transform-style: preserve-3d;
  transition: transform 640ms cubic-bezier(0.2, 0.8, 0.2, 1);
  /*
   * 앞면일 때도 none이 아니라 rotateY(0deg)를 둔다. none으로 돌아가면 합성
   * 레이어가 버려지면서, backface-visibility가 걸린 자식이 다시 그려지지 않아
   * 명함이 통째로 사라진다. will-change는 쓰지 않는다 — 레이어를 영구히
   * 올려 두면 스크롤한 아래쪽이 안 그려지는 오류가 따로 났다.
   */
  transform: rotateY(0deg);
  cursor: pointer;
}
.card[data-face="back"] { transform: rotateY(180deg); }

.face {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 36px;
  background: var(--surface);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: rotateY(0deg);
}
.back { transform: rotateY(180deg); }

.face-top { display: flex; align-items: center; gap: 10px; }
.mark { display: block; }
.wordmark { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.wordmark .dim { color: var(--muted); }
.wordmark .thin { font-weight: 600; color: var(--muted); }

/*
 * 이 페이지에서 가장 큰 글자. 명함 위의 이름 하나뿐이고, 아래의 어떤 것도
 * 이보다 크지 않다. 이름을 페이지 제목으로 한 번 더 쓰지 않는 이유이기도 하다 —
 * 같은 이름이 두 번 외치면 어느 쪽이 그 사람인지 흐려진다.
 */
.person { font-size: clamp(28px, 6vw, 38px); font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; }
.role { margin-top: 7px; font-size: 15px; color: var(--muted); }

.face-bottom { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.face-bottom .org { color: var(--text); font-weight: 600; }
.face-bottom .dot { color: var(--muted); }

/* 뒷면 — 왼쪽은 연락처, 오른쪽은 QR */
.back-grid { display: flex; gap: 20px; align-items: center; justify-content: space-between; height: 100%; }
.back-list { font-size: 15px; line-height: 1.5; }
.back-list dt { margin-top: 13px; font-size: 11px; font-weight: 600; letter-spacing: .1em; color: var(--muted); }
.back-list dt:first-child { margin-top: 0; }

.qr { flex: none; text-align: center; }
/*
 * QR은 어두운 모드에서도 흰 타일 위에 둔다. 어두운 판 위에 어두운 모듈을
 * 그리면 아예 안 보이고, 색을 뒤집어도 반전 QR을 못 읽는 스캐너가 있다.
 * 밝은 모드에서는 판과 같은 흰색이라 타일이 보이지 않는다 — 두 모드의
 * 자리 차지는 같다.
 */
.qr-tile { display: inline-block; padding: 8px; background: #ffffff; border-radius: 3px; }
.qr img { display: block; width: 116px; height: 116px; }
.qr figcaption { margin-top: 7px; font-size: 11px; font-weight: 600; color: var(--muted); }

/*
 * 뒤집기. 명함 오른쪽 아래에 붙인다 — 종이를 집어 넘기는 손이 가는 자리다.
 * 왼쪽 선은 이름부터 아래 글까지 내용이 쓰는 축이라 비워 둔다.
 */
.flip-row { display: flex; justify-content: flex-end; margin-top: 12px; }
.flip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 12px;
  font: inherit; font-size: 13px; font-weight: 600; letter-spacing: -0.24px;
  color: var(--muted); background: transparent;
  border: 0; border-radius: 999px; cursor: pointer;
  transition: color .2s ease, background .2s ease;
}
.flip:hover { color: var(--text); background: var(--chip); }
.flip svg { transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.flip[aria-pressed="true"] svg { transform: rotate(180deg); }

/* ── 알약 — 본사이트 헤더 알약과 같은 치수 ───────────────────────────── */

.acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px;
  font: inherit; font-size: 17px; font-weight: 600; letter-spacing: -0.24px;
  border: 0; border-radius: 999px;
  background: var(--chip); color: var(--text);
  cursor: pointer;
  transition: opacity .2s ease, background .2s ease;
}
.pill:hover { opacity: .8; }
.pill--primary { background: var(--invert-bg); color: var(--invert-text); }

.note { min-height: 1.4em; margin-top: 12px; font-size: 14px; color: var(--muted); }

/* ── 가로줄 ───────────────────────────────────────────────────────────── */

.rule { height: 1px; margin: 28px 0; background: var(--line); }

/* ── 스튜디오로 ───────────────────────────────────────────────────────
 *
 * 이 페이지에서 나가는 단 하나의 길. 본사이트 .lp-core-card의 뒤집힘
 * (호버하면 흰 판이 검어지고 글자가 희어진다)을 여기에 쓴다.
 */

.go {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px 24px;
  background: var(--surface); color: var(--text);
  transition: background .35s ease, color .35s ease;
}
.go:hover { background: var(--invert-bg); color: var(--invert-text); }
.go-title { display: block; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.go-sub { display: block; margin-top: 5px; font-size: 14px; color: var(--muted); transition: color .35s ease; }
.go:hover .go-sub { color: var(--faint); }
.go-arrow { flex: none; color: var(--muted); transition: transform .35s ease, color .35s ease; }
.go:hover .go-arrow { transform: translateX(6px); color: var(--invert-text); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tags li {
  display: inline-flex; align-items: center; height: 28px; padding: 0 11px;
  border-radius: 999px; background: var(--chip); color: var(--chip-text); font-size: 13px;
}

/* ── 채널 — 본사이트 푸터의 아이콘 줄과 같은 44px 칸 ─────────────────── */

.chans { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 24px; margin-left: -11px; }
.chans a {
  display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center;
  border-radius: 999px; color: var(--text); transition: background .2s ease;
}
.chans a:hover { background: var(--chip); }
.chans svg { width: 19px; height: 19px; }

/* ── 사업자 정보 ─────────────────────────────────────────────────────── */

.legal { margin-top: 24px; font-size: 12px; line-height: 1.7; color: var(--muted); }
.legal .sep { color: var(--faint); }
.legal-meta { margin-top: 4px; }
.legal-meta a { text-decoration: underline; text-underline-offset: 3px; }

/* ── 좁은 화면 ────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .stage { align-items: flex-start; padding: 32px 16px 48px; }
  .face { padding: 24px; }
  .wordmark { font-size: 15px; }
  .role { font-size: 14px; }
  .face-bottom { font-size: 13px; }
  .qr img { width: 96px; height: 96px; }
  .back-list { font-size: 13.5px; }

  /*
   * 알약 셋이 한 줄에 못 들어간다. 그냥 흘려 보내면 2 + 1로 어정쩡하게
   * 끊기므로, 주된 행동에 한 줄을 통째로 주고 나머지 둘이 아래 줄을 나눈다.
   */
  .pill { font-size: 16px; }
  .pill--primary { flex: 1 1 100%; }
  .acts .pill:not(.pill--primary) { flex: 1 1 0; }

  .go { padding: 18px 20px; }
  .go-title { font-size: 17px; }
}

@media (max-width: 380px) {
  .face { padding: 20px; }
  .qr img { width: 80px; height: 80px; }
  .back-list { font-size: 12.5px; }
  .back-grid { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
