/* ============================================================
   Sketcho Premium — web client styles
   Token lấy từ source app (lib/configs/themes): navy #293444,
   cam #F3720C, xanh #65BC79/#90C980, phụ #4A4A4A, font Fredoka.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&display=swap');

:root {
  --navy: #293444; --navy-2: #323B48; --ink: #293444;
  --orange: #F3720C; --orange-2: #EB6827; --peach: #FFAF70;
  --green: #65BC79; --green-2: #90C980; --green-dark: #2F6841;
  --muted: #4A4A4A; --muted-2: #858585; --line: #E4E4E4; --bg: #f4f8f2; --white: #fff;
  --r-card: 22px; --r-btn: 999px;
  --shadow: 0 10px 30px rgba(41,52,68,.08); --shadow-lg: 0 18px 50px rgba(41,52,68,.15);
  --ease: cubic-bezier(.2,.8,.2,1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 "Fredoka", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  background-image: linear-gradient(rgba(41,52,68,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(41,52,68,.07) 1px, transparent 1px);
  background-size: 28px 28px;
}
a { color: var(--orange); text-decoration: none; } a:hover { color: var(--orange-2); }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.1; text-wrap: balance; }
h2 { font-size: clamp(30px, 4vw, 44px); }
p { margin: 0; }

/* ---------- components ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 54px; padding: 0 28px; border-radius: var(--r-btn); font: inherit; font-weight: 700; font-size: 17px; border: 0; cursor: pointer; text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s; }
.btn:hover { transform: translateY(-2px); } .btn:active { transform: translateY(0); }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 8px 20px rgba(243,114,12,.3); }
.btn-primary:hover { background: var(--orange-2); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-outline { background: #fff; color: var(--navy); border: 2px solid var(--navy); }
.btn-ghost { background: rgba(255,255,255,.18); color: #fff; border: 2px solid rgba(255,255,255,.5); }
.btn-sm { height: 42px; padding: 0 18px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.pill { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 999px; font-weight: 700; font-size: 13px; white-space: nowrap; }
.card { background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.card.lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* ---------- layout utilities (thay inline style) ---------- */
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack    { display: flex; flex-direction: column; gap: 12px; }
.row-wrap { display: flex; gap: 12px; flex-wrap: wrap; }
.panel    { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.panel-lg { padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.h-md { font-size: 24px; font-weight: 600; }
.h-sm { font-size: 18px; font-weight: 600; }
.text-sm { font-size: 14px; }
.self-start { align-self: flex-start; }

/* ---------- nav ---------- */
.nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 700; color: var(--ink); }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.nav-links { display: flex; gap: 26px; align-items: center; font-weight: 700; }
.nav-links a { color: var(--ink); }
.nav-user { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px 0 6px; border-radius: 999px; background: #fff; border: 2px solid var(--navy); font-weight: 700; font-size: 14px; color: var(--ink); white-space: nowrap; min-width: 0; }
.nav-user #nav-email { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.nav-user .avatar { flex: none; }
.nav-user .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.nav-user .pill { height: 22px; font-size: 11px; background: #e7f6e5; color: var(--green-dark); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-radius: 32px; color: #fff; min-height: 620px; display: grid; grid-template-columns: 6fr 5fr; gap: 40px; align-items: end; padding: 64px 56px 0;
  background: radial-gradient(ellipse 60% 50% at 20% 20%, rgba(255,255,255,.28), transparent 60%), radial-gradient(ellipse 50% 60% at 85% 75%, rgba(36,120,60,.35), transparent 60%), linear-gradient(160deg, var(--green-2) 0%, var(--green) 55%, var(--green) 100%); }
.hero .doodle { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .22; pointer-events: none; }
.hero-copy { position: relative; display: flex; flex-direction: column; gap: 22px; padding-bottom: 64px; }
.hero h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1.02; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.08); }
.hero p { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; max-width: 520px; color: #f1fbef; text-wrap: pretty; }
.hero .pill-light { background: rgba(255,255,255,.22); color: #fff; align-self: flex-start; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.mood { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.mood .label { font-size: 13px; color: #eaf8e8; font-weight: 600; }
.mood .pill { background: rgba(255,255,255,.22); color: #fff; transition: background .35s, color .35s, transform .35s var(--ease); }
.mood .pill.on { background: #fff; color: var(--navy); transform: scale(1.06); }

.hero-visual { position: relative; display: flex; justify-content: center; align-items: flex-end; height: 100%; min-height: 520px; }
.paper { position: absolute; bottom: -40px; left: 50%; transform: translateX(-50%) rotate(6deg); width: 380px; height: 520px; background: #fff; border-radius: 6px; box-shadow: 0 20px 50px rgba(0,0,0,.18);
  background-image: linear-gradient(rgba(41,52,68,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(41,52,68,.08) 1px, transparent 1px); background-size: 24px 24px; }
.phone { position: relative; width: 330px; border-radius: 28px 28px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.25); transform: rotate(-3deg); transform-origin: bottom center; overflow: hidden; }
.phone img { width: 100%; }
.phone .veil { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; animation: veil 5s ease-in-out infinite; }
.sticker { position: absolute; background: #fff; border-radius: 16px; box-shadow: 0 12px 28px rgba(0,0,0,.18); padding: 10px 14px; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--ink); will-change: transform; }
.sticker.s1 { left: -24px; top: 64px; --rot: -6deg; animation: floaty 6s ease-in-out infinite; }
.sticker.s2 { right: -10px; top: 200px; --rot: 5deg; animation: floaty 7s ease-in-out infinite 1s; }
.sticker.s3 { left: 10px; bottom: 120px; --rot: 3deg; animation: floaty 6.5s ease-in-out infinite .5s; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.slider-mini { width: 90px; height: 6px; border-radius: 3px; background: #ECECEC; position: relative; }
.slider-mini .fill { position: absolute; left: 0; top: 0; height: 6px; border-radius: 3px; background: var(--orange); animation: slidefill 5s ease-in-out infinite; }
.slider-mini .knob { position: absolute; top: -5px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--orange); transform: translateX(-50%); animation: slideknob 5s ease-in-out infinite; }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.eq i { width: 3px; background: var(--green); display: inline-block; height: 6px; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .15s; } .eq i:nth-child(3) { animation-delay: .3s; } .eq i:nth-child(4) { animation-delay: .45s; }

/* ---------- before / after ---------- */
.ba-section { display: grid; grid-template-columns: 5fr 7fr; gap: 40px; align-items: center; padding: 72px 0 0; }
.ba-copy { display: flex; flex-direction: column; gap: 16px; }
.ba-copy .pill { background: #fff; color: var(--orange); border: 2px solid #ffd9bd; align-self: flex-start; }
.ba { position: relative; height: 380px; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); background: #fff; --pos: 52%; user-select: none; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.ba .back { filter: grayscale(1) contrast(1.35) brightness(1.05); }
.ba .front { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba .bar { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.1); transform: translateX(-50%); }
.ba .handle { position: absolute; top: 50%; left: var(--pos); transform: translate(-50%, -50%); width: 48px; height: 48px; border-radius: 50%; background: var(--orange); box-shadow: 0 8px 20px rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; pointer-events: none; }
.ba input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.ba .tag { position: absolute; top: 16px; } .ba .tag.l { left: 16px; background: rgba(255,255,255,.9); color: var(--navy); } .ba .tag.r { right: 16px; background: rgba(41,52,68,.85); color: #fff; }

/* ---------- sections ---------- */
.section { padding: 72px 0 0; display: flex; flex-direction: column; gap: 28px; }
.section-head { display: flex; flex-direction: column; gap: 8px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.step { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.step .num { font-size: 34px; color: var(--orange); font-weight: 700; line-height: 1; }
.step h3 { font-size: 22px; font-weight: 600; }
.feature { overflow: hidden; display: flex; flex-direction: column; }
.feature img { width: 100%; height: 300px; object-fit: cover; object-position: top; }
.feature .body { padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.feature h3 { font-size: 22px; font-weight: 600; }
.feature.dark { background: var(--navy); color: #fff; padding: 22px; justify-content: center; gap: 14px; }
.feature.dark p { color: #cdd3e6; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plan { padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.plan .name { font-size: 22px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.plan .price { font-size: 44px; font-weight: 700; line-height: 1; }
.plan .price small { font-size: 15px; font-weight: 600; color: var(--muted); }
.plan .btn { margin-top: auto; }
.plan.hot { background: var(--orange); color: #fff; box-shadow: 0 18px 40px rgba(243,114,12,.3); transform: translateY(-10px); animation: breathe 4s ease-in-out infinite; }
.plan.hot .price small { color: rgba(255,255,255,.9); } .plan.hot p { color: #fff; opacity: .95; }
.plan.hot .pill { background: #fff; color: var(--orange); }
.fine { font-size: 14px; color: var(--muted-2); }
.premium-card { padding: 32px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; background: linear-gradient(160deg, var(--green-2), var(--green)); color: #fff; }
.premium-card .pill { background: rgba(255,255,255,.22); color: #fff; align-self: flex-start; }
.premium-card .title { font-size: clamp(22px, 2.6vw, 32px); font-weight: 700; }
.premium-card p { color: #eaf8e8; max-width: 640px; }
.premium-card .actions { display: flex; flex-direction: column; gap: 10px; }
.notice { border: 2px solid #ffd9bd; background: #fff7f0; border-radius: 16px; padding: 14px 16px; display: flex; gap: 10px; align-items: flex-start; color: var(--orange-2); font-size: 15px; }
.notice p { color: var(--muted); }
.notice-col { flex-direction: column; gap: 6px; }

/* ---------- faq / footer ---------- */
.faq { padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.faq h3 { font-size: 20px; font-weight: 600; }
.footer { margin-top: 72px; padding: 36px 0; border-top: 1px solid #dfe5dc; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted-2); }
.footer .links { display: flex; gap: 22px; flex-wrap: wrap; } .footer .links a { color: var(--muted-2); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.modal .backdrop { position: absolute; inset: 0; background: rgba(41,52,68,.45); backdrop-filter: blur(3px); animation: fade .25s var(--ease); }
.modal .box { position: relative; width: 440px; max-width: 100%; background: #fff; border-radius: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.3); padding: 36px 36px 28px; display: flex; flex-direction: column; gap: 22px; animation: pop .35s var(--ease); }
.modal .top { display: flex; justify-content: space-between; align-items: flex-start; }
.modal .top img { width: 56px; height: 56px; border-radius: 14px; }
.modal .close { background: none; border: 0; cursor: pointer; padding: 4px; color: var(--muted-2); }
.modal h2 { font-size: 30px; }
.modal .providers { display: flex; flex-direction: column; gap: 12px; }
.btn-apple { background: #000; color: #fff; width: 100%; font-size: 16px; height: 52px; }
.btn-google { background: #fff; color: var(--navy); border: 2px solid var(--line); width: 100%; font-size: 16px; height: 52px; }
.modal .legal { font-size: 12px; color: var(--muted-2); text-align: center; }
.dev-login { border: 2px dashed var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.dev-login input { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }

/* ---------- account ---------- */
.acc-anon { padding: 40px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; margin-top: 24px; }
.acc-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 24px; align-items: start; padding-top: 24px; }
.acc-plan-line { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.acc-col { display: flex; flex-direction: column; gap: 24px; }
.status-card { padding: 32px; display: flex; flex-direction: column; gap: 18px; background: linear-gradient(160deg, var(--green-2), var(--green)); color: #fff; }
.status-card.off { background: var(--navy); }
.status-card .pill { background: rgba(255,255,255,.22); color: #fff; align-self: flex-start; }
.status-card h1 { font-size: clamp(34px, 4vw, 48px); color: #fff; }
.status-card p, .status-card .sub { color: #eaf8e8; }
.table { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 3fr 2fr 2fr 2fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid #e6ebe3; align-items: center; }
.row.head { padding: 12px 0; font-size: 13px; color: var(--muted-2); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.row:last-child { border-bottom: 0; }
.st { justify-self: start; } .st.active { background: #e7f6e5; color: var(--green-dark); } .st.grace { background: #fff3e0; color: var(--orange-2); } .st.off { background: #f1f2f6; color: var(--muted); }

/* ---------- toast ---------- */
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 60; box-shadow: 0 10px 30px rgba(0,0,0,.2); animation: pop .3s var(--ease); }
.toast.ok { background: var(--green); color: #fff; } .toast.err { background: #d9480f; color: #fff; }

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .1s; } .reveal.d2 { transition-delay: .2s; } .reveal.d3 { transition-delay: .3s; } .reveal.d4 { transition-delay: .4s; }
.hero-in { animation: herorise .9s var(--ease) both; }
.hero-in.d1 { animation-delay: .15s; } .hero-in.d2 { animation-delay: .3s; } .hero-in.d3 { animation-delay: .45s; } .hero-in.d4 { animation-delay: .6s; }
@keyframes herorise { from { opacity: 0; transform: translateY(30px) rotate(var(--rot, 0deg)); } to { opacity: 1; transform: translateY(0) rotate(var(--rot, 0deg)); } }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(var(--rot)); } 50% { transform: translateY(-8px) rotate(var(--rot)); } }
@keyframes slidefill { 0%, 100% { width: 60%; } 50% { width: 25%; } }
@keyframes slideknob { 0%, 100% { left: 60%; } 50% { left: 25%; } }
@keyframes veil { 0%, 100% { opacity: 0; } 50% { opacity: .55; } }
@keyframes eq { 0%, 100% { height: 6px; } 50% { height: 14px; } }
@keyframes breathe { 0%, 100% { box-shadow: 0 18px 40px rgba(243,114,12,.3); } 50% { box-shadow: 0 24px 56px rgba(243,114,12,.45); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding: 40px 28px 0; min-height: 0; }
  .hero-copy { padding-bottom: 28px; }
  .hero-visual { min-height: 440px; }
  .paper { width: 300px; height: 420px; }
  .phone { width: 260px; }
  .sticker.s1 { left: 0; top: 20px; } .sticker.s2 { right: 0; top: 120px; } .sticker.s3 { left: 0; bottom: 80px; }
  .ba-section { grid-template-columns: 1fr; padding-top: 56px; }
  .ba { height: 300px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3, .plans { grid-template-columns: 1fr; }
  .plan.hot { transform: none; order: -1; }
  .premium-card { grid-template-columns: 1fr; }
  .acc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-links a.link { display: none; }
  .nav { gap: 10px; } .nav-links { gap: 8px; min-width: 0; }
  .brand { font-size: 22px; flex: none; }
  .nav-user { padding: 0 6px 0 4px; gap: 6px; } .nav-user #nav-email { display: none; } .nav-user .pill { flex: none; }
  .nav-links .btn-sm { padding: 0 14px; white-space: nowrap; flex: none; }
  .hero { padding: 28px 20px 0; border-radius: 24px; }
  .hero h1 { font-size: 36px; }
  .hero .pill-light { white-space: normal; height: auto; padding: 6px 14px; line-height: 1.3; }
  .hero-actions .btn { width: 100%; }
  .grid-4 { grid-template-columns: 1fr; }
  .feature img { height: 220px; }
  .row { grid-template-columns: 1fr 1fr; }
  .row.head { display: none; }
  .modal .box { padding: 28px 22px 22px; }
}
