/* 구성: 앱 화면이 주인공. 하루의 색으로 구역을 나눈다.
   첫 화면은 앱 대표색, 새벽 음성 기록은 앱의 수면 남색, 추억은 연한 초록.
   색은 앱 AppColors 값을 그대로 쓴다. */
@font-face {
  font-family: "BebeHand";
  src: url("assets/hand.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --clay: #a84c2b;
  --clay-deep: #8a3c20;
  --peach: #f5c4a8;
  --paper: #faf9f7;
  --white: #ffffff;
  --sand: #f1f0ed;
  --ink: #302b27;
  --muted: #6b625a;
  --line: #e6e2dd;
  --night: #221e57;
  --night-line: #c7d2fe;
  --sage: #e7ece3;
  --phone-edge: #1d1a18;
  --font: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --hand: "BebeHand", var(--font);
  --gutter-l: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--paper);
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.night :focus-visible,
.hero :focus-visible,
.closing :focus-visible {
  outline-color: var(--white);
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 40;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--white);
  border-radius: 8px;
}

.skip-link:focus {
  top: 12px;
}

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.45rem, 10.4vw, 4.1rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.028em;
}

h2 {
  font-size: clamp(1.8rem, 6.6vw, 2.75rem);
  font-weight: 800;
  line-height: 1.26;
  letter-spacing: -0.024em;
}

h3 {
  font-size: clamp(1.4rem, 5vw, 1.8rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

p {
  margin: 0;
}

.section-lead {
  margin-top: 14px;
  color: var(--muted);
  max-width: 34em;
}

/* 머리글 */
.header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  border-radius: 9px;
}

.nav {
  display: none;
  gap: 26px;
  margin-left: auto;
  font-size: 0.94rem;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
}

.nav a:hover {
  color: var(--ink);
}

.header-get {
  margin-left: auto;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--clay);
  color: var(--white);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

/* 첫 화면 */
.hero {
  background: var(--clay);
  color: var(--white);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: 34px;
  padding-top: 42px;
}

.kicker {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--clay-deep);
  font-size: 0.92rem;
  font-weight: 700;
}

.hero h1 {
  margin-top: 16px;
}

.lead {
  margin-top: 16px;
  max-width: 27em;
  font-size: 1.08rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
}

.badges a {
  display: block;
  border-radius: 8px;
}

.badge-apple {
  height: 46px;
  width: auto;
}

/* 구글 배지는 공식 파일 위아래에 투명 여백이 있어 보이는 높이를 애플 배지와 맞춘다 */
.badge-play {
  height: 60px;
  width: auto;
  margin-block: -7px;
}

.hero-note {
  margin-top: 14px;
  font-size: 0.92rem;
}

.hero-stage {
  position: relative;
  height: 420px;
}

.phone {
  margin: 0;
  padding: 2.4%;
  background: var(--phone-edge);
  border-radius: 12% / 5.6%;
  box-shadow: 0 22px 44px -18px rgb(30 18 12 / 0.55);
}

.phone img {
  width: 100%;
  border-radius: 10% / 4.7%;
}

.stage-main {
  position: absolute;
  top: 0;
  right: 4%;
  width: min(62vw, 250px);
}

.stage-side {
  display: none;
}

.stage-widget {
  position: absolute;
  left: 0;
  bottom: 28px;
  width: min(74vw, 300px);
  filter: drop-shadow(0 16px 22px rgb(30 18 12 / 0.45));
}

/* 시기 고르기 */
.period {
  padding-block: 54px 56px;
}

.rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 26px;
  border-top: 3px solid var(--line);
}

.rail[hidden] {
  display: none !important;
}

.rail button {
  position: relative;
  appearance: none;
  background: none;
  border: 0;
  margin: 0;
  padding: 13px 2px 12px;
  color: var(--muted);
  font: inherit;
  font-size: clamp(0.82rem, 3.5vw, 1.02rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  cursor: pointer;
}

/* 줄 위의 점은 시기가 이어진다는 뜻이다 */
.rail button::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  width: 13px;
  height: 13px;
  margin-left: -6.5px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--line);
}

.rail button[aria-selected="true"] {
  color: var(--clay);
}

.rail button[aria-selected="true"]::before {
  background: var(--clay);
  border-color: var(--clay);
}

.panel {
  display: grid;
  gap: 32px;
  margin-top: 34px;
}

.js .panel {
  animation: panel-in 0.18s ease-out;
}

@keyframes panel-in {
  from {
    transform: translateY(6px);
  }
  to {
    transform: none;
  }
}

.panel[hidden] {
  display: none;
}

.panel-tag {
  display: none;
  margin-bottom: 8px;
  color: var(--clay);
  font-weight: 700;
}

html:not(.js) .panel-tag {
  display: block;
}

.points {
  display: grid;
  gap: 0;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.points li {
  display: grid;
  gap: 1px;
  padding-block: 13px;
  border-top: 1px solid var(--line);
}

.points strong {
  font-size: 1.04rem;
}

.points span {
  color: var(--muted);
}

.panel-shot {
  margin: 0;
  justify-self: center;
  width: min(60vw, 232px);
}

.stack {
  position: relative;
  padding-bottom: 26px;
}

/* 기록 줄이 작아 보이지 않게 같은 화면의 목록을 크게 겹쳐 둔다 */
.stack-card {
  position: absolute;
  left: -15%;
  bottom: 0;
  width: 130%;
  max-width: 130%;
  padding-top: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 16px 30px -14px rgb(30 18 12 / 0.4);
}

.panel-shot .phone {
  max-height: 356px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 76%, transparent);
  mask-image: linear-gradient(#000 76%, transparent);
}

/* 하단 메뉴를 잘라 낸 짧은 화면이라 지도와 목록까지 다 보여 준다. */
.panel-shot .phone-whole {
  max-height: none;
  -webkit-mask-image: none;
  mask-image: none;
}

.panel-shot figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
}

