/* ==========================================================================
   KHWAJA FAROOQ & CO — Design System
   Tax • Audit • Compliance • Advisory

   Token system
   -----------------------------------------------------------------------
   Color
     --ink        #12191F  deep charcoal-navy (headings, footer, "&CO" black)
     --teal       #0A7AAA  brand teal, sampled from the logo mark
     --teal-deep  #075A78  pressed/hover teal
     --teal-mist  #EAF3F6  pale teal tint for section backgrounds
     --brass      #AD8A3F  muted brass — the "official seal" accent
     --paper      #FBFAF6  warm paper white (ledger page, not pure white)
     --line       #DDE3E0  hairline rule colour

   Type
     Display: 'Roboto Slab' — echoes the slab-serif of the wordmark
     Body:    'Manrope'      — contemporary grotesque, quiet workhorse
     Utility: 'IBM Plex Mono' — ledger figures, eyebrows, tracked labels

   Signature
     The "ledger-frame": an open rectangle with one notched corner,
     lifted directly from the logo mark. Used to frame the hero, section
     eyebrows, cards and images throughout the site — the one recurring,
     unmistakable device.
   ========================================================================== */

:root {
  --ink: #12191f;
  --ink-soft: #3a444c;
  --teal: #0a7aaa;
  --teal-deep: #075a78;
  --teal-mist: #eaf3f6;
  --brass: #ad8a3f;
  --brass-soft: #e7d9b8;
  --paper: #fbfaf6;
  --paper-alt: #f3f1ea;
  --line: #dde3e0;
  --white: #ffffff;

  --font-display: 'Roboto Slab', serif;
  --font-body: 'Manrope', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --radius: 2px;
  --shadow-soft: 0 10px 40px -18px rgba(18, 25, 31, 0.25);
  --shadow-lift: 0 22px 50px -20px rgba(10, 122, 170, 0.35);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------------------------------- Reset & base ------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink-soft);
  background: var(--paper);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden !important;
}
header{
    overflow-x: hidden;
}
h1, h2, h3, h4, .display-font {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
}
main {
    position: relative;
    overflow-x: hidden;
}
a { color: var(--teal); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--teal-deep); }

::selection { background: var(--teal); color: #fff; }

/* visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

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

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--teal-deep);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--brass);
  display: inline-block;
}

.section { padding: 5.5rem 0; position: relative; }
.section-sm { padding: 3.5rem 0; }
.bg-mist { background: var(--teal-mist); }
.bg-paper-alt { background: var(--paper-alt); }
.bg-ink { background: var(--ink); color: #cbd5db; }
.bg-ink h1, .bg-ink h2, .bg-ink h3, .bg-ink .display-font { color: #fff; }

/* ledger ruled-paper texture, used sparingly on light sections */
.ledger-texture {
  background-image: repeating-linear-gradient(
    to bottom, transparent 0, transparent 39px, rgba(10,122,170,0.055) 40px
  );
}

/* --------------------------- Signature: ledger-frame --------------------
   An open rectangular frame with a notch cut from the bottom-left corner,
   matching the logo mark. Comes in a static (.ledger-frame) and an
   animated, self-drawing variant (.ledger-frame--draw) used once in the
   hero on load.
---------------------------------------------------------------------------*/
.ledger-frame {
  position: relative;
  border: 2px solid var(--teal);
  padding: clamp(1.75rem, 4vw, 3.25rem);
}
.ledger-frame::after {
  /* the notch: two short bars that recreate the broken corner of the mark */
  content: "";
  position: absolute;
  left: -2px;
  bottom: -2px;
  width: 34%;
  max-width: 160px;
  height: 14px;
  background: var(--paper);
  border-top: 2px solid var(--teal);
  border-right: none;
}
.bg-ink .ledger-frame::after { background: var(--ink); }
.bg-mist .ledger-frame::after { background: var(--teal-mist); }

.ledger-frame--sm { padding: 1.25rem 1.5rem; }
.ledger-frame--brass { border-color: var(--brass); }
.ledger-frame--brass::after { border-top-color: var(--brass); }

/* animated draw-in, played once via JS adding .is-drawn */
.ledger-frame--draw {
  --draw: 0;
}
.ledger-frame--draw svg.frame-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.ledger-frame--draw svg.frame-svg path {
  fill: none;
  stroke: var(--teal);
  stroke-width: 3;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
}
.ledger-frame--draw.is-drawn svg.frame-svg path {
  animation: draw-frame 1.6s var(--ease) forwards;
}
@keyframes draw-frame {
  to { stroke-dashoffset: 0; }
}
.ledger-frame--draw { border: none; }

/* ------------------------------- Navbar --------------------------------- */
.site-navbar {
  background: rgba(251, 250, 246, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
  padding: 0.85rem 0;
}
.site-navbar.is-scrolled {
  box-shadow: 0 8px 30px -20px rgba(18,25,31,0.35);
  border-bottom-color: var(--line);
}
.brand-mark { display: flex; align-items: center; gap: 0.7rem; }
.brand-mark img { height: 40px; width: auto; }
.brand-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.15;
}
.brand-wordmark small {
  display: block;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--teal-deep);
  text-transform: uppercase;
}

