/* Kara Together — website tinh (trang chu, quyen rieng tu, dieu khoan).
   Mau lay tu lib/core/constants/app_colors.dart de khop voi app. */

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/Manrope-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/Manrope-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/Manrope-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

:root {
  --bg: #050617;
  --bg-top: #10113a;
  --bg-mid: #07081f;
  --surface: #0c0d2b;
  --surface-2: #121440;
  --line: rgba(153, 160, 208, 0.16);
  --text: #f7f5ff;
  --muted: #a9a4c3;
  --primary: #8b5cf6;
  --primary-strong: #6d3deb;
  --pink: #ff3d9a;
  --cyan: #4cc9ff;
  --gold: #ffc857;
  --gradient: linear-gradient(135deg, var(--pink), var(--primary-strong));
  --radius: 20px;
  --max: 1120px;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto,
    sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(
      60rem 36rem at 12% -8%,
      rgba(255, 61, 154, 0.18),
      transparent 60%
    ),
    radial-gradient(
      52rem 34rem at 92% 0%,
      rgba(139, 92, 246, 0.24),
      transparent 62%
    ),
    linear-gradient(180deg, var(--bg-top), var(--bg-mid) 46%, #040510);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

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

a {
  color: var(--cyan);
  text-underline-offset: 3px;
}

a:hover {
  color: #8fdcff;
}

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  padding: 8px 14px;
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  z-index: 100;
}

.skip-link:focus {
  left: 16px;
}

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

@media (min-width: 720px) {
  .container {
    padding: 0 28px;
  }
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 6, 23, 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.brand:hover {
  color: var(--text);
}

.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 999px;
}

.site-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  background: rgba(139, 92, 246, 0.2);
}

@media (max-width: 520px) {
  .brand span {
    display: none;
  }
  .site-nav a {
    padding: 8px 10px;
    font-size: 13px;
  }
}

/* ---------- Common ---------- */

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pink);
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}

.section {
  padding: 72px 0;
}

.section-head {
  max-width: 680px;
  margin-bottom: 32px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  margin-top: 8px;
}

.section-head p {
  color: var(--muted);
  margin: 12px 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 16px;
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 12px 32px rgba(255, 61, 154, 0.28);
}

.btn-primary:hover {
  color: #fff;
  filter: brightness(1.08);
}

.btn-ghost {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 200, 87, 0.5);
  color: var(--gold);
  font-weight: 800;
  font-size: 15px;
}

/* ---------- Hero ---------- */

.hero {
  padding: 56px 0 40px;
}

.hero .container {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero {
    padding: 80px 0 56px;
  }
  .hero .container {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 56px;
  }
}

.hero h1 {
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 800;
  margin-top: 12px;
}

.hero h1 .accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lead {
  font-size: clamp(17px, 2vw, 19px);
  color: var(--muted);
  max-width: 560px;
  margin: 20px 0 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.hero-points li::before {
  content: "✓";
  color: var(--cyan);
  margin-right: 8px;
}

.phone {
  position: relative;
  width: min(100%, 330px);
  margin: 0 auto;
  padding: 10px;
  border-radius: 44px;
  background: linear-gradient(160deg, #23245a, #0a0b26);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55),
    0 0 90px rgba(139, 92, 246, 0.28);
}

.phone img {
  border-radius: 34px;
  width: 100%;
}

/* ---------- Features ---------- */

.features {
  display: grid;
  gap: 16px;
}

@media (min-width: 640px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  padding: 24px;
  border-radius: var(--radius);
  background: linear-gradient(
    160deg,
    rgba(28, 30, 84, 0.72),
    rgba(12, 13, 43, 0.72)
  );
  border: 1px solid var(--line);
}

.card .icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 22px;
  background: rgba(139, 92, 246, 0.18);
  margin-bottom: 16px;
}

.card h3 {
  font-size: 19px;
  font-weight: 800;
}

.card p {
  color: var(--muted);
  margin: 8px 0 0;
  font-size: 16px;
}

/* ---------- Gallery ---------- */

.gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(72%, 260px);
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 20px;
  margin: 0 -4px;
}

@media (min-width: 900px) {
  .gallery {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    max-width: 900px;
    margin: 0 auto;
    overflow: visible;
  }
}

.gallery figure {
  margin: 0;
  scroll-snap-align: start;
}

.gallery img {
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.gallery figcaption {
  margin-top: 12px;
  font-weight: 700;
  font-size: 15px;
  color: var(--muted);
  text-align: center;
}

/* ---------- Support / FAQ ---------- */

.support {
  display: grid;
  gap: 24px;
}

@media (min-width: 900px) {
  .support {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
  }
}

.contact-card {
  padding: 28px;
  border-radius: var(--radius);
  background: radial-gradient(
      30rem 18rem at 0% 0%,
      rgba(255, 61, 154, 0.22),
      transparent 70%
    ),
    var(--surface);
  border: 1px solid var(--line);
}

.contact-card h3 {
  font-size: 22px;
  font-weight: 800;
}

.contact-card p {
  color: var(--muted);
  margin: 10px 0 20px;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(12, 13, 43, 0.7);
  padding: 0 20px;
}

.faq details + details {
  margin-top: 12px;
}

.faq summary {
  cursor: pointer;
  font-weight: 800;
  padding: 18px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--pink);
  font-size: 22px;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  margin: 0 0 18px;
  color: var(--muted);
}

/* ---------- Legal documents ---------- */

.doc {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 0 80px;
}

.doc h1 {
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 800;
  margin-top: 10px;
}

.doc .meta {
  color: var(--muted);
  margin: 12px 0 0;
  font-size: 15px;
}

.doc h2 {
  font-size: 23px;
  font-weight: 800;
  margin: 44px 0 12px;
  scroll-margin-top: 84px;
}

.doc h3 {
  font-size: 18px;
  font-weight: 800;
  margin: 24px 0 8px;
}

.doc p,
.doc li {
  color: #dcd8f0;
}

.doc ul,
.doc ol {
  padding-left: 22px;
}

.doc li + li {
  margin-top: 6px;
}

.doc strong {
  color: var(--text);
}

.doc code {
  font-size: 0.9em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.summary-box {
  margin: 28px 0 8px;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.summary-box h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.summary-box ul {
  margin: 0;
}

.toc {
  margin: 28px 0 0;
  padding: 18px 22px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(12, 13, 43, 0.6);
}

.toc p {
  margin: 0 0 8px;
  font-weight: 800;
  color: var(--text);
}

.toc ol {
  margin: 0;
  columns: 2 220px;
  column-gap: 32px;
  font-size: 15px;
}

.toc li {
  break-inside: avoid;
}

.toc a {
  color: var(--muted);
  text-decoration: none;
}

.toc a:hover {
  color: var(--text);
  text-decoration: underline;
}

.table-wrap {
  overflow-x: auto;
  margin: 16px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--text);
  font-weight: 800;
  background: rgba(255, 255, 255, 0.03);
}

td {
  color: #dcd8f0;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 40px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.site-footer a:hover {
  color: var(--text);
}

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