/* ============================================================
   Family Call — Landing page styles
   Brand colors sourced from app/lib/config/app_theme.dart
   ============================================================ */

:root {
  --green: #4CAF50;
  --green-dark: #2E7D32;
  --green-light: #66BB6A;
  --accent: #FF7043;
  --accent-light: #FF8A65;
  --bg: #F5F7FA;
  --card: #FFFFFF;
  --text: #1F2937;
  --text-muted: #5B6472;
  --border: #E5E9F0;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(46, 125, 50, 0.08);
  --shadow-lg: 0 16px 48px rgba(46, 125, 50, 0.14);
  --max: 1120px;
  --font: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

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

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

.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.hidden { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--green); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--green-dark); border-color: var(--green); }
.btn-ghost:hover { background: rgba(76, 175, 80, .08); color: var(--green-dark); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav-links a { color: var(--text-muted); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--green-dark); text-decoration: none; }

.lang-switch { display: flex; gap: 2px; border: 1px solid var(--border); border-radius: 999px; padding: 3px; background: #fff; }
.lang-switch button {
  border: none; background: transparent; cursor: pointer;
  padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text-muted);
}
.lang-switch button.active { background: var(--green); color: #fff; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; font-size: 26px; color: var(--text); margin-left: auto; }

/* ---------- Hero (full-bleed background image + overlay) ---------- */
.hero {
  position: relative;
  min-height: 700px;
  background-image:
    linear-gradient(90deg, rgba(18,38,26,0) 0%, rgba(18,38,26,.05) 28%, rgba(18,38,26,.45) 52%, rgba(18,38,26,.85) 74%, rgba(18,38,26,.94) 100%),
    url('../img/hero.jpg');
  background-size: cover;
  background-position: 30% center;
  color: #fff;
}
/* Ghim khối chữ CỨNG vào góc dưới bên phải (absolute) — không phụ thuộc chiều cao nội dung */
.hero-inner {
  position: absolute;
  right: max(28px, calc((100vw - var(--max)) / 2));
  bottom: 56px;
  z-index: 2;
  width: 100%; max-width: 480px;
  padding: 0;
  text-align: left;
}
.hero .eyebrow { color: #A5D6A7; }
.hero h1 { font-size: clamp(44px, 4.4vw, 60px); line-height: 1.04; font-weight: 700; letter-spacing: -1px; color: #fff; white-space: nowrap; }
.hero-subtitle { font-size: clamp(21px, 1.9vw, 26px); font-weight: 600; line-height: 1.3; color: #fff; margin-top: 14px; }
.hero .lead { font-size: 17px; color: rgba(255,255,255,.85); margin: 16px 0 28px; max-width: 100%; }
.hero-cta { display: flex; flex-wrap: nowrap; gap: 14px; align-items: center; }
.hero-cta .btn { white-space: nowrap; }
.hero-cta .btn-ghost { color: #fff; border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.08); }
.hero-cta .btn-ghost:hover { background: rgba(255,255,255,.18); color: #fff; }
.badge-store img { height: 56px; width: auto; }
.hero-note { margin-top: 16px; font-size: 13px; color: rgba(255,255,255,.8); }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 700; letter-spacing: -.3px; }
.section-head p { color: var(--text-muted); margin-top: 12px; font-size: 17px; }
.eyebrow { color: var(--green); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: 13px; }

/* ---------- Feature grid ---------- */
.features { background: #fff; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px; transition: transform .18s ease, box-shadow .18s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-icon {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 26px; background: rgba(76, 175, 80, .12); margin-bottom: 16px;
}
.feature-card h3 { font-size: 18px; margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: 15px; }

/* ---------- Audience ---------- */
.audience-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; max-width: 860px; margin: 0 auto; }
.audience-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; display: flex; gap: 18px; align-items: flex-start;
}
.audience-card .a-emoji { font-size: 34px; line-height: 1; }
.audience-card h3 { font-size: 18px; margin-bottom: 6px; }
.audience-card p { color: var(--text-muted); font-size: 15px; }

/* ---------- Privacy band ---------- */
.privacy-band { background: linear-gradient(160deg, var(--green-dark), var(--green)); color: #fff; }
.privacy-band .section-head h2, .privacy-band .eyebrow { color: #fff; }
.privacy-band .section-head p { color: rgba(255,255,255,.9); }
.privacy-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 900px; margin: 0 auto; }
.privacy-item { background: rgba(255,255,255,.12); border-radius: var(--radius); padding: 24px; text-align: center; }
.privacy-item .p-emoji { font-size: 30px; }
.privacy-item h3 { font-size: 16px; margin: 10px 0 6px; }
.privacy-item p { font-size: 14px; color: rgba(255,255,255,.88); }

/* ---------- Screenshots ---------- */
.shots { background: #fff; }
.shot-strip {
  display: flex; gap: 28px; justify-content: center; flex-wrap: wrap;
  padding: 12px 4px 24px;
}
.shot {
  flex: 0 0 220px; margin: 0;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
/* Phone frame */
.phone {
  position: relative; width: 220px; aspect-ratio: 9 / 19.5;
  background: linear-gradient(160deg, #E8F5E9, #fff);
  border: 8px solid #1b1b1f; border-radius: 34px;
  box-shadow: 0 12px 30px rgba(0,0,0,.14), 0 3px 8px rgba(0,0,0,.08);
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s;
}
/* Notch */
.phone::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 44%; height: 18px; background: #1b1b1f;
  border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; z-index: 2;
}
.phone img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.shot figcaption {
  color: var(--text-muted); font-size: 14px; font-weight: 500; text-align: center;
}
/* Hover effect */
.shot:hover .phone {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 22px 44px rgba(0,0,0,.20), 0 6px 14px rgba(0,0,0,.10);
}
@media (max-width: 720px) {
  .shot-strip {
    flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start;
    scroll-snap-type: x mandatory;
  }
  .shot { scroll-snap-align: center; }
}

/* ---------- CTA ---------- */
.cta { text-align: center; }
.cta-box {
  background: #fff; border: 1px solid var(--border); border-radius: 24px;
  padding: 48px 30px; box-shadow: var(--shadow); max-width: 760px; margin: 0 auto;
}
.cta-box h2 { font-size: clamp(24px, 3.2vw, 32px); }
.cta-box p { color: var(--text-muted); margin: 12px 0 26px; font-size: 17px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; align-items: center; }

/* ---------- Footer ---------- */
.site-footer { background: #12261A; color: #C9D3CC; padding: 48px 0 30px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: #fff; margin-bottom: 10px; }
.footer-brand img { width: 30px; height: 30px; border-radius: 7px; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer-col a { display: block; color: #C9D3CC; font-size: 14px; margin-bottom: 8px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 32px; padding-top: 20px; font-size: 13px; color: #93A29A; text-align: center; }

/* ---------- Article (privacy / terms / support) ---------- */
.article { background: #fff; padding: 56px 0 72px; }
.article .container { max-width: 820px; }
.article h1 { font-size: clamp(26px, 3.6vw, 36px); margin-bottom: 8px; }
.article .updated { color: var(--text-muted); font-size: 14px; margin-bottom: 32px; }
.article h2 { font-size: 21px; margin: 32px 0 12px; }
.article h3 { font-size: 17px; margin: 22px 0 8px; }
.article p { color: #374151; margin-bottom: 14px; }
.article ul { margin: 0 0 16px 22px; color: #374151; }
.article li { margin-bottom: 8px; }
.article strong { color: var(--text); }
.callout {
  background: #E8F5E9; border-left: 4px solid var(--green); border-radius: 8px;
  padding: 16px 18px; margin: 20px 0; color: var(--green-dark);
}

/* ---------- Responsive ---------- */
/* Màn hẹp (mobile/tablet dọc): chữ dồn sang phải; cỡ chữ co theo bề rộng để MỌI dòng nằm 1 hàng.
   Dòng dài nhất là subtitle tiếng Việt (~40 ký tự) -> chọn vw sao cho nó vừa khít, các dòng khác tự vừa theo. */
@media (max-width: 900px) {
  .hero {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background-image:
      linear-gradient(90deg, rgba(18,38,26,.12) 0%, rgba(18,38,26,.5) 38%, rgba(18,38,26,.9) 100%),
      url('../img/hero.jpg');
    background-position: 20% center;
    text-align: left;
  }
  .hero-inner {
    position: static;
    right: auto; bottom: auto;
    max-width: 100%;
    margin: 0;
    padding: 60px 24px;
  }
  /* Các dòng ngắn: 1 hàng, không vỡ dòng (co cỡ theo bề rộng) */
  .hero h1,
  .hero-subtitle,
  .hero-note { white-space: nowrap; max-width: 100%; }
  .hero h1 { font-size: 8.6vw; }
  .hero-subtitle { font-size: 4vw; }
  .hero-note { font-size: 2.7vw; }
  /* Đoạn mô tả dài: cho phép xuống 2 hàng, KHÔNG cắt cụt */
  .hero .lead { white-space: normal; font-size: clamp(14px, 3.4vw, 18px); max-width: 100%; }
  .hero-cta { justify-content: flex-start; }
  .hero-cta .btn { font-size: 3vw; padding: 2.4vw 3.6vw; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .privacy-list { grid-template-columns: 1fr; }
}
/* Từ tablet trở lên trong nhóm hẹp: đặt trần cỡ chữ để không quá to */
@media (min-width: 620px) and (max-width: 900px) {
  .hero h1 { font-size: 56px; }
  .hero-subtitle { font-size: 27px; }
  .hero .lead { font-size: 21px; }
  .hero-note { font-size: 16px; }
  .hero-cta .btn { font-size: 15px; padding: 12px 22px; }
}
@media (max-width: 720px) {
  .nav-links {
    position: fixed; inset: 68px 0 auto 0; background: #fff; flex-direction: column;
    align-items: flex-start; gap: 4px; padding: 16px 20px; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .2s;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { width: 100%; padding: 8px 0; }
  .nav-links .lang-switch { margin: 8px 0; }
  .nav-toggle { display: block; }
  .feature-grid { grid-template-columns: 1fr; }
  .audience-grid { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
}
