/* RentWise landing — cùng bộ màu "Sổ cái" với apps/web/app/globals.css (chế độ sáng). */
:root {
  --desk: #E9EDF4;
  --ink: #1B2440;
  --ink-2: #3A4460;
  --muted: #56607A;
  --paper: #FFFFFF;
  --rule: #D9E3F3;
  --margin: #D8402F;
  --pen: #1F3FBF;
  --green: #17794A;
  --red: #C8321F;
  --accent: #F2C230;
  --note-yellow: #FFF3B8;
  --note-blue: #D9E6FF;
  --note-pink: #FFD9D2;
  --shadow: #C4CCDC;
  --on-ink-soft: #D4DBEC;
  --display: 'Oswald', 'Arial Narrow', sans-serif;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --hand: 'Patrick Hand', cursive;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--desk); color: var(--ink); font-family: var(--sans); line-height: 1.5; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pen); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--accent); color: var(--ink); padding: 10px 16px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.eyebrow { margin: 0; font: 600 14px var(--display); letter-spacing: 1.5px; text-transform: uppercase; color: var(--pen); }
.h2 { margin: 0; font: 600 clamp(32px, 4.4vw, 46px)/1.1 var(--display); text-transform: uppercase; }
.lead { margin: 0; font-size: 18px; line-height: 1.6; color: var(--ink-2); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 15px; color: var(--ink-2); }
.check-list li { display: flex; gap: 8px; align-items: center; }

