/* AK Soft Solutions — component styles layered on top of Tailwind utilities. */

:root {
  --brand-900: #0b2a5b;
  --brand-700: #1a3fb0;
  --brand-600: #1d4fd8;
  --brand-50: #eef4ff;
  --accent-400: #fbbf24;
  --accent-500: #f59e0b;
}

html { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.scrollbar-none { scrollbar-width: none; }
.scrollbar-none::-webkit-scrollbar { display: none; }
::selection { background: #bcd3ff; color: #0b2a5b; }

/* Navigation */
.nav-link {
  position: relative;
  padding: .5rem .85rem;
  font-size: .9rem;
  font-weight: 600;
  color: #334155;
  border-radius: .6rem;
  white-space: nowrap;
  transition: color .2s, background-color .2s;
}
.nav-link:hover { color: var(--brand-700); background: #f1f5f9; }
.nav-link.is-active { color: var(--brand-700); }
.nav-link.is-active::after {
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: -.2rem;
  height: 2px; border-radius: 2px; background: var(--accent-400);
}
.mobile-link {
  display: block; padding: .8rem .9rem; border-radius: .75rem;
  font-weight: 600; color: #1e293b; transition: background-color .2s;
}
.mobile-link:hover { background: #f1f5f9; }
.mobile-link.is-active { background: var(--brand-50); color: var(--brand-700); }
/* Desktop mega dropdown */
.dropdown-panel {
  visibility: hidden; opacity: 0; pointer-events: none;
  transform: translate(-50%, 10px) scale(.98); transform-origin: top center;
  transition: opacity .2s ease, transform .25s cubic-bezier(.2,.8,.2,1), visibility 0s linear .25s;
}
.dropdown.is-open .dropdown-panel,
.no-js .dropdown:hover .dropdown-panel,
.no-js .dropdown:focus-within .dropdown-panel {
  visibility: visible; opacity: 1; pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
  transition: opacity .2s ease, transform .25s cubic-bezier(.2,.8,.2,1), visibility 0s;
}
.dropdown.is-open .dropdown-chevron { transform: rotate(180deg); }
.dropdown.is-open > .nav-link { color: var(--brand-700); background: #f1f5f9; }
.dropdown-item {
  display: flex; gap: .85rem; padding: .8rem; border-radius: 1rem;
  transition: background-color .2s;
}
.dropdown-surface {
  background: #f3f6fc;
  border: 1px solid #c9d8f5;
  box-shadow: 0 30px 60px -20px rgba(11, 42, 91, .35), 0 12px 24px -12px rgba(11, 42, 91, .18);
}
.dropdown-item:hover, .dropdown-item:focus-visible, .dropdown-item.is-current {
  background: #fff; box-shadow: 0 1px 2px rgba(11, 42, 91, .06), 0 6px 16px -8px rgba(11, 42, 91, .2);
}
.dropdown-icon {
  width: 2.6rem; height: 2.6rem; flex-shrink: 0; display: grid; place-items: center;
  border-radius: .8rem; background: #fff; color: var(--brand-600);
  box-shadow: inset 0 0 0 1px #d9e6ff;
  transition: background-color .2s, color .2s, transform .2s, box-shadow .2s;
}
.dropdown-item:hover .dropdown-icon, .dropdown-item.is-current .dropdown-icon {
  background: var(--brand-600); color: #fff; transform: scale(1.05); box-shadow: none;
}

/* Dims the page behind an open dropdown so the menu stands out on any background */
.nav-scrim {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(7, 27, 61, .32); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
body.dropdown-open .nav-scrim { opacity: 1; pointer-events: auto; }

/* Header login dropdown */
.login-panel {
  visibility: hidden; opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}
[data-login].is-open .login-panel {
  visibility: visible; opacity: 1; pointer-events: auto; transform: none;
  transition: opacity .2s ease, transform .2s ease, visibility 0s;
}
[data-login].is-open [data-login-toggle] { border-color: #8eb6ff; color: var(--brand-700); }

/* Mobile accordion */
.accordion-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.mobile-accordion.is-open .accordion-body { grid-template-rows: 1fr; }
.mobile-accordion.is-open .accordion-chevron { transform: rotate(180deg); }

.mobile-panel { transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
#mobile-menu.is-open .mobile-panel { transform: translateX(0); }
#site-header.is-scrolled { box-shadow: 0 6px 24px -12px rgba(15, 23, 42, .18); }

/* Buttons */
.btn-primary, .btn-accent, .btn-outline, .btn-ghost-light, .btn-white {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.35rem; border-radius: .8rem;
  font-weight: 700; font-size: .925rem; line-height: 1.2;
  transition: transform .15s, box-shadow .2s, background-color .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn-primary { background: var(--brand-600); color: #fff; box-shadow: 0 8px 20px -8px rgba(29, 79, 216, .6); }
.btn-primary:hover { background: var(--brand-700); transform: translateY(-1px); }
.btn-accent { background: var(--accent-400); color: #0b2a5b; box-shadow: 0 8px 20px -8px rgba(245, 158, 11, .7); }
.btn-accent:hover { background: #fcd34d; transform: translateY(-1px); }
.btn-outline { border: 1.5px solid #cbd5e1; color: #0f172a; background: #fff; }
.btn-outline:hover { border-color: var(--brand-600); color: var(--brand-700); }
.btn-ghost-light { border: 1.5px solid rgba(255,255,255,.3); color: #fff; }
.btn-ghost-light:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.6); }
.btn-white { background: #fff; color: var(--brand-900); }
.btn-white:hover { background: var(--brand-50); }
:is(.btn-primary, .btn-accent, .btn-outline, .btn-ghost-light, .btn-white):focus-visible,
.nav-link:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent-500); outline-offset: 2px;
}

/* Hero rotating word */
.word-rotator {
  position: relative; display: inline-block; white-space: nowrap; vertical-align: bottom;
  transition: width .5s cubic-bezier(.4, 0, .2, 1);
}
.word-rotator-text { display: inline-block; transition: transform .4s ease, opacity .4s ease; }
.word-rotator-text.is-leaving { transform: translateY(-45%); opacity: 0; }
.word-rotator-text.is-entering { transform: translateY(45%); opacity: 0; transition: none; }

/* Highlighted button: periodic light sweep */
.btn-shine { position: relative; overflow: hidden; isolation: isolate; }
.btn-shine::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .65), transparent);
  transform: skewX(-20deg); animation: btn-shine 3.2s ease-in-out infinite;
}
@keyframes btn-shine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.btn-accent.btn-shine { box-shadow: 0 10px 24px -8px rgba(245, 158, 11, .75), 0 0 0 4px rgba(251, 191, 36, .18); }
.btn-accent.btn-shine:hover { box-shadow: 0 14px 28px -8px rgba(245, 158, 11, .85), 0 0 0 6px rgba(251, 191, 36, .22); }

/* Hero: TallyPrime Developer mock-up — lines appear one by one, then "build" */
/* Lines not yet "typed" take no space, so the caret sits right under the current line */
.js [data-tdl-code].is-typing .tdl-line:not(.is-shown) { display: none; }
.js [data-tdl-code].is-typing .tdl-line.is-shown { animation: tdl-type-in .25s ease; }
@keyframes tdl-type-in { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.tdl-caret { animation: tdl-blink 1s steps(1) infinite; }
@keyframes tdl-blink { 50% { opacity: 0; } }
[data-tdl-status].is-busy .tdl-status-dot { background: var(--accent-300); animation: tdl-blink .6s steps(1) infinite; }
[data-tdl-status].is-ok .tdl-status-dot { background: #34d399; }
.tdl-file { display: flex; align-items: center; gap: .5rem; padding: .3rem 1rem; color: #94a3b8; transition: background-color .3s, color .3s; }
.tdl-file-dot { width: .375rem; height: .375rem; border-radius: 999px; background: #475569; flex-shrink: 0; transition: background-color .3s; }
.tdl-file-ok { margin-left: auto; color: #34d399; font-weight: 700; opacity: 0; transition: opacity .3s; }
.tdl-file.is-active { background: rgba(29, 79, 216, .25); color: #fff; }
.tdl-file.is-active .tdl-file-dot { background: var(--accent-400); }
.tdl-file.is-built .tdl-file-ok { opacity: 1; }
.tdl-file.is-built:not(.is-active) .tdl-file-dot { background: #34d399; }

/* Section helpers */
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand-600);
}
.eyebrow::before { content: ""; width: 1.25rem; height: 2px; background: var(--accent-400); border-radius: 2px; }
.section-title { font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; color: #0f172a; }

.bg-grid {
  background-image:
    linear-gradient(to right, #fff 1px, transparent 1px),
    linear-gradient(to bottom, #fff 1px, transparent 1px);
  background-size: 40px 40px;
}
.bg-dots { background-image: radial-gradient(#cbd5e1 1px, transparent 1px); background-size: 22px 22px; }

/* Cards */
.card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 1.25rem;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.card-hover:hover { border-color: #bcd3ff; box-shadow: 0 20px 40px -20px rgba(29, 79, 216, .25); transform: translateY(-3px); }

/* Homepage service cards */
.service-card {
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s, border-color .3s;
}
/* soft blue wash that fades in from the top */
.service-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, #eef4ff 0%, rgba(238, 244, 255, 0) 70%);
  opacity: 0; transition: opacity .35s;
}
/* accent bar that grows along the bottom edge */
.service-card::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--brand-600), var(--accent-400));
  transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2,.8,.2,1);
}
.service-card:hover,
.js .service-card.reveal.is-visible:hover {
  transform: translateY(-6px);
  border-color: #bcd3ff;
  box-shadow: 0 30px 50px -26px rgba(29, 79, 216, .45);
}
.service-card:hover::before { opacity: 1; }
.service-card:hover::after { transform: scaleX(1); }
.service-icon { transition: background-color .3s, color .3s, transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
.service-card:hover .service-icon {
  background: var(--brand-600); color: #fff;
  transform: rotate(-8deg) scale(1.1);
  box-shadow: 0 10px 20px -8px rgba(29, 79, 216, .7);
}
.service-watermark {
  position: absolute; right: -1.5rem; top: -1.5rem; z-index: -1; color: var(--brand-600);
  opacity: 0; transform: rotate(12deg) scale(.85); transition: opacity .4s, transform .5s cubic-bezier(.2,.8,.2,1);
}
.service-watermark svg { stroke-width: 1.25; }
.service-card:hover .service-watermark { opacity: .07; transform: rotate(0) scale(1); }

/* Services page: hero tiles */
.svc-tile { transition: transform .3s cubic-bezier(.2,.8,.2,1), background-color .3s, box-shadow .3s; }
.svc-tile:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -24px rgba(0, 0, 0, .6); }

/* Services page: explorer tabs */
.svc-tab {
  position: relative; width: 100%; display: flex; align-items: center; gap: .85rem;
  padding: .85rem; border-radius: 1.1rem; color: #0f172a;
  transition: background-color .25s, color .25s, box-shadow .25s;
}
.svc-tab:hover { background: #f1f5f9; }
.svc-tab-icon {
  width: 2.6rem; height: 2.6rem; flex-shrink: 0; display: grid; place-items: center; border-radius: .8rem;
  background: var(--brand-50); color: var(--brand-600); transition: background-color .25s, color .25s, transform .25s;
}
.svc-tab-sub { color: #64748b; }
.svc-tab-arrow { color: #cbd5e1; opacity: 0; transform: translateX(-4px); transition: all .25s; }
.svc-tab:hover .svc-tab-arrow { opacity: 1; transform: none; }
.svc-tab.is-active { background: var(--brand-900); color: #fff; box-shadow: 0 14px 28px -14px rgba(11, 42, 91, .7); }
.svc-tab.is-active .svc-tab-icon { background: var(--accent-400); color: var(--brand-950); transform: rotate(-6deg); }
.svc-tab.is-active .svc-tab-sub { color: #bcd3ff; }
.svc-tab.is-active .svc-tab-arrow { opacity: 1; transform: none; color: var(--accent-400); }

/* Desktop with JS: show one panel at a time. Mobile / no-JS: all panels stacked. */
@media (min-width: 1024px) {
  .js [data-svc-tabs] .svc-panel:not(.is-active) { display: none; }
  .js [data-svc-tabs] .svc-panel.is-active { animation: svc-in .45s cubic-bezier(.2,.8,.2,1); }
}
@keyframes svc-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.svc-point { transition: background-color .25s, box-shadow .25s, transform .25s; }
.svc-point:hover { background: #fff; box-shadow: 0 0 0 1px #bcd3ff, 0 12px 24px -16px rgba(29, 79, 216, .4); transform: translateY(-2px); }

/* Contact page info cards */
.contact-card { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.contact-card:hover {
  transform: translateY(-4px); border-color: #8eb6ff;
  box-shadow: 0 22px 40px -18px rgba(29, 79, 216, .35);
}
.contact-card.is-wa:hover { border-color: #6ee7b7; box-shadow: 0 22px 40px -18px rgba(16, 185, 129, .35); }
.contact-icon { transition: background-color .25s ease, color .25s ease, transform .25s ease; }
.contact-card:hover .contact-icon { background: var(--brand-600); color: #fff; transform: scale(1.08) rotate(-4deg); }
.contact-card.is-wa:hover .contact-icon { background: #10b981; color: #fff; }

/* Admin dashboard feature cards */
.feature-card { transition: transform .25s ease, box-shadow .25s ease; }
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 0 1.5px #8eb6ff, 0 24px 44px -22px rgba(29, 79, 216, .4);
}

/* Footer */
.footer-h { color: #fff; font-weight: 700; font-size: .9rem; margin-bottom: 1.1rem; }
.footer-list { display: grid; gap: .7rem; font-size: .9rem; }
.footer-list a:hover { color: #fff; }
.social-btn {
  width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: .7rem;
  background: rgba(255,255,255,.06); color: #cbd5e1; transition: background-color .2s, color .2s;
}
.social-btn:hover { background: var(--accent-400); color: var(--brand-900); }

/* Forms */
.field-label { display: block; font-size: .85rem; font-weight: 600; color: #334155; margin-bottom: .4rem; }
.field {
  width: 100%; border: 1.5px solid #e2e8f0; background: #fff; border-radius: .75rem;
  padding: .7rem .9rem; font-size: .95rem; color: #0f172a; transition: border-color .2s, box-shadow .2s;
}
.field::placeholder { color: #94a3b8; }
.field:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 4px rgba(29, 79, 216, .12); }
.field.is-invalid { border-color: #ef4444; }
.field-error { margin-top: .35rem; font-size: .8rem; color: #dc2626; }

/* Add-on filters */
.chip {
  display: inline-flex; align-items: center; gap: .4rem; flex-shrink: 0;
  padding: .45rem .85rem; border-radius: 999px; font-size: .84rem; font-weight: 600;
  border: 1.5px solid #e2e8f0; color: #475569; background: #fff; transition: all .2s; white-space: nowrap;
}
.chip:hover { border-color: #8eb6ff; color: var(--brand-700); background: var(--brand-50); }
.chip.is-active { background: var(--brand-900); border-color: var(--brand-900); color: #fff; }
.chip-count {
  min-width: 1.35rem; padding: 0 .35rem; border-radius: 999px; text-align: center;
  font-size: .72rem; line-height: 1.35rem; background: #f1f5f9; color: #64748b;
}
.chip:hover .chip-count { background: #fff; color: var(--brand-700); }
.chip.is-active .chip-count { background: rgba(255,255,255,.18); color: #fff; }

/* Add-on card: golden look when the Multi-user licence is selected */
[data-addon] { transition: border-color .3s, box-shadow .3s, transform .25s, background-color .3s; }
[data-addon] [data-price-value], [data-addon] [data-buy] { transition: color .3s, background .3s, box-shadow .3s; }
[data-addon].is-multi {
  border-color: #f2c94c;
  background: linear-gradient(180deg, #fffdf6 0%, #fff6dc 100%);
  box-shadow: 0 0 0 1px #f2c94c, 0 22px 44px -20px rgba(217, 119, 6, .45);
}
/* Hover. The selectors repeat .reveal.is-visible so they beat `.js .reveal.is-visible { transform: none }` */
[data-addon]:hover,
.js [data-addon].reveal.is-visible:hover {
  transform: translateY(-6px);
  border-color: #8eb6ff;
  box-shadow: 0 0 0 1px #bcd3ff, 0 28px 50px -24px rgba(29, 79, 216, .45);
}
[data-addon].is-multi:hover,
.js [data-addon].reveal.is-visible.is-multi:hover {
  border-color: #e0a91c;
  box-shadow: 0 0 0 1px #e0a91c, 0 28px 50px -22px rgba(217, 119, 6, .6);
}
[data-addon] h3 { transition: color .25s; }
[data-addon]:hover h3 { color: var(--brand-700); }
[data-addon].is-multi:hover h3 { color: #92400e; }
[data-addon]:hover img { transform: scale(1.05); }
[data-addon].is-multi [data-price-value] { color: #b45309; }
[data-addon].is-multi .price-toggle { background: #fbe7b2; }
[data-addon].is-multi .price-toggle button { color: #92400e; }
[data-addon].is-multi .price-toggle button.is-active {
  background: linear-gradient(135deg, #fcd34d, #f59e0b); color: #3b2300;
  box-shadow: 0 2px 6px -1px rgba(217, 119, 6, .5);
}
[data-addon].is-multi [data-buy] {
  background: linear-gradient(135deg, #f8cf55 0%, #e3a313 100%); color: #3b2300;
  box-shadow: 0 10px 22px -10px rgba(217, 119, 6, .8);
}
[data-addon].is-multi [data-buy]:hover { background: linear-gradient(135deg, #fbd96b 0%, #eaae1f 100%); }
[data-addon].is-multi .btn-outline { border-color: #f1d08a; background: #fffaf0; }
[data-addon].is-multi .btn-outline:hover { border-color: #e0a91c; color: #b45309; }

/* Add-on pagination */
.page-btn {
  min-width: 2.6rem; height: 2.6rem; padding: 0 .8rem; display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  border-radius: .75rem; border: 1.5px solid #e2e8f0; background: #fff;
  font-size: .9rem; font-weight: 700; color: #334155; transition: all .2s;
}
.page-btn:hover:not(:disabled):not(.is-active) { border-color: #8eb6ff; color: var(--brand-700); background: var(--brand-50); }
.page-btn.is-active { background: var(--brand-900); border-color: var(--brand-900); color: #fff; box-shadow: 0 8px 18px -8px rgba(11, 42, 91, .6); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }
.page-nav { font-weight: 600; }

.price-toggle button { padding: .35rem .8rem; border-radius: .55rem; font-size: .78rem; font-weight: 700; color: #64748b; transition: all .2s; }
.price-toggle button.is-active { background: #fff; color: var(--brand-900); box-shadow: 0 1px 3px rgba(15,23,42,.12); }

/* FAQ */
details summary::-webkit-details-marker { display: none; }
details[open] .faq-icon { transform: rotate(45deg); }

/* Prose for legal pages */
.prose-page h2 { font-size: 1.3rem; font-weight: 800; color: #0f172a; margin: 2rem 0 .6rem; }
.prose-page p, .prose-page li { line-height: 1.75; }
.prose-page ul { list-style: disc; padding-left: 1.25rem; margin: .6rem 0; }

/* Motion */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
.wa-pulse::before {
  content: ""; position: absolute; inset: 0; border-radius: 999px; background: #25D366;
  z-index: -1; animation: wa-pulse 2.2s infinite;
}
@keyframes wa-pulse { 0% { transform: scale(1); opacity: .5; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.animate-float { animation: float 6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
