/* ==========================================================================
   Shah Infotech — custom design layer (works alongside Tailwind CDN utilities)
   ========================================================================== */

:root {
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

/* Anchor offset so sticky header doesn't cover section headings */
section[id], main [id] {
  scroll-margin-top: 6rem;
}

::selection {
  background: #B8873B;
  color: #FAF8F2;
}

/* ---------------------------------------------------------------------- */
/* Accessibility                                                          */
/* ---------------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 1rem;
  z-index: 100;
  background: #16233D;
  color: #FAF8F2;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.skip-link:focus {
  left: 1rem;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #B8873B;
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------------- */
/* Header                                                                  */
/* ---------------------------------------------------------------------- */

#site-header {
  background: transparent;
}

#site-header.scrolled {
  background: rgba(250, 248, 242, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #E4DFD1;
}

#site-header.scrolled #nav-inner {
  height: 4.5rem;
}

.nav-link {
  position: relative;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #3C4C6B;
  transition: color 0.25s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1.5px;
  background: #B8873B;
  transition: width 0.3s var(--ease);
}

.nav-link:hover {
  color: #16233D;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link-active {
  color: #16233D;
}

.nav-link-active::after {
  width: 100%;
}

.mobile-link {
  font-family: "Fraunces", serif;
  font-size: 1.75rem;
  font-weight: 500;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: #FAF8F2;
}

/* Hamburger */
.hamburger {
  display: block;
  width: 24px;
  height: 18px;
  position: relative;
}

.hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: #16233D;
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), top 0.3s var(--ease);
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 8px; }
.hamburger span:nth-child(3) { top: 16px; }

#menu-toggle[aria-expanded="true"] .hamburger span:nth-child(1) {
  top: 8px;
  transform: rotate(45deg);
}
#menu-toggle[aria-expanded="true"] .hamburger span:nth-child(2) {
  opacity: 0;
}
#menu-toggle[aria-expanded="true"] .hamburger span:nth-child(3) {
  top: 8px;
  transform: rotate(-45deg);
}

#mobile-menu.is-open {
  transform: translateX(0);
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #16233D;
  color: #FAF8F2;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  box-shadow: 0 1px 2px rgba(22,35,61,0.08);
  white-space: nowrap;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: #B8873B;
  color: #16233D;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(184,135,59,0.45);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #16233D;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.85rem 0.25rem;
  border-bottom: 1.5px solid #16233D;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), gap 0.25s var(--ease);
}

.btn-secondary:hover {
  color: #B8873B;
  border-color: #B8873B;
  gap: 0.75rem;
}

/* ---------------------------------------------------------------------- */
/* Eyebrow label                                                           */
/* ---------------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9C6F2C;
  font-weight: 500;
}

/* ---------------------------------------------------------------------- */
/* Ledger-line signature background                                        */
/* ---------------------------------------------------------------------- */

.ledger-bg {
  position: relative;
  background-color: #FAF8F2;
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 43px,
      #E4DFD1 43px,
      #E4DFD1 44px
    );
  background-position: 0 8rem;
}

.ledger-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(250,248,242,0) 0%, #FAF8F2 92%);
  pointer-events: none;
}

.ledger-bg-dark {
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 43px,
      rgba(255,255,255,0.05) 43px,
      rgba(255,255,255,0.05) 44px
    );
  opacity: 0.6;
}

/* ---------------------------------------------------------------------- */
/* Stamp badge                                                             */
/* ---------------------------------------------------------------------- */

.stamp-badge {
  position: absolute;
  top: -1.25rem;
  right: 1rem;
  z-index: 10;
  width: 108px;
  height: 108px;
  border-radius: 999px;
  border: 2px dashed #B8873B;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #FAF8F2;
  color: #9C6F2C;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.3;
  transform: rotate(-9deg);
  box-shadow: 0 8px 24px -8px rgba(22,35,61,0.25);
  padding: 0.5rem;
}

.stamp-badge-sub {
  margin-top: 0.2rem;
  font-size: 0.6rem;
  font-weight: 700;
  color: #16233D;
}

@media (max-width: 640px) {
  .stamp-badge {
    width: 84px;
    height: 84px;
    font-size: 0.45rem;
    top: -0.75rem;
    right: 0.5rem;
  }
  .stamp-badge-sub { font-size: 0.5rem; }
}

/* Floating card on hero image */
.floating-card {
  position: absolute;
  left: -1rem;
  bottom: -1.5rem;
  background: #FFFFFF;
  border: 1px solid #E4DFD1;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 20px 40px -16px rgba(22,35,61,0.2);
  max-width: 260px;
}

