/* ============================================
   천사간병협회 랜딩 — 토스 스타일 레이아웃
   ============================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  word-break: keep-all;
}

h1,
h2,
h3,
p,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

a {
  color: inherit;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-gutter);
}

.container-narrow {
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: var(--space-gutter);
}

.section-gray {
  background: var(--color-bg-gray);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 700;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition:
    transform var(--duration-fast) var(--ease-out-expo),
    background-color var(--duration-fast) ease,
    opacity var(--duration-fast) ease;
}

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

.btn-primary {
  background: var(--color-accent);
  color: var(--gray-900);
}

.btn-primary:hover {
  background: var(--primary-40);
}

.btn-dark {
  background: var(--gray-900);
  color: var(--white);
}

.btn-dark:hover {
  opacity: 0.85;
}

.btn-gray {
  background: var(--gray-100);
  color: var(--gray-800);
}

.btn-gray:hover {
  background: var(--gray-200);
}

.btn-sm {
  padding: 0.5rem 1.05rem;
  font-size: var(--text-small);
  border-radius: var(--radius-md);
}

.btn-lg {
  padding: 0.95rem 1.75rem;
  font-size: var(--text-lead);
}

.btn-block {
  width: 100%;
}

.btn:focus-visible,
a:focus-visible,
.link-btn:focus-visible,
input:focus-visible,
textarea:focus-visible,
.store-badge:focus-visible {
  outline: 3px solid var(--blue-50);
  outline-offset: 2px;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--gray-700);
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(229, 232, 235, 0.6);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--gray-900);
}

.brand-mark {
  font-size: 1.35rem;
}

.site-nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.25rem);
}

.site-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-small);
  color: var(--gray-700);
  transition: color var(--duration-fast) ease;
}

.site-nav a:hover {
  color: var(--gray-900);
}

/* ---------- Hero (토스형 센터 정렬) ---------- */

.hero {
  padding-block: clamp(5rem, 4rem + 6vw, 9rem) 0;
  text-align: center;
  overflow: hidden;
}

.hero h1 {
  font-size: var(--text-hero);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.025em;
  color: var(--gray-900);
}

.hero h1 .hl {
  color: var(--color-accent-text);
}

.hero-sub {
  margin-top: 1.5rem;
  font-size: var(--text-lead);
  font-weight: 600;
  color: var(--color-text-subtle);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

/* ---------- Phone mockup (공용) ---------- */

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: clamp(3rem, 2rem + 4vw, 5rem);
}

.phone {
  position: relative;
  width: min(17.5rem, 74vw);
  border-radius: 2.6rem;
  background: linear-gradient(145deg, #f4f5f7 0%, #d8dce1 45%, #b9bfc7 100%);
  padding: 0.45rem;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    inset 0 -1px 2px rgba(25, 31, 40, 0.25),
    0 2px 4px rgba(25, 31, 40, 0.08),
    0 14px 28px rgba(25, 31, 40, 0.12),
    0 36px 70px rgba(25, 31, 40, 0.18);
}

/* 측면 버튼 (전원/볼륨) */
.phone::before,
.phone::after {
  content: '';
  position: absolute;
  width: 3px;
  border-radius: 2px 0 0 2px;
  background: linear-gradient(180deg, #c8cdd4, #9aa1aa);
}

.phone::before {
  left: -3px;
  top: 22%;
  height: 3.4rem;
}

.phone::after {
  right: -3px;
  top: 26%;
  height: 4.4rem;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, #c8cdd4, #9aa1aa);
}

.phone-hero {
  width: min(19rem, 78vw);
}

.phone-screen {
  border-radius: 2.15rem;
  background: var(--gray-50);
  padding: 1.3rem 0.9rem;
  display: grid;
  gap: 0.6rem;
  align-content: start;
  min-height: 27rem;
}

.app-bar {
  font-weight: 800;
  color: var(--gray-900);
  font-size: 0.95rem;
  padding: 0.15rem 0.25rem 0.35rem;
  text-align: left;
}

.phone-screen-img {
  position: relative;
  padding: 0;
  min-height: 0;
  display: block;
  overflow: hidden;
}

.phone-screen-img img {
  display: block;
  width: 100%;
  height: auto;
}

.mock-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 0.85rem 0.95rem;
  box-shadow: var(--shadow-card);
  text-align: left;
}

.mock-card-accent {
  background: var(--primary-10);
}

.mock-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gray-500);
}

