/* ============================================================
   souvikpati.in — Design system
   Dark, minimal, premium. Mobile-first.
   ============================================================ */

:root {
  --bg:            #0b0d10;
  --bg-elev:       #101318;
  --bg-elev-2:     #151922;
  --surface:       #12151b;
  --border:        #23272f;
  --border-soft:   #1b1e25;
  --text:          #eef1f5;
  --text-muted:    #9aa3af;
  --text-dim:      #6b7280;
  --accent:        #5b8cff;
  --accent-2:      #7c6cff;
  --accent-soft:   rgba(91,140,255,.12);
  --success:       #34d399;
  --danger:        #f87171;
  --warn:          #fbbf24;
  --radius:        14px;
  --radius-sm:     10px;
  --radius-lg:     22px;
  --maxw:          1180px;
  --shadow:        0 1px 2px rgba(0,0,0,.4), 0 8px 30px rgba(0,0,0,.35);
  --shadow-lg:     0 24px 60px -20px rgba(0,0,0,.6);
  --font-body:     'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --font-display:  'Sora', var(--font-body);
  --ease:          cubic-bezier(.16,.84,.44,1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient background glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(60rem 40rem at 80% -10%, rgba(124,108,255,.10), transparent 60%),
    radial-gradient(50rem 40rem at -10% 10%, rgba(91,140,255,.10), transparent 55%);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s var(--ease); }
ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.14; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(18px, 4vw, 40px); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  padding: .78rem 1.35rem; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .18s var(--ease), background .2s, border-color .2s, box-shadow .2s;
  white-space: nowrap; line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: .55rem 1rem; font-size: .875rem; }
.btn-lg { padding: .95rem 1.7rem; font-size: 1rem; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 24px -8px rgba(91,140,255,.6); }
.btn-primary:hover { background: #4f80f5; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: #fff; background: var(--accent-soft); }
.btn-block { width: 100%; justify-content: center; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: saturate(160%) blur(14px);
  background: rgba(11,13,16,.72);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-bottom-color: var(--border); background: rgba(11,13,16,.9); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 700; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 1.05rem;
  box-shadow: 0 6px 18px -6px rgba(124,108,255,.7);
}
.brand-name { font-size: 1.05rem; letter-spacing: -.02em; }
.brand-logo { height: 30px; width: auto; }

.main-nav { display: flex; align-items: center; }
.nav-menu { display: flex; align-items: center; gap: .35rem; }
.nav-menu > li > a { display: inline-block; padding: .5rem .85rem; border-radius: 999px; color: var(--text-muted); font-weight: 500; font-size: .94rem; }
.nav-menu > li > a:hover { color: var(--text); }
.nav-menu > li > a.active { color: var(--text); background: var(--bg-elev-2); }
.nav-cta { margin-left: .4rem; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 42px; height: 42px; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.nav-toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: .2rem;
    background: var(--bg-elev); border-bottom: 1px solid var(--border); padding: 1rem clamp(18px,4vw,40px) 1.5rem;
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity .22s, transform .22s var(--ease);
  }
  .nav-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-menu > li > a { padding: .8rem .9rem; font-size: 1rem; }
  .nav-cta { margin: .4rem 0 0; }
  .nav-cta .btn { width: 100%; justify-content: center; }
}

/* ---------- Layout helpers ---------- */
.section { padding-block: clamp(56px, 8vw, 110px); }
.section-tight { padding-block: clamp(40px, 6vw, 72px); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent); opacity: .6; }
.section-head { max-width: 640px; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; }
.lead { font-size: 1.15rem; color: var(--text-muted); }

.grid { display: grid; gap: clamp(16px, 2.2vw, 26px); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(70px, 12vw, 150px) clamp(50px, 8vw, 90px); }
.hero-inner { max-width: 820px; }
.hero h1 { margin-bottom: 1.1rem; }
.hero .gradient-text {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.28rem); color: var(--text-muted); max-width: 620px; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; align-items: center; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 1.4rem 2rem; margin-top: 2.8rem; color: var(--text-muted); font-size: .92rem; }
.hero-meta strong { color: var(--text); font-family: var(--font-display); }
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .9rem; border-radius: 999px;
  background: var(--bg-elev-2); border: 1px solid var(--border); font-size: .82rem; color: var(--text-muted); margin-bottom: 1.6rem;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(52,211,153,.15); }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, var(--bg-elev) 0%, var(--surface) 100%);
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: clamp(1.3rem, 2.4vw, 1.8rem);
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
  position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-4px); border-color: var(--border); box-shadow: var(--shadow); }