@media (max-width: 640px) {
  .floating-card {
    left: 0.5rem;
    bottom: -1rem;
    padding: 0.85rem 1rem;
    max-width: 220px;
  }
}

/* ---------------------------------------------------------------------- */
/* Service cards                                                           */
/* ---------------------------------------------------------------------- */

.service-card {
  background: #FFFFFF;
  border: 1px solid #E4DFD1;
  border-radius: 1.5rem;
  padding: 2.25rem 2rem;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -20px rgba(22,35,61,0.18);
  border-color: #D3A554;
}

.service-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.9rem;
  background: #FBF3E4;
  color: #9C6F2C;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.feature-li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: #3C4C6B;
}

.feature-li::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #D3A554;
  margin-top: 0.5rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #16233D;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.card-link:hover {
  color: #B8873B;
  border-color: #B8873B;
}

/* ---------------------------------------------------------------------- */
/* Expert feature list (dark section)                                      */
/* ---------------------------------------------------------------------- */

.expert-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.9rem;
  color: rgba(250,248,242,0.72);
  line-height: 1.5;
}

.expert-feature-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin-top: 0.45rem;
  border-radius: 999px;
  background: #B8873B;
}

/* ---------------------------------------------------------------------- */
/* About stat tile                                                         */
/* ---------------------------------------------------------------------- */

.stat-tile {
  position: absolute;
  bottom: -1.5rem;
  right: -1rem;
  background: #FFFFFF;
  border: 1px solid #E4DFD1;
  border-radius: 1.25rem;
  padding: 1.25rem 1.75rem;
  box-shadow: 0 20px 40px -16px rgba(22,35,61,0.2);
}

@media (max-width: 640px) {
  .stat-tile {
    right: 0.5rem;
    bottom: -1rem;
    padding: 1rem 1.25rem;
  }
}

.check-li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: #22304C;
  font-weight: 500;
}

.check-li svg {
  width: 1.35rem;
  height: 1.35rem;
  color: #B8873B;
  flex-shrink: 0;
}

/* ---------------------------------------------------------------------- */
/* Testimonial slider                                                      */
/* ---------------------------------------------------------------------- */

.testimonial-viewport {
  overflow: hidden;
  border-radius: 1.5rem;
  background: #FFFFFF;
  border: 1px solid #E4DFD1;
}

.testimonial-track {
  display: flex;
  transition: transform 0.5s var(--ease);
}

.testimonial-slide {
  flex: 0 0 100%;
  padding: 3rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (min-width: 640px) {
  .testimonial-slide { padding: 3.5rem 4rem; }
}

.quote-mark {
  width: 2.25rem;
  height: 1.75rem;
  color: #E7C98A;
  margin-bottom: 1rem;
}

.slider-btn {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 1px solid #E4DFD1;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #16233D;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.slider-btn svg { width: 1.1rem; height: 1.1rem; }

.slider-btn:hover {
  background: #16233D;
  color: #FAF8F2;
  border-color: #16233D;
}

#testimonial-dots button {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #D6DCE7;
  transition: background 0.25s var(--ease), width 0.25s var(--ease);
}

#testimonial-dots button[aria-selected="true"] {
  background: #B8873B;
  width: 22px;
}

/* ---------------------------------------------------------------------- */
/* CTA banner                                                              */
/* ---------------------------------------------------------------------- */

.cta-banner {
  background: #16233D;
  border-radius: 2rem;
  padding: 3rem 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom, transparent 0, transparent 43px, rgba(255,255,255,0.04) 43px, rgba(255,255,255,0.04) 44px
  );
  pointer-events: none;
}

/* ---------------------------------------------------------------------- */
/* Contact                                                                 */
/* ---------------------------------------------------------------------- */

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.85rem;
  background: #FFFFFF;
  border: 1px solid #E4DFD1;
  color: #9C6F2C;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-icon svg { width: 1.25rem; height: 1.25rem; }

.social-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid #E4DFD1;
  background: #FFFFFF;
  color: #16233D;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

.social-icon svg { width: 1.05rem; height: 1.05rem; }

.social-icon:hover {
  background: #B8873B;
  color: #16233D;
  transform: translateY(-3px);
}

.social-icon-dark {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
  color: #FAF8F2;
}

.social-icon-dark:hover {
  background: #B8873B;
  color: #16233D;
}

.contact-form {
  background: #FFFFFF;
  border: 1px solid #E4DFD1;
  border-radius: 1.75rem;
  padding: 2.25rem;
}

