/* RallyLog 랜딩 공통 — 앱 픽셀 B(RallyLog 16) 문법: 라일락 바탕, 계단 모서리, 2px 잉크 테두리,
   점선 구분선, 네모 칸, 그림자·그라데이션·유리 없음. 색은 lib/core/theme/app_theme.dart와 같다. */
@font-face { font-family: "Galmuri11"; src: url("../fonts/Galmuri11.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Galmuri11"; src: url("../fonts/Galmuri11-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "GalmuriMono11"; src: url("../fonts/GalmuriMono11.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "PressStart2P"; src: url("../fonts/PressStart2P-Regular.woff2") format("woff2"); font-display: swap; }

:root {
  --lilac: #EAE4F2; --card: #FFFFFF; --well: #E2DCEC; --line: #D6CFE3;
  --ink: #1C1A33; --ink-muted: #4B4766; --faint: #5F5A78;
  --night: #262B5C; --night-well: #4B4F82; --night-muted: #B9B6D3; --night-deep: #1B1F47;
  --me: #FF6A1A; --me-ink: #D2440A; --me-tint: #FFE6D9;
  --opp: #3D63F0; --opp-ink: #2648C8; --opp-tint: #E3E8FD;
  --gold: #F5B800; --gold-ink: #8A5A00; --clear: #23B24F;
  --dot: "Galmuri11", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --mono: "GalmuriMono11", "Galmuri11", ui-monospace, monospace;
  --game: "PressStart2P", "GalmuriMono11", monospace;
  --body: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--lilac); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--lilac); color: var(--ink); font: 16px/1.6 var(--body); word-break: keep-all; overflow-x: hidden; }
[hidden] { display: none !important; }
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--me); outline-offset: 3px; }
.in { max-width: 1200px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 48px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pixelated { image-rendering: pixelated; image-rendering: crisp-edges; }

/* 계단 모서리 — 앱 pixelSteppedRect(세 사각형의 합). --u = 계단 한 칸, --bw = 테두리, --b/--f = 테두리/바탕. */
.px { --u: 4px; --bw: 2px; --b: var(--ink); --f: var(--card); position: relative; isolation: isolate; background: var(--b);
  clip-path: polygon(calc(2 * var(--u)) 0, calc(100% - 2 * var(--u)) 0, calc(100% - 2 * var(--u)) var(--u), calc(100% - var(--u)) var(--u),
    calc(100% - var(--u)) calc(2 * var(--u)), 100% calc(2 * var(--u)), 100% calc(100% - 2 * var(--u)), calc(100% - var(--u)) calc(100% - 2 * var(--u)),
    calc(100% - var(--u)) calc(100% - var(--u)), calc(100% - 2 * var(--u)) calc(100% - var(--u)), calc(100% - 2 * var(--u)) 100%, calc(2 * var(--u)) 100%,
    calc(2 * var(--u)) calc(100% - var(--u)), var(--u) calc(100% - var(--u)), var(--u) calc(100% - 2 * var(--u)), 0 calc(100% - 2 * var(--u)),
    0 calc(2 * var(--u)), var(--u) calc(2 * var(--u)), var(--u) var(--u), calc(2 * var(--u)) var(--u)); }
.px::before { content: ""; position: absolute; inset: var(--bw); z-index: -1; background: var(--f); clip-path: inherit; }
.px.flat { --bw: 0px; --b: var(--f); }
.px.s { --u: 2px; }

/* 점선 구분선 (PixelDivider) */
.dash { height: 2px; border: 0; margin: 0; background: repeating-linear-gradient(90deg, var(--line) 0 4px, transparent 4px 8px); }

/* 게임 낱말 꼬리표 (PixelText) */
.tag { margin: 0 0 12px; font: 400 16px/1.5 var(--game); letter-spacing: .02em; color: var(--me-ink); text-transform: uppercase; }

/* 버튼 — 계단 모양, 누르면 2px 내려간다 */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { --b: var(--ink); --f: var(--me); display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px;
  border: 0; color: var(--ink); font: 700 16px/1 var(--dot); text-decoration: none; cursor: pointer; }
.btn:active { transform: translateY(2px); }
.btn:focus-visible { outline: 0; --b: var(--me-ink); --bw: 4px; }
.btn-light { --f: var(--card); }
.btn-ink { --b: var(--ink); --f: var(--ink); color: #fff; }
.btn-night { --b: var(--night-muted); --f: var(--night); color: #fff; }
.btn .logo { flex: none; width: 20px; height: 20px; }
.btn .logo-apple { width: 19px; height: 22px; margin-top: -3px; }

/* 내비 */
.site-nav { position: sticky; top: 0; z-index: 100; background: var(--lilac); border-bottom: 2px solid var(--ink); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 400 16px/1 var(--game); color: var(--ink); letter-spacing: .02em; }
.brand img { width: 32px; height: 32px; }
.links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px); }
.links > a:not(.btn) { text-decoration: none; font: 700 16px/1 var(--dot); color: var(--ink-muted); }
.links > a:not(.btn):hover, .links > a[aria-current="page"] { color: var(--ink); }
.links .btn { min-height: 42px; padding: 0 16px; font-size: 14px; }
.btn-avatar { width: 42px; padding: 0 !important; overflow: hidden; --f: var(--me); color: var(--ink); font: 700 16px/1 var(--dot); }
.btn-avatar img { position: relative; z-index: 0; width: 100%; height: 100%; object-fit: cover; display: block; clip-path: inherit; }
.burger { display: none; flex-direction: column; justify-content: center; gap: 4px; width: 44px; height: 44px; padding: 11px; border: 0; background: none; cursor: pointer; }
.burger span { display: block; height: 4px; background: var(--ink); }
.drawer { position: sticky; top: 68px; z-index: 99; display: grid; padding: 0 clamp(16px, 4vw, 48px) 8px; background: var(--card); border-bottom: 2px solid var(--ink); }
.drawer a, .drawer button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 16px 0; border: 0; background: none;
  color: var(--ink); font: 700 16px var(--dot); text-decoration: none; cursor: pointer; }
.drawer > * + * { background: repeating-linear-gradient(90deg, var(--line) 0 4px, transparent 4px 8px) top / 100% 2px no-repeat; }
.drawer a::before, .drawer button::before { content: "▶"; font-size: 12px; color: var(--me-ink); }
.drawer > :last-child { color: var(--me-ink); }

/* 푸터 */
.foot { background: var(--night); color: var(--night-muted); font-size: 15px; padding-block: 48px 36px; }
.foot-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; }
.foot h4 { margin: 0 0 14px; color: var(--gold); font: 400 12px/1.5 var(--game); letter-spacing: .04em; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot a { text-decoration: none; }
.foot a:hover, .foot a[aria-current="page"] { color: #fff; }
.foot .brand { color: #fff; margin-bottom: 14px; }
.foot-bottom { margin-top: 36px; padding-top: 20px; background: repeating-linear-gradient(90deg, var(--night-well) 0 4px, transparent 4px 8px) top / 100% 2px no-repeat;
  font: 400 14px/1.5 var(--mono); }

@media (max-width: 900px) {
  .links > a:not(.btn) { display: none; }
  .burger { display: flex; }
}
@media (max-width: 980px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
