/* DogEar 소개 홈페이지
 * 근거: docs/planning/27.DogEar(소개 홈페이지 PRD).md
 *   §8 브랜드 — 따뜻한 밝은 배경 + 절제된 오렌지, 여백으로 구분, 부드러운 모서리,
 *              반복되는 카드·네모 상자·영문 라벨 절제
 *   §3  모바일 퍼스트 → 태블릿·데스크톱 확장
 * 색: 앱 토큰(src/constants/tokens.ts)과 같은 값을 쓴다.
 */

:root {
  /* tokens.ts 정본. 브랜드 가이드 시트 이미지에는 깨진 HEX가 섞여 있어 쓰지 않는다. */
  --orange: #FF7A30;         /* Primary Orange */
  --orange-2: #FF6A2D;       /* 그라디언트 종점 */
  --orange-1: #FF9B4D;       /* 그라디언트 시작 */
  --red: #FF4D2D;            /* Primary Red — 강조 한 곳에만 */
  --orange-deep: #C2410C;    /* Derived — 소형 텍스트 4.5:1 확보 */
  --cream: #FFF6F0;
  --peach: #FFF0E6;
  --grad: linear-gradient(135deg, var(--orange-1) 0%, var(--orange-2) 58%, var(--red) 100%);
  --ink: #222222;
  --ink-soft: #5A5148;
  --ink-faint: #74665A;     /* 작은 글씨용 — #8C7B6B는 흰 바탕 4.07:1·푸터 3.82:1로 4.5:1 미달이었다 */
  --line: #EFE7E0;
  --white: #FFFFFF;

  --wrap: 1080px;
  --radius: 20px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: 'Apple SD Gothic Neo', 'Pretendard', 'Noto Sans KR', system-ui, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;   /* 한국어 — 단어 중간에서 줄바꿈되지 않게 */
}

img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* grid·flex 자식은 기본이 min-width:auto라 내용이 길면 컨테이너를 넘어선다.
   한 곳만 넘쳐도 문서 전체에 가로 스크롤이 생겨 모든 섹션이 잘려 보인다. */
.split > *, .shots > *, .step > * { min-width: 0; }

/* 건너뛰기 링크 — 키보드 사용자 */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 12px 18px; z-index: 100; border-radius: 0 0 12px 0;
}
.skip:focus { left: 0; }

:where(a, button):focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 6px;
}


/* ── 섹션 공통 ────────────────────────────────── */
section { padding: 68px 0; }
section.tint { background: var(--cream); }
.hero + section.tint { background: #fff; }

h1, h2 { letter-spacing: -0.6px; line-height: 1.34; }
h1 { font-size: 30px; font-weight: 800; }
h2 { font-size: 25px; font-weight: 800; }
.lead { margin-top: 14px; font-size: 16.5px; color: var(--ink-soft); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 12px;
  font-size: 13px; font-weight: 700; color: var(--orange-deep);
  background: var(--peach); padding: 6px 14px 6px 10px; border-radius: 999px;
}
.eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--grad);
}

/* ── 첫 소개 ──────────────────────────────────────
   브랜드 그라디언트를 첫 화면에 크게 쓴다.
   ⚠️ 글자는 흰색이 아니라 차콜(#222)이다. 선명한 오렌지 위 흰 글씨는 2.1~3.3:1로
      KWCAG 4.5:1에 한참 못 미친다. 차콜은 같은 배경에서 4.8~7.6:1로 전 구간 통과한다.
      (흰 글씨를 쓰려면 배경을 #C2410C 수준까지 어둡게 낮춰야 해서 선명함을 잃는다) */