.service-card { display: flex; flex-direction: column; height: 100%; }
.service-card .svc-icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 1.1rem;
  transition: background .25s, color .25s, transform .25s var(--ease);
}
.service-card:hover .svc-icon { background: var(--accent); color: #fff; transform: rotate(-4deg) scale(1.04); }
.service-card h3 { margin-bottom: .45rem; font-size: 1.18rem; }
.service-card p { color: var(--text-muted); font-size: .95rem; margin-bottom: 1.1rem; }
.service-card .svc-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-soft); }
.price-tag { font-family: var(--font-display); font-weight: 700; }
.price-tag small { display: block; font-family: var(--font-body); font-weight: 500; font-size: .72rem; color: var(--text-dim); letter-spacing: .02em; text-transform: uppercase; }
.svc-arrow { color: var(--text-muted); transition: transform .2s var(--ease), color .2s; }
.service-card:hover .svc-arrow { transform: translateX(4px); color: var(--accent); }

/* ---------- Feature / why list ---------- */
.feature-item { display: flex; gap: 1rem; }
.feature-item .fi-icon { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--bg-elev-2); color: var(--accent); border: 1px solid var(--border-soft); }
.feature-item h3 { font-size: 1.08rem; margin-bottom: .3rem; }
.feature-item p { color: var(--text-muted); font-size: .95rem; margin: 0; }

/* Checklist */
.checklist li { position: relative; padding-left: 1.9rem; margin-bottom: .7rem; color: var(--text-muted); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235b8cff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* ---------- Process / steps ---------- */
.steps { counter-reset: step; }
.step { position: relative; padding: 1.5rem 1.5rem 1.5rem 1.5rem; }
.step .step-num { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--accent); opacity: .35; line-height: 1; }
.step h3 { margin: .6rem 0 .4rem; }
.step p { color: var(--text-muted); font-size: .95rem; margin: 0; }

/* ---------- Tech marquee / chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip { padding: .5rem .95rem; border-radius: 999px; background: var(--bg-elev-2); border: 1px solid var(--border-soft); font-size: .875rem; color: var(--text-muted); font-weight: 500; transition: border-color .2s, color .2s, transform .2s var(--ease); }
.chip:hover { color: var(--text); border-color: var(--border); transform: translateY(-2px); }

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--border-soft); border-radius: var(--radius-sm); margin-bottom: .8rem; background: var(--surface); overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: 0; color: var(--text); font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; padding: 1.1rem 1.3rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer; }
.faq-q .faq-ic { flex: 0 0 auto; transition: transform .25s var(--ease); color: var(--text-muted); }
.faq-item.open .faq-ic { transform: rotate(45deg); color: var(--accent); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); }
.faq-a-inner { padding: 0 1.3rem 1.2rem; color: var(--text-muted); }

/* ---------- Blog ---------- */
.post-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; padding: 0; }
.post-card .post-thumb { aspect-ratio: 16/9; background: var(--bg-elev-2); overflow: hidden; }
.post-card .post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.post-card:hover .post-thumb img { transform: scale(1.05); }
.post-card .post-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.post-meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .8rem; color: var(--text-dim); margin-bottom: .7rem; }
.post-meta .tag-pill { color: var(--accent); font-weight: 600; }
.post-card h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.post-card h3 a:hover { color: var(--accent); }
.post-card p { color: var(--text-muted); font-size: .92rem; margin-bottom: 1rem; }
.post-card .read-more { margin-top: auto; font-weight: 600; font-size: .9rem; color: var(--accent); }

