/* =====================================================================
   HINDI FONT STYLE — Premium Typography Toolkit
   Modular CSS Architecture · v1.0
   ===================================================================== */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  /* Brand palette — warm gradient identity */
  --hfs-coral: #FF7A59;
  --hfs-pink: #E94B7B;
  --hfs-violet: #7B3FE4;
  --hfs-indigo: #3B82F6;
  --hfs-mint: #10B981;
  --hfs-amber: #F59E0B;

  /* Surface system */
  --bg-page: #FBFAFF;
  --bg-soft: #F5F2FF;
  --bg-card: #FFFFFF;
  --bg-glass: rgba(255,255,255,0.72);

  /* Text */
  --t-heading: #14152B;
  --t-body: #2A2A3D;
  --t-muted: #6E6E85;
  --t-soft: #9A9AB0;
  --t-invert: #FFFFFF;

  /* Borders & shadow */
  --border: #ECE7F7;
  --border-strong: #DBD3F0;
  --shadow-sm: 0 2px 8px rgba(20,21,43,.04);
  --shadow-md: 0 8px 28px rgba(20,21,43,.08);
  --shadow-lg: 0 24px 60px rgba(123,63,228,.14);

  /* Gradient set */
  --grad-primary: linear-gradient(135deg,#FF7A59 0%,#E94B7B 55%,#7B3FE4 100%);
  --grad-soft: linear-gradient(135deg,#FFF1EC 0%,#F4ECFF 100%);
  --grad-cool: linear-gradient(135deg,#3B82F6 0%,#7B3FE4 100%);
  --grad-warm: linear-gradient(135deg,#F59E0B 0%,#E94B7B 100%);

  /* Radii & motion */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;
  --ease: cubic-bezier(.4,.0,.2,1);
  --t-fast: .18s;
  --t-base: .28s;
  --t-slow: .5s;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Inter', system-ui, sans-serif;
  --font-hindi: 'Noto Sans Devanagari', 'Tiro Devanagari Hindi', Georgia, serif;
  --container: 1180px;
}

/* ---------- 2. RESET ---------- */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--t-body);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--hfs-violet); }
button, input, textarea, select { font: inherit; color: inherit; }
input, textarea, select { outline: none; }
ul, ol { list-style: none; }

/* ---------- 3. UTILITIES ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.text-grad {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.muted { color: var(--t-muted); }
.center { text-align: center; }
.flex { display: flex; }
.gap-sm { gap: 8px; }
.gap { gap: 16px; }
.gap-lg { gap: 24px; }

/* ---------- 4. TYPOGRAPHY ---------- */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); color: var(--t-heading); line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 700; }
h4 { font-size: 1.15rem; font-weight: 700; }
p { color: var(--t-body); }
.lead { font-size: 1.125rem; color: var(--t-muted); max-width: 70ch; }

/* ---------- 5. HEADER / NAV ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.logo { display: flex; align-items: center; gap: 8px; }
.logo img { height: 36px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  font-size: .94rem; font-weight: 500; color: var(--t-body);
  position: relative;
}
.nav-links a:hover { color: var(--hfs-violet); }
.nav-links a.active { color: var(--hfs-violet); font-weight: 600; }

.nav-cta {
  background: var(--grad-primary);
  color: #fff; padding: 10px 18px;
  border-radius: var(--r-pill);
  font-weight: 600; font-size: .9rem;
  box-shadow: 0 6px 18px rgba(233,75,123,.32);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast);
}
.nav-cta:hover { transform: translateY(-1px); color: #fff; box-shadow: 0 10px 26px rgba(233,75,123,.42); }

.nav-toggle {
  display: none; width: 40px; height: 40px;
  border: 1px solid var(--border); background: var(--bg-card);
  border-radius: var(--r-sm); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block; content: ''; width: 18px; height: 2px; background: var(--t-heading); position: relative; transition: all .2s;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; top: 68px; right: 0;
    flex-direction: column; align-items: stretch;
    background: var(--bg-card); width: 280px; max-width: 86vw;
    height: calc(100vh - 68px); padding: 24px 22px;
    box-shadow: var(--shadow-lg);
    transform: translateX(110%); transition: transform var(--t-base) var(--ease);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-cta { text-align: center; margin-top: 10px; }
}

/* ---------- 6. HERO ---------- */
.hero {
  position: relative;
  padding: 56px 0 64px;
  background: var(--grad-soft);
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 12% 15%, rgba(255,122,89,.18), transparent 40%),
    radial-gradient(circle at 88% 85%, rgba(123,63,228,.18), transparent 45%);
  pointer-events: none;
}
.hero-grid {
  display: grid; grid-template-columns: 1.1fr .9fr;
  gap: 56px; align-items: center; position: relative; z-index: 1;
}
.hero h1 { margin-bottom: 18px; }
.hero p.lead { font-size: 1.18rem; margin-bottom: 26px; color: #44455F; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--grad-primary); color: #fff !important;
  padding: 14px 26px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 1rem; border: none; cursor: pointer;
  box-shadow: 0 10px 28px rgba(233,75,123,.32);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(233,75,123,.4); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; color: var(--t-heading) !important;
  padding: 14px 26px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 1rem; border: 1px solid var(--border-strong); cursor: pointer;
  transition: transform var(--t-fast), border-color var(--t-fast);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--hfs-violet); color: var(--hfs-violet) !important; }