/* Nền */
.desk { background-color: var(--desk); background-image: radial-gradient(var(--shadow) 1.2px, transparent 1.2px); background-size: 22px 22px; }
.ruled { background-color: var(--paper); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 35px, var(--rule) 35px, var(--rule) 36px); }
.ruled-margin { background-color: var(--paper); background-image: linear-gradient(to right, transparent 0, transparent 71px, #F0A79D 71px, #F0A79D 73px, transparent 73px), repeating-linear-gradient(to bottom, transparent 0, transparent 35px, var(--rule) 35px, var(--rule) 36px); }
.inkgrid { background-color: var(--ink); background-image: linear-gradient(#26304F 1px, transparent 1px), linear-gradient(90deg, #26304F 1px, transparent 1px); background-size: 44px 44px; color: #fff; }
.outline-glyph { position: absolute; font: 700 clamp(160px, 24vw, 340px)/1 var(--display); color: transparent; -webkit-text-stroke: 2px #D3DAE7; user-select: none; pointer-events: none; }

/* Nút */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 10px; font: 600 16px var(--sans); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn-lg { min-height: 56px; padding: 0 30px; font-size: 17px; }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 4px 4px 0 var(--accent); }
.btn-primary:hover { color: #fff; background: var(--pen); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--accent); }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { color: var(--ink); background: #FFD54A; transform: translate(-1px, -1px); }
.btn-ghost { background: var(--paper); color: var(--ink); border: 2px solid var(--ink); }
.btn-ghost:hover { color: var(--pen); border-color: var(--pen); }

/* Thanh trên */
.topbar { background: var(--ink); color: #fff; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; border-radius: 8px; background: var(--accent); color: var(--ink); display: flex; align-items: center; justify-content: center; font: 700 20px var(--display); }
.brand-name { font: 600 24px var(--display); letter-spacing: .5px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px 28px; flex: 1 1 auto; font-size: 15px; margin: 0; padding: 0; list-style: none; }
.nav-links a { color: #fff; text-decoration: none; }
.nav-links a:hover { text-decoration: underline; }
.nav-cta { display: flex; gap: 12px; align-items: center; }
.nav-cta .login { color: #fff; min-height: 44px; display: inline-flex; align-items: center; padding: 0 8px; }
.nav-cta .btn { min-height: 44px; }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero-inner { position: relative; padding-top: 72px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.pill { margin: 0; display: inline-flex; align-items: center; gap: 10px; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 6px 16px 6px 10px; font-size: 14px; font-weight: 600; }
.live { width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.hero h1 { margin: 0; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.hero-kicker { font: 600 22px var(--display); letter-spacing: 3px; text-transform: uppercase; color: var(--pen); }
.hero-title { font: 700 clamp(40px, 6.4vw, 68px)/1.04 var(--display); text-transform: uppercase; letter-spacing: -.5px; max-width: 900px; }
.scribble { position: relative; display: inline-block; white-space: nowrap; }
.scribble svg { position: absolute; left: -2%; bottom: -14px; width: 104%; height: 22px; overflow: visible; }
.hero-lead { margin: 8px 0 0; font-size: 19px; line-height: 1.6; color: var(--ink-2); max-width: 680px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.hero-visual { position: relative; width: 100%; max-width: 1120px; margin-top: 36px; padding-bottom: 7%; text-align: left; }
.hero-visual .browser { width: 86%; }
.hero-phone { position: absolute; right: 0; bottom: 0; width: 25%; min-width: 120px; --r: 3deg; transform: rotate(var(--r)); }
.tag { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font: 600 12px var(--display); letter-spacing: 1px; text-transform: uppercase; padding: 4px 10px; border-radius: 6px; white-space: nowrap; z-index: 1; }
.hero-note { position: absolute; left: -2%; top: 46%; width: 190px; background: var(--note-yellow); font-size: 19px; --r: -4deg; transform: rotate(var(--r)); }
.hero-stamp { position: absolute; left: 52%; top: 8%; color: var(--green); transform: rotate(-8deg); }

/* Khung thiết bị */
.browser { border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; background: var(--paper); box-shadow: 10px 10px 0 var(--shadow); }
.browser-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #F3F5FA; border-bottom: 2px solid var(--ink); }
.dot { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--ink); flex: none; }
.dot.r { background: #FF8272; } .dot.y { background: var(--accent); } .dot.g { background: #4FD28F; }
.url { flex: 1; min-width: 0; margin-left: 10px; background: #fff; border: 1.5px solid var(--shadow); border-radius: 6px; padding: 4px 10px; font: 500 12px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser-label { font: 600 12px var(--display); letter-spacing: 1px; text-transform: uppercase; color: var(--pen); margin-left: 8px; }
.phone { background: #0D1220; border-radius: 46px; padding: 9px; box-shadow: 12px 14px 0 rgba(27, 36, 64, .18); }
.phone img { width: 100%; border-radius: 38px; }
.phone.dark { background: #060A14; }
.note { font-family: var(--hand); color: var(--ink); box-shadow: 3px 3px 0 var(--shadow); padding: 14px 16px; line-height: 1.3; }
.stamp { font: 700 15px var(--display); text-transform: uppercase; letter-spacing: 1px; padding: 6px 12px; border: 3px solid; border-radius: 6px; background: rgba(255, 255, 255, .85); }

/* Dải chữ chạy */
.ticker { background: var(--accent); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); overflow: hidden; padding: 14px 0; }
.marquee { display: flex; width: max-content; font: 600 20px var(--display); text-transform: uppercase; letter-spacing: 1px; }
.marquee span { display: inline-flex; align-items: center; gap: 28px; padding-right: 28px; white-space: nowrap; }
.marquee span::after { content: "✶"; color: var(--margin); }

/* RentWise là gì */
.what { border-bottom: 2px solid var(--ink); }
.what .wrap { padding-left: 96px; }
.definition { margin: 0; font-size: 20px; line-height: 1.7; max-width: 820px; }
.pains { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 36px; }
.pain { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 12px; padding: 24px; background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; }
.pain .old { margin: 0; font: 400 21px var(--hand); color: var(--red); text-decoration: line-through; }
.pain p:last-child { margin: 0; font-size: 17px; line-height: 1.6; }

/* Tính năng */
.features { display: flex; flex-direction: column; gap: 96px; padding: 96px 0 40px; }
.row { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.row.flip { flex-wrap: wrap-reverse; }
.row-text { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.row-media { flex: 1.3 1 520px; min-width: 0; position: relative; }
.row-no { font: 500 14px var(--mono); color: var(--margin); }
.h3 { margin: 0; font: 600 clamp(26px, 3vw, 34px)/1.15 var(--display); text-transform: uppercase; }
.row-text p { margin: 0; font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.row-text ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 16px; }
.margin-note { font: 400 20px var(--hand) !important; color: var(--pen) !important; }
.phone-stage { flex: 1 1 420px; display: flex; justify-content: center; padding: 24px 0; }
.phone-stage::before { content: ""; position: absolute; inset: 8% 10%; background: var(--note-blue); border: 2px solid var(--ink); border-radius: 28px; transform: rotate(-3deg); }
.phone-stage .phone { position: relative; width: min(290px, 70%); }
.phone-stage .note { position: absolute; right: 4%; top: 12%; width: 160px; background: var(--note-yellow); font-size: 18px; --r: 4deg; transform: rotate(var(--r)); }
.row-stamp { position: absolute; right: 6%; bottom: -18px; color: var(--red); transform: rotate(6deg); }

.cards { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 32px; }
.card { flex: 1 1 320px; min-width: 0; background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 6px 6px 0 var(--shadow); padding: 24px; display: flex; gap: 16px; transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--ink); }
.card-mark { flex: none; width: 44px; height: 44px; border-radius: 10px; border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; font: 700 18px var(--display); }
.card h3 { margin: 0 0 6px; font: 600 20px/1.25 var(--display); text-transform: uppercase; }
.card p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); }

/* iPhone */
.app-row { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.app-text { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.app-text .eyebrow { color: var(--accent); }
.app-text p { margin: 0; font-size: 18px; line-height: 1.65; color: var(--on-ink-soft); }
.dash-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 17px; }
.dash-list li::before { content: "— "; color: var(--accent); font-weight: 700; }
.app-fan { flex: 1.2 1 480px; min-width: 0; position: relative; aspect-ratio: 1 / 1.15; max-height: 640px; }
.app-fan .side { position: absolute; top: 9%; width: 36%; }
.app-fan .left { left: 2%; transform: rotate(-7deg); }
.app-fan .right { right: 2%; transform: rotate(7deg); }
.app-fan .center { position: absolute; left: 30%; top: 0; width: 40%; z-index: 2; }
.app-fan .center .phone { box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.store-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 8px; font-size: 14px; color: var(--on-ink-soft); }

/* Các bước */
.steps { list-style: none; margin: 48px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 24px; }
.step { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 12px; background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; padding: 28px; box-shadow: 6px 6px 0 var(--shadow); }
.step.hl { background: var(--note-yellow); box-shadow: 6px 6px 0 var(--ink); }
.step-no { font: 700 60px/1 var(--display); color: transparent; -webkit-text-stroke: 2px var(--pen); }
.step.hl .step-no { -webkit-text-stroke-color: var(--margin); }
.step h3 { margin: 0; font: 600 23px var(--display); text-transform: uppercase; }
.step p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); }

/* So sánh */
.band { background: var(--paper); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.table-box { overflow-x: auto; border: 2px solid var(--ink); border-radius: 14px; margin-top: 32px; }
.cmp { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 16px; }
.cmp th, .cmp td { padding: 14px 16px; text-align: left; border-bottom: 1.5px solid var(--rule); vertical-align: top; }
.cmp thead th { font: 600 14px var(--display); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--ink); }
.cmp tbody th { font-weight: 600; }
.cmp td { color: var(--muted); }
.cmp td.rw { background: var(--note-yellow); color: var(--ink); font-weight: 600; }
.cmp thead th.rw { background: var(--accent); color: var(--ink); }

/* Bảng giá */
.center { text-align: center; align-items: center; }
.billing { display: flex; gap: 4px; padding: 4px; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; margin: 40px auto 0; width: max-content; max-width: 100%; }
.billing button { all: unset; cursor: pointer; min-height: 44px; padding: 0 18px; border-radius: 8px; font: 600 15px var(--sans); color: var(--ink); }
.billing button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.billing button:focus-visible { outline: 3px solid var(--pen); outline-offset: -3px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 28px; margin: 40px auto 0; }
.plan { min-width: 0; position: relative; background: var(--paper); border: 2px solid var(--ink); border-radius: 18px; padding: 32px; display: flex; flex-direction: column; gap: 18px; box-shadow: 6px 6px 0 var(--shadow); }
.plan.hl { background: var(--note-yellow); box-shadow: 8px 8px 0 var(--ink); }
.plan h3 { margin: 0; font: 600 26px var(--display); text-transform: uppercase; }
.plan p { margin: 0; color: var(--ink-2); }
.price { display: flex; align-items: baseline; gap: 8px; }
.price strong { font: 700 40px var(--display); color: var(--ink); }
.plan ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.plan .btn { margin-top: auto; }
.ribbon { position: absolute; top: -16px; right: 24px; background: var(--margin); color: #fff; font: 600 13px var(--display); letter-spacing: 1px; text-transform: uppercase; padding: 6px 12px; border-radius: 6px; }

/* Hỏi đáp */
.faq-wrap { max-width: 860px; }
.faq { border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; margin-top: 32px; }
.faq details { border-bottom: 2px solid var(--ink); background: var(--paper); }
.faq details:last-child { border-bottom: 0; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px; padding: 16px 20px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { margin: 0; font: 600 18px/1.4 var(--sans); }
.faq summary::after { content: "+"; font: 600 24px var(--display); color: var(--margin); flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 20px 20px; font-size: 16px; line-height: 1.7; color: var(--ink-2); }

/* CTA cuối */
.cta { position: relative; overflow: hidden; background: var(--accent); border: 2px solid var(--ink); border-radius: 18px; box-shadow: 8px 8px 0 var(--ink); padding: 56px 40px; display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between; }
.cta::after { content: "₫"; position: absolute; right: -20px; bottom: -70px; font: 700 220px/1 var(--display); color: transparent; -webkit-text-stroke: 2px rgba(27, 36, 64, .18); pointer-events: none; }
.cta > div { position: relative; flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.cta h2 { margin: 0; font: 700 clamp(30px, 3.6vw, 42px)/1.1 var(--display); text-transform: uppercase; }
.cta p { margin: 0; font-size: 18px; }
.cta .btn { position: relative; box-shadow: 4px 4px 0 #fff; }

/* Chân trang */
.footer { background: var(--ink); color: var(--on-ink-soft); }
.footer .wrap { padding-top: 48px; padding-bottom: 48px; display: flex; flex-wrap: wrap; gap: 32px 56px; justify-content: space-between; font-size: 15px; }
.footer-about { display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.footer-about .brand-name { color: #fff; }
.footer nav { display: flex; flex-direction: column; gap: 10px; }
.footer nav h2 { margin: 0; font: 600 14px var(--display); letter-spacing: 1px; text-transform: uppercase; color: var(--accent); }
.footer a { color: #fff; }
.footer small { width: 100%; font-size: 13px; color: #A4AFCB; border-top: 1px solid #34456B; padding-top: 20px; }

/* Trang văn bản pháp lý */
.legal { max-width: 820px; margin: 0 auto; padding: 64px 24px 96px; }
.legal-sheet { background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 8px 8px 0 var(--shadow); padding: clamp(24px, 5vw, 56px); }
.legal h1 { margin: 0 0 8px; font: 600 clamp(32px, 5vw, 44px)/1.1 var(--display); text-transform: uppercase; }
.legal .meta { margin: 0 0 24px; color: var(--muted); font-size: 15px; }
.legal .draft { margin: 0 0 32px; padding: 14px 16px; background: var(--note-yellow); border: 2px dashed var(--ink); border-radius: 10px; font-size: 15px; }
.legal h2 { margin: 40px 0 12px; font: 600 24px/1.25 var(--display); text-transform: uppercase; }
.legal h3 { margin: 24px 0 8px; font: 600 18px/1.35 var(--sans); }
.legal p, .legal li { font-size: 16px; line-height: 1.75; color: var(--ink-2); }
.legal ul, .legal ol { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal strong { color: var(--ink); }
.legal .toc { background: #F3F5FA; border-radius: 10px; padding: 16px 20px; }
.legal .toc ol { margin: 0; }
.legal .table-box { margin-top: 12px; }
.legal table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 15px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1.5px solid var(--rule); line-height: 1.6; }
.legal thead th { font: 600 13px var(--display); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--ink); }

/* Hiệu ứng — chỉ transform/opacity; tắt hẳn khi người dùng chọn giảm chuyển động. */
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-12px) rotate(var(--r, 0deg)); } }
@keyframes stamp-in { 0% { opacity: 0; transform: scale(2.4) rotate(-14deg); } 55% { opacity: 1; transform: scale(.9) rotate(-8deg); } 100% { opacity: 1; transform: scale(1) rotate(-8deg); } }
@keyframes draw { from { stroke-dashoffset: 420; } to { stroke-dashoffset: 0; } }
@keyframes slide { to { transform: translateX(-50%); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
  .d1 { animation-delay: .08s; } .d2 { animation-delay: .18s; } .d3 { animation-delay: .3s; } .d4 { animation-delay: .45s; } .d5 { animation-delay: .7s; }
  .bob { animation: bob 5s ease-in-out infinite; }
  .bob-slow { animation: bob 7s ease-in-out infinite; }
  .hero-stamp { animation: stamp-in .7s cubic-bezier(.3, 1.4, .5, 1) 1.1s both; }
  .scribble path { stroke-dasharray: 420; animation: draw 1.2s ease-out .6s both; }
  .marquee { animation: slide 38s linear infinite; }
  .live { animation: blink 1.6s ease-in-out infinite; }
  @supports (animation-timeline: view()) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 5% entry 55%; }
  }
}

/* Điện thoại */
@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .what .wrap { padding-left: 40px; }
  .ruled-margin { background-image: linear-gradient(to right, transparent 0, transparent 23px, #F0A79D 23px, #F0A79D 25px, transparent 25px), repeating-linear-gradient(to bottom, transparent 0, transparent 35px, var(--rule) 35px, var(--rule) 36px); }
  .hero-note { display: none; }
  .hero-visual .browser { width: 92%; }
  .phone { border-radius: 26px; padding: 5px; }
  .phone img { border-radius: 21px; }
  .cta { padding: 40px 24px; }
  .row, .app-row { gap: 40px; }
  .features { gap: 72px; }
}
