﻿/* =========================================================================
   SpendTrak — Shared Design System
   Used by: about/abdelrahman-sanad.html, blogs.html, partnership.html,
            helpcenter.html
   Extracted from index.html so the four secondary pages share an identical
   palette, typography, nav, button treatment, and footer/social bar.
   ========================================================================= */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root{
  /* ---- Cosmic green palette (matches index.html) ---- */
  --bg:           #04070a;
  --bg-2:         #070d10;
  --ink:          #eaf2ee;
  --ink-dim:      rgba(234,242,238,.62);
  --ink-faint:    rgba(234,242,238,.38);
  --line:         rgba(234,242,238,.10);
  --line-strong:  rgba(234,242,238,.22);

  --green:        #33ff8a;
  --green-soft:   #7cffb1;
  --green-mid:    #2fd17a;
  --green-deep:   #0f8a4a;
  --green-glow:   rgba(51,255,138,.55);
  --green-ink:    #b8ffd4;

  --red:          #ff4d6d;
  --yellow:       #ffd13a;
  --orange:       #f5b342;
  --teal:         #2fb9a4;
  --gold:         #f0b94a;
  --gold-soft:    #ffd57a;

  /* ---- Typography (matches index.html) ---- */
  --display: 'Cinzel', 'Times New Roman', serif;
  --serif:   'Cormorant Garamond', 'Times New Roman', serif;
  --sans:    'Cinzel', 'Times New Roman', serif;
  --mono:    'JetBrains Mono', ui-monospace, monospace;

  --maxw: 1280px;
}

html, body { min-height: 100%; }

body{
  font-family: var(--sans);
  font-weight: 600;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.7;
  letter-spacing: .015em;
  overflow-x: hidden;
}

/* Ambient atmosphere — same body::before glow as index */
body::before{
  content: ""; position: fixed; inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 0%,  rgba(47,185,164,.08), transparent 55%),
    radial-gradient(ellipse at 90% 80%, rgba(95,227,176,.06), transparent 60%);
  pointer-events: none; z-index: 1;
}

::selection { background: var(--green); color: #04141a; }

/* Long-form prose uses Cormorant Garamond serif for readability */
article p, .page-prose p, .page-prose li{
  font-family: var(--serif);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.75;
  letter-spacing: .005em;
  color: var(--ink);
}
article p em, .page-prose em{ color: var(--green-soft); font-style: italic; }

a { color: var(--green); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--green-soft); }

img { max-width: 100%; height: auto; }

/* =========================================================================
   PAGE BACKGROUND
   Each page sets a static background image via the .page-bg element.
   The element is fixed and sits behind everything else; a dark veil
   gradient sits above it for text legibility.
   ========================================================================= */
.page-bg{
  position: fixed; inset: 0; z-index: -2;
  background-position: center; background-size: cover; background-repeat: no-repeat;
}
.page-veil{
  position: fixed; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(4,7,10,.78) 0%, rgba(4,7,10,.55) 35%, rgba(4,7,10,.86) 100%);
  pointer-events: none;
}

/* =========================================================================
   NAVIGATION (matches index.html)
   ========================================================================= */
.nav{
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px 40px;
  background: rgba(2,6,8,.78);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(95,227,176,.18);
  transition: padding .4s ease, background .4s ease;
}
.nav.scrolled{
  background: rgba(2,6,8,.92);
  border-bottom-color: rgba(95,227,176,.28);
  padding: 12px 40px;
}
.nav-left  { display: flex; align-items: center; }
.nav-right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

.brand{
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  color: var(--green);
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(95,227,176,.45);
}
.brand-mark{
  width: 34px; height: 34px;
  background: var(--logo-url, url("assets/spendtrak-logo.webp")) center/contain no-repeat;
  position: relative;
  flex-shrink: 0;
}

.nav-links{ display: flex; gap: 34px; align-items: center; justify-content: center; }
.nav-links a{
  color: var(--green);
  text-decoration: none;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(95,227,176,.35);
  transition: color .25s ease, text-shadow .25s ease;
  position: relative;
}
.nav-links a:hover{ color: var(--green-soft); text-shadow: 0 0 18px rgba(124,255,177,.7); }
.nav-links a::after{
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px; background: var(--green);
  transform-origin: left; transform: scaleX(0);
  transition: transform .35s cubic-bezier(.2,.7,.3,1);
}
.nav-links a:hover::after{ transform: scaleX(1); }
.nav-links a.is-active{ color: var(--green-soft); }
.nav-links a.is-active::after{ transform: scaleX(1); }

