/* attadiary.com — 기특 일기 홈페이지. 외부 글꼴·스크립트 없이 이 파일 하나로 그린다.
   경로는 모두 이 파일 기준 상대 경로라서 index.html 을 직접 열어도 그대로 보인다. */
@font-face {
  font-family: "Atta Hand";
  src: url("assets/fonts/atta-hand.woff2") format("woff2");
  font-display: swap;
}

:root {
  --paper: #FBF6EF;
  --paper-deep: #F4EBD8;
  --card: #FFFFFF;
  --ink: #4B443B;
  --ink-strong: #3A2F28;
  --sub: #6F655A;
  --line: #E8DDCF;
  --accent: #B4533A;
  --accent-deep: #96412B;
  --link: #2F6B5A;
  --peach: #F4A98C;
  --sky: #CFE6E4;
  --hill-1: #BFD9B4;
  --hill-2: #A5C79B;
  --hand: "Atta Hand", "Gaegu", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  --body: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: 20px;
  --top-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 12px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { color: var(--ink-strong); margin: 0; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 30; padding: 10px 16px; border-radius: 10px; background: var(--ink-strong); color: #fff; }
.skip:focus { top: 12px; color: #fff; }

/* Google Play 공식 배지. 그림은 그대로 두고 크기만 정한다.
   Google 지침: 높이 28px 이상, 둘레 여백은 배지 높이의 1/4 이상, 색·모양 변경 금지. */
.badge { display: inline-block; flex: none; line-height: 0; border-radius: 10px; }
.badge img { width: auto; height: 60px; max-width: none; }

/* 상단 바: 이름, 메뉴, Google Play 배지 */
.top { position: sticky; top: 0; z-index: 20; background: rgba(251, 246, 239, .94); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(8px)) { .top { background: rgba(251, 246, 239, .82); backdrop-filter: blur(10px); } }
.top-in { display: flex; align-items: center; gap: 14px; min-height: var(--top-h); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink-strong); text-decoration: none; font-family: var(--hand); font-size: 30px; line-height: 1; letter-spacing: -.03em; white-space: nowrap; }
.brand img { border-radius: 10px; box-shadow: 0 1px 0 rgba(75, 68, 59, .12); }
.nav { display: none; margin-left: 18px; gap: 22px; font-size: 15px; }
.nav a, .lang { color: var(--ink); text-decoration: none; white-space: nowrap; }
.nav a:hover, .lang:hover { color: var(--accent-deep); text-decoration: underline; }
.lang { margin-left: auto; font-size: 14px; padding: 8px 4px; }
.top-badge img { height: 40px; }
@media (max-width: 559px) {
  .top-in { gap: 12px; }
  .brand { gap: 8px; font-size: 25px; }
  .brand img { width: 34px; height: 34px; }
  .lang { font-size: 13px; }
}
@media (max-width: 399px) {
  .top-badge img { height: 36px; }
  .brand img { display: none; }
}

/* 첫 화면 */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--sky) 0%, var(--paper-deep) 68%, var(--paper) 100%); }
.hero-sky { position: absolute; inset: 0; pointer-events: none; }
.cloud { position: absolute; height: 46px; border-radius: 999px; background: rgba(255, 255, 255, .78); }
.cloud::before { content: ""; position: absolute; left: 22%; bottom: 40%; width: 46%; aspect-ratio: 1; border-radius: 50%; background: inherit; }
.cloud.c1 { width: 150px; left: 4%; top: 46px; }
.cloud.c2 { width: 110px; right: 7%; top: 120px; opacity: .8; }
.hill { position: absolute; border-radius: 50%; }
.hill.h1 { left: -20%; right: 30%; bottom: -230px; height: 380px; background: var(--hill-1); }
.hill.h2 { left: 28%; right: -25%; bottom: -260px; height: 380px; background: var(--hill-2); }
.hero-in { position: relative; display: grid; gap: 36px; padding-top: 44px; padding-bottom: 56px; }
.eyebrow { font-size: 15px; font-weight: 700; letter-spacing: .02em; color: var(--accent-deep); }
.hero h1 { margin-top: 10px; font-family: var(--hand); font-weight: 400; font-size: clamp(52px, 13vw, 92px); line-height: 1.04; letter-spacing: -.04em; word-spacing: -.08em; }
.lead { margin-top: 20px; max-width: 30em; font-size: 19px; color: var(--ink); }
.hero-badge { margin-top: 28px; }
.hero-note { margin-top: 16px; font-size: 14px; color: var(--sub); }
.hero-shot { justify-self: center; width: min(74vw, 320px); }
.hero-shot img { border-radius: 28px; box-shadow: 0 18px 40px rgba(58, 47, 40, .22), 0 0 0 6px rgba(255, 255, 255, .7); transform: rotate(2deg); }

