/* TRYCAT — style.css
   색: 검정 / 버터옐로 / 흰색.  불 끄기 = 어두운 화면(기본), 불 켜기 = 버터 화면.
   화면 폭 899px 이하는 모바일 배치, 그 위는 PC 배치예요. */

:root {
  --ground: #1A1A1A;
  --ink: #F1E3A4;
  --line: rgba(241, 227, 164, 0.35);
  --card: rgba(241, 227, 164, 0.06);
  --hl: rgba(241, 227, 164, 0.08);
  --mono: 'JetBrains Mono', 'Nanum Gothic Coding', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
[data-theme="light"] {
  --ground: #F1E3A4;
  --ink: #1A1A1A;
  --line: rgba(26, 26, 26, 0.3);
  --card: rgba(26, 26, 26, 0.06);
  --hl: rgba(26, 26, 26, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; position: relative; overflow-x: hidden;
  background: var(--ground); color: var(--ink);
  font-family: var(--mono); font-size: 16px; line-height: 1.5;
  transition: background-color .3s ease, color .3s ease;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; border-radius: 4px; }
button { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: 1168px; margin: 0 auto; padding: 0 24px; }
.only-mobile { display: none; }
.skip { position: absolute; left: 16px; top: -64px; z-index: 100; padding: 10px 16px; background: var(--ink); color: var(--ground); border-radius: 8px; }
.skip:focus { top: 16px; }

/* ---------- 불 켜기 / 끄기 ---------- */
.lamp {
  position: fixed; top: 20px; right: 24px; z-index: 50;
  width: 64px; min-height: 44px; padding: 0; border: 0; background: transparent;
  color: var(--ink); cursor: pointer; display: flex; justify-content: center; align-items: center;
  transition: transform .2s ease;
}
.lamp:hover { transform: rotate(-8deg) scale(1.08); }
.lamp svg { display: block; width: 64px; height: auto; overflow: visible; }
.lp { fill: none; stroke: currentColor; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.lp-fill { fill: currentColor; fill-opacity: .18; stroke: none; }
.lp-on { display: none; }
[data-theme="light"] .lp-on { display: inline; }

/* ---------- 첫 화면 ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 72px 24px 120px;
}
.trycatch {
  display: flex; flex-direction: column; align-items: flex-start;
  font-weight: 700; font-size: clamp(60px, 8.6vw, 80px); line-height: 1.1; letter-spacing: 0;
}
.trycatch .try { font-size: 1.1875em; }
.cat { display: block; width: 4.75em; height: auto; aspect-ratio: 520 / 460; margin: .1em 0 .1em 4ch; overflow: visible; }
.hero-note { position: absolute; left: 0; right: 0; bottom: 36px; padding: 0 32px; text-align: center; font-size: 22px; line-height: 1.3; }

.ink { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.eye { fill: #FFFFFF; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.pupil { fill: #1A1A1A; stroke: none; }
.w9 { stroke-width: 9; } .w12 { stroke-width: 12; } .w16 { stroke-width: 16; }
.pupils { transition: transform 90ms ease-out; }
.eyes-thin { display: none; }
.eyes-round { display: inline; }
[data-theme="light"] .eyes-thin { display: inline; }
[data-theme="light"] .eyes-round { display: none; }

/* ---------- 공통 조각 ---------- */
.section { padding-top: 168px; }
.title { font-weight: 700; font-size: clamp(32px, 4vw, 56px); line-height: 1.15; letter-spacing: -0.02em; }
.lead { margin-top: 16px; font-size: clamp(16px, 1.7vw, 24px); line-height: 1.5; }
.cmt { margin-top: 96px; font-size: 24px; line-height: 1.5; }

.win { margin-top: 32px; border: 2px solid var(--line); border-radius: 20px; background: var(--card); counter-reset: ln; }
.win.first { margin-top: 72px; }
.win-title { display: flex; align-items: center; height: 60px; padding: 0 28px; border-bottom: 2px solid var(--line); font-size: 18px; }
.win-title.plain { border-bottom: 0; height: 56px; font-size: 16px; }
.win-body { padding: 36px 0; }

.cl, .field {
  position: relative; display: flex; align-items: center; min-height: 56px; padding: 0 36px;
  counter-increment: ln; transition: background-color .15s ease;
}
.cl::before, .field::before { content: counter(ln); flex: 0 0 56px; font-size: 20px; opacity: .4; }
.cl:hover, .cl:focus-within { background: var(--hl); }
.code { font-size: 26px; white-space: nowrap; }
.indent { padding-left: 4ch; }
.kw { all: unset; color: inherit; cursor: default; font-size: 26px; padding-left: 4ch; white-space: nowrap; }
.kw:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; border-radius: 4px; }
.cm { margin-left: 32px; font-size: 18px; opacity: .6; white-space: nowrap; }
.cm.grp { margin-left: calc(4ch * 26 / 18); }
.tip {
  position: absolute; right: 36px; top: 50%; width: 400px; padding: 14px 18px; border-radius: 12px;
  background: var(--ink); color: var(--ground); font-size: 15px; line-height: 1.6;
  opacity: 0; pointer-events: none; transform: translate(12px, -50%);
  transition: opacity .22s ease, transform .22s ease; z-index: 2;
}
.cl:hover .tip, .cl:focus-within .tip { opacity: 1; transform: translate(0, -50%); }

/* 모바일 접이식 목록 */
.acc-list { margin-top: 32px; border-bottom: 2px solid var(--line); }
.acc { border-top: 2px solid var(--line); }
.acc summary { list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 20px 0; cursor: pointer; }
.acc summary::-webkit-details-marker { display: none; }
.acc h3 { font-size: 24px; line-height: 1.2; }
.plus { font-size: 24px; line-height: 1; transition: transform .2s ease; }
.acc[open] .plus { transform: rotate(45deg); }
.acc p { padding: 0 0 22px; font-size: 16px; line-height: 1.75; }
.acc p::before { content: "// "; }

/* ---------- 레퍼런스 ---------- */
.card { margin-top: 32px; padding: 40px; border: 2px solid var(--line); border-radius: 20px; background: var(--card); display: flex; flex-direction: column; gap: 24px; }
.card h3 { margin-top: 20px; font-size: 40px; line-height: 1.2; }
.card .desc { margin-top: 16px; max-width: 640px; font-size: 20px; line-height: 1.75; }
.card .links { display: flex; align-items: baseline; gap: 16px; font-size: 18px; line-height: 1.5; }
.card .links span { opacity: .7; }
.card .shot { display: block; width: 100%; border-radius: 12px; }
.card:has(.shot) { display: grid; grid-template-columns: 1fr 520px; gap: 24px 40px; align-items: start; }
.card .shot { grid-column: 2; grid-row: 1 / span 2; }
.cards { margin-top: 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cards .card { margin-top: 0; padding: 32px; }
.cards .card h3 { font-size: 28px; }
.cards .card .desc { font-size: 17px; }
.cards .card:has(.shot) { display: flex; }
.chip { display: inline-block; border: 2px solid var(--line); border-radius: 999px; padding: 4px 16px; font-size: 15px; line-height: 1.5; }

/* ---------- 문의 창 ---------- */
.field { min-height: 64px; }
.field.top { align-items: flex-start; padding-top: 12px; padding-bottom: 12px; }
.field.top::before { padding-top: 6px; }
.k { display: inline-block; box-sizing: content-box; padding-left: 4ch; width: 7ch; font-size: 26px; }
.q { font-size: 26px; }
.in {
  min-width: 0; width: 460px; max-width: 100%; margin: 0 4px; padding: 4px 6px;
  font-family: inherit; font-size: 24px; line-height: 1.4; color: inherit; background: transparent;
  border: 0; border-bottom: 2px dashed var(--line); border-radius: 0; outline: none;
}
textarea.in { width: 560px; resize: none; line-height: 1.6; }
.in::placeholder { color: currentColor; opacity: .4; }
.in:focus { border-bottom: 2px solid currentColor; }
.send-line { min-height: 88px; }
.send {
  padding: 12px 24px; border: 2px solid currentColor; border-radius: 12px; background: transparent;
  font-size: 24px; font-weight: 700; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease;
}
.send:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 currentColor; }
.send:active { transform: none; box-shadow: none; }
.hint { margin-left: 24px; font-size: 16px; opacity: .6; }
.status-line .txt { font-size: 22px; }
.lnk { all: unset; margin-left: 24px; cursor: pointer; text-decoration: underline; font-size: 18px; }
.lnk:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; border-radius: 4px; }
.contact-line { margin-top: 32px; display: flex; align-items: baseline; gap: 16px; font-size: 18px; line-height: 1.4; }
.contact-line a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

/* ---------- 하단 정보 ---------- */
.footer { margin-top: 0; padding-bottom: 220px; }
.company { display: flex; align-items: stretch; }
.company .lines { flex: 1; padding: 24px 0; min-width: 0; }
.company .cl { min-height: 44px; }
.company .cl::before { flex-basis: 48px; font-size: 16px; }
.company .code { font-size: 20px; }
.company .cm { font-size: 16px; }
.logo-panel { flex: 0 0 340px; padding: 24px; display: flex; align-items: center; justify-content: center; }
.logo { display: block; width: 240px; height: auto; aspect-ratio: 445 / 355; }
.lg { fill: currentColor; stroke: none; }
.copy { margin-top: 20px; font-size: 15px; line-height: 1.6; opacity: .7; }
.plain-info { font-size: 14px; line-height: 1.9; }
.plain-info div { display: flex; gap: 16px; }
.plain-info span:first-child { min-width: 116px; opacity: .7; }

/* ---------- 페이지 맨 아래 왼쪽 모서리 고양이 (불 켰을 때만) ---------- */
.catcorner { position: absolute; left: 0; bottom: 0; width: 210px; height: 178px; overflow: hidden; pointer-events: none; }
.catcorner img { position: absolute; left: 0; top: 0; width: 210px; height: 178px; opacity: 0; transform: translateY(110%); transition: opacity .5s ease, transform .6s ease; user-select: none; }
[data-theme="light"] .catcorner img { opacity: 1; transform: translateY(0); }

/* ---------- 404 ---------- */
.nf { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 48px 24px; gap: 32px; }
.nf pre { margin: 0; font: inherit; font-weight: 700; font-size: clamp(28px, 6vw, 56px); line-height: 1.3; white-space: pre-wrap; }
.nf a { font-size: 20px; }

/* ---------- 모바일 배치 ---------- */
@media (max-width: 899px) {
  .cards { grid-template-columns: 1fr; margin-top: 24px; gap: 16px; }
  .cards .card { padding: 24px; }
  .cards .card .desc { font-size: 16px; }
  .only-desktop { display: none !important; }
  .only-mobile { display: block; }
  .contact-line.only-mobile { display: flex; }
  .lamp { top: 12px; right: 12px; width: 52px; }
  .lamp svg { width: 52px; }
  .section { padding-top: 64px; }
  .win.first { margin-top: 40px; }
  .cmt { margin-top: 72px; font-size: 16px; }
  .card { padding: 24px; margin-top: 24px; }
  .card h3 { margin-top: 14px; font-size: 28px; }
  .card .desc { margin-top: 10px; font-size: 16px; }
  .card .links { font-size: 14px; }
  .card:has(.shot) { display: flex; }
  .chip { padding: 2px 14px; font-size: 14px; }
  .acc-list { margin-top: 24px; }
  .contact-line { margin-top: 24px; font-size: 18px; }
  .footer { padding-bottom: 130px; }
  .footer .logo { width: 96px; margin-bottom: 24px; }
  .copy { margin-top: 16px; font-size: 13px; }
  .catcorner { width: 120px; height: 66px; }
  .catcorner img { width: 120px; height: 102px; }
}
@media (max-width: 640px) {
  .trycatch { font-size: clamp(48px, 15.4vw, 60px); }
  .trycatch .try { font-size: 1em; }
  .cat { width: 3.2em; }
  .hero-note { bottom: 28px; padding: 0 24px; font-size: 15px; line-height: 1.5; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .cl:hover .tip, .cl:focus-within .tip, .tip { transform: translate(0, -50%); }
}