.navbar-nav .nav-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0.5rem;
  padding: 0.4rem 0.1rem !important;
  position: relative;
}
.navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--brass);
  transition: width .25s var(--ease);
}
.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after { width: 100%; }
.navbar-nav .nav-link.active { color: var(--teal-deep); }

/* --------------------------------- Buttons -------------------------------*/
.btn { border-radius: var(--radius); font-family: var(--font-mono); font-size: 0.82rem;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 0.75rem 1.6rem;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
  border-width: 2px;
}
.btn-teal { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-deep); border-color: var(--teal-deep); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn-outline-teal { background: transparent; border-color: var(--teal); color: var(--teal); }
.btn-outline-teal:hover { background: var(--teal); color: #fff; transform: translateY(-2px); }
.btn-brass { background: var(--brass); border-color: var(--brass); color: #fff; }
.btn-brass:hover { background: #8f7231; border-color: #8f7231; color: #fff; transform: translateY(-2px); box-shadow: 0 20px 40px -20px rgba(173,138,63,0.55); }
.btn-outline-light { border-color: rgba(255,255,255,0.55); color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--ink); }
.btn-sm-cta { padding: 0.5rem 1.1rem; font-size: 0.72rem; }

/* -------------------------------- Hero ----------------------------------*/
.hero {
  position: relative;
  padding: 7rem 0 5rem;
  background: var(--paper);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -20%; right: -12%;
  width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(10,122,170,0.10) 0%, rgba(10,122,170,0) 70%);
  pointer-events: none;
}
.hero-kicker {
  font-family: var(--font-mono);
  color: var(--brass);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.78rem;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  line-height: 1.08;
  margin: 0.9rem 0 1.1rem;
}
.hero h1 span { color: var(--teal); }
.hero-lede { font-size: 1.1rem; max-width: 46ch; color: var(--ink-soft); }
.hero-links { font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
.hero-links a { color: var(--ink-soft); border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.hero-links a:hover { color: var(--teal-deep); border-color: var(--teal-deep); }

/* ------------------------------ Stat strip ------------------------------*/
.stat-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat-block { text-align: center; padding: 2rem 1rem; border-right: 1px solid var(--line); }
.stat-block:last-child { border-right: none; }
.stat-figure {
  font-family: var(--font-mono);
  font-size: 2.6rem;
  color: var(--teal);
  font-weight: 700;
  line-height: 1;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.5rem;
  display: block;
}

/* -------------------------------- Cards ---------------------------------*/
.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 2.1rem 1.75rem;
  height: 100%;
  position: relative;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--teal);
  box-shadow: var(--shadow-soft);
}
.service-card .icon-tile {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: var(--teal-mist);
  color: var(--teal);
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.service-card:hover .icon-tile { background: var(--teal); color: #fff; }
.service-card h3 { font-size: 1.08rem; margin-bottom: 0.6rem; }
.service-card p { font-size: 0.92rem; margin-bottom: 0; }
.service-card .card-corner {
  position: absolute; top: 0; right: 0; width: 16px; height: 16px;
  border-top: 2px solid transparent; border-right: 2px solid transparent;
  transition: border-color .3s var(--ease);
}
.service-card:hover .card-corner { border-color: var(--brass); }

.value-item { display: flex; gap: 1.1rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.value-item:last-child { border-bottom: none; }
.value-item .icon-tile {
  flex: none; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
  background: var(--teal-mist); color: var(--teal); font-size: 1.2rem;
}
.value-item h3 { font-size: 1.02rem; margin-bottom: 0.3rem; }
.value-item p { margin: 0; font-size: 0.92rem; }

/* ------------------------------ Page header ------------------------------*/
.page-header {
  padding: 6.5rem 0 3.5rem;
  background: var(--ink);
  color: #cbd5db;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 90px);
}
.page-header h1 { color: #fff; margin: 0.6rem 0 0.5rem; font-size: clamp(2rem, 4vw, 2.9rem); }
.page-header .eyebrow { color: var(--brass-soft); }
.page-header .eyebrow::before { background: var(--teal); }
.breadcrumb-line { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.05em; color: #9fb0b8; }
.breadcrumb-line a { color: #cfe4ec; }
.breadcrumb-line a:hover { color: #fff; }

/* --------------------------------- CTA band ------------------------------*/
.cta-band {
  background: linear-gradient(120deg, var(--teal-deep), var(--ink) 85%);
  color: #fff;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute; right: -8%; top: -30%;
  width: 460px; height: 460px; border: 60px solid rgba(255,255,255,0.05);
  border-radius: 50%;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #cfe0e6; }

/* -------------------------------- Footer ---------------------------------*/
.site-footer { background: var(--ink); color: #9fb0b8; padding: 4rem 0 0; }
.site-footer h3, .site-footer h5 { color: #fff; }
.footer-brand img { height: 42px; }
.site-footer a { color: #b9c8cf; }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.65rem; font-size: 0.92rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.09);
  margin-top: 3rem;
  padding: 1.4rem 0;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}
.social-row { display: flex; gap: 0.75rem; margin-top: 1.1rem; }
.social-row a {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.18); color: #fff; transition: all .25s var(--ease);
}
.social-row a:hover { background: var(--teal); border-color: var(--teal); transform: translateY(-3px); }

/* ------------------------------- Contact ---------------------------------*/
.contact-card { background: var(--white); border: 1px solid var(--line); padding: 1.9rem; height: 100%; transition: border-color .3s var(--ease), transform .3s var(--ease); }
.contact-card:hover { border-color: var(--teal); transform: translateY(-4px); }
.contact-card .icon-tile { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--teal-mist); color: var(--teal); font-size: 1.25rem; margin-bottom: 1rem; }
.contact-card .whatsapp-link { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--font-mono); font-size: 0.85rem; }

.form-control, .form-select {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  background: var(--white);
}
.form-control:focus, .form-select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(10,122,170,0.15);
}
.form-label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.4rem; }

.map-frame { border: 2px solid var(--teal); overflow: hidden; }
.map-frame iframe { display: block; width: 100%; height: 100%; min-height: 320px; filter: grayscale(0.15) contrast(1.05); }

/* ------------------------------ WhatsApp float ----------------------------*/
.whatsapp-float {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 1040;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; box-shadow: 0 12px 30px -8px rgba(37,211,102,0.6);
  transition: transform .25s var(--ease);
}
.whatsapp-float:hover { transform: scale(1.08); color: #fff; }

/* ------------------------------ Back to top -------------------------------*/
.back-to-top {
  position: fixed; right: 1.5rem; bottom: 6rem; z-index: 1040;
  width: 44px; height: 44px; background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all .3s var(--ease); border: none;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--teal); }

/* ------------------------------ About page --------------------------------*/
.mv-card { background: var(--white); border: 1px solid var(--line); padding: 2.5rem; height: 100%; position: relative; }
.mv-card .eyebrow { margin-bottom: 0.75rem; }
.mv-card h3 { font-size: 1.35rem; }

.about-portrait {
  border: 2px solid var(--teal);
  padding: 1.75rem;
  background: var(--teal-mist);
  position: relative;
  min-height: 340px;
  display: flex; align-items: center; justify-content: center;
}
.about-portrait img { max-width: 70%; height: auto; }

/* ---------------------------- Services detail ------------------------------*/
.svc-row { display: flex; gap: 2.25rem; padding: 3rem 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.svc-row:last-child { border-bottom: none; }
.svc-num { font-family: var(--font-mono); font-size: 0.78rem; color: var(--brass); letter-spacing: 0.1em; }
.svc-icon {
  flex: none; width: 74px; height: 74px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--teal); color: var(--teal); font-size: 1.9rem;
}
.svc-row h3 { margin-bottom: 0.5rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.chip {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em;
  padding: 0.55rem 1rem; border: 1px solid var(--line); background: var(--white);
  display: inline-flex; align-items: center; gap: 0.5rem; transition: all .2s var(--ease);
}
.chip:hover { border-color: var(--teal); color: var(--teal-deep); transform: translateY(-2px); }
.chip i { color: var(--teal); }

/* ---------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  .stat-block { border-right: none; border-bottom: 1px solid var(--line); }
  .stat-block:last-child { border-bottom: none; }
  .svc-row { flex-direction: column; gap: 1.25rem; }
}