.mock-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-top: 0.15rem;
}

.mock-meta {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: var(--gray-600);
}

.mock-progress {
  margin-top: 0.55rem;
  height: 0.45rem;
  border-radius: var(--radius-full);
  background: var(--white);
  overflow: hidden;
}

.mock-progress span {
  display: block;
  width: 62%;
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--primary-50);
}

.mock-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
}

.mock-tile {
  display: grid;
  place-items: center;
  gap: 0.25rem;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.2rem;
  font-size: 1.1rem;
  box-shadow: var(--shadow-card);
}

.mock-tile span {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--gray-600);
}

.mock-btn {
  background: var(--primary-50);
  color: var(--gray-900);
  border-radius: var(--radius-md);
  padding: 0.7rem;
  text-align: center;
  font-weight: 800;
  font-size: 0.88rem;
  margin-top: 0.15rem;
}

.mock-badge {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--green-60);
  background: #eefaf0;
  border-radius: var(--radius-full);
  padding: 0.18rem 0.55rem;
}

.mock-check {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--gray-800);
}

.mock-sign {
  background: var(--white);
  border: 1.5px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 0.8rem 0.9rem 0.6rem;
  color: var(--gray-800);
  text-align: center;
}

.mock-sign svg {
  width: 70%;
  height: auto;
}

.float-chip {
  position: absolute;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-full);
  padding: 0.55rem 1rem;
  font-size: var(--text-tiny);
  font-weight: 700;
  color: var(--gray-800);
  box-shadow: var(--shadow-float);
  white-space: nowrap;
  animation: floaty 5s ease-in-out infinite;
}

.chip-1 {
  top: 16%;
  left: calc(50% - 17rem);
}

.chip-2 {
  top: 52%;
  right: calc(50% - 17rem);
  animation-delay: 1.6s;
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ---------- Stats ---------- */

.stats {
  padding-block: var(--space-section);
  text-align: center;
}

.stats-eyebrow {
  font-size: var(--text-lead);
  font-weight: 600;
  color: var(--color-text-subtle);
}

.stats-number {
  margin-top: 0.75rem;
  font-size: var(--text-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--gray-900);
}

.stats-number strong {
  color: var(--color-accent-text);
  font-variant-numeric: tabular-nums;
}

.stats-points {
  list-style: none;
  margin: 2.25rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.stats-points li {
  background: var(--gray-100);
  color: var(--gray-800);
  font-weight: 700;
  font-size: var(--text-small);
  border-radius: var(--radius-full);
  padding: 0.55rem 1.1rem;
}

/* ---------- Story sections (토스형 좌우 분할) ---------- */

.story {
  padding-block: var(--space-section);
}

.story-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6rem);
}

.story-flip .story-copy {
  order: 2;
}

.story-flip .story-visual {
  order: 1;
}

.story-visual {
  display: flex;
  justify-content: center;
}

.story-eyebrow {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--color-accent-text);
  margin-bottom: 0.9rem;
}

.story-copy h2,
.story-copy h3 {
  font-size: var(--text-display);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--gray-900);
}

.story-copy p:not(.story-eyebrow) {
  margin-top: 1.25rem;
  font-size: var(--text-lead);
  line-height: 1.7;
  color: var(--color-text-sub);
  max-width: 26rem;
}

/* ---------- App section ---------- */

.app-section {
  padding-block: var(--space-section);
}

.app-head {
  text-align: center;
  max-width: 44rem;
  margin-inline: auto;
}

.app-head h2 {
  font-size: var(--text-display);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--gray-900);
}

.app-lead {
  margin-top: 1.25rem;
  font-size: var(--text-lead);
  color: var(--color-text-sub);
}

.app-row {
  margin-top: clamp(4rem, 3rem + 5vw, 8rem);
}

/* ---------- Feature cards ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: clamp(4rem, 3rem + 5vw, 7rem);
}

.feature {
  background: var(--gray-50);
  border-radius: var(--radius-xl);
  padding: 2rem 1.75rem;
  transition: transform var(--duration-normal) var(--ease-out-expo);
}

.feature:hover {
  transform: translateY(-6px);
}

.feature-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 1rem;
}

.feature h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 0.55rem;
}

.feature p {
  font-size: var(--text-small);
  line-height: 1.65;
  color: var(--color-text-sub);
}

/* ---------- Store CTA ---------- */

