/* ============================================================
   LoveLanguage — style.css  (mobile-first)
   ============================================================ */

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

:root {
  --rose:   #d02040;
  --mauve:  #a01030;
  --peach:  #f07090;
  --bg:     #faf7f8;
  --card:   #ffffff;
  --border: rgba(196,115,138,.15);
  --text:   #2c1a22;
  --muted:  #7a6070;
  --hint:   #b0a0a8;
  --color-low:  #d02040;
  --color-mid:  #c4920a;
  --color-high: #5a9e6f;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 2px 16px rgba(196,115,138,.12);
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

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

a { color: var(--rose); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Accessibility ──────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -40px; left: 0;
  background: var(--rose); color: #fff;
  padding: 8px 16px; z-index: 1000;
  border-radius: 0 0 8px 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
}
.skip-link:focus { top: 0; clip: auto; overflow: visible; }

*:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}

/* ── Typography ─────────────────────────────────────────────── */
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 600; line-height: 1.2; }
h2 { font-size: clamp(1.1rem, 3vw, 1.4rem); font-weight: 600; line-height: 1.3; }
h3 { font-size: 1rem; font-weight: 600; }

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 28px;
  background: linear-gradient(135deg, var(--rose), var(--mauve));
  color: #fff;
  border: none;
  border-radius: 28px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .2s, transform .15s;
  box-shadow: 0 4px 16px rgba(196,115,138,.25);
}
.btn:hover { opacity: .92; transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-lg { padding: 14px 36px; font-size: 15px; }
.btn-full { width: 100%; }
.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--rose);
  color: var(--rose);
  box-shadow: none;
}
.btn-nav { padding: 8px 18px; font-size: 13px; }

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  background: rgba(250,247,248,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
  gap: 12px;
}

.logo {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.logo:hover { text-decoration: none; opacity: .85; }

.main-nav { display: none; }
.main-nav ul { list-style: none; display: flex; gap: 20px; align-items: center; }
.main-nav a { font-size: 13px; color: var(--muted); text-decoration: none; }
.main-nav a:hover { color: var(--text); }

.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .2s;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Drawer (mobile nav) ────────────────────────────────────── */
.drawer {
  position: fixed;
  top: 0; right: -100%;
  width: min(80vw, 300px);
  height: 100vh;
  background: var(--card);
  box-shadow: -8px 0 32px rgba(0,0,0,.12);
  z-index: 200;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: right .25s ease;
}
.drawer.open { right: 0; }
.drawer-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--muted);
  align-self: flex-end;
  padding: 4px;
  margin-bottom: 12px;
}
.drawer nav { display: flex; flex-direction: column; gap: 0; }
.drawer nav a {
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
  text-decoration: none;
}
.drawer nav .btn { margin-top: 20px; text-align: center; }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 190;
  display: none;
}
.overlay.active { display: block; }

/* ── Tag / Badge ────────────────────────────────────────────── */
.tag {
  display: inline-block;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  background: #fbeaf0;
  color: #993556;
  margin-bottom: 10px;
  font-weight: 500;
}
.badge {
  font-size: 10px;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
  font-weight: 500;
}
.badge-ok   { background: #eaf3de; color: #3b6d11; }
.badge-wait { background: #faeeda; color: #854f0b; }

/* ── Step bar ───────────────────────────────────────────────── */
.step-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}
.step {
  height: 3px;
  flex: 1;
  border-radius: 2px;
  background: #e8dce4;
  transition: background .3s;
}
.step.done    { background: var(--rose); }
.step.current { background: rgba(196,115,138,.45); }

/* ── Hero / Landing ─────────────────────────────────────────── */
.hero { padding: 40px 0 32px; }

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero-text h1 { margin-bottom: 10px; }
.hero-text p  { color: var(--muted); margin-bottom: 18px; font-size: 15px; }

.hero-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feat-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.feat-icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.feat-card strong { display: block; font-size: 13px; color: var(--text); }
.feat-card span   { font-size: 12px; color: var(--muted); }

/* ── Form pages ─────────────────────────────────────────────── */
.form-section { padding: 32px 0 48px; }

.form-container {
  max-width: 520px;
}

.form-title { font-size: 1.4rem; margin-bottom: 6px; }
.form-desc  { color: var(--muted); font-size: 13px; margin-bottom: 20px; }

fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
legend {
  font-size: 11px;
  font-weight: 600;
  color: var(--rose);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 0 6px;
}

.field-group { margin-top: 10px; }
.field-group label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.field-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  transition: border-color .2s;
}
.field-group input:focus { border-color: var(--rose); outline: none; }

