/* 고릴라파이 홈페이지
   색·모양은 docs/06-디자인-기준.md(원본 munchkin docs/11-디자인-정책.md)의 역할 표만 쓴다.
   다크 모드 값은 홈페이지용으로 새로 정했다(디자인 정책에는 아직 없음):
   Soft = Main 22%를 다크 바탕에 섞은 색, Ink = 밝은 쪽 Soft 값을 그대로 씀. */

:root {
  --main: #45a586; --soft: #ddf4ea; --ink: #1e4a3d;
  --accent: #e38aa6; --accent-soft: #fde2ea; --accent-ink: #5a2a3a;
  --caution: #d9a62e; --caution-soft: #fff4c2; --caution-ink: #4a3b00;
  --gray: #8a94a3;
  --bg: #f4f6f8; --card: #ffffff; --card-big: #eef4f2;
  --line: #e4e8ed; --line-strong: #c9d0d8;
  --text: #1c1b1f; --sub: #6b7380;
  --hero-end: #ddf4ea;
  --header-bg: rgba(244, 246, 248, 0.86);
  --r-card: 22px; --r-big: 26px; --r-inner: 18px; --r-box: 14px; --r-chip: 8px;
  /* 스쿼클: 갤럭시 config_icon_mask 식 */
  --squircle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1' preserveAspectRatio='none'%3E%3Cpath d='M1 .5C1 .060561 .776153 0 .5 0C.223847 0 0 .060561 0 .5C0 .939439 .223847 1 .5 1C.776153 1 1 .939439 1 .5Z'/%3E%3C/svg%3E");
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --soft: #1c352d; --ink: #ddf4ea;
    --accent-soft: #3f3034; --accent-ink: #fde2ea;
    --caution-soft: #3d361a; --caution-ink: #fff4c2;
    --bg: #111614; --card: #1c2321; --card-big: #171d1b;
    --line: #2a3330; --line-strong: #3a4542;
    --text: #e8eeeb; --sub: #9aa6a1;
    --hero-end: #1c352d;
    --header-bg: rgba(17, 22, 20, 0.86);
    color-scheme: dark;
  }
}

/* 기본 */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
:lang(en) { word-break: normal; }
img, svg { display: block; }
img { max-width: 100%; height: auto; }
a { color: var(--main); text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.3; text-wrap: balance; }
p, dd { margin: 0; text-wrap: pretty; }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 24px; } }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 24px; height: 24px; fill: currentColor; flex: none; }
.squircle { -webkit-mask: var(--squircle) center / 100% 100% no-repeat; mask: var(--squircle) center / 100% 100% no-repeat; }
:focus-visible { outline: 3px solid var(--main); outline-offset: 3px; border-radius: 10px; }
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 20;
  padding: 10px 16px; border-radius: 999px;
  background: var(--soft); color: var(--ink); font-weight: 700; text-decoration: none;
}
.skip:focus { top: 10px; }