/* Article */
.article { max-width: 760px; margin-inline: auto; }
.article-header { max-width: 760px; margin: 0 auto clamp(1.5rem,3vw,2.5rem); }
.article-hero { max-width: 980px; margin: 1.5rem auto 0; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-soft); }
.article-hero img { width: 100%; }
.prose { font-size: 1.06rem; line-height: 1.8; color: #d9dee6; }
.prose h2 { margin-top: 2.2rem; font-size: 1.6rem; }
.prose h3 { margin-top: 1.8rem; }
.prose p { margin-bottom: 1.3rem; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { margin: 0 0 1.3rem 1.3rem; }
.prose li { margin-bottom: .5rem; }
.prose img { border-radius: var(--radius); margin: 1.5rem 0; border: 1px solid var(--border-soft); }
.prose blockquote { margin: 1.6rem 0; padding: .8rem 1.4rem; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-muted); font-style: italic; }
.prose pre { background: #0d1017; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1.1rem 1.3rem; overflow-x: auto; font-size: .9rem; margin: 1.5rem 0; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; background: var(--bg-elev-2); padding: .15em .4em; border-radius: 5px; }
.prose pre code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: .7rem .9rem; text-align: left; }
.prose th { background: var(--bg-elev-2); font-weight: 600; }
.prose iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: var(--radius); margin: 1.5rem 0; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: .85rem; color: var(--text-dim); margin-bottom: 1.5rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { opacity: .5; }

/* ---------- Forms ---------- */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .45rem; color: var(--text); }
.field .hint { font-size: .8rem; color: var(--text-dim); font-weight: 400; }
.input, .textarea, .select {
  width: 100%; font-family: inherit; font-size: .98rem; color: var(--text);
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .8rem 1rem; transition: border-color .2s, box-shadow .2s; appearance: none;
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea { min-height: 140px; resize: vertical; }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }
.field-error { color: var(--danger); font-size: .82rem; margin-top: .35rem; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Flash / alerts ---------- */
.flash { padding: .85rem 1.15rem; border-radius: var(--radius-sm); margin: 1.2rem 0; font-size: .95rem; border: 1px solid var(--border); }
.flash-success { background: rgba(52,211,153,.1); border-color: rgba(52,211,153,.35); color: #a7f3d0; }
.flash-error   { background: rgba(248,113,113,.1); border-color: rgba(248,113,113,.35); color: #fecaca; }
.flash-info    { background: var(--accent-soft); border-color: rgba(91,140,255,.35); color: #c7d7ff; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(135deg, #14182100, #191d29);
  border: 1px solid var(--border); padding: clamp(2.2rem, 5vw, 4rem);
  text-align: center;
}
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(40rem 20rem at 50% -20%, rgba(91,140,255,.18), transparent 60%); pointer-events: none; }
.cta-band h2 { position: relative; }
.cta-band p { position: relative; color: var(--text-muted); max-width: 540px; margin: 0 auto 1.8rem; }
.cta-band .hero-actions { position: relative; justify-content: center; }

/* ---------- Empty states ---------- */
.empty-state { text-align: center; padding: clamp(2.5rem, 6vw, 5rem) 1rem; border: 1px dashed var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.empty-state h3 { color: var(--text); }
.empty-state p { color: var(--text-muted); max-width: 440px; margin: 0 auto 1.4rem; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 2.5rem; flex-wrap: wrap; }
.pagination a, .pagination span { padding: .55rem .9rem; border-radius: 9px; border: 1px solid var(--border-soft); color: var(--text-muted); font-size: .9rem; min-width: 42px; text-align: center; }
.pagination a:hover { border-color: var(--accent); color: #fff; }
.pagination .current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination .disabled { opacity: .4; pointer-events: none; }

/* ---------- Detail page split ---------- */
.split { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.aside-card { position: sticky; top: 90px; }

.tag-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag-list a { padding: .35rem .8rem; border-radius: 999px; background: var(--bg-elev-2); border: 1px solid var(--border-soft); font-size: .82rem; color: var(--text-muted); }
.tag-list a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; }
.mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; } .items-center { align-items: center; } .gap-2 { gap: 1rem; } .wrap { flex-wrap: wrap; }
.divider { height: 1px; background: var(--border-soft); border: 0; margin: clamp(2rem,5vw,3.5rem) 0; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
