/* ==========================================================================
   내가그린기린기록 — 소개 페이지
   앱과 같은 크림 + 짙은 초록, 손그림(sketch) 테두리 감성
   ========================================================================== */

:root {
  --cream: #f2ecdf;          /* 페이지 배경 */
  --cream-soft: #faf6ec;     /* 카드 배경 */
  --ink: #22372c;            /* 본문 잉크색 */
  --ink-soft: #55685c;       /* 보조 텍스트 */
  --green: #2e4a3a;          /* 브랜드 짙은 초록 */
  --green-deep: #24382e;
  --green-bubble: #5c7263;   /* 사용자 말풍선 */
  --line: #2f4a3c;           /* 스케치 선 색 */
  --shadow: 0 10px 30px rgba(34, 55, 44, 0.10);

  --font-serif: "Gowun Batang", serif;
  --font-body: "Gowun Dodum", sans-serif;
  --font-hand: "Gaegu", cursive;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* ── 잉크 라인 아이콘 ─────────────────────────────── */
.svg-defs { display: none; }

.icon {
  width: 2rem;
  height: 2rem;
  stroke: var(--green);
  fill: none;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}
.icon .ink-fill { fill: var(--green); stroke: none; }
.icon-lg { width: 2.6rem; height: 2.6rem; }
.icon-xl { width: 3.4rem; height: 3.4rem; stroke-width: 2.3; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.7;
  word-break: keep-all; /* 한국어 어절 단위 줄바꿈 */
  /* 은은한 종이 질감 */
  background-image:
    radial-gradient(rgba(46, 74, 58, 0.045) 1px, transparent 1px);
  background-size: 22px 22px;
}

.container {
  width: min(1080px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.center { text-align: center; }
.br-desktop { display: none; }
@media (min-width: 720px) { .br-desktop { display: inline; } }

/* ── 손그림 테두리 공통 ──────────────────────────────
   삐뚤빼뚤한 border-radius 로 스케치 느낌을 냅니다 */
.sketch {
  border: 2px solid var(--line);
  border-radius: 255px 18px 225px 18px / 18px 225px 18px 255px;
  background: var(--cream-soft);
  box-shadow: 3px 4px 0 rgba(47, 74, 60, 0.16);
}

/* ── 버튼 ─────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  text-decoration: none;
  border: 2px solid var(--green-deep);
  border-radius: 200px 16px 200px 16px / 16px 200px 16px 200px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px) rotate(-0.3deg); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--green);
  color: #f6efdf;
  box-shadow: 3px 4px 0 rgba(36, 56, 46, 0.35);
}
.btn-primary:hover { background: var(--green-deep); box-shadow: 4px 6px 0 rgba(36, 56, 46, 0.3); }

.btn-ghost {
  background: transparent;
  color: var(--green-deep);
}
.btn-ghost:hover { background: rgba(46, 74, 58, 0.07); }

.btn-sm { padding: 0.45rem 1.1rem; font-size: 0.92rem; }
.btn-lg { padding: 0.85rem 1.9rem; font-size: 1.08rem; font-weight: 600; }

/* ── 손글씨 노트 ──────────────────────────────────── */
.hand-note {
  font-family: var(--font-hand);
  font-size: 1.25rem;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}
.hand-note::before { content: "✎ "; }

/* ── 헤더 ─────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(242, 236, 223, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid rgba(47, 74, 60, 0.25);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.8rem;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark { width: 38px; height: 38px; display: block; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; border-radius: 9px; }
.brand-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: 0.01em;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}
.header-nav a:not(.btn) {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
  transition: color 0.15s;
}
.header-nav a:not(.btn):hover { color: var(--green-deep); }
.header-cta-mobile { display: none; }

@media (max-width: 720px) {
  .header-nav { display: none; }
  .header-cta-mobile { display: inline-block; }
}

/* ── 히어로 ───────────────────────────────────────── */
.hero { padding: 5rem 0 4.5rem; overflow: hidden; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
@media (max-width: 860px) {
  .hero { padding-top: 3.2rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 2.6rem; }
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  line-height: 1.32;
  font-weight: 700;
  margin-bottom: 1.1rem;
}
.hero h1 em {
  font-style: normal;
  position: relative;
  white-space: nowrap;
}
/* 형광펜 밑줄 */
.hero h1 em::after {
  content: "";
  position: absolute;
  left: -2px; right: -2px; bottom: 0.12em;
  height: 0.42em;
  background: rgba(122, 155, 132, 0.38);
  z-index: -1;
  border-radius: 4px;
  transform: rotate(-0.5deg);
}
.hero-sub {
  font-size: 1.07rem;
  color: var(--ink-soft);
  margin-bottom: 1.8rem;
}
.hero-sub strong { color: var(--green-deep); }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}
.hero-hint {
  font-family: var(--font-hand);
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* ── 히어로 대화 목업 ─────────────────────────────── */
.hero-chat { max-width: 430px; justify-self: end; width: 100%; }
@media (max-width: 860px) { .hero-chat { justify-self: center; } }

.chat-frame {
  padding: 1.3rem 1.2rem 1.1rem;
  transform: rotate(0.6deg);
}
.chat-head {
  font-family: var(--font-hand);
  font-size: 1.02rem;
  color: var(--ink-soft);
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.chat-head .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4c7a5d;
  display: inline-block;
}

.bubble {
  position: relative;
  padding: 0.75rem 0.95rem;
  margin-bottom: 0.85rem;
  font-size: 0.94rem;
  line-height: 1.6;
  max-width: 88%;
  box-shadow: 2px 3px 0 rgba(47, 74, 60, 0.14);
}
.bubble.silok {
  background: #fdfbf5;
  margin-right: auto;
  transform: rotate(-0.4deg);
  padding-left: 2.5rem;
}
.bubble.silok .avatar {
  position: absolute;
  left: 0.55rem;
  top: 0.6rem;
}
.bubble.silok .avatar .icon {
  width: 1.45rem;
  height: 1.45rem;
  stroke-width: 4;
}
.bubble.silok .avatar img {
  width: 1.5rem;
  height: auto;
  display: block;
  border-radius: 5px;
}
.bubble.user {
  background: var(--green-bubble);
  color: #f4f1e8;
  margin-left: auto;
  transform: rotate(0.4deg);
  border-color: var(--green-deep);
}
.chat-typing {
  font-family: var(--font-hand);
  font-size: 0.98rem;
  color: var(--ink-soft);
  padding-left: 0.3rem;
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: 0.45; } }

/* ── 섹션 공통 ────────────────────────────────────── */
.section { padding: 4.5rem 0; }
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 2.6rem;
}

/* ── 미디어(영상/스크린샷) ────────────────────────── */
.section-media { padding-top: 3.4rem; }

/* 사진/영상이 주인공인 구역이라 손그림 테두리 대신 깔끔한 사각 테두리를 씀 */
.section-media .sketch {
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(47, 74, 60, 0.12);
}

.media-frame {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  max-width: 1000px; /* 아래 스크린샷 2열 합친 폭과 동일 */
  margin-inline: auto;
  display: grid;
  place-items: center;
  padding: 0;
}
.media-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-placeholder {
  display: grid;
  place-items: center;
  gap: 0.25rem;
  text-align: center;
  color: var(--ink-soft);
  padding: 2rem;
}
.media-placeholder .media-icon { display: block; opacity: 0.8; }
.media-placeholder p { font-family: var(--font-hand); font-size: 1.3rem; }
.media-placeholder small { font-size: 0.85rem; opacity: 0.75; }
.media-placeholder.small { padding: 1.4rem 0.8rem; }

.shots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
  max-width: 1000px;
  margin: 2rem auto 0;
  /* 같은 줄의 카드는 높이를 맞춘다(남는 공간 허용) */
}
.shot-wide { grid-column: 1 / -1; }
@media (max-width: 540px) { .shots { grid-template-columns: 1fr; } }

.shot {
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.shot > .media-placeholder { flex: 1; min-height: 150px; }
.shot img { width: 100%; display: block; }
.shot figcaption {
  font-family: var(--font-hand);
  font-size: 1.02rem;
  text-align: center;
  color: var(--ink-soft);
  padding: 0.55rem 0.6rem 0.7rem;
  border-top: 2px dashed rgba(47, 74, 60, 0.3);
  margin-top: auto; /* 이미지가 짧아도 캡션은 카드 바닥에 붙인다 */
}

/* ── 사용 흐름 ────────────────────────────────────── */
.flow-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.3rem;
  counter-reset: step;
}
.flow-step {
  position: relative;
  padding: 1.6rem 1.2rem 1.4rem;
  text-align: center;
}
.flow-step:nth-child(odd) { transform: rotate(-0.5deg); }
.flow-step:nth-child(even) { transform: rotate(0.5deg); }

.step-num {
  position: absolute;
  top: -0.85rem;
  left: 50%;
  translate: -50% 0;
  width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #f6efdf;
  font-family: var(--font-hand);
  font-size: 1.05rem;
  border-radius: 50% 45% 55% 50%;
  border: 2px solid var(--green-deep);
}
.step-icon { display: block; margin-bottom: 0.6rem; }
.step-icon .icon { margin-inline: auto; }
.flow-step h3 {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  margin-bottom: 0.45rem;
}
.flow-step p { font-size: 0.9rem; color: var(--ink-soft); }

/* ── 메뉴바 앱 ────────────────────────────────────── */
.menubar-inner {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 1000px;
  margin-inline: auto;
}
@media (max-width: 860px) { .menubar-inner { grid-template-columns: 1fr; gap: 2.4rem; } }
.menubar-copy { min-width: 0; } /* nowrap 코드가 그리드 칸을 밀어내지 않게 */

.menubar-desc {
  font-size: 1.02rem;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
}
.menubar-desc br { display: none; }
@media (min-width: 860px) { .menubar-desc br { display: inline; } }

/* 명령어가 주인공인 박스라 손그림 테두리 대신 깔끔한 사각으로 */
.install-box {
  padding: 1.1rem 1.2rem 1rem;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(47, 74, 60, 0.10);
}
.install-label {
  font-family: var(--font-hand);
  font-size: 1.08rem;
  color: var(--green-deep);
  margin-bottom: 0.55rem;
}
.install-row {
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
}
.install-row code {
  flex: 1;
  min-width: 0;
  display: block;
  background: #23372c;
  color: #e9f2e9;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.78rem;
  line-height: 1.5;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  overflow-x: auto;
  white-space: nowrap;
  word-break: normal;
}
.install-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 0.6rem;
}
.menubar-links { margin-top: 0.9rem; }
.menubar-links a {
  color: var(--green-deep);
  font-size: 0.92rem;
  text-decoration: none;
  border-bottom: 1.5px dashed rgba(47, 74, 60, 0.4);
}
.menubar-links a:hover { border-bottom-style: solid; }