.hero-stats { display: flex; gap: 24px; margin-top: 30px; flex-wrap: wrap; }
.hero-stats > div { background: var(--bg-glass); padding: 14px 18px; border-radius: var(--r-md); border: 1px solid var(--border); min-width: 120px; }
.hero-stats strong { display: block; font-size: 1.4rem; color: var(--t-heading); }
.hero-stats span { font-size: .85rem; color: var(--t-muted); }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }
}

/* ---------- 7. GENERATOR (LIVE TOOL) ---------- */
.generator-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
}
.gen-controls {
  display: grid; grid-template-columns: 1fr 160px 140px 140px auto; gap: 14px; align-items: end;
  margin-bottom: 24px;
}
.gen-field label { display: block; font-size: .82rem; font-weight: 600; color: var(--t-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.gen-field input[type="text"],
.gen-field input[type="number"] {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border);
  border-radius: var(--r-sm); background: var(--bg-page); font-size: 1rem;
  transition: border-color var(--t-fast);
}
.gen-field input:focus { border-color: var(--hfs-violet); }
.gen-field input[type="color"] {
  width: 100%; height: 46px; border: 1.5px solid var(--border); border-radius: var(--r-sm);
  background: var(--bg-page); padding: 4px; cursor: pointer;
}
.btn-reset {
  height: 46px; padding: 0 18px; border-radius: var(--r-sm);
  background: var(--bg-soft); border: 1.5px solid var(--border);
  color: var(--t-body); cursor: pointer; font-weight: 600; transition: all var(--t-fast);
}
.btn-reset:hover { background: #fff; border-color: var(--hfs-violet); color: var(--hfs-violet); }

@media (max-width: 880px) {
  .gen-controls { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .gen-controls { grid-template-columns: 1fr; }
}

/* Preview grid */
.previews {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px;
}
.font-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden;
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base);
}
.font-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.font-label {
  padding: 12px 16px; font-size: .85rem; font-weight: 600; color: var(--t-muted);
  border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px;
  background: var(--bg-soft);
}
.font-label .badge { background: var(--grad-primary); color: #fff; padding: 2px 8px; border-radius: var(--r-pill); font-size: .7rem; }
.preview-box {
  padding: 24px 16px; min-height: 90px;
  display: flex; align-items: center; justify-content: center;
  word-break: break-word; text-align: center; line-height: 1.3;
}
.card-actions { display: flex; border-top: 1px solid var(--border); }
.card-actions button {
  flex: 1; padding: 11px 6px; background: transparent; border: none; cursor: pointer;
  font-size: .82rem; font-weight: 600; color: var(--t-body);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background var(--t-fast), color var(--t-fast);
}
.card-actions button + button { border-left: 1px solid var(--border); }
.card-actions button:hover { background: var(--bg-soft); color: var(--hfs-violet); }
.card-actions button.is-copied { background: #ECFDF5; color: var(--hfs-mint); }
.card-actions svg { width: 14px; height: 14px; }

/* ---------- 8. CATEGORY GRID ---------- */
.cat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px;
}
.cat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.cat-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.cat-body { padding: 18px 20px; }
.cat-body h3 { margin-bottom: 6px; }
.cat-body p { color: var(--t-muted); font-size: .92rem; margin-bottom: 12px; }
.cat-body .link-arrow { color: var(--hfs-violet); font-weight: 600; font-size: .9rem; }
.cat-body .link-arrow::after { content: ' →'; transition: transform .2s; display: inline-block; }
.cat-card:hover .link-arrow::after { transform: translateX(4px); }

/* ---------- 9. CHIPS / TAGS / FEATURES ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 14px; border-radius: var(--r-pill);
  background: var(--bg-card); border: 1px solid var(--border-strong);
  font-size: .85rem; color: var(--t-body); cursor: pointer; transition: all var(--t-fast);
}
.chip:hover { background: var(--grad-primary); border-color: transparent; color: #fff; }

.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 22px;
}
.feature {
  background: var(--bg-card); padding: 22px; border-radius: var(--r-md);
  border: 1px solid var(--border);
}
.feature .icon {
  width: 44px; height: 44px; border-radius: var(--r-sm);
  background: var(--grad-soft); display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.feature .icon svg { width: 22px; height: 22px; color: var(--hfs-violet); }
.feature h4 { margin-bottom: 6px; }
.feature p { color: var(--t-muted); font-size: .92rem; }

/* ---------- 10. PROSE (article / content pages) ---------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin-top: 32px; margin-bottom: 14px; }
.prose h3 { margin-top: 22px; margin-bottom: 8px; }
.prose p { margin-bottom: 16px; color: #3D3E55; }
.prose ul { margin: 0 0 16px 20px; }
.prose ul li { list-style: disc; margin-bottom: 6px; color: #3D3E55; }
.prose a { color: var(--hfs-violet); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* ---------- 11. FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden;
}
.faq-q {
  width: 100%; text-align: left; padding: 16px 20px;
  background: transparent; border: none; cursor: pointer;
  font-weight: 600; color: var(--t-heading); display: flex; justify-content: space-between; align-items: center;
}
.faq-q::after { content: '+'; font-size: 1.4rem; color: var(--hfs-violet); transition: transform .25s; }
.faq-item[open] .faq-q::after { content: '−'; }
.faq-a { padding: 0 20px 18px; color: var(--t-muted); font-size: .96rem; line-height: 1.7; }

/* ---------- 12. BREADCRUMB ---------- */
.crumb { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--t-muted); margin: 18px 0; flex-wrap: wrap; }
.crumb a { color: var(--t-muted); }
.crumb a:hover { color: var(--hfs-violet); }
.crumb span.sep { color: var(--t-soft); }
.crumb span.current { color: var(--t-heading); font-weight: 600; }

/* ---------- 13. FOOTER ---------- */
.footer {
  background: linear-gradient(180deg,#FFF 0%,#F5F2FF 100%);
  border-top: 1px solid var(--border);
  margin-top: 80px;
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 36px;
}
.footer-brand p { color: var(--t-muted); font-size: .92rem; margin: 12px 0 16px; max-width: 320px; }
.footer h5 { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--t-heading); margin-bottom: 14px; font-weight: 700; }
.footer ul li { margin-bottom: 8px; }
.footer ul a { color: var(--t-muted); font-size: .92rem; }
.footer ul a:hover { color: var(--hfs-violet); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; padding-top: 24px; border-top: 1px solid var(--border);
  font-size: .85rem; color: var(--t-muted);
}
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; transition: all .2s; }
.footer-social a:hover { background: var(--grad-primary); border-color: transparent; color: #fff; }
.footer-social svg { width: 16px; height: 16px; }

@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- 14. TOAST ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: #14152B; color: #fff; padding: 12px 22px; border-radius: var(--r-pill);
  font-size: .9rem; font-weight: 500; opacity: 0; pointer-events: none;
  transition: opacity var(--t-base), transform var(--t-base); z-index: 200;
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 15. MISC ---------- */
.divider { height: 1px; background: var(--border); margin: 48px 0; }
.notice {
  display: flex; gap: 12px; padding: 16px 18px;
  background: var(--grad-soft); border-radius: var(--r-md);
  border: 1px solid var(--border); color: var(--t-body); font-size: .93rem;
}
.skip-link {
  position: absolute; left: -200vw; top: 0; background: #14152B; color: #fff;
  padding: 10px 16px; z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