@media (min-width: 640px) {
  .contact-form { padding: 2.75rem; }
}

.field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #22304C;
  margin-bottom: 0.5rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #E4DFD1;
  background: #FDFCFA;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  color: #16233D;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  font-family: inherit;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #8C9AB5;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: #B8873B;
  box-shadow: 0 0 0 4px rgba(184,135,59,0.12);
}

.field textarea { resize: vertical; min-height: 120px; }

.field.has-error input,
.field.has-error textarea {
  border-color: #C0563B;
}

.field-error {
  display: block;
  min-height: 1.1rem;
  font-size: 0.75rem;
  color: #C0563B;
  margin-top: 0.35rem;
}

.form-status {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
}

.form-status-success {
  background: #EEF6EE;
  color: #35633B;
  border: 1px solid #C7E2C8;
}

.form-status-error {
  background: #FBEEEA;
  color: #A8402A;
  border: 1px solid #F0CBC0;
}

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */

.footer-heading {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(250,248,242,0.4);
}

.footer-link {
  color: rgba(250,248,242,0.65);
  transition: color 0.25s var(--ease);
}

.footer-link:hover {
  color: #B8873B;
}

/* ---------------------------------------------------------------------- */
/* Back to top                                                             */
/* ---------------------------------------------------------------------- */

.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 40;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: #16233D;
  color: #FAF8F2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px -8px rgba(22,35,61,0.4);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s var(--ease);
  pointer-events: none;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: #B8873B;
  color: #16233D;
}

.back-to-top svg { width: 1.25rem; height: 1.25rem; }

/* ---------------------------------------------------------------------- */
/* Scroll reveal animation                                                 */
/* ---------------------------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------------------------------------------------------------- */
/* Downloads page                                                          */
/* ---------------------------------------------------------------------- */

.store-card {
  background: #FFFFFF;
  border: 1px solid #E4DFD1;
  border-radius: 1.25rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.store-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -18px rgba(22,35,61,0.18);
  border-color: #D3A554;
}

.store-badge-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  background: #16233D;
  color: #FAF8F2;
  border-radius: 0.85rem;
  padding: 0.7rem 1.1rem;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}

.store-badge-btn:hover {
  background: #B8873B;
  color: #16233D;
  transform: translateY(-2px);
}

.store-badge-icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
}

.store-badge-icon svg { width: 100%; height: 100%; }

.store-badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.store-eyebrow {
  font-size: 0.625rem;
  letter-spacing: 0.03em;
  opacity: 0.75;
}

.store-name {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 1rem;
}

.download-card {
  background: #FFFFFF;
  border: 1px solid #E4DFD1;
  border-radius: 1.25rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.download-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -18px rgba(22,35,61,0.18);
  border-color: #D3A554;
}

.download-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.85rem;
  background: #FBF3E4;
  color: #9C6F2C;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.download-icon svg { width: 1.35rem; height: 1.35rem; }

.download-icon-dark {
  background: rgba(255,255,255,0.12);
  color: #E7C98A;
}

.download-title {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 1.0625rem;
  color: #16233D;
  margin-top: 1rem;
  line-height: 1.35;
}

.download-desc {
  font-size: 0.875rem;
  color: #3C4C6B;
  margin-top: 0.5rem;
  line-height: 1.5;
  flex-grow: 1;
}

.download-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid #F0ECE0;
}

.file-tag {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #9C6F2C;
  background: #FBF3E4;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.file-tag-dark {
  background: rgba(255,255,255,0.14);
  color: #F2DFB6;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #16233D;
  transition: color 0.25s var(--ease), gap 0.25s var(--ease);
}

.download-btn svg { width: 1rem; height: 1rem; }

.download-btn:hover {
  color: #B8873B;
  gap: 0.55rem;
}

.download-btn-dark {
  color: #FAF8F2;
}

.download-btn-dark:hover {
  color: #E7C98A;
}

.download-card-dark {
  background: #202E4C;
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset;
}

.download-card-dark:hover {
  background: #253656;
  border-color: rgba(211,165,84,0.7);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset, 0 20px 40px -18px rgba(0,0,0,0.45);
}

.download-card-dark .download-meta {
  border-top-color: rgba(255,255,255,0.14);
}

.download-card-dark .download-title {
  color: #FAF8F2;
}

.download-card-dark .download-title span {
  color: rgba(250,248,242,0.62);
}

.download-card-dark .download-desc {
  color: rgba(250,248,242,0.78);
}