/* 팝오버 목업 — 실제 메뉴바 앱을 참고해 기린 아이콘에서 팝오버가 내려오는 형태 */
.menubar-mock { max-width: 340px; justify-self: center; width: 100%; position: relative; }
.menubar-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.34rem 0.7rem;
  background: #2c3b31;
  border-radius: 14px 14px 4px 4px;
  margin-bottom: 1.05rem;
  box-shadow: 0 6px 16px rgba(20, 30, 24, 0.28);
}
.menubar-bar .menubar-mascot { display: flex; }
.menubar-bar .menubar-mascot img { width: 15px; display: block; image-rendering: pixelated; }
.menubar-sys {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.mb-ic {
  width: 15px;
  height: 15px;
  stroke: #cdd8cd;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}
.mb-ic .f { fill: #cdd8cd; stroke: none; }
.menubar-bar .menubar-time {
  color: #eef3ee;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  margin-left: 0.15rem;
}
/* 팝오버 본체 — 실제 앱의 크기·비율(340px 폭 기준)을 그대로 반영, 색/폰트는 페이지 톤 유지 */
.popover-mock {
  position: relative;
  padding: 16px;
  background: var(--cream-soft);
  border: 1px solid rgba(47, 74, 60, 0.12);
  border-radius: 18px;
  box-shadow: 0 10px 32px rgba(34, 55, 44, 0.18), 0 2px 8px rgba(34, 55, 44, 0.08);
}
/* 기린 아이콘 아래를 가리키는 말풍선 꼬리(앱: 20×10 삼각형) */
.popover-mock::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 9px;
  width: 20px;
  height: 10px;
  background: var(--cream-soft);
  clip-path: polygon(50% 0, 0 100%, 100% 100%);
  filter: drop-shadow(0 -1px 0.5px rgba(47, 74, 60, 0.10));
}
.popover-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.popover-head img { height: 22px; width: auto; }
.popover-head strong { font-size: 13px; font-weight: 800; color: var(--green-deep); }
.popover-textarea {
  border: 1px solid rgba(47, 74, 60, 0.12);
  border-radius: 12px;
  min-height: 120px;
  padding: 10px 12px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
  background: var(--cream);
}
.popover-textarea .caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  background: var(--green);
  margin-left: 2px;
  vertical-align: -0.12em; /* 글자 높이에 맞춰 살짝 위로 */
  animation: blink 1.1s step-end infinite;
}
.popover-foot { margin-top: 6px; }
.popover-link {
  display: block;
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: none;
  min-height: 15px;
}
.popover-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.pop-btn {
  flex: 1;
  text-align: center;
  padding: 9px 0;
  font-size: 13px;
  font-weight: 800;
  border-radius: 999px;
  border: 1px solid transparent;
}
.pop-btn.ghost { color: var(--ink); background: var(--cream); border-color: rgba(47, 74, 60, 0.2); }
.pop-btn.solid { color: var(--cream-soft); background: var(--green); }
.menubar-mock-note {
  font-family: var(--font-hand);
  text-align: center;
  color: var(--ink-soft);
  font-size: 1rem;
  margin-top: 0.8rem;
}

/* ── 특징 ─────────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 880px;
  margin-inline: auto;
}
@media (max-width: 720px) { .features { grid-template-columns: 1fr; } }

.feature { padding: 1.7rem 1.6rem; }
.feature:nth-child(odd) { transform: rotate(-0.35deg); }
.feature:nth-child(even) { transform: rotate(0.35deg); }
.feature-icon { display: block; margin-bottom: 0.7rem; }
.feature h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.feature p { font-size: 0.95rem; color: var(--ink-soft); }

/* ── 마지막 CTA ───────────────────────────────────── */
.section-cta { padding-bottom: 5.5rem; }
.cta-card {
  display: inline-block;
  padding: 3rem clamp(1.6rem, 6vw, 4.5rem);
  transform: rotate(-0.4deg);
}
.cta-card h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  margin-bottom: 1.6rem;
}

/* ── 푸터 ─────────────────────────────────────────── */
.site-footer {
  border-top: 2px solid rgba(47, 74, 60, 0.25);
  padding: 1.6rem 0 2rem;
  background: rgba(46, 74, 58, 0.05);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.footer-inner nav { display: flex; gap: 1.2rem; }
.footer-inner a { color: var(--green-deep); text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }
.made-by a {
  border-bottom: 1.5px dashed rgba(47, 74, 60, 0.4);
}
.made-by a:hover { border-bottom-style: solid; text-decoration: none; }

/* ── 등장 효과 ────────────────────────────────────── */
.reveal {
  opacity: 0;
  translate: 0 18px;
  transition: opacity 0.6s ease, translate 0.6s ease;
}
.reveal.shown { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; translate: none; transition: none; }
  .chat-typing { animation: none; }
  html { scroll-behavior: auto; }
}