.hero {
  position: relative; overflow: hidden;
  padding: 48px 0 64px;
  background: linear-gradient(135deg, var(--orange-1) 0%, var(--orange) 46%, var(--orange-2) 100%);
  color: var(--ink);
}
.hero h1 { font-size: 32px; }
.hero .lead { font-size: 17px; color: #3A2A1E; }

/* 아이콘 타일 + 워드마크 — 스토어 그래픽과 같은 짜임 */
.brandmark { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.brandmark .tile {
  width: 62px; height: 62px; border-radius: 17px; background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(120,40,5,.22);
}
.brandmark .tile img { width: 42px; height: auto; }
.brandmark .wm { width: 128px; height: auto; }


/* 히어로 안의 앱 화면은 더 또렷하게 띄운다 */
.hero .shot { border-color: rgba(255,255,255,.5); box-shadow: 0 26px 54px -20px rgba(110,35,5,.5); }

/* ── 설치 배지 ────────────────────────────────────
   Google·Apple 공식 배지는 **변형 없이** 원본 비율 그대로 쓴다.
   (색 바꾸기·흐리게 하기·직접 다시 그리기 모두 각 사 가이드라인 위반 — 그래서 hover에 투명도를 쓰지 않는다)
   두 배지를 **같은 높이**로 맞추고 너비는 비율로 따라가게 둔다.
     Google 238.96×70.87 (3.37) · Apple 129.70×40 (3.24)
   Apple 최소 높이는 40px. 모바일 44px이면 두 개 합쳐 ≈300px라 360px 폰에서도 한 줄에 들어간다. */
.stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; align-items: center; }

.badge { display: inline-block; line-height: 0; border-radius: 8px; transition: transform .15s ease; }
.badge img { height: 44px; width: auto; }
.badge:hover { transform: translateY(-1px); }
.badge:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { .badge { transition: none; } .badge:hover { transform: none; } }

/* 720~999px는 히어로·설치 카드가 두 칸으로 나뉘어 글 칸이 좁다(≈310~350px). 44px를 유지해야 한 줄에 든다. */
@media (min-width: 1000px) {
  .stores { gap: 12px; }
  .badge img { height: 52px; }
}

/* ── 앱 화면 ──────────────────────────────────── */
/* 폰 프레임을 두르지 않는다 (PRD §8 "과도한 휴대폰 프레임과 장식을 최소화") */
/* 앱 화면 대부분이 흰 바탕이라 페이지 배경과 붙어 경계가 사라졌다.
   크림 매트를 두르고 테두리를 또렷하게 해 한 장 한 장을 구분한다.
   휴대폰 프레임을 흉내 내지는 않는다(PRD §8). */
.shot {
  border-radius: 24px;
  border: 1px solid rgba(194,65,12,.16);
  overflow: hidden;
  background: var(--cream);
  padding: 10px;
  box-shadow: 0 20px 42px -20px rgba(140,50,10,.34), 0 2px 6px rgba(140,50,10,.07);
}
/* ⚠️ 화면을 CSS로 자르지 않는다.
   예전에는 .shot에 height를 고정하고 object-fit:cover로 잘랐는데,
   캡처마다 어디가 잘릴지 통제가 안 돼 버튼·문구가 뭉텅 잘려 나갔다.
   지금은 보여줄 구간을 원본에서 미리 잘라 두고(assets/screens), 여기서는 그대로 보여준다. */
.shot img { width: 100%; height: auto; display: block; border-radius: 15px; }
.caption { margin-top: 12px; font-size: 14.5px; font-weight: 600; color: var(--ink-soft);
            display: flex; align-items: center; gap: 8px; }
.caption::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }

/* ⚠️ 열 크기를 지정하지 않으면 grid 열이 이미지의 고유 너비(720px)에 맞춰 잡혀
   컨테이너를 넘어선다. img의 max-width:100%는 이 계산에 반영되지 않는다.
   minmax(0, 1fr)로 열의 최소값을 0으로 내려야 컨테이너 안에 갇힌다. */
.shots { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; margin-top: 30px; align-items: start; }

/* 흐름 목록 — 순서는 <ol>이 전하고, 눈에는 일러스트로 보여준다.
   피치 원 위에 올린 건 앱 장소 상세의 지표 아이콘(피치 원 + 아이콘)과 같은 짜임이라서다. */
