/* =========================================================
   SulitSee by Kurvo — Design System
   See the price. Know the sulit.
   ========================================================= */
@import url("theme.css"); /* glass, dock, ceremony overlay, dark mode */
:root {
  --green: #16A34A;
  --green-600: #16A34A;
  --green-700: #15803D;
  --green-500: #22C55E;
  --lime: #84CC16;
  --sun: #FACC15;
  --navy: #0F172A;
  --navy-2: #13213B;
  --cloud: #F8FAFC;
  --line: #E2E8F0;
  --muted: #64748B;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --nav-h: 76px;
}

* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { background: var(--cloud); color: var(--navy); font-feature-settings: "ss01", "cv11"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: #BBF7D0; color: #052E16; }
.tabular { font-variant-numeric: tabular-nums; }
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }
:focus-visible { outline: 2.5px solid var(--green-500); outline-offset: 2px; border-radius: 10px; }

/* ---------- Logo ---------- */
.ss-logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; }
.ss-logo img { height: 2.15rem; width: auto; flex: none; }
.ss-logo .ss-word { display: flex; flex-direction: column; line-height: 1; }
.ss-logo .ss-word b { font-weight: 900; font-size: 1.45rem; letter-spacing: -.045em; color: var(--navy); }
.ss-logo .ss-word b span { background: linear-gradient(100deg, #16A34A 10%, #22C55E 55%, #84CC16); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ss-logo .ss-word small { align-self: flex-end; margin-top: .14rem; font-size: .62rem; font-weight: 700; letter-spacing: .02em; color: #475569; }
.ss-logo .ss-word small strong { font-weight: 900; color: var(--navy); }
.ss-logo.on-dark .ss-word b, .ss-logo.on-dark .ss-word small strong { color: #fff; }
.ss-logo.on-dark .ss-word small { color: #94A3B8; }
.ss-logo.on-dark .ss-word b span { background: linear-gradient(100deg, #4ADE80, #A3E635); -webkit-background-clip: text; background-clip: text; }
.ss-logo.lg img { height: 3.2rem; }
.ss-logo.lg .ss-word b { font-size: 2.1rem; }
.ss-logo.lg .ss-word small { font-size: .82rem; }

.text-gradient { background: linear-gradient(100deg, #16A34A 0%, #22C55E 45%, #84CC16 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.text-gradient-light { background: linear-gradient(100deg, #4ADE80, #A3E635 60%, #FACC15); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 2.9rem; padding: 0 1.25rem; border-radius: 14px; font-weight: 700; font-size: .92rem; letter-spacing: -.01em; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .2s, color .2s, border-color .2s; cursor: pointer; white-space: nowrap; user-select: none; }
.btn:active { transform: scale(.97); }
.btn svg { width: 1.1rem; height: 1.1rem; flex: none; }
.btn-primary { color: #fff; background: linear-gradient(135deg, #22C55E, #16A34A 55%, #15803D); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 10px 24px -10px rgba(22,163,74,.7); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 16px 30px -10px rgba(22,163,74,.8); }
.btn-sun { color: #1a1300; background: linear-gradient(135deg, #FDE047, #FACC15); box-shadow: 0 10px 24px -10px rgba(234,179,8,.8); }
.btn-sun:hover { transform: translateY(-2px); }
.btn-dark { color: #fff; background: var(--navy); }
.btn-dark:hover { background: #1E293B; transform: translateY(-2px); }
.btn-outline { color: var(--navy); background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.btn-outline:hover { border-color: #86EFAC; color: var(--green-700); transform: translateY(-1px); }
.btn-ghost { color: var(--navy); background: transparent; }
.btn-ghost:hover { background: #F1F5F9; }
.btn-glass { color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(10px); }
.btn-glass:hover { background: rgba(255,255,255,.14); }
.btn-lg { min-height: 3.5rem; padding: 0 1.75rem; font-size: 1rem; border-radius: 16px; }
.btn-sm { min-height: 2.35rem; padding: 0 .9rem; font-size: .82rem; border-radius: 11px; }
.btn-icon { width: 2.75rem; min-width: 2.75rem; padding: 0; }
.btn[disabled], .btn.is-loading { opacity: .7; pointer-events: none; }
.btn .spinner { width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite; }

/* ---------- Inputs ---------- */
.field { display: grid; gap: .45rem; }
.field label { font-size: .82rem; font-weight: 700; color: #334155; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg { position: absolute; left: 1rem; width: 1.15rem; height: 1.15rem; color: #94A3B8; pointer-events: none; transition: color .2s; }
.input { width: 100%; height: 3.3rem; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; padding: 0 1rem; font-size: .95rem; font-weight: 500; color: var(--navy); outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
.input-wrap > svg + .input { padding-left: 2.85rem; }
.input::placeholder { color: #A0AEC0; font-weight: 500; }
.input:hover { border-color: #CBD5E1; }
.input:focus { border-color: var(--green-500); box-shadow: 0 0 0 4px rgba(34,197,94,.15); }
.input-wrap:focus-within > svg { color: var(--green-600); }
.input.is-invalid { border-color: #EF4444; box-shadow: 0 0 0 4px rgba(239,68,68,.1); }
.input.is-valid { border-color: #86EFAC; }
.field-hint { font-size: .76rem; color: var(--muted); min-height: 1rem; }
.field-hint.error { color: #DC2626; font-weight: 600; }
.input-action { position: absolute; right: .5rem; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 10px; color: #64748B; }
.input-action:hover { background: #F1F5F9; color: var(--navy); }
.checkbox { appearance: none; width: 1.2rem; height: 1.2rem; border-radius: 6px; border: 1.5px solid #CBD5E1; display: inline-grid; place-items: center; cursor: pointer; transition: .2s; flex: none; background: #fff; }
.checkbox:checked { background: var(--green-600) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center/75% no-repeat; border-color: var(--green-600); }

/* toggle */
.toggle { position: relative; width: 2.9rem; height: 1.7rem; border-radius: 99px; background: #CBD5E1; transition: background .25s; flex: none; cursor: pointer; }
.toggle::after { content: ""; position: absolute; top: .2rem; left: .2rem; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(15,23,42,.2); transition: transform .3s var(--spring); }
.toggle[aria-checked="true"] { background: var(--green-600); }
.toggle[aria-checked="true"]::after { transform: translateX(1.2rem); }

/* ---------- Cards & surfaces ---------- */
.card { background: #fff; border: 1px solid #E8EDF3; border-radius: 24px; box-shadow: 0 1px 2px rgba(15,23,42,.03), 0 8px 24px -12px rgba(15,23,42,.08); }
.card-hover { transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.card-hover:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(15,23,42,.04), 0 24px 48px -16px rgba(15,23,42,.16); border-color: #D9E2EC; }
.glass { background: rgba(255,255,255,.72); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6); border: 1px solid rgba(255,255,255,.7); }
.glass-dark { background: rgba(15,23,42,.55); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid rgba(255,255,255,.1); }
.surface-navy { background: radial-gradient(120% 120% at 100% 0%, #173A33 0%, rgba(23,58,51,0) 45%), radial-gradient(90% 90% at 0% 100%, #1B2D52 0%, rgba(27,45,82,0) 60%), #0F172A; color: #fff; }
.surface-green { background: radial-gradient(120% 140% at 0% 100%, #FACC15 0%, rgba(250,204,21,0) 38%), radial-gradient(90% 120% at 30% 80%, #84CC16 0%, rgba(132,204,22,0) 55%), linear-gradient(135deg, #22C55E, #16A34A 50%, #14532D); color: #fff; }
.grid-bg { background-image: linear-gradient(rgba(15,23,42,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(15,23,42,.045) 1px, transparent 1px); background-size: 44px 44px; }
.noise::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; mix-blend-mode: soft-light; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E"); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; height: 1.6rem; padding: 0 .6rem; border-radius: 99px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.badge svg { width: .85rem; height: .85rem; }
.badge-green { background: #DCFCE7; color: #15803D; }
.badge-sun { background: #FEF9C3; color: #854D0E; }
.badge-navy { background: var(--navy); color: #fff; }
.badge-gray { background: #F1F5F9; color: #475569; }
.badge-red { background: #FEE2E2; color: #B91C1C; }
.badge-outline { border: 1px solid var(--line); color: #475569; background: #fff; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--green-700); }
.eyebrow.dot::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: var(--green-500); box-shadow: 0 0 0 4px rgba(34,197,94,.2); }
.demo-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .68rem; font-weight: 700; color: #854D0E; background: #FEFCE8; border: 1px solid #FEF08A; border-radius: 99px; padding: .2rem .6rem; }

/* ---------- Product tile ---------- */
.ptile { position: relative; display: grid; place-items: center; border-radius: 18px; overflow: hidden; flex: none; }
.ptile svg { width: 72%; height: 72%; filter: drop-shadow(0 6px 8px rgba(15,23,42,.15)); }
.ptile .emoji { font-size: 2rem; line-height: 1; filter: drop-shadow(0 4px 6px rgba(15,23,42,.15)); }

/* ---------- Motion ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes floaty2 { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(10px) rotate(-1.5deg); } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.45); } 100% { box-shadow: 0 0 0 14px rgba(34,197,94,0); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes scanline { 0%, 100% { top: 8%; } 50% { top: 88%; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes shimmer { 100% { transform: translateX(100%); } }
@keyframes blob { 0%, 100% { border-radius: 42% 58% 60% 40% / 45% 45% 55% 55%; transform: rotate(0deg) scale(1); } 50% { border-radius: 58% 42% 40% 60% / 55% 60% 40% 45%; transform: rotate(20deg) scale(1.06); } }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes grow-y { from { transform: scaleY(0); } }
@keyframes slide-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(3px); } 30%, 50%, 70% { transform: translateX(-5px); } 40%, 60% { transform: translateX(5px); } }

.float-a { animation: floaty 6s ease-in-out infinite; }
.float-b { animation: floaty2 7s ease-in-out infinite; }
.float-c { animation: floaty 8s ease-in-out -2s infinite; }
.anim-pop { animation: pop .5s var(--spring) both; }
.anim-fade-up { animation: fade-up .6s var(--ease) both; }
.anim-shake { animation: shake .45s ease both; }
.pulse-dot { animation: pulse-ring 1.6s ease-out infinite; }
.blob { animation: blob 14s ease-in-out infinite; }
.grow-x { transform-origin: left; animation: grow-x 1.2s var(--ease) both; }
.grow-y { transform-origin: bottom; animation: grow-y 1s var(--ease) both; }

[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0ms); }
[data-reveal="left"] { transform: translateX(-28px); }
[data-reveal="right"] { transform: translateX(28px); }
[data-reveal="zoom"] { transform: scale(.94); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Toast ---------- */
.toast-stack { position: fixed; z-index: 120; left: 50%; bottom: 1.5rem; transform: translateX(-50%); display: grid; gap: .6rem; width: min(92vw, 420px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; border-radius: 16px; background: #0F172A; color: #fff; font-size: .88rem; font-weight: 600; box-shadow: 0 20px 40px -12px rgba(15,23,42,.45); animation: fade-up .45s var(--spring) both; }
.toast .t-icon { width: 1.9rem; height: 1.9rem; border-radius: 10px; display: grid; place-items: center; background: rgba(34,197,94,.18); color: #4ADE80; flex: none; }
.toast .t-icon svg { width: 1rem; height: 1rem; }
.toast .t-act { flex: none; margin: -.35rem -.35rem -.35rem 0; padding: .45rem .8rem; border-radius: 10px; background: rgba(74,222,128,.16); color: #4ADE80; font-weight: 800; font-size: .82rem; transition: background .2s; }
.toast .t-act:hover { background: rgba(74,222,128,.28); }
.toast.is-leaving { transition: .3s var(--ease); opacity: 0; transform: translateY(10px) scale(.97); }
@media (max-width: 1023px) { .app-page .toast-stack { bottom: calc(var(--nav-h) + 1rem + env(safe-area-inset-bottom)); } }

/* ---------- Sheet / Modal ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(2,6,23,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 1.25rem; opacity: 0; transition: opacity .3s var(--ease); }
.overlay.is-open { opacity: 1; }
.sheet { width: min(100%, 560px); max-height: calc(100dvh - 2.5rem); overflow: auto; background: #fff; border-radius: 28px; box-shadow: 0 40px 80px -20px rgba(2,6,23,.5); transform: translateY(24px) scale(.98); transition: transform .45s var(--spring); }
.overlay.is-open .sheet { transform: none; }
.sheet-handle { display: none; }
@media (max-width: 640px) {
  .overlay { align-items: flex-end; padding: 0; }
  .sheet { width: 100%; max-height: 92dvh; border-radius: 28px 28px 0 0; transform: translateY(100%); transition: transform .45s var(--ease); padding-bottom: env(safe-area-inset-bottom); }
  .sheet-handle { display: block; width: 2.6rem; height: .3rem; border-radius: 99px; background: #CBD5E1; margin: .65rem auto 0; }
}

/* ---------- Phone mockup ---------- */
.phone { position: relative; width: 300px; aspect-ratio: 300 / 620; border-radius: 48px; padding: 11px; background: linear-gradient(145deg, #2A3448, #0B1222 40%, #1E293B); box-shadow: 0 0 0 1.5px #3B475E inset, 0 50px 100px -30px rgba(2,6,23,.55), 0 30px 60px -30px rgba(22,163,74,.35); }
.phone::before { content: ""; position: absolute; right: -3px; top: 150px; width: 3px; height: 70px; border-radius: 0 3px 3px 0; background: #1E293B; }
.phone-screen { position: relative; height: 100%; border-radius: 38px; overflow: hidden; background: #F8FAFC; }
.phone-island { position: absolute; z-index: 5; top: 10px; left: 50%; transform: translateX(-50%); width: 92px; height: 26px; border-radius: 99px; background: #000; }

/* ---------- Scanner visuals ---------- */
.scan-frame { position: relative; overflow: hidden; }
.scan-corner { position: absolute; width: 2.4rem; height: 2.4rem; border-color: var(--sun); border-style: solid; border-width: 0; }
.scan-corner.tl { left: 0; top: 0; border-top-width: 4px; border-left-width: 4px; border-top-left-radius: 14px; }
.scan-corner.tr { right: 0; top: 0; border-top-width: 4px; border-right-width: 4px; border-top-right-radius: 14px; }
.scan-corner.bl { left: 0; bottom: 0; border-bottom-width: 4px; border-left-width: 4px; border-bottom-left-radius: 14px; }
.scan-corner.br { right: 0; bottom: 0; border-bottom-width: 4px; border-right-width: 4px; border-bottom-right-radius: 14px; }
.scan-beam { position: absolute; left: 4%; right: 4%; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, #FACC15 15%, #FDE047 50%, #FACC15 85%, transparent); box-shadow: 0 0 18px 4px rgba(250,204,21,.55); animation: scanline 2.2s ease-in-out infinite; }
.scan-beam::after { content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 60px; background: linear-gradient(to top, rgba(250,204,21,.18), transparent); }
.receipt { position: relative; background: #FFFEF8; color: #1E293B; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; box-shadow: 0 24px 50px -16px rgba(2,6,23,.55); }
.receipt::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; background: linear-gradient(-45deg, transparent 6px, #FFFEF8 0) 0 0 / 12px 10px repeat-x, linear-gradient(45deg, transparent 6px, #FFFEF8 0) 0 0 / 12px 10px repeat-x; }
.receipt-line { display: flex; justify-content: space-between; gap: .5rem; font-size: .66rem; line-height: 1.55; }
.receipt-line.hl { background: rgba(250,204,21,.32); border-radius: 3px; box-shadow: 0 0 0 2px rgba(250,204,21,.32); transition: background .3s; }

/* check animation */
.check-anim path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .5s .15s var(--ease) forwards; }
.ring-anim circle.ring { stroke-dasharray: 160; stroke-dashoffset: 160; animation: draw .7s var(--ease) forwards; }

/* list checkbox */
.lcheck { width: 1.6rem; height: 1.6rem; border-radius: 9px; border: 2px solid #CBD5E1; display: grid; place-items: center; color: #fff; flex: none; transition: background .25s, border-color .25s, transform .3s var(--spring); }
.lcheck svg { width: .95rem; height: .95rem; opacity: 0; transform: scale(.4); transition: .3s var(--spring); }
.is-checked .lcheck { background: var(--green-600); border-color: var(--green-600); transform: scale(1.06); }
.is-checked .lcheck svg { opacity: 1; transform: none; }
.is-checked .item-name { color: #94A3B8; text-decoration: line-through; text-decoration-thickness: 1.5px; }

/* skeleton */
.skeleton { position: relative; overflow: hidden; background: #E2E8F0; border-radius: 8px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent); animation: shimmer 1.3s infinite; }

/* chart tooltip */
.chart-tip { position: absolute; pointer-events: none; z-index: 10; background: #0F172A; color: #fff; padding: .5rem .7rem; border-radius: 12px; font-size: .75rem; font-weight: 600; box-shadow: 0 12px 24px -8px rgba(2,6,23,.4); transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; opacity: 0; transition: opacity .15s; }
.chart-tip.show { opacity: 1; }
/* Donut segments grow on hover (the width comes from each chart: --seg-hover) */
.donut-seg:hover { stroke-width: var(--seg-hover); }
/* The first and last bars keep their tip inside the chart (never past the screen edge) */
.chart-tip.tip-start { left: 0 !important; transform: translate(0, calc(-100% - 12px)); }
.chart-tip.tip-end { left: auto !important; right: 0; transform: translate(0, calc(-100% - 12px)); }
.chart-tip small { display: block; color: #94A3B8; font-weight: 600; font-size: .68rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