.field-error {
  display: block;
  font-size: 11px;
  color: var(--color-low);
  margin-top: 4px;
}

.privacy-note {
  font-size: 11px;
  color: var(--hint);
  text-align: center;
  margin: 12px 0 16px;
}

/* ── Status page ────────────────────────────────────────────── */
.status-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }

.status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fbeaf0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; color: #993556;
  flex-shrink: 0;
}
.status-info { flex: 1; }
.status-info strong { display: block; font-size: 13px; }
.email-masked { font-size: 11px; color: var(--hint); }

.resend-wrap { margin-top: 4px; font-size: 11px; color: var(--muted); }
.resend-btn {
  background: none; border: none;
  color: var(--rose); cursor: pointer;
  font-size: 11px; text-decoration: underline; padding: 0;
}

.info-box {
  background: #fbeaf0;
  border-left: 3px solid var(--rose);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 12px 14px;
  font-size: 12px;
  color: #6a3050;
  line-height: 1.6;
}

/* ── Quiz ───────────────────────────────────────────────────── */
.quiz-greeting {
  font-size: 15px;
  margin-bottom: 20px;
  line-height: 1.6;
}
.quiz-greeting span { color: var(--muted); font-size: 13px; }

.lang-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.lang-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}
.lang-emoji { font-size: 24px; flex-shrink: 0; }
.lang-info { flex: 1; }
.lang-info h2 { font-size: 14px; }
.lang-info p  { font-size: 11px; color: var(--muted); margin-top: 2px; }

.more-btn {
  background: none; border: none;
  font-size: 10px; color: var(--rose);
  cursor: pointer; padding: 0;
  display: flex; align-items: center; gap: 3px;
  flex-shrink: 0; white-space: nowrap;
}

.lang-detail {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin: 10px 0;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 8px;
  border-left: 2px solid var(--rose);
}

.slider-wrap { margin-top: 12px; }

.score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 11px;
  color: var(--muted);
}
.score-val {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--rose);
  min-width: 32px;
  text-align: right;
}

.ll-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  border: none;
  display: block;
  background: linear-gradient(to right, var(--rose) 0%, var(--rose) 50%, #e8dce4 50%, #e8dce4 100%);
}
.ll-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--card);
  border: 2.5px solid var(--rose);
  box-shadow: 0 2px 8px rgba(196,115,138,.3);
  cursor: grab;
  transition: transform .12s, box-shadow .12s;
}
.ll-range:active::-webkit-slider-thumb {
  cursor: grabbing;
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(196,115,138,.4);
}
.ll-range::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--card);
  border: 2.5px solid var(--rose);
  cursor: grab;
}
.ll-range::-moz-range-track { height: 5px; border-radius: 3px; }

.zone-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--hint);
  margin-top: 5px;
}

/* ── Thank you ──────────────────────────────────────────────── */
.ty-page { text-align: center; }
.ty-hero { padding: 16px 0 20px; }
.ty-hero h1 { margin: 8px 0; }
.ty-hero p  { color: var(--muted); }