.store-cta {
  margin-top: clamp(4rem, 3rem + 5vw, 7rem);
  text-align: center;
  background: var(--gray-900);
  border-radius: var(--radius-xl);
  padding: clamp(2.5rem, 2rem + 3vw, 4.5rem) 1.5rem;
}

.store-lead {
  font-size: var(--text-heading);
  font-weight: 700;
  line-height: 1.5;
  color: var(--white);
  margin-bottom: 1.75rem;
}

.store-lead strong {
  color: var(--primary-40);
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--white);
  color: var(--gray-900);
  border: none;
  border-radius: var(--radius-md);
  padding: 0.65rem 1.4rem;
  font-family: inherit;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out-expo);
}

.store-badge:hover {
  transform: translateY(-2px);
}

.store-badge-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.store-badge-text {
  display: grid;
  text-align: left;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.2;
}

.store-badge-text small {
  font-weight: 500;
  font-size: 0.65rem;
  color: var(--gray-500);
}

/* ---------- Promises ---------- */

.promise-section {
  padding-block: var(--space-section);
}

.promises {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: clamp(2.5rem, 2rem + 3vw, 4rem);
}

.promise {
  display: grid;
  gap: 0.45rem;
  padding: 1.75rem 1.9rem;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.promise dt {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--gray-900);
}

.promise dt::before {
  content: '✓ ';
  color: var(--color-accent-text);
}

.promise dd {
  color: var(--color-text-sub);
  font-size: var(--text-small);
}

/* ---------- Contact (전화 상담 전용) ---------- */

.contact-section {
  padding-block: var(--space-section);
}

.contact-inner {
  text-align: center;
}

.contact-inner h2 {
  font-size: var(--text-display);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--gray-900);
}

.contact-lead {
  margin-top: 1.25rem;
  font-size: var(--text-lead);
  color: var(--color-text-sub);
}

.contact-tel {
  display: inline-block;
  margin-top: 2rem;
  font-size: clamp(2.25rem, 1.5rem + 3.5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--gray-900);
  text-decoration: none;
}

.contact-tel:hover {
  color: var(--color-accent-text);
}

.contact-inner .hero-actions {
  margin-top: 1.75rem;
}

.contact-mail {
  margin-top: 1.5rem;
  font-size: var(--text-small);
  color: var(--gray-600);
}

.contact-mail a {
  color: var(--gray-800);
  font-weight: 700;
  text-decoration: none;
}

.contact-mail a:hover {
  text-decoration: underline;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--gray-50);
  border-top: 1px solid var(--color-border);
  color: var(--gray-600);
  padding-block: 3.5rem;
  font-size: var(--text-small);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-900);
  font-size: 1.05rem;
  margin-bottom: 1.1rem;
}

.footer-en {
  color: var(--gray-500);
  font-size: var(--text-tiny);
}

.footer-info {
  font-style: normal;
  line-height: 1.9;
}

.footer-info a {
  color: var(--gray-700);
  text-decoration: none;
}

.footer-info a:hover {
  text-decoration: underline;
}

.footer-links {
  margin-top: 1.25rem;
}

.footer-links .link-btn {
  color: var(--gray-800);
  font-weight: 700;
}

.footer-copy {
  margin-top: 1.5rem;
  color: var(--gray-500);
  font-size: var(--text-tiny);
}

/* ---------- Scroll reveal (토스형) ---------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity var(--duration-reveal) var(--ease-out-expo),
    transform var(--duration-reveal) var(--ease-out-expo);
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Reduced motion ---------- */

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

  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .float-chip {
    animation: none;
  }

  .btn,
  .feature,
  .store-badge {
    transition: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 64rem) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .chip-1 {
    left: var(--space-gutter);
  }

  .chip-2 {
    right: var(--space-gutter);
  }
}

@media (max-width: 48rem) {
  .site-nav {
    display: none;
  }

  .story-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .story-flip .story-copy {
    order: 1;
  }

  .story-flip .story-visual {
    order: 2;
  }

  .story-copy p:not(.story-eyebrow) {
    margin-inline: auto;
  }

  .promises {
    grid-template-columns: 1fr;
  }

  .float-chip {
    display: none;
  }
}

@media (max-width: 30rem) {
  .hero-actions .btn {
    width: 100%;
  }

  .phone {
    width: min(15.5rem, 80vw);
  }
}