/* App-store badges in nav (matches index style) */
.store-badge{
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  background:
    radial-gradient(140% 90% at 30% 0%, rgba(255,240,200,.18) 0%, rgba(255,240,200,0) 32%),
    radial-gradient(120% 140% at 50% 110%, rgba(51,255,138,.26) 0%, rgba(51,255,138,0) 55%),
    linear-gradient(180deg, #0a4a32 0%, #042519 45%, #02110b 100%);
  border: 1px solid rgba(245,212,120,.6);
  color: var(--green);
  text-decoration: none;
  transition: border-color .3s ease, transform .35s cubic-bezier(.2,.7,.3,1),
              box-shadow .35s ease, background .3s ease;
  box-shadow:
    0 14px 28px -10px rgba(0,0,0,.85),
    0 22px 38px -16px rgba(51,255,138,.28),
    inset 0 1.5px 0 rgba(255,240,200,.42),
    inset 0 -1.5px 0 rgba(0,0,0,.65),
    inset 0 0 0 1px rgba(245,212,120,.18);
}
.store-badge:hover{
  border-color: rgba(245,212,120,.9);
  box-shadow:
    0 18px 36px -10px rgba(0,0,0,.9),
    0 26px 50px -12px rgba(51,255,138,.45),
    inset 0 1.5px 0 rgba(255,240,200,.55),
    inset 0 -1.5px 0 rgba(0,0,0,.65);
  transform: translateY(-1px);
}
.store-badge svg{ flex-shrink: 0; }
.store-badge .sb-text{
  display: inline-flex; flex-direction: column; line-height: 1;
  font-family: var(--display);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.store-badge .sb-small{ font-size: 8px; color: var(--gold-soft); margin-bottom: 2px; }
.store-badge .sb-large{ font-size: 13px; color: var(--ink); font-weight: 600; }

/* =========================================================================
   FULL-WIDTH PAGE LAYOUT
   ========================================================================= */
.page-wrap{
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 140px 40px 80px;
}
.page-wrap.narrow{ max-width: 920px; }

.page-eyebrow{
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--green);
  text-shadow: 0 0 12px rgba(95,227,176,.4);
  margin-bottom: 24px;
  display: inline-flex; align-items: center; gap: 14px;
}
.page-eyebrow::before{
  content: ""; width: 36px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--green));
}

.page-title{
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(40px, 5.6vw, 84px);
  line-height: 1.04;
  letter-spacing: .005em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 20px;
}
.page-title em{
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  color: var(--green-soft);
  text-transform: none;
  letter-spacing: 0;
}

.page-lede{
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.5;
  color: var(--ink-dim);
  max-width: 64ch;
  margin-bottom: 56px;
}

/* Section heading inside long pages */
.sec-eyebrow{
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 14px;
  display: inline-block;
}
.sec-title{
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.1;
  letter-spacing: .005em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 18px;
}
.sec-title em{
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  color: var(--green-soft);
  text-transform: none;
  letter-spacing: 0;
}

/* Glass card — used for blog cards, FAQ, partnership boxes */
.card{
  background: rgba(8,14,18,.5);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid rgba(95,227,176,.18);
  border-radius: 16px;
  padding: 28px 26px;
  transition: border-color .3s ease, transform .3s cubic-bezier(.2,.7,.3,1), box-shadow .3s ease;
}
.card:hover{
  border-color: rgba(95,227,176,.42);
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -16px rgba(51,255,138,.28);
}
a.card{ color: inherit; text-decoration: none; display: block; }

/* Pill / tag */
.tag{
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
  padding: 4px 10px;
  border: 1px solid rgba(95,227,176,.32);
  border-radius: 999px;
  margin-bottom: 14px;
}