.share-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 16px 0;
  text-align: left;
}
.share-label { font-size: 11px; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .06em; }
.share-row   { display: flex; gap: 8px; align-items: center; }
.share-url   {
  flex: 1; font-size: 11px; color: var(--hint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: monospace; background: var(--bg);
  padding: 6px 10px; border-radius: 6px;
}
.copy-btn {
  background: none;
  border: 1.5px solid var(--rose);
  color: var(--rose);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}
.share-note { font-size: 10px; color: var(--hint); margin-top: 8px; }

.next-steps {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: left;
  margin-bottom: 16px;
}
.next-title { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.next-steps ol { padding-left: 18px; }
.next-steps li { font-size: 12px; color: var(--muted); line-height: 1.8; }

/* ── Report ─────────────────────────────────────────────────── */
.report-page { padding: 28px 0 48px; }

.report-header { margin-bottom: 20px; }
.report-meta { font-size: 12px; color: var(--hint); font-family: monospace; margin-bottom: 4px; }
.report-intro { font-size: 15px; color: var(--muted); }

.report-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.report-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.report-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.report-card-head h2 { flex: 1; font-size: 13px; }
.report-score { font-size: 1.4rem; font-weight: 700; }

.report-bar-bg {
  height: 5px;
  background: #e8dce4;
  border-radius: 3px;
  margin-bottom: 10px;
}
.report-bar {
  height: 100%;
  border-radius: 3px;
  transition: width .6s ease;
}

.report-tip   { font-size: 12px; color: var(--muted); font-style: italic; margin-bottom: 8px; }
.email-note   { font-size: 11px; color: var(--rose); margin-top: 8px; }

.report-cta {
  text-align: center;
  padding: 20px;
  background: var(--card);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.report-cta p { color: var(--muted); font-size: 13px; margin-bottom: 12px; }

/* ── Content pages ──────────────────────────────────────────── */
.content-page { padding: 32px 0 48px; }
.content-body { color: var(--muted); line-height: 1.8; margin-top: 16px; }
.content-body p { margin-bottom: 12px; }

.about-intro { color: var(--muted); margin: 12px 0 24px; font-size: 14px; line-height: 1.7; }
.about-langs { display: flex; flex-direction: column; gap: 12px; }
.about-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.about-card .lang-emoji { font-size: 26px; flex-shrink: 0; margin-top: 2px; }
.about-card h2 { font-size: 14px; margin-bottom: 5px; }
.about-card p  { font-size: 12px; color: var(--muted); line-height: 1.6; }

/* ── AdSense slots ──────────────────────────────────────────── */
.ad-slot {
  background: #fdf5f7;
  border: 1.5px dashed #e8c8d4;
  border-radius: 8px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #c4a0b0;
}
.ad-card    { min-height: 250px; }
.ad-sidebar { min-height: 200px; }

/* ── Cookie banner ──────────────────────────────────────────── */
.cookie-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 14px 16px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}
.cookie-bar p { font-size: 12px; color: var(--muted); line-height: 1.5; }
.cookie-btns  { display: flex; gap: 8px; }
.cookie-btns .btn { flex: 1; padding: 9px 0; font-size: 12px; }
.cookie-btns .btn-ghost { flex: 1; padding: 9px 0; font-size: 12px; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 16px 0;
  margin-top: auto;
}
.site-footer p { font-size: 11px; color: var(--hint); text-align: center; }

/* ── Desktop ────────────────────────────────────────────────── */
@media (min-width: 768px) {

  .main-nav { display: block; }
  .hamburger, .drawer, .overlay { display: none !important; }

  .hero { padding: 60px 0 48px; }
  .hero-inner {
    flex-direction: row;
    align-items: center;
    gap: 48px;
  }
  .hero-text { flex: 1.2; }
  .hero-features { flex: 1; }

  .feat-card { padding: 16px; }

  .form-section { padding: 48px 0 64px; }
  .form-container { margin: 0 auto; }

  .report-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .about-langs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .cookie-bar {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
  }
  .cookie-bar p { margin: 0; flex: 1; }
  .cookie-btns  { flex-shrink: 0; }

  .ad-horizontal { min-height: 90px; }
  .ad-sidebar { display: block; }

  .status-row { padding: 16px 20px; }
}

@media (min-width: 1024px) {
  .hero-inner { gap: 64px; }
  .hero-text h1 { font-size: 2.4rem; }
}

/* Logo image */
.logo-img {
  height: 36px;
  width: auto;
  display: block;
}
@media (min-width: 768px) {
  .logo-img { height: 40px; }
}