/* 머리 줄 */
.top {
  position: sticky; top: 0; z-index: 10;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
}
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.brand__mark { width: 36px; height: 36px; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { padding: 8px 12px; border-radius: 999px; color: var(--text); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
.nav a:hover { background: var(--soft); color: var(--ink); }
.nav .nav__lang { margin-left: 4px; color: var(--main); font-weight: 700; }
@media (max-width: 400px) {
  .nav a { padding: 8px 8px; font-size: 14px; }
  .brand { font-size: 17px; gap: 8px; }
  .brand__mark { width: 32px; height: 32px; }
}
@media (max-width: 340px) { .brand__name { display: none; } }
@media (max-width: 430px) { :lang(en) .brand__name { display: none; } }

/* 카드 */
main { padding-top: 8px; }
.card { background: var(--card); border-radius: var(--r-card); padding: 18px 16px; }
@media (min-width: 768px) { .card { padding: 24px 26px; } }

/* 머리 카드 */
.hero {
  display: grid; gap: 28px; align-items: center;
  border-radius: var(--r-big);
  padding: 30px 20px 34px;
  background: linear-gradient(135deg, var(--card) 55%, var(--hero-end));
  overflow: hidden;
}
@media (min-width: 768px) { .hero { grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); padding: 52px 48px; } }
.eyebrow { margin-bottom: 10px; color: var(--main); font-weight: 700; font-size: 14px; letter-spacing: 0.02em; }
.hero h1 { font-size: clamp(28px, 6.4vw, 44px); letter-spacing: -0.02em; line-height: 1.25; }
.lead { margin-top: 14px; color: var(--sub); font-size: clamp(16px, 2.2vw, 18px); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero__art { position: relative; width: min(180px, 50vw); aspect-ratio: 1; margin: 0 auto; }
@media (min-width: 768px) { .hero__art { width: min(230px, 100%); } }
.hero__mark { width: 100%; height: 100%; }
.float {
  position: absolute; display: grid; place-items: center;
  width: 23%; aspect-ratio: 1;
  background: var(--card); color: var(--main);
  -webkit-mask: var(--squircle) center / 100% 100% no-repeat;
  mask: var(--squircle) center / 100% 100% no-repeat;
  animation: bob 5s ease-in-out infinite;
}
.float .ic { width: 52%; height: 52%; }
.float--1 { left: -9%; top: 16%; }
.float--2 { right: -3%; top: -3%; color: var(--accent); animation-delay: -1.7s; }
.float--3 { right: -10%; bottom: 14%; animation-delay: -3.4s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* 버튼·칩·타일 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--soft); color: var(--ink);
  font: inherit; font-weight: 700; text-decoration: none;
  transition: box-shadow 0.15s;
}
.btn:hover { box-shadow: inset 0 0 0 2px var(--main); }
.btn--accent { background: var(--accent-soft); color: var(--accent-ink); }
.btn--accent:hover { box-shadow: inset 0 0 0 2px var(--accent); }
.btn--off, .btn--off:hover { background: transparent; color: var(--gray); box-shadow: inset 0 0 0 1px var(--line-strong); cursor: default; }
.chip {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px;
  border-radius: var(--r-chip); background: var(--bg); color: var(--sub);
  font-size: 13px; font-weight: 700; white-space: nowrap;
}
.chip--caution { background: var(--caution-soft); color: var(--caution-ink); }
.tile {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px;
  background: var(--soft); color: var(--main);
  -webkit-mask: var(--squircle) center / 100% 100% no-repeat;
  mask: var(--squircle) center / 100% 100% no-repeat;
}
.tile .ic { width: 22px; height: 22px; }
.tile--gray { background: var(--bg); color: var(--gray); }
.note { color: var(--sub); font-size: 14px; }

/* 구역 */
.section { margin-top: 40px; }
.section__head { margin: 0 4px 14px; }
.section__title { font-size: 22px; letter-spacing: -0.01em; }
.section__lead { margin-top: 4px; color: var(--sub); }

/* 앱 카드(큰 카드 안에 작은 카드) */
.app { background: var(--card-big); border-radius: var(--r-big); }
.app__head { display: flex; align-items: center; gap: 14px; }
.app__icon { width: 72px; height: 72px; flex: none; }
.app__name { flex: 1; min-width: 0; }
.app__title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.app__name h3 { font-size: 21px; letter-spacing: -0.01em; }
.app__name p { margin-top: 2px; color: var(--sub); font-size: 14px; }
.app__desc { margin: 16px 2px 14px; }
.features { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
.feature { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border-radius: var(--r-inner); background: var(--card); }
.feature strong { display: block; font-size: 16px; }
.feature p { margin-top: 2px; color: var(--sub); font-size: 14.5px; line-height: 1.55; }
.app__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 0 2px; }

.more { margin-top: 14px; padding-top: 4px; border-top: 1px solid var(--line); }
.more summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 44px; padding: 0 2px; cursor: pointer; list-style: none;
  color: var(--sub); font-weight: 700; font-size: 15px;
}
.more summary::-webkit-details-marker { display: none; }
.more summary .ic { transition: transform 0.2s; }
.more[open] summary .ic { transform: rotate(180deg); }
.links { display: grid; gap: 8px; margin: 4px 0 2px; padding: 0; list-style: none; }
.links li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 48px; padding: 10px 14px; border-radius: var(--r-box); background: var(--card);
}

.next { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.next h3 { font-size: 16px; }
.next p { margin-top: 2px; color: var(--sub); font-size: 14.5px; }

/* 회사 */
.facts { margin: 0; }
.facts > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.facts > div:first-child { padding-top: 2px; border-top: 0; }
.facts > div:last-child { padding-bottom: 2px; }
.facts dt { color: var(--sub); font-weight: 700; font-size: 14.5px; }
.facts dd { margin: 0; }
@media (min-width: 768px) { .facts > div { grid-template-columns: 140px minmax(0, 1fr); } }

/* 문의 */
.contact { display: flex; align-items: flex-start; gap: 14px; }
.email {
  display: inline-flex; align-items: center; min-height: 48px; margin: 12px 0 10px; padding: 0 20px;
  border-radius: 999px; background: var(--soft); color: var(--ink);
  font-weight: 800; font-size: 17px; text-decoration: none; word-break: break-all;
}
.email:hover { box-shadow: inset 0 0 0 2px var(--main); }

/* 바닥글 */
.foot {
  margin-top: 56px; padding: 28px 0 calc(36px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); color: var(--sub); font-size: 13.5px;
}
.foot__brand { display: flex; align-items: center; gap: 8px; color: var(--text); }
.foot__brand img { width: 28px; height: 28px; }
.foot__brand span { color: var(--sub); }
.biz { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 14px 0 0; }
.biz > div { display: flex; gap: 6px; }
.biz dt { font-weight: 700; }
.biz dd { margin: 0; }
.biz a { color: inherit; }
.foot__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 16px; }
.foot__langs { display: flex; gap: 14px; }
.foot__langs a { color: var(--sub); }
.foot__langs a[aria-current] { color: var(--text); font-weight: 700; text-decoration: none; }

/* 404 */
.notfound { padding-top: 24px; }
.notfound .card { padding: 44px 20px; text-align: center; }
.notfound img { width: 96px; height: 96px; margin: 0 auto 18px; }
.notfound h1 { font-size: 26px; }
.notfound p { margin-top: 8px; color: var(--sub); }
.notfound .actions { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float { animation: none; }
}