/* 구역 공통 */
.section { padding: 64px 0; }
.section h2, .cta h2 { font-family: var(--hand); font-weight: 400; font-size: clamp(38px, 8.4vw, 56px); line-height: 1.12; letter-spacing: -.04em; word-spacing: -.08em; }
.section-lead { margin-top: 14px; max-width: 34em; color: var(--sub); }

/* 기능 */
.feats { margin-top: 36px; display: grid; gap: 28px; }
.feat { display: grid; grid-template-columns: 128px 1fr; gap: 18px; align-items: start; align-content: start; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; }
.feat img { border-radius: 14px; }
.feat-no { display: block; font-family: var(--hand); font-size: 24px; line-height: 1; color: var(--accent); }
.feat h3 { margin-top: 6px; font-family: var(--hand); font-weight: 400; font-size: 28px; line-height: 1.15; letter-spacing: -.03em; word-spacing: -.06em; }
.feat p { margin-top: 8px; font-size: 15.5px; line-height: 1.65; color: var(--ink); }

/* 마무리 */
.cta { padding: 8px 0 72px; text-align: center; }
.cta-in { display: grid; justify-items: center; gap: 30px; }
.cta h2 { max-width: 15em; }

/* 바닥 */
.foot { border-top: 1px solid var(--line); background: var(--card); padding: 34px 0 44px; font-size: 14.5px; }
.foot-in { display: grid; gap: 18px; }
.foot-brand { display: flex; align-items: center; gap: 10px; font-family: var(--hand); font-size: 26px; line-height: 1; letter-spacing: -.03em; color: var(--ink-strong); }
.foot-brand img { border-radius: 9px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a { color: var(--ink); }
.foot-small { color: var(--sub); font-size: 13.5px; }

/* 정책 문서 */
.doc { max-width: 820px; padding-top: 44px; padding-bottom: 72px; }
.doc h1 { font-size: clamp(28px, 6.4vw, 38px); line-height: 1.25; }
.doc h2 { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 22px; line-height: 1.4; }
.doc h3 { margin-top: 28px; font-size: 18px; }
.doc p { margin-top: 14px; }
.doc h1 + p { color: var(--sub); font-size: 15px; }
.doc ul { margin-top: 14px; padding-left: 22px; list-style: disc; }
.doc li { margin-top: 6px; }
.doc li::marker { color: var(--peach); }
.table-wrap { margin-top: 18px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.doc table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14.5px; line-height: 1.6; }
.doc th, .doc td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.doc th { background: #FBE3D6; color: var(--ink-strong); font-weight: 700; white-space: nowrap; }
.doc tr:last-child td { border-bottom: 0; }
.draft { margin-bottom: 22px; padding: 12px 16px; border-radius: 12px; background: #FFF1C9; color: #5C4300; font-size: 15px; font-weight: 700; }

/* 없는 주소 안내 */
.nf { max-width: 820px; text-align: center; padding-top: 88px; padding-bottom: 72px; }
.nf h1 { font-size: clamp(28px, 6.4vw, 38px); line-height: 1.25; }
.nf p { margin-top: 14px; }
.btn-line { display: inline-block; margin: 20px 6px 0; padding: 10px 20px; border: 1.5px solid var(--ink); border-radius: 999px; color: var(--ink-strong); text-decoration: none; }
.btn-line:hover { background: var(--ink-strong); color: #fff; }

@media (min-width: 560px) {
  :root { --gutter: 28px; }
  .top-badge img { height: 44px; }
  .feat { grid-template-columns: 150px 1fr; padding: 20px; gap: 22px; }
}

@media (min-width: 900px) {
  :root { --gutter: 40px; --top-h: 72px; }
  body { font-size: 18px; }
  .nav { display: flex; }
  .badge img { height: 68px; }
  .top-badge img { height: 46px; }
  .hero-in { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 48px; padding-top: 72px; padding-bottom: 96px; }
  .hero-shot { width: min(100%, 340px); justify-self: end; margin-right: 4%; }
  .lead { font-size: 21px; }
  .section { padding: 96px 0; }
  .feats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
  .feat { grid-template-columns: 1fr; padding: 22px 22px 26px; gap: 18px; }
  .feat img { width: 100%; }
  .feat h3 { font-size: 30px; }
  .cta { padding: 8px 0 104px; }
  .foot-in { grid-template-columns: auto 1fr; align-items: center; column-gap: 40px; }
  .foot-small { grid-column: 1 / -1; }
  .foot-links { justify-content: flex-end; }
}

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