/* ==========================================================
   Nhà Đất An Phát – demo static page
   Royal blue + warm orange + slate · Manrope
   ========================================================== */
:root {
  --blue: #1D4ED8;
  --blue-deep: #1E3A8A;
  --navy: #14235C;
  --blue-50: #EFF6FF;
  --blue-100: #DBEAFE;
  --orange: #F97316;
  --orange-text: #C2410C;
  --ink: #0F172A;
  --slate: #334155;
  --muted: #475569;
  --line: #E2E8F0;
  --tint: #F1F5F9;
  --white: #FFFFFF;
  --teal: #0F766E;

  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem;
  --s6: 2rem; --s7: 3rem; --s8: 4.5rem; --s9: 6rem;

  --r-sm: 10px; --r-md: 16px; --r-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 2px 8px rgba(15, 23, 42, .06);
  --shadow-md: 0 10px 30px -8px rgba(29, 78, 216, .25), 0 2px 6px rgba(15, 23, 42, .06);
  --shadow-lg: 0 24px 60px -20px rgba(20, 35, 92, .4);

  --font: "Manrope", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-body: 1rem;
  --fs-h1: clamp(2rem, 1.3rem + 3.4vw, 3.5rem);
  --fs-h2: clamp(1.6rem, 1.2rem + 1.8vw, 2.5rem);
  --fs-h3: clamp(1.05rem, 1rem + .3vw, 1.2rem);
  --fs-lead: clamp(1.05rem, 1rem + .35vw, 1.2rem);
  --wrap: 1200px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; font-family: var(--font); font-size: var(--fs-body); line-height: 1.6;
  color: var(--slate); background: var(--white); overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure, address { margin: 0; padding: 0; }
ul, ol { list-style: none; }
address { font-style: normal; }
h1, h2, h3 { color: var(--ink); line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.3; letter-spacing: -.01em; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--s4); top: -100px; z-index: 100; background: var(--ink); color: #fff; padding: var(--s3) var(--s4); border-radius: var(--r-sm); font-weight: 700; }
.skip:focus { top: var(--s3); }
.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.ic { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: .7rem 1.4rem; border: 2px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 800; cursor: pointer; text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-accent { background: var(--orange); color: var(--ink); box-shadow: 0 8px 20px -8px rgba(249, 115, 22, .8); }
.btn-ghost { background: var(--white); color: var(--blue); border-color: var(--blue-100); }
.btn-ghost:hover { box-shadow: var(--shadow-sm); }

.link-arrow { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; font-weight: 800; color: var(--blue); }
.link-arrow .ic { transition: transform .2s ease; }
.link-arrow:hover .ic { transform: translateX(4px); }

/* ---------- header ---------- */
.site-header { background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); z-index: 50; }
.header-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); padding-block: var(--s2); }
.brand { display: inline-flex; align-items: center; gap: var(--s3); min-height: 44px; }
.brand-mark { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-size: 1.25rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.brand-text small { font-size: .8rem; font-weight: 700; color: var(--orange-text); letter-spacing: .12em; text-transform: uppercase; }
.brand-light .brand-text strong { color: #fff; }
.brand-light .brand-text small { color: #FDBA74; }
.hotline { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding-inline: var(--s4); border-radius: 999px; background: var(--blue-50); color: var(--blue); font-weight: 800; }
.nav { order: 3; width: 100%; }
.nav ul { display: flex; flex-wrap: wrap; gap: var(--s1); }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--s3); border-radius: var(--r-sm); font-weight: 700; color: var(--slate); }
.nav a:hover { background: var(--tint); color: var(--blue); }

@media (min-width: 900px) {
  .site-header { position: sticky; top: 0; backdrop-filter: blur(8px); }
  .header-in { flex-wrap: nowrap; padding-block: var(--s3); }
  .nav { order: 0; width: auto; margin-inline: auto; }
  .nav a { padding-inline: var(--s4); }
}

/* ---------- hero ---------- */
.hero { background: radial-gradient(900px 400px at 85% 0%, #DBEAFE 0%, transparent 70%), linear-gradient(180deg, var(--blue-50), #fff 88%); padding-top: var(--s7); padding-bottom: var(--s7); }
.hero-grid { display: grid; gap: var(--s6); align-items: center; }
.eyebrow { font-size: .85rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--orange-text); margin-bottom: var(--s3); }
.eyebrow-light { color: #FDBA74; }
.hero-copy h1 .hl { color: var(--blue); background: linear-gradient(transparent 68%, rgba(249, 115, 22, .3) 68%); }
.lead { font-size: var(--fs-lead); margin-top: var(--s4); max-width: 34rem; color: var(--slate); }
.trust { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin-top: var(--s5); font-weight: 700; color: var(--ink); }
.trust li { display: inline-flex; align-items: center; gap: var(--s2); }
.trust .ic { color: var(--blue); }
.hero-art { display: none; position: relative; }
.hero-art > svg { width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(29, 78, 216, .22)); }
.float { position: absolute; display: flex; align-items: center; gap: var(--s2); padding: var(--s3) var(--s4); background: #fff; border-radius: var(--r-md); box-shadow: var(--shadow-md); font-size: .9rem; color: var(--slate); }
.float b { color: var(--ink); }
.float .ic { color: var(--teal); width: 1.5em; height: 1.5em; }
.float .dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(249, 115, 22, .25); }
.f1 { left: -4%; top: 14%; }
.f2 { right: -2%; bottom: 12%; }
@media (prefers-reduced-motion: no-preference) {
  .f1 { animation: bob 6s ease-in-out infinite; }
  .f2 { animation: bob 7s ease-in-out -2s infinite; }
  @keyframes bob { 50% { transform: translateY(-8px); } }
}
@media (min-width: 900px) {
  .hero { padding-top: var(--s8); }
  .hero-grid { grid-template-columns: 1.05fr .95fr; gap: var(--s7); }
  .hero-art { display: block; }
}

/* ---------- search panel ---------- */
.search { margin-top: var(--s6); background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: var(--s4); }
.tabs { position: relative; display: flex; flex-wrap: wrap; gap: var(--s2); border: 0; padding: 0; margin: 0 0 var(--s4); min-width: 0; }
.tabs input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tabs label { display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--s5); border-radius: 999px; font-weight: 800; color: var(--muted); background: var(--tint); cursor: pointer; transition: transform .2s ease; }
.tabs label:hover { transform: translateY(-1px); }
.tabs input:checked + label { background: var(--blue); color: #fff; }
.tabs input:focus-visible + label { outline: 3px solid var(--orange); outline-offset: 3px; }
.search-grid { display: grid; gap: var(--s3); }
.field { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.field label { font-size: .875rem; font-weight: 800; color: var(--ink); }
.field select, .field input {
  width: 100%; min-height: 48px; padding: .6rem .9rem; font: inherit; font-weight: 600; color: var(--ink);
  background: #fff; border: 1.5px solid #94A3B8; border-radius: var(--r-sm);
}
.field select { appearance: none; padding-right: 2.4rem; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D4ED8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right .7rem center / 1.2rem; }
.field input::placeholder { color: #64748B; font-weight: 500; }
.field select:focus-visible, .field input:focus-visible { outline: 3px solid var(--orange); outline-offset: 1px; border-color: var(--blue); }
.search-btn { min-height: 52px; }
@media (min-width: 620px) { .search-grid { grid-template-columns: 1fr 1fr; } .search-btn { grid-column: 1 / -1; } }
@media (min-width: 1000px) {
  .search { padding: var(--s5) var(--s5) var(--s5); }
  .search-grid { grid-template-columns: 1.1fr 1.1fr 1fr 1fr auto; align-items: end; }
  .search-btn { grid-column: auto; }
}

/* ---------- sections ---------- */
.section { padding-block: var(--s8); }
.section-tint { background: var(--tint); }
.sec-head { max-width: 42rem; margin-bottom: var(--s6); }
.sec-head p:not(.eyebrow) { margin-top: var(--s3); color: var(--muted); font-size: var(--fs-lead); }
.sec-head-row { max-width: none; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s3) var(--s5); }
.sec-head-light h2 { color: #fff; }

/* districts */
.districts { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s3); }
.districts a { display: grid; grid-template-columns: auto 1fr; column-gap: var(--s3); align-items: center; min-height: 72px; padding: var(--s3) var(--s4); background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); transition: transform .2s ease, box-shadow .2s ease; }
.districts a:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.districts .ic { grid-row: span 2; width: 2.5rem; height: 2.5rem; padding: .6rem; border-radius: 12px; background: var(--blue-50); color: var(--blue); }
.d-name { font-weight: 800; color: var(--ink); }
.d-count { font-size: .9rem; color: var(--muted); }
@media (min-width: 760px) { .districts { grid-template-columns: repeat(4, 1fr); } }

/* listings */
.cards { display: grid; gap: var(--s5); grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(4, 1fr); gap: var(--s4); } }
.card { display: flex; flex-direction: column; background: #fff; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.media { position: relative; aspect-ratio: 400 / 260; background: var(--blue-50); }
.media svg { width: 100%; height: 100%; }
.ribbon { position: absolute; top: var(--s3); left: 0; padding: .3rem .9rem .3rem .8rem; font-size: .8rem; font-weight: 800; letter-spacing: .02em; border-radius: 0 999px 999px 0; box-shadow: 0 4px 10px rgba(15, 23, 42, .2); }
.ribbon-hot { background: var(--orange); color: var(--ink); }
.ribbon-sale { background: var(--blue); color: #fff; }
.ribbon-rent { background: var(--orange-text); color: #fff; }
.ribbon-new { background: var(--teal); color: #fff; }
.card-body { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4); flex: 1; }
.price { font-size: 1.4rem; font-weight: 800; color: var(--blue); letter-spacing: -.02em; }
.price small { font-size: .85rem; font-weight: 700; color: var(--muted); margin-left: .25rem; }
.card h3 { min-height: 2.6em; }
.loc { display: flex; align-items: center; gap: var(--s2); font-size: .95rem; color: var(--muted); }
.loc .ic { color: var(--orange-text); }
.specs { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-top: auto; padding-top: var(--s3); border-top: 1px dashed var(--line); font-size: .92rem; font-weight: 700; color: var(--ink); }
.specs li { display: inline-flex; align-items: center; gap: .4rem; }
.specs .ic { color: var(--blue); }

/* valuation */
.valuation { background: radial-gradient(700px 300px at 10% 0%, rgba(96, 165, 250, .35), transparent 70%), linear-gradient(135deg, var(--blue) 0%, var(--navy) 100%); color: #DBEAFE; padding-block: var(--s8); position: relative; overflow: hidden; }
.valuation::after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 320px; height: 320px; border-radius: 50%; background: var(--orange); opacity: .18; }
.valuation-in { position: relative; z-index: 1; display: grid; gap: var(--s6); align-items: center; }
.valuation h2 { color: #fff; }
.val-copy > p:not(.eyebrow) { margin-top: var(--s3); font-size: var(--fs-lead); max-width: 34rem; }
.val-list { margin-top: var(--s4); display: grid; gap: var(--s2); font-weight: 700; color: #fff; }
.val-list li { display: flex; align-items: center; gap: var(--s2); }
.val-list .ic { color: #FDBA74; }
.val-form { display: grid; gap: var(--s3); background: #fff; color: var(--slate); padding: var(--s5); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.field-row { display: grid; gap: var(--s3); }
@media (min-width: 520px) { .field-row { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .valuation-in { grid-template-columns: 1fr 1fr; gap: var(--s7); } }

/* projects */
.projects { display: grid; gap: var(--s5); }
.project { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease; }
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.project > svg { width: 100%; aspect-ratio: 400 / 240; height: auto; }
.project-lg > svg { aspect-ratio: 640 / 380; }
.project-body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); padding: var(--s5); }
.chip { display: inline-block; padding: .2rem .75rem; border-radius: 999px; font-size: .8rem; font-weight: 800; background: var(--blue-100); color: var(--blue-deep); }
.chip-hot { background: var(--orange); color: var(--ink); }
.proj-price { color: var(--muted); }
.proj-price strong { color: var(--blue); font-size: 1.1rem; }
@media (min-width: 900px) {
  .projects { grid-template-columns: 1.4fr 1fr; grid-template-rows: auto auto; }
  .project-lg { grid-row: span 2; }
  .project-lg > svg { flex: 1; min-height: 0; aspect-ratio: auto; }
}

/* agents */
.agents { display: grid; gap: var(--s4); grid-template-columns: 1fr; }
@media (min-width: 560px) { .agents { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .agents { grid-template-columns: repeat(4, 1fr); } }
.agent { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s2); background: #fff; padding: var(--s5); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.avatar { width: 88px; height: 88px; margin-bottom: var(--s2); box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--blue-100); border-radius: 50%; }
.role { font-size: .95rem; color: var(--muted); }
.stat { font-size: .9rem; font-weight: 700; color: var(--teal); margin-bottom: var(--s2); }
.agent .btn { margin-top: auto; width: 100%; }

/* process */
.steps { display: grid; gap: var(--s4); counter-reset: none; }
.steps li { position: relative; padding: var(--s5); background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.step-n { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; margin-bottom: var(--s3); border-radius: 14px; background: var(--blue); color: #fff; font-weight: 800; font-size: 1.2rem; box-shadow: 0 8px 16px -6px rgba(29, 78, 216, .6); }
.steps li:nth-child(even) .step-n { background: var(--orange); color: var(--ink); box-shadow: 0 8px 16px -6px rgba(249, 115, 22, .7); }
.steps h3 { margin-bottom: var(--s2); }
.steps p { font-size: .95rem; color: var(--muted); }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) {
  .steps { grid-template-columns: repeat(5, 1fr); gap: var(--s3); }
  .steps li:not(:last-child)::after { content: ""; position: absolute; top: 2.9rem; right: -.8rem; width: .8rem; height: 2px; background: var(--blue-100); }
}

/* stats */
.stats { background: linear-gradient(160deg, var(--navy), #0B1437); color: #DBEAFE; padding-block: var(--s8); }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s3); margin-bottom: var(--s6); }
.kpis div { padding: var(--s4); border-radius: var(--r-md); background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); }
.kpis dt { font-size: .9rem; color: #BFDBFE; }
.kpis dd { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.8rem); font-weight: 800; color: #fff; letter-spacing: -.03em; line-height: 1.1; margin-top: var(--s2); }
.kpis small { font-size: .9rem; font-weight: 700; color: #FDBA74; margin-left: .3rem; letter-spacing: 0; }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.bars { padding: var(--s5); border-radius: var(--r-lg); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); }
.bars h3 { color: #fff; margin-bottom: var(--s4); }
.bars ul { display: grid; gap: var(--s3); }
.bars li { display: grid; grid-template-columns: 5.5rem 1fr 2.5rem; align-items: center; gap: var(--s3); font-weight: 700; }
.b-track { height: 14px; border-radius: 999px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.b-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #60A5FA, var(--orange)); }
.w100 { width: 100%; } .w62 { width: 62%; } .w55 { width: 55%; } .w38 { width: 38%; } .w28 { width: 28%; }
.b-val { text-align: right; color: #fff; }
@media (min-width: 640px) { .bars li { grid-template-columns: 8rem 1fr 3rem; } }

/* faq */
.faq-wrap { display: grid; gap: var(--s5); }
.faq { display: grid; gap: var(--s3); }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding-inline: var(--s5); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 60px; padding-block: var(--s3); font-weight: 800; color: var(--ink); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: .6rem; height: .6rem; border-right: 3px solid var(--blue); border-bottom: 3px solid var(--blue); transform: rotate(45deg); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { padding-bottom: var(--s4); color: var(--muted); }
@media (min-width: 900px) { .faq-wrap { grid-template-columns: 1fr 1.4fr; gap: var(--s7); align-items: start; } }

/* news */
.news { display: grid; gap: var(--s5); }
@media (min-width: 700px) { .news { grid-template-columns: repeat(3, 1fr); } }
.news-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; }
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.news-card > svg { width: 100%; aspect-ratio: 2 / 1; height: auto; }
.news-body { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s5); }
.meta { font-size: .85rem; font-weight: 700; color: var(--orange-text); text-transform: uppercase; letter-spacing: .04em; }
.news-body h3 a { display: inline-block; padding-block: 2px; }
.news-body h3 a:hover { color: var(--blue); }
.news-body p:last-child { color: var(--muted); font-size: .95rem; }

/* footer */
.site-footer { background: #0B1437; color: #CBD5E1; padding-top: var(--s8); }
.footer-grid { display: grid; gap: var(--s6); padding-bottom: var(--s6); }
.f-brand p { margin-top: var(--s4); max-width: 26rem; font-size: .95rem; }
.f-title { font-size: 1rem; color: #fff; margin-bottom: var(--s3); letter-spacing: 0; }
.site-footer address p { display: flex; align-items: flex-start; gap: var(--s2); margin-bottom: var(--s2); }
.site-footer address .ic { margin-top: .2em; color: #FDBA74; }
.site-footer a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.site-footer a:hover { text-decoration-color: currentColor; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer .brand { text-decoration: none; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2) var(--s5); padding-block: var(--s5); border-top: 1px solid rgba(255, 255, 255, .12); font-size: .9rem; }
.footer-bottom a { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1.4fr 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