/* 새벽 음성 기록 */
.night {
  background: var(--night);
  color: var(--white);
  padding-block: 54px 60px;
  overflow: hidden;
}

.night-grid {
  display: grid;
  gap: 40px;
}

.clock {
  color: var(--night-line);
  font-size: 1.02rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.night h2 {
  margin-top: 8px;
}

.spoken {
  font-family: var(--hand);
  font-weight: 700;
  font-size: clamp(1.9rem, 8vw, 2.7rem);
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.night .spoken {
  margin-block: 20px 14px;
  color: var(--peach);
}

.night-copy .fine {
  margin-top: 14px;
  color: var(--night-line);
  font-size: 0.9rem;
}

.duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  width: 100%;
  max-width: 460px;
  justify-self: center;
}

.duo-low {
  margin-top: 34px;
}

/* 가족 */
.family {
  padding-block: 54px 56px;
}

.family-grid {
  display: grid;
  gap: 36px;
}

.family-grid > :last-child {
  grid-row: 1;
}

.family .spoken {
  margin-bottom: 10px;
  color: var(--clay);
}

/* 추억 */
.memory {
  background: var(--sage);
  padding-block: 54px 60px;
}

.memory-grid {
  display: grid;
  gap: 40px;
}

.memory .section-lead,
.memory .points span {
  color: #55564e;
}

.memory .points li {
  border-top-color: #cdd5c8;
}

/* 그 밖의 기능 */
.more {
  padding-block: 54px 44px;
}

.more-list {
  display: grid;
  gap: 0;
  margin: 22px 0 0;
}

.more-list div {
  display: grid;
  gap: 2px;
  padding-block: 12px;
  border-top: 1px solid var(--line);
}

.more-list dt {
  color: var(--clay);
  font-size: 0.94rem;
  font-weight: 700;
}

.more-list dd {
  margin: 0;
  font-weight: 700;
}

/* 옮겨 오기 */
.switch {
  background: var(--sand);
  overflow: hidden;
}

.switch-grid {
  display: grid;
  gap: 28px;
  padding-top: 56px;
}

.switch-shot {
  margin: 0;
  justify-self: center;
  width: min(58vw, 220px);
  height: 170px;
}

.switch .section-lead {
  color: #5c544d;
}

/* 질문 */
.faq {
  padding-block: 50px 60px;
}

.faq-grid {
  display: grid;
  gap: 24px;
}

.faq-list details {
  border-top: 1px solid var(--line);
}

.faq-list details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  position: relative;
  padding: 15px 34px 15px 0;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 11px;
  color: var(--clay);
  font-size: 1.4rem;
  font-weight: 500;
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list details p {
  padding-bottom: 16px;
  color: var(--muted);
}

/* 마무리 */
.closing {
  background: var(--clay);
  color: var(--white);
  padding-block: 56px;
}

.closing-grid {
  display: grid;
  gap: 8px;
}

.footer {
  padding-block: 28px;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.82rem;
}

.footer p {
  margin-top: 8px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--ink);
  font-weight: 700;
}

/* 휴대폰 아래 고정 버튼 */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  padding: 10px var(--gutter-r) calc(10px + env(safe-area-inset-bottom, 0px)) var(--gutter-l);
  background: var(--paper);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 0.2s ease;
}

.dock.is-visible {
  transform: none;
}

.dock a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  border-radius: 14px;
  background: var(--clay);
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
}

.dock img {
  border-radius: 7px;
}

@media (min-width: 720px) {
  .more-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 34px;
  }

  .faq-grid {
    grid-template-columns: 1fr 2fr;
    gap: 48px;
  }

  .closing-grid {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 40px;
  }

  .closing .badges {
    margin-top: 0;
  }

  .dock {
    display: none;
  }
}

@media (min-width: 960px) {
  body {
    font-size: 18px;
  }

  .nav {
    display: flex;
  }

  .header-get {
    margin-left: 0;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
    gap: 24px;
    padding-top: 0;
  }

  .hero-copy {
    padding-block: 84px 92px;
  }

  .hero-stage {
    height: auto;
    min-height: 620px;
  }

  .stage-main {
    top: 56px;
    left: 8%;
    right: auto;
    width: 52%;
  }

  .stage-side {
    display: block;
    position: absolute;
    top: 128px;
    left: 57%;
    width: 44%;
  }

  .stage-widget {
    left: -5%;
    bottom: 64px;
    width: 62%;
  }

  .panel,
  .family-grid,
  .memory-grid,
  .night-grid,
  .switch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 64px;
    align-items: center;
  }

  .panel-shot {
    width: 300px;
  }

  .panel-shot .phone:not(.phone-cut) {
    max-height: none;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .panel-shot .phone-cut {
    max-height: none;
  }

  .period,
  .family,
  .memory,
  .night {
    padding-block: 96px;
  }

  .family-grid > :last-child {
    grid-row: auto;
  }

  .rail {
    max-width: 760px;
  }

  .switch-grid {
    padding-top: 72px;
    align-items: start;
  }

  .switch-shot {
    width: 280px;
    height: 300px;
  }
}

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

  .js .panel {
    animation: none;
  }

  .dock {
    transition: none;
  }
}
