/* KoreanCupid local — one stylesheet, real responsive */
:root {
  --brand: #929add;
  --brand-dark: #5a61a0;
  --text: #333;
  --muted: #666;
  --grey: #f0f0f2;
  --white: #fff;
  --wa: #25d366;
  --font: "Noto Sans KR", Roboto, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
  line-height: 1.5;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-dark); }
button, select { font: inherit; }

/* —— Header —— */
.topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
}
.brand svg.heart { width: 32px; height: 29px; flex: none; }
.brand svg.word { width: 148px; height: 24px; flex: none; fill: #fff; }
.brand .word .logo-dark { fill: #fff; }
.brand .word .logo-light { fill: #e8e8e8; }

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lang {
  position: relative;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,.28);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
}
.lang-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 140px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
  overflow: hidden;
  z-index: 50;
}
.lang.open .lang-menu { display: block; }
.lang-menu a {
  display: block;
  padding: 10px 14px;
  color: #333;
  text-decoration: none;
}
.lang-menu a:hover { background: #f3f3f7; }
.lang-menu a.active { font-weight: 700; color: var(--brand-dark); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff !important;
  text-decoration: none !important;
  border: 0;
  border-radius: 6px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.btn:hover { background: var(--brand-dark); }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  background: #2a2d45 center / cover no-repeat;
  background-image: url("../images/homepage.jpg");
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20,22,40,.55) 0%, rgba(20,22,40,.15) 55%, rgba(20,22,40,.05) 100%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: min(560px, 92%);
  margin: 0 0 0 6%;
  padding: 100px 0 140px;
  text-align: center;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  font-weight: 700;
  line-height: 1.25;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.hero .sub {
  margin: 0 0 22px;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 500;
  line-height: 1.4;
  text-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.hero-benefits {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  padding: 14px 20px;
  background: rgba(0,0,0,.38);
  backdrop-filter: blur(4px);
  font-size: 0.95rem;
}
.hero-benefits span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-benefits i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand);
  flex: none;
}

/* —— Sections —— */
.section {
  padding: 56px 24px;
  max-width: 1120px;
  margin: 0 auto;
}
.section.grey { background: var(--grey); max-width: none; }
.section.grey .section-inner {
  max-width: 1120px;
  margin: 0 auto;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.grid-3 h2 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  color: #222;
}
.grid-3 p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.section-title {
  text-align: center;
  margin: 0 0 8px;
  font-size: 1.6rem;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  margin: 0 0 28px;
}
.stories {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.story {
  width: min(260px, 100%);
  text-align: center;
  text-decoration: none;
  color: inherit;
}
.story img {
  width: 120px;
  height: 120px;
  margin: 0 auto 12px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ddd;
}
.story p { margin: 0; font-size: 0.95rem; color: #444; }
.center { text-align: center; }

.wa-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 28px 0;
}
.wa-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e6e6ea;
  text-decoration: none !important;
  color: #1b7a3d !important;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0,0,0,.06);
  transition: transform .15s ease, box-shadow .15s ease;
}
.wa-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, .25);
}
.wa-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--wa);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  line-height: 0;
  box-shadow: 0 6px 16px rgba(37, 211, 102, .45);
}
.wa-icon svg {
  width: 34px;
  height: 34px;
  display: block;
  flex: none;
}
/* 必须盖过 .footer a { display:block }，否则图标会偏左上 */
.wa-social,
.footer a.wa-social {
  width: 56px !important;
  height: 56px !important;
  padding: 0 !important;
  border-radius: 50%;
  background: var(--wa);
  color: #fff !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  box-shadow: 0 6px 16px rgba(37, 211, 102, .4);
  overflow: hidden;
  line-height: 0;
  box-sizing: border-box;
}
.wa-social svg,
.footer a.wa-social svg {
  width: 28px;
  height: 28px;
  display: block;
  flex: none;
  margin: 0;
}

.app-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin: 24px;
  padding: 28px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,.08);
}
.app-banner h2 { margin: 0; font-size: 1.4rem; }

.langs {
  text-align: center;
  padding: 18px;
  font-size: 0.95rem;
  border-top: 1px solid #eee;
}

.footer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 36px 24px 48px;
  background: #f7f7f9;
  border-top: 1px solid #e8e8ec;
  max-width: 1120px;
  margin: 0 auto;
}
.footer h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: #555;
}
.footer a {
  display: block;
  text-decoration: none;
  color: var(--brand-dark);
  padding: 3px 0;
  font-size: 0.92rem;
}
.social { display: flex; gap: 8px; flex-wrap: wrap; }
.social img { width: 44px; height: 44px; }
.trademark {
  text-align: center;
  padding: 12px 20px 72px;
  font-size: 0.72rem;
  color: #888;
  line-height: 1.45;
}

/* CS FAB */
.cs-fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 9999;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--wa);
  color: #fff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  text-decoration: none !important;
}
.cs-fab svg { width: 28px; height: 28px; }

/* ========== MOBILE ========== */
@media (max-width: 768px) {
  .topbar {
    position: sticky;
    top: 0;
    background: var(--brand-dark);
    padding: 10px 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,.2);
  }
  .brand svg.heart { width: 26px; height: 24px; }
  .brand svg.word { width: 118px; height: 19px; }
  .lang-btn { padding: 6px 10px; font-size: 0.85rem; }
  .btn.login { padding: 7px 12px; font-size: 0.85rem; }

  .hero {
    min-height: auto;
    background-image: url("../images/mobile-hero.jpg");
    background-position: center top;
    justify-content: flex-end;
  }
  .hero::before {
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.25) 50%, rgba(0,0,0,.2) 100%);
  }
  .hero-inner {
    width: 100%;
    margin: 0;
    padding: 120px 16px 28px;
  }
  .hero h1 { font-size: 1.45rem; }
  .hero .sub { font-size: 0.98rem; }
  .hero-benefits {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    background: #2b2f4a;
    padding: 14px 16px;
  }

  .section { padding: 32px 16px; }
  .grid-3 { grid-template-columns: 1fr; gap: 20px; }
  .wa-row { grid-template-columns: 1fr; }
  .stories { gap: 20px; }
  .app-banner { margin: 16px; padding: 20px; flex-direction: column; text-align: center; }
  .footer {
    grid-template-columns: 1fr 1fr;
    padding: 24px 16px 40px;
  }
  .trademark { padding-bottom: 88px; }
}

@media (max-width: 480px) {
  .footer { grid-template-columns: 1fr; }
}