.steps { margin-top: 28px; display: grid; gap: 14px; list-style: none; }
.step { display: flex; gap: 14px; align-items: center; }
.step .ic {
  flex: none; width: 56px; height: 56px; border-radius: 50%;
  background: var(--peach);
  display: flex; align-items: center; justify-content: center;
}
.step .ic img { width: 44px; height: 44px; }
.step p { font-size: 16px; color: var(--ink-soft); }

/* 설치 안내 카드의 일러스트 — 제목 위에 둔다. 카드 모서리에 걸치면 좁은 폭에서 제목과 겹친다. */
.card-illust { width: 80px; height: 80px; margin: -6px 0 14px -4px; }

/* ── FAQ ─────────────────────────────────────────
   PRD 구성에 없는 임시 영역(2026-09-12). 뺄 때 이 블록째 지운다.
   JS 없이 동작하도록 <details>/<summary>를 쓴다. */
.faq h2 { margin-bottom: 8px; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.faq details:first-of-type { border-top: 1px solid var(--line); margin-top: 26px; }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  font-size: 16.5px; font-weight: 700; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none;
  font-size: 20px; font-weight: 600; color: var(--orange);
  line-height: 1.2;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 12px; font-size: 15.5px; color: var(--ink-soft); }

/* ── 마지막 설치 안내 ─────────────────────────────
   페이지가 크림·흰색만 오가면 평평하다. 여기서 브랜드 그라디언트를 한 번 크게 쓴다.
   글자는 흰 카드 위에 올려 명도대비(4.5:1)를 지킨다 — 오렌지 위 흰 글씨는 2.8:1로 모자란다. */
.cta { background: var(--grad); padding: 64px 0; }
.cta .card {
  background: #fff; border-radius: 26px;
  padding: 38px 28px;
  box-shadow: 0 26px 60px -24px rgba(140,45,5,.55);
}
.cta .stores { margin-top: 24px; }
/* 좁은 폰에서는 카드 안쪽 여백만큼 폭이 모자라 배지가 두 줄로 접힌다.
   카드를 화면 가장자리 쪽으로 넓히고 배지를 Apple 최소 높이(40px)로 낮춰 360px에서도 한 줄에 둔다. */
@media (max-width: 399px) {
  .cta .wrap { padding: 0 16px; }
  .cta .card { padding: 34px 22px; }
  .cta .badge img { height: 40px; }
  .cta .stores { gap: 8px; }
}

/* ── 하단 ─────────────────────────────────────── */
footer { background: #FBF7F4; border-top: 1px solid var(--line); padding: 44px 0 56px; }
footer img { height: 24px; margin-bottom: 16px; }
.f-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 22px; }
.f-links a { font-size: 14.5px; color: var(--ink-soft); text-decoration: none; }
.f-links a:hover { color: var(--orange-deep); text-decoration: underline; }
.biz { font-size: 13px; color: var(--ink-faint); line-height: 1.75; }

/* ── 태블릿 이상 ──────────────────────────────── */
@media (min-width: 720px) {
  section { padding: 88px 0; }
  .cta { padding: 96px 0; }
  .cta .card { padding: 56px 52px; }
  h1 { font-size: 40px; }
  .hero h1 { font-size: 44px; }
  .brandmark .tile { width: 74px; height: 74px; border-radius: 20px; }
  .brandmark .tile img { width: 50px; }
  .brandmark .wm { width: 152px; }
  .step .ic { width: 64px; height: 64px; }
  .step .ic img { width: 50px; height: 50px; }
  /* 넓은 화면에서는 카드 오른쪽이 비어 무게가 왼쪽으로 쏠린다 → 일러스트를 오른쪽 기둥으로 옮긴다 */
  .cta .card { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 40px; align-items: center; }
  .cta .card > * { grid-column: 1; }
  .cta .card > .card-illust { grid-column: 2; grid-row: 1 / span 4; width: 176px; height: 176px; margin: 0 8px 0 0; }
  h2 { font-size: 32px; }
  .lead, .hero .lead { font-size: 18px; }
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
  .split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 48px; align-items: center; }
  .split .shots { margin-top: 0; grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 1000px) {
  .hero .split { grid-template-columns: 1.05fr .95fr; gap: 64px; }

}