/* CTA button — matches index store-cta visual */
.cta-btn{
  display: inline-flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 24px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background:
    radial-gradient(140% 90% at 30% 0%, rgba(255,240,200,.18) 0%, rgba(255,240,200,0) 32%),
    radial-gradient(120% 140% at 50% 110%, rgba(51,255,138,.32) 0%, rgba(51,255,138,0) 55%),
    linear-gradient(180deg, #0a4a32 0%, #042519 45%, #02110b 100%);
  border: 1px solid rgba(245,212,120,.6);
  border-radius: 12px;
  box-shadow:
    0 14px 28px -10px rgba(0,0,0,.85),
    0 22px 38px -16px rgba(51,255,138,.32),
    inset 0 1.5px 0 rgba(255,240,200,.42),
    inset 0 -1.5px 0 rgba(0,0,0,.65),
    inset 0 0 0 1px rgba(245,212,120,.18);
  transition: transform .35s cubic-bezier(.2,.7,.3,1), box-shadow .35s ease, border-color .3s ease;
}
.cta-btn:hover{
  transform: translateY(-2px);
  border-color: rgba(245,212,120,.9);
  box-shadow:
    0 18px 36px -10px rgba(0,0,0,.9),
    0 26px 50px -12px rgba(51,255,138,.45),
    inset 0 1.5px 0 rgba(255,240,200,.55),
    inset 0 -1.5px 0 rgba(0,0,0,.65);
  color: var(--ink);
}

/* =========================================================================
   FOOTER (matches index "end" social-bar treatment)
   ========================================================================= */
.page-footer{
  position: relative;
  z-index: 2;
  margin-top: 80px;
  padding: 60px 40px 40px;
  background: rgba(2,6,8,.78);
  backdrop-filter: blur(18px);
  border-top: 1px solid rgba(95,227,176,.18);
}
.page-footer-inner{
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
}
.ft-brand{ display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ft-brand .brand-mark{ width: 28px; height: 28px; }
.ft-brand .brand-name{
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
}
.ft-tagline{
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-dim);
  max-width: 32ch;
  line-height: 1.5;
}
.ft-col-title{
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 14px;
}
.ft-col a{
  display: block;
  color: var(--ink-dim);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .04em;
  text-decoration: none;
  padding: 6px 0;
  transition: color .25s ease;
}
.ft-col a:hover{ color: var(--green); }
.page-footer-bottom{
  max-width: var(--maxw);
  margin: 36px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(234,242,238,.08);
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.social-bar{
  display: inline-flex; gap: 8px;
}
.social-bar a{
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(234,242,238,.18);
  border-radius: 10px;
  color: var(--ink-dim);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.social-bar a svg{ width: 16px; height: 16px; }
.social-bar a:hover{
  color: var(--green);
  border-color: rgba(95,227,176,.5);
  background: rgba(95,227,176,.08);
}

/* =========================================================================
   MOBILE — burger + page-level overrides
   Same breakpoints as index.html mobile work
   ========================================================================= */
.mobile-burger{ display: none; }
.mobile-menu{ display: none; }

@media (max-width: 760px){
  .nav{
    grid-template-columns: 1fr auto !important;
    padding: 12px 16px !important;
    gap: 8px;
  }
  .nav.scrolled{ padding: 10px 16px !important; }
  .nav-links{ display: none !important; }
  .nav-right .store-badge{ display: none !important; }
  .brand{ font-size: 16px !important; gap: 8px !important; }
  .brand-mark{ width: 28px !important; height: 28px !important; }

  .mobile-burger{
    display: inline-flex;
    align-items: center; justify-content: center;
    position: relative;
    width: 44px; height: 44px;
    border-radius: 10px;
    background: rgba(2,6,8,.6);
    border: 1px solid rgba(95,227,176,.28);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-burger span{
    position: absolute;
    width: 22px; height: 1.5px;
    background: var(--green);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(95,227,176,.5);
    transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .25s ease, top .35s cubic-bezier(.4,0,.2,1);
  }
  .mobile-burger span:nth-child(1){ top: calc(50% - 6px); }
  .mobile-burger span:nth-child(2){ top: calc(50% - 0.75px); }
  .mobile-burger span:nth-child(3){ top: calc(50% + 4.5px); }
  .mobile-burger.open span:nth-child(1){ top: 50%; transform: translateY(-50%) rotate(45deg); }
  .mobile-burger.open span:nth-child(2){ opacity: 0; }
  .mobile-burger.open span:nth-child(3){ top: 50%; transform: translateY(-50%) rotate(-45deg); }

  .mobile-menu{
    display: block;
    position: fixed; inset: 0;
    z-index: 9999;
    background: rgba(2,6,8,.97);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .4s cubic-bezier(.4,0,.2,1), visibility 0s linear .4s;
    overflow-y: auto;
  }
  .mobile-menu.open{
    opacity: 1; visibility: visible; pointer-events: auto;
    transition: opacity .4s cubic-bezier(.4,0,.2,1), visibility 0s linear 0s;
  }
  .mobile-menu-inner{
    min-height: 100%;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: max(88px, calc(env(safe-area-inset-top) + 64px)) 28px max(32px, env(safe-area-inset-bottom));
    box-sizing: border-box;
  }
  .mobile-menu-close{
    position: absolute; top: 18px; right: 18px;
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent;
    border: 1px solid rgba(95,227,176,.28);
    border-radius: 10px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-menu-close::before, .mobile-menu-close::after{
    content: ""; position: absolute;
    width: 22px; height: 1.5px;
    background: var(--green);
    box-shadow: 0 0 10px rgba(95,227,176,.5);
    border-radius: 2px;
  }
  .mobile-menu-close::before{ transform: rotate(45deg); }
  .mobile-menu-close::after{ transform: rotate(-45deg); }
  .mobile-menu-nav{
    margin-top: 12px; display: flex; flex-direction: column; gap: 18px;
  }
  .mobile-menu-nav a{
    color: var(--green); text-decoration: none;
    font-family: var(--display); font-size: 22px; font-weight: 600;
    letter-spacing: .14em; text-transform: uppercase;
    text-shadow: 0 0 14px rgba(95,227,176,.4);
    padding: 8px 0; border-bottom: 1px solid rgba(234,242,238,.06);
    transition: color .2s ease, padding-left .25s cubic-bezier(.4,0,.2,1);
  }
  .mobile-menu-nav a:active{ color: var(--green-soft); padding-left: 6px; }
  .mobile-menu-cta{
    display: flex; flex-direction: column; gap: 12px; margin-top: 28px;
  }
  .mobile-menu-cta .store-badge{
    width: 100%; height: 52px !important; justify-content: center; padding: 0 16px !important;
  }
  .mobile-menu-social{
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin-top: 24px;
  }
  .mobile-menu-social a{
    display: inline-flex; align-items: center; justify-content: center;
    aspect-ratio: 1;
    border: 1px solid rgba(234,242,238,.18); border-radius: 10px;
    color: rgba(234,242,238,.78);
    transition: color .2s ease, border-color .2s ease, background .2s ease;
  }
  .mobile-menu-social a svg{ width: 20px; height: 20px; }
  .mobile-menu-social a:active{
    color: var(--green); border-color: rgba(95,227,176,.5); background: rgba(95,227,176,.08);
  }
  .mobile-menu-foot{
    text-align: center; margin-top: 28px; padding-top: 20px;
    border-top: 1px solid rgba(234,242,238,.08);
    color: var(--ink-faint);
    font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
    text-transform: uppercase;
  }

  /* Page-level mobile spacing */
  .page-wrap{ padding: 100px 20px 60px; }
  .page-title{ font-size: clamp(34px, 9vw, 56px); }
  .page-lede{ font-size: 16px; }
  .page-footer{ padding: 44px 20px 32px; }
  .page-footer-inner{ grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .page-footer-bottom{ flex-direction: column; gap: 18px; text-align: center; padding: 24px 20px 0; }
  .page-footer-bottom > span{ order: 2; }
  .social-bar{ order: 1; }
}

/* =========================================================================
   PERFORMANCE: same touch-only optimisations as index
   ========================================================================= */
@media (hover: none) and (pointer: coarse){
  .store-badge{ animation: none !important; }
  .store-badge::before, .store-badge::after{ animation: none !important; display: none !important; }
}


/* ---- Related tools (cross-link) block — shown at a tool's result stage ---- */
.related-tools{ margin-top:34px; padding-top:24px; border-top:1px solid rgba(95,227,176,.16); }
.related-tools .rt-eyebrow{ font-family:var(--mono); font-size:11px; letter-spacing:.18em; text-transform:uppercase; color:var(--green); margin-bottom:15px; }
.related-tools .rt-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px; }
.related-tools .rt-card{ display:flex; flex-direction:column; gap:5px; padding:15px 16px; border-radius:13px; background:rgba(4,8,11,.5); border:1px solid rgba(95,227,176,.18); text-decoration:none; transition:border-color .2s ease, transform .2s ease, background .2s ease; }
.related-tools .rt-card:hover{ border-color:rgba(95,227,176,.5); transform:translateY(-2px); background:rgba(51,255,138,.06); }
.related-tools .rt-name{ font-family:var(--display); font-size:14px; letter-spacing:.02em; color:var(--ink); }
.related-tools .rt-desc{ font-family:var(--serif); font-style:italic; font-size:13px; line-height:1.4; color:var(--ink-faint); }
