/* =========================================
   오디오 브리핑 — Style
   Mobile-first · 50대+ 최적화 · Minimal · Warm
   ========================================= */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg:          #F7F4EE;
  --bg-deep:     #EDE8DF;
  --text:        #24211E;
  --text-sub:    #736B63;
  --accent:      #9A7453;
  --accent-hover:#7E5C3E;
  --divider:     #D6CDBF;
  --white:       #FFFFFF;

  --font-title: 'Noto Serif KR', serif;
  --font-body:  'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;

  --content-max: 680px;
  --px: 24px;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

/* --- Layout helper --- */
.hero-content,
#story,
#message,
#promises,
#footer {
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--px);
  padding-right: var(--px);
}


/* =========================================
   SECTION 01 — HERO + AUDIO
   ========================================= */

#hero {
  background: var(--bg);
}

.hero-image-wrap {
  width: 100%;
  max-height: 38vh;
  overflow: hidden;
  position: relative;
}

.hero-image-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 90px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 65%;
}

/* Hero Text */
.hero-content {
  padding-top: 24px;
  padding-bottom: 36px;
  text-align: center;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-sub);
  margin-bottom: 12px;
}

.hero-title {
  font-family: var(--font-title);
  line-height: 1.2;
  margin-bottom: 12px;
}

.hero-title-sub {
  display: block;
  font-size: 24px;
  font-weight: 400;
  color: var(--text-sub);
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.hero-title-main {
  display: block;
  font-size: 42px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  color: var(--text-sub);
  letter-spacing: 0.05em;
  margin-bottom: 32px;
}


/* =========================================
   AUDIO PLAYER
   ========================================= */

.player {
  margin-bottom: 24px;
}

/* -- Play Button -- */
.play-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  border: 2px solid var(--accent);
  border-radius: 60px;
  background: var(--accent);
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--white);
  transition: background 0.25s, border-color 0.25s, transform 0.15s;
  min-height: 56px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 12px rgba(154, 116, 83, 0.25);
}

.play-btn:hover,
.play-btn:focus-visible {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.play-btn:active {
  transform: scale(0.97);
}

/* 재생 중 상태 — 아웃라인 스타일 */
.player--playing .play-btn {
  background: transparent;
  color: var(--accent);
  box-shadow: none;
}

.player--playing .play-btn .play-duration {
  color: var(--text-sub);
}

.play-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.play-label {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.play-duration {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
}

/* -- Progress UI -- */
.player-progress-wrap {
  margin-top: 20px;
  padding: 0 2px;
}

.player-time {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sub);
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}

.progress-bar {
  position: relative;
  width: 100%;
  height: 6px;
  background: var(--divider);
  border-radius: 3px;
  cursor: pointer;
  touch-action: none;
}

.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 3px;
  pointer-events: none;
  transition: width 0.15s linear;
}

.progress-handle {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 18px;
  height: 18px;
  background: var(--accent);
  border: 2.5px solid var(--white);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 1px 6px rgba(0,0,0,0.18);
  opacity: 0;
  transition: opacity 0.2s;
}

.player--playing .progress-handle,
.progress-bar:hover .progress-handle {
  opacity: 1;
}


/* -- Transparency -- */
.transparency {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-sub);
  text-align: center;
  word-break: keep-all;
}


/* =========================================
   SECTION 02 — STORY
   ========================================= */

#story {
  padding-top: 56px;
  padding-bottom: 56px;
}

.section-title {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--text);
  text-align: center;
  margin-bottom: 44px;
  word-break: keep-all;
}

/* Timeline */
.timeline {
  list-style: none;
  position: relative;
  padding-left: 36px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 11px;
  width: 1px;
  background: var(--divider);
}

.timeline-item {
  position: relative;
  padding-bottom: 32px;
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp 0.5s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.05s; }
.timeline-item:nth-child(2) { animation-delay: 0.12s; }
.timeline-item:nth-child(3) { animation-delay: 0.19s; }
.timeline-item:nth-child(4) { animation-delay: 0.26s; }
.timeline-item:nth-child(5) { animation-delay: 0.33s; }
.timeline-item:nth-child(6) { animation-delay: 0.40s; }

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-num {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 3px;
}

.timeline-text {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  word-break: keep-all;
}

.timeline-item--highlight .timeline-num {
  font-size: 14px;
}

.timeline-item--highlight .timeline-text {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* =========================================
   SECTION 03 — MESSAGE
   ========================================= */

#message {
  padding-top: 48px;
  padding-bottom: 56px;
  border-top: 1px solid var(--divider);
}

.message-quote {
  text-align: center;
  margin-bottom: 12px;
}

.message-main {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 16px;
  word-break: keep-all;
}

.message-sub {
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-sub);
  word-break: keep-all;
}

.message-source {
  text-align: center;
  font-size: 12px;
  color: var(--divider);
  font-style: italic;
  letter-spacing: 0.02em;
}


/* =========================================
   SECTION 04 — PROMISES
   ========================================= */

#promises {
  padding-top: 40px;
  padding-bottom: 48px;
}

.source-details {
  border-top: 1px solid var(--divider);
  padding-top: 20px;
}

.source-toggle {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
  min-height: 48px;
}

.source-toggle::-webkit-details-marker {
  display: none;
}

.toggle-icon {
  font-size: 20px;
  font-weight: 300;
  color: var(--text-sub);
  transition: transform 0.3s;
  line-height: 1;
}

details[open] .toggle-icon {
  transform: rotate(45deg);
}

.source-content {
  padding-top: 20px;
}

.source-item {
  margin-bottom: 24px;
}

.source-item:last-child {
  margin-bottom: 0;
}

.source-item h3 {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
  word-break: keep-all;
}

.source-item p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-sub);
  word-break: keep-all;
}


/* =========================================
   FOOTER
   ========================================= */

#footer {
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
  padding: 36px var(--px) 56px;
  border-top: 1px solid var(--divider);
  text-align: center;
}

.footer-candidate {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 12px;
  word-break: keep-all;
}

.footer-disclaimer {
  font-size: 11px;
  line-height: 1.7;
  color: var(--divider);
  word-break: keep-all;
}


/* =========================================
   DESKTOP (≥ 720px)
   ========================================= */

@media (min-width: 720px) {
  :root {
    --px: 40px;
  }

  .hero-image-wrap {
    max-height: 46vh;
  }

  .hero-title-sub {
    font-size: 28px;
  }

  .hero-title-main {
    font-size: 50px;
  }

  .section-title {
    font-size: 26px;
  }

  .timeline-text {
    font-size: 20px;
  }

  .timeline-item--highlight .timeline-text {
    font-size: 26px;
  }

  .message-main {
    font-size: 26px;
  }

  .message-sub {
    font-size: 19px;
  }
}

/* Safe-area for notched phones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  #footer {
    padding-bottom: calc(56px + env(safe-area-inset-bottom));
  }
}