/* Faber landing: page CSS, linked after the kit. Only what the references leave to the page:
   the pictures inside the visuals (the Faber window, the card fragments), --p-h, the mark and
   the footer's photograph. */

/* ---------------------------------------------------------------- the mark: Faber's own icon */
.ly-mark { width: .82em; height: .82em; border-radius: 22%; background: url("/img/faber-icon.png") center / cover no-repeat; vertical-align: -.08em; }
.ly-mark::before, .ly-mark::after { display: none; }
.nav__logo img, .footer-logo img { width: 28px; height: 28px; border-radius: 7px; }

/* ---------------------------------------------------------------- ShinyText (reactbits.dev, TextAnimations/ShinyText)
   a light sweeping across the pill's words: two passes on load, two more on hover */
.shiny-text {
  color: #c4ccd8a8;
  background: linear-gradient(120deg, #fff0 40%, #ffffffe6 50%, #fff0 60%) 0 0 / 200% 100% no-repeat, linear-gradient(#c4ccd8, #c4ccd8);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: shine-a 2.2s linear 2;
}
.pill:hover .shiny-text { animation-name: shine-b; }
@keyframes shine-a { from { background-position: 100% 0, 0 0; } to { background-position: -100% 0, 0 0; } }
@keyframes shine-b { from { background-position: 100% 0, 0 0; } to { background-position: -100% 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .shiny-text { animation: none; } }

/* ---------------------------------------------------------------- SpotlightCard (reactbits.dev, Components/SpotlightCard) */
.spotlight {
  position: absolute; inset: 0; z-index: 5; pointer-events: none; border-radius: inherit; opacity: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), var(--spotlight-color), transparent 80%);
  transition: opacity .5s ease;
}
[data-spotlight]:hover > .spotlight { opacity: 1; }

/* ---------------------------------------------------------------- the hero window: Aurora over deep navy */
.hero--centred .hero__window { background: radial-gradient(120% 90% at 50% 0%, #b9d3fa, #6a98e6 75%); }
.hero__window > .aurora-container { z-index: 0; opacity: .65; }

/* the Faber window: a light app, its sidebar, the folder bar and the conversation */
.d-win { background: #fff; color: #16181a; border-radius: 12px; overflow: hidden; font: 400 14px/1.45 var(--font-text);
  box-shadow: 0 0 0 1px rgb(255 255 255 / .1), 0 40px 80px -30px rgb(0 0 0 / .75); text-align: left; }
.d-win__bar { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; background: #f1f3f6; font-size: 13px; color: #5d6268; }
.d-win__bar b { font-weight: 500; color: #16181a; }
.d-win__bar .sp { flex: 1; }
.d-win__dots { display: flex; gap: 6px; } .d-win__dots i { width: 10px; height: 10px; border-radius: 50%; background: #dcdfe2; }
.d-win__body { display: grid; grid-template-columns: 220px 1fr; min-height: 380px; }
.d-side { border-right: 1px solid #eceef1; padding: 10px; display: grid; align-content: start; gap: 2px; background: #f7f8fa; font-size: 13px; color: #4b5058; }
.d-side .q { height: 32px; margin-bottom: 4px; border-radius: 8px; background: #fff; box-shadow: inset 0 0 0 1px #e3e6ea; display: flex; align-items: center; padding: 0 10px; color: #8a9099; }
.d-side .new { white-space: nowrap; overflow: hidden; height: 32px; margin-bottom: 8px; border-radius: 8px; background: #2563eb; color: #fff; display: flex; align-items: center; gap: 8px; padding: 0 10px; font-weight: 500; }
.d-side .new svg { width: 14px; height: 14px; }
.d-side .t { padding: 7px 10px; border-radius: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-side .t.is-on { color: #1d4ed8; font-weight: 500; box-shadow: inset 2px 0 #2563eb; border-radius: 0; }
.d-side .h { margin: 8px 10px 2px; font-size: 13px; color: #8a9099; }
.convo { display: grid; min-width: 0; align-content: start; }
.d-chat { display: grid; gap: 8px; align-content: start; padding: 14px 18px; font-size: 14px; }
.d-msg { max-width: 82%; padding: 9px 13px; border-radius: 14px; line-height: 1.45; }
.d-msg--me { justify-self: end; background: #2563eb; color: #fff; border-bottom-right-radius: 5px; }
.d-msg--bot { background: #f1f3f6; color: #16181a; border-bottom-left-radius: 5px; max-width: 88%; }
.d-tool { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #6b7280; }
.d-tool::before { content: ""; flex: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #2563eb; border-right-color: transparent; animation: d-spin .8s linear infinite; }
.d-tool.is-done::before { border: 0; width: 14px; height: 14px; animation: none;
  background: #16a34a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M4 7.2l2 2 4-4.4' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
@keyframes d-spin { to { transform: rotate(360deg); } }
.acts { display: flex; gap: 8px; }
.acts span { height: 30px; padding: 0 12px; border-radius: 8px; display: inline-flex; align-items: center; font-size: 13px; font-weight: 500; background: #2563eb; color: #fff; }
.acts span + span { background: transparent; color: #16181a; box-shadow: inset 0 0 0 1px #d5d9df; }
.d-chat > :is(.d-tool, .d-msg--bot, .acts) { transition: opacity .3s ease, transform .3s ease; }
.d-chat > :is(.d-tool, .d-msg--bot, .acts):not(.is-on) { opacity: 0; transform: translateY(4px); }
@media (max-width: 1023px) { .d-win__body { grid-template-columns: 180px 1fr; } }
@media (max-width: 639px) {
  .d-win__body { grid-template-columns: 1fr; } .d-side { display: none; }
  .d-win__bar .sp ~ span { display: none; }
  .d-chat { font-size: 13px; padding: 12px 14px; }
}

/* ---------------------------------------------------------------- card loops (src/scripts/loops.ts) */
[data-steps-loop] [data-at], [data-steps-loop] [data-gone] { transition: opacity .3s ease, transform .3s ease, max-height .35s ease, background-color .3s ease; }
[data-steps-loop] .is-hidden { opacity: 0; transform: translateY(4px); }
[data-steps-loop] .is-gone { opacity: 0; max-height: 0 !important; padding-block: 0 !important; border-width: 0 !important; overflow: hidden; }

/* ---------------------------------------------------------------- feature and step cards */
.bento .panel, .steps .panel { --p-h: 336px; }
.ui { background: #fff; color: #16181a; border-radius: 12px; font: 400 13px/1.45 var(--font-text);
  box-shadow: 0 0 0 1px rgb(15 23 42 / .08), 0 24px 48px -24px rgb(15 23 42 / .45); overflow: hidden; text-align: left; }
.ui__bar { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-bottom: 1px solid #eceef1; color: #5d6268; font-size: 13px; }
.ui__bar b { color: #16181a; font-weight: 500; }
.ui__bar .sp { flex: 1; }
.ui__body { padding: 12px; display: grid; gap: 8px; }
.ui-btn { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 8px; background: #2563eb; color: #fff; font-weight: 500; font-size: 13px; }
.ui-btn--ghost { background: transparent; color: #16181a; box-shadow: inset 0 0 0 1px #d5d9df; }
.file-ico { flex: none; width: 18px; height: 22px; border-radius: 3px; position: relative; background: #217346; }
.file-ico::after { content: ""; position: absolute; right: 0; top: 0; border: 4px solid #fff; border-left-color: transparent; border-bottom-color: transparent; }
.file-ico--img { background: #f59e0b; } .file-ico--md { background: #475569; } .file-ico--html { background: #e34f26; }

/* the wide card: twelve order files become one clean sheet */
.bento .stage > .at-corner { --ax: 40px; --ay: 48px; }
.sheet { width: 720px; }
.sheet__grid { display: grid; font-variant-numeric: tabular-nums; }
.sheet__row { display: grid; grid-template-columns: 44px 120px 1fr 110px 120px; align-items: center; height: 34px; max-height: 34px; border-bottom: 1px solid #eef0f3; }
.sheet__row > span { padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet__row > span:first-child { color: #9aa0a8; text-align: center; background: #f7f8fa; height: 100%; display: grid; place-items: center; border-right: 1px solid #eef0f3; }
.sheet__row.is-head { background: #f7f8fa; color: #5d6268; font-weight: 500; }
.sheet__row.is-dup { background: #fef2f2; color: #b91c1c; text-decoration: line-through; }
.sheet__row .num { text-align: right; }
.sheet__row .tot { text-align: right; font-weight: 500; color: #15803d; }
.sheet__row.is-sum { background: #eff6ff; font-weight: 600; }
.sheet__tabs { display: flex; gap: 2px; padding: 6px 8px; background: #f7f8fa; border-top: 1px solid #eef0f3; color: #5d6268; }
.sheet__tabs span { padding: 3px 10px; border-radius: 6px; }
.sheet__tabs span.is-on { background: #fff; color: #217346; font-weight: 500; box-shadow: inset 0 0 0 1px #e3e6ea; }

/* the small cards: one fragment each, cut by the panel's bottom */
.bento .stage > .fit { --ax: 24px; --ay: 32px; --fit-max: 300px; }
.renames .r { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 2px 10px; align-items: center; padding: 6px 4px; border-bottom: 1px solid #f0f2f5; }
.renames .r s { color: #9aa0a8; font-size: 13px; grid-column: 2; }
.renames .r b { font-weight: 500; grid-column: 2; grid-row: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.renames .r .file-ico { grid-row: 1 / span 2; }
.renames .count { display: flex; justify-content: space-between; align-items: center; padding-top: 4px; color: #5d6268; }
.diff { font: 400 13px/1.55 "JetBrains Mono", ui-monospace, monospace; }
.diff div { padding: 1px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.diff .del { background: #fef2f2; color: #b91c1c; } .diff .add { background: #f0fdf4; color: #15803d; }
.diff .ctx { color: #6b7280; }
.desc .d-msg { max-width: 100%; font-size: 13px; }
.desc .d-msg--me { max-width: 92%; }
.hist .t { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 8px; border-radius: 8px; }
.hist .t span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist .t time { color: #9aa0a8; flex: none; }
.hist .t.is-on { background: #e8eefc; color: #1d4ed8; font-weight: 500; }

/* step one: the chat with Duy */
.zchat .d-msg { max-width: 88%; font-size: 13px; padding: 8px 12px; }
.zchat .d-msg--bot { background: #f1f3f6; }
.zchat .who { display: flex; align-items: center; gap: 8px; }
.zchat .who i { width: 22px; height: 22px; border-radius: 50%; background: #2563eb; color: #fff; display: grid; place-items: center; font: 600 13px/1 var(--font-text); font-style: normal; }
.zchat .paid { justify-self: end; display: flex; gap: 6px; align-items: center; color: #15803d; padding: 2px 4px; font-weight: 500; font-size: 13px; }
.zchat .paid::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #16a34a; }
/* step two: the installer */
.setup__body { padding: 18px; display: grid; gap: 12px; }
.setup__head { display: flex; gap: 12px; align-items: center; }
.setup__head img { width: 40px; height: 40px; border-radius: 10px; }
.setup__head b { display: block; font-size: 14px; font-weight: 600; }
.setup__bar { height: 8px; border-radius: 99px; background: #e8eefc; overflow: hidden; }
.setup__bar i { display: block; height: 100%; width: 100%; background: #2563eb; border-radius: inherit; }
.setup__foot { display: flex; justify-content: space-between; align-items: center; color: #5d6268; }
/* step three: the activation dialog */
.activate__body { padding: 18px; display: grid; gap: 12px; }
.activate__body h5 { margin: 0; font: 600 15px/1.3 var(--font-text); }
.activate__body p { margin: 0; color: #5d6268; }
.field { height: 38px; border-radius: 0; border-bottom: 2px solid #2563eb; background: #f4f6f9; display: flex; align-items: center; padding: 0 12px; font: 400 13px/1 "JetBrains Mono", ui-monospace, monospace; color: #16181a; letter-spacing: .02em; }
.activate__body .ui-btn { justify-self: start; }

@media (max-width: 639px) {
  .bento .panel, .steps .panel { --p-h: 260px; }
  .bento .stage > .at-corner { --ax: 20px; --ay: 24px; }
  .sheet { width: 560px; }
  .sheet__row { grid-template-columns: 36px 96px 1fr 0 100px; } .sheet__row > span:nth-child(4) { display: none; }
}

/* ---------------------------------------------------------------- pricing page: the months and the licence */
.months { display: grid; gap: 6px; font-variant-numeric: tabular-nums; }
.months .m { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: var(--s-4); min-height: 44px; }
.months .m > * { line-height: 28px; }
.months .m b { font-weight: 500; color: var(--accent); }
.months .m span { color: var(--muted); }
.months .m strong { font-weight: 600; font-size: var(--t-lead); }
.months .m.is-off strong { color: var(--muted); font-weight: 500; }
.months .m.is-sum strong { color: var(--accent); }
.lic { width: 100%; max-width: 420px; }
.lic dl { margin: 0; display: grid; }
.lic dl div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1px solid #f0f2f5; }
.lic dt { color: #5d6268; } .lic dd { margin: 0; font-weight: 500; }
.lic .ok { color: #15803d; display: inline-flex; align-items: center; gap: 6px; }
.lic .ok::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #16a34a; }
.lic__foot { display: flex; gap: 8px; padding-top: 4px; }
.smart { width: 100%; max-width: 460px; background: #1f5fa8; color: #fff; border-radius: 6px; font: 400 13px/1.5 "Segoe UI", var(--font-text); box-shadow: 0 24px 48px -24px rgb(15 23 42 / .55); }
.smart__body { padding: 22px 24px 18px; display: grid; gap: 10px; }
.smart h5 { margin: 0; font: 400 22px/1.25 "Segoe UI", var(--font-text); }
.smart p { margin: 0; opacity: .92; }
.smart u { text-underline-offset: 3px; font-weight: 600; }
.smart dl { margin: 4px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; opacity: .92; }
.smart dd { margin: 0; }
.smart__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; background: rgb(0 0 0 / .14); }
.smart__foot span { min-width: 96px; height: 30px; display: grid; place-items: center; border: 1px solid rgb(255 255 255 / .55); font-weight: 500; }
.smart__foot span.is-pick { background: #fff; color: #1f5fa8; border-color: #fff; box-shadow: 0 0 0 2px #fde047; }
.split-visual .panel { --p-h: 400px; border-radius: var(--r-lg); }
.split-visual .stage > .at-rise { --ax: 40px; --ay: 48px; }

/* ---------------------------------------------------------------- the footer: a blue-hour shore (Unsplash, Pierre Bouillot) */
.footer--statement.footer--photo {
  background: linear-gradient(rgb(6 12 26 / .62), rgb(6 12 26 / .82)), #0b1424 url("/assets/img/photo-907-960.webp") 50% 40% / cover no-repeat;
  --bg: #0b1424; --surface: #142038; --ink: #f2f5fa; --muted: #c3cddc; --accent: #9fd4ff;
  --action: #2563eb; --action-ink: #ffffff;
  --line: rgb(242 245 250 / .18); --line-strong: rgb(242 245 250 / .34);
  color: var(--ink);
}
@media (min-width: 961px) { .footer--statement.footer--photo { background-image: linear-gradient(rgb(6 12 26 / .62), rgb(6 12 26 / .82)), url("/assets/img/photo-907.webp"); } }
.footer--photo .close__word { color: rgb(242 245 250 / .92); }
.footer--photo .close__word { line-height: 1.1; }

/* ---------------------------------------------------------------- the skip link, the pricing hero */
.skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { width: auto; height: auto; clip-path: none; z-index: 100; padding: 8px 12px; border-radius: 8px; background: var(--ink); color: var(--bg); }
.hero--pricing .hero__plans { margin-top: var(--s-7); align-items: stretch; text-align: left; }
.steps-list { list-style: none; margin-inline: 0; margin-bottom: 0; padding: 0; }
.setup__head span { color: #5d6268; }
@media (max-width: 1023px) { .hero--pricing .hero__plans > .plan { grid-column: auto / span 6; } }
@media (max-width: 639px) { .hero--pricing .hero__plans > .plan { grid-column: 1 / -1; } }

/* the kit's .card > p sets body size; the plan price keeps its display size */
.card--plan > .plan__price { font-size: clamp(30px, 3vw, 44px); line-height: 1; }
.plan__btn--primary { background: var(--action); color: var(--action-ink); }
/* second bento row: its cards are taller, so the fragment sits mid-panel instead of on a bare ground */
.wrap > .grid.bento .stage > .fit { top: 50%; translate: 0 -50%; }

/* ---------------------------------------------------------------- fitting the screens below 1280
   1024-1279 and the tablet: two small cards and two questions step out, so each section keeps its
   screens (layout-v4: cut a long grid, never shrink it) */
@media (max-width: 1279px) {
  .m-desk { display: none !important; }
  .plan__list li:nth-child(4) { display: none; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  #viec .panel { --p-h: 240px; }
}
@media (min-width: 640px) and (max-width: 1279px) {
  .wrap > .grid.bento > .card { grid-column: auto / span 6; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  #cach-bat-dau .grid.steps > .card { grid-column: auto / span 4; }
  #cach-bat-dau .panel { --p-h: 240px; }
  #cach-bat-dau .stage > .fit { --ax: 12px; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  #cach-bat-dau { --h: 2; }
  #viec .panel { --p-h: 40svh; }
  #cach-bat-dau .panel { --p-h: calc(45svh - 50px); }
  .d-win__body { grid-template-columns: 200px 1fr; }
  .footer--photo .close__word { font-size: clamp(56px, 10vw, 110px); }
}
@media (min-width: 640px) and (max-width: 1023px) {
  .grid.pricing > .span-4.stack-5 { grid-column: 1 / -1; }
  .grid.pricing > .plan { grid-column: auto / span 6; }
  .closing__links .grid > :first-child { grid-column: 1 / -1; }
  .closing__links .grid > .footer__col { grid-column: auto / span 4; }
}
#bang-gia, #cach-bat-dau { --hm: 2; }
@media (min-width: 640px) and (max-width: 1023px) { .faq__item.m-desk { display: block !important; } }

/* the hero window: the last chat title and the sheet's count step out where they would cut */
@media (max-width: 1279px) { .d-side > :nth-child(5) { display: none; } }
@media (max-width: 1023px) { .sheet .ui__bar > span:last-child { display: none; } }
@media (max-width: 639px) {
  #viec .group .panel { --p-h: 320px; }
  #viec .wrap > .grid.bento .panel { --p-h: 205px; }
  .closing__links .grid > :first-child { display: none; }
  .pill .muted { display: none; }
}
@media (max-width: 639px) { .wrap > .grid.bento .stage > .fit { top: var(--ay-sm, 24px); translate: none; } }
@media (max-width: 1023px) {
  .sheet__row { grid-template-columns: 36px 96px 1fr 0 100px; } .sheet__row > span:nth-child(4) { display: none; }
  .diff { font-size: 11px; }
}
/* a tall tablet (820x1180): the panels take the extra height, so no group ends on a bare screen */
@media (min-width: 640px) and (max-width: 1023px) and (min-height: 1100px) {
  #viec .panel { --p-h: 60svh; }
  #cach-bat-dau .panel { --p-h: calc(45svh - 30px); }
}
/* the four-month example: on a phone the prices take two screens, so the example the pricing page
   shows fills the first one; from 640 it stays on /pricing */
.m-phone { display: none; }
@media (max-width: 639px) { .m-phone { display: grid; } }
/* the hero window: a shorter fade at its foot, so the lit ground stays lit around the app */
.hero--centred .hero__window { -webkit-mask-image: linear-gradient(to bottom, #000 90%, transparent); mask-image: linear-gradient(to bottom, #000 90%, transparent); }
@media (min-width: 640px) and (max-width: 1023px) { .hero--centred .hero__window { -webkit-mask-image: none; mask-image: none; } }

/* ---------------------------------------------------------------- /pricing below 1280 */
@media (max-width: 1279px) {
  .hero--pricing .plan__for { display: none; }
}
@media (min-width: 1024px) and (max-width: 1279px) { #cai-dat .frame--split, #vi-du .frame--split { --ratio: 110%; } }
@media (min-width: 640px) and (max-width: 1023px) { #cai-dat .frame--split, #vi-du .frame--split { --ratio: 56%; } }
/* a phone: the two plans as name and price under the hero's words; what each includes is in the
   questions and the example below */
@media (max-width: 639px) {
  .hero--pricing .hero__plans { margin-top: var(--s-5); }
  .hero--pricing .plan :is(.plan__btn, .plan__list) { display: none; }
}
/* /pricing questions: two step out on a phone */
@media (max-width: 639px) { .faq--pricing > :is(:nth-child(3), :nth-child(4)) { display: none; } }
@media (min-width: 1280px) { #cai-dat .frame--split, #vi-du .frame--split { --ratio: 100%; } }
/* /pricing: the plan cards close up where their buttons were; the two split frames take the hero
   window's lit ground and a larger mock, so neither reads as an empty dark box */
.hero--pricing .plan__for { min-height: 0; }
.hero--pricing .plan__list { margin-top: var(--s-2); }
:is(#vi-du, #cai-dat) .frame--split { background: radial-gradient(120% 90% at 50% 0%, #b9d3fa, #6a98e6 75%); border-color: transparent; }
@media (min-width: 1280px) { :is(#vi-du, #cai-dat) :is(.lic, .smart) { zoom: 1.2; } }
@media (max-width: 1023px) { .hero--pricing .plan__for { display: block; } }
@media (max-width: 639px) { .section--faq .grid > .faq { margin-top: var(--s-4); } }
