/* ===========================================================
   SHARMAJI TOOLS — Design System
   Concept: the Indian office register / file-room. PDFs are
   paperwork, so the site is built like a ledger book — ruled
   paper, a red margin rule, manila file-folder cards, and a
   recurring rubber-stamp mark for trust & status.
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fjalla+One&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root{
  /* --- palette: ledger paper + stamp ink --- */
  --paper:      #E7EEE1;   /* pale mint-tinted register paper */
  --paper-alt:  #DCE6D3;   /* deeper paper tone, section bands */
  --card:       #EFE6CC;   /* manila file-folder tan */
  --card-edge:  #CBAA72;   /* folder edge / brass-ish border */
  --ink:        #16223B;   /* fountain-pen navy — primary text */
  --ink-soft:   #47597A;   /* secondary navy, muted */
  --stamp:      #B5342A;   /* rubber-stamp red */
  --stamp-dark: #7A2A20;   /* red-thread / tape, darker red */
  --brass:      #96731F;   /* brass seal gold, used sparingly */
  --line:       rgba(22,34,59,0.16);   /* ruled hairlines */
  --line-strong:rgba(22,34,59,0.30);
  --shadow:     0 6px 18px rgba(22,34,59,0.10);

  --font-display: 'Fjalla One', 'Arial Narrow', sans-serif;
  --font-body:    'IBM Plex Sans', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', 'Courier New', monospace;

  --content-w: 1120px;
  --radius: 3px;
}

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

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

body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  position: relative;
}

/* subtle paper grain, applied once, cheap to repaint */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.02 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

a{ color: inherit; }
img{ max-width: 100%; display: block; }
button{ font-family: inherit; }

h1,h2,h3,h4{
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 0 0 0.4em;
  color: var(--ink);
}
h1{ font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.05; }
h2{ font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3{ font-size: 1.25rem; }
p{ margin: 0 0 1em; color: var(--ink-soft); }

.eyebrow{
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stamp-dark);
}

:focus-visible{
  outline: 2px solid var(--stamp);
  outline-offset: 3px;
}

.wrap{
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}

/* the red margin rule — like ruled school-notebook paper —
   runs down the left edge of the main column on wide screens */
.ledger-margin{
  position: relative;
}
.ledger-margin::before{
  content:"";
  position: absolute;
  left: 46px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(181,52,42,0.35);
}
@media (max-width: 760px){
  .ledger-margin::before{ display: none; }
}

.ledger-rule{
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}
.ledger-rule.strong{ border-top-color: var(--line-strong); }

/* ===================== HEADER / NAV ===================== */
.site-header{
  position: sticky; top: 0; z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line-strong);
}
.site-header .wrap{
  display: flex; align-items: center; justify-content: space-between;
  height: 78px;
}
.brand{
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand img{ height: 36px; width: 36px; }
.brand-name{
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}
.brand-name small{
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin-top: 2px;
}
.site-nav{ display: flex; align-items: center; gap: 6px; }
.site-nav a{
  font-family: var(--font-mono);
  font-size: 0.86rem;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: var(--radius);
  letter-spacing: 0.02em;
}
.site-nav a:hover{ color: var(--ink); background: var(--paper-alt); }
.site-nav a.current{ color: var(--stamp); }
.nav-toggle{
  display: none;
  background: none; border: 1px solid var(--line-strong);
  padding: 8px 10px; border-radius: var(--radius); cursor: pointer;
}
@media (max-width: 760px){
  .site-nav{
    position: absolute; top: 78px; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line-strong);
    flex-direction: column; align-items: stretch;
    padding: 8px 0 14px;
    display: none;
  }
  .site-nav.open{ display: flex; }
  .site-nav a{ padding: 12px 28px; }
  .nav-toggle{ display: inline-flex; }
}

/* ===================== BUTTONS ===================== */
.btn{
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  padding: 13px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:active{ transform: translateY(1px); }
.btn-primary{
  background: var(--stamp);
  color: #FBF6EA;
  box-shadow: var(--shadow);
}
.btn-primary:hover{ background: var(--stamp-dark); }
.btn-secondary{
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-secondary:hover{ border-color: var(--ink); background: var(--paper-alt); }
.btn[disabled]{ opacity: 0.45; cursor: not-allowed; }
.btn-block{ width: 100%; justify-content: center; }

/* ===================== STAMP BADGE ===================== */
/* the site's signature element — a rubber-stamp mark used for
   status / trust cues throughout (hero, cards, footer) */
.stamp{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stamp);
  border: 2px solid var(--stamp);
  border-radius: 999px;
  padding: 7px 16px;
  transform: rotate(-4deg);
  position: relative;
  opacity: 0.92;
  mix-blend-mode: multiply;
}
.stamp::after{
  content:"";
  position: absolute; inset: -4px;
  border: 1px solid var(--stamp);
  border-radius: 999px;
  opacity: 0.35;
}
.stamp.brass{ color: var(--brass); border-color: var(--brass); }
.stamp.brass::after{ border-color: var(--brass); }
.stamp.small{ font-size: 0.62rem; padding: 4px 10px; transform: rotate(-6deg); }

/* ===================== HERO ===================== */
.hero{ padding: 64px 0 56px; }
.hero-top{
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 22px; flex-wrap: wrap;
}
.file-no{
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
}
.hero p.lede{
  font-size: 1.15rem;
  max-width: 46em;
}
.hero-actions{ display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }

/* ===================== SECTIONS ===================== */
.section{ padding: 54px 0; }
.section-head{
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 20px; margin-bottom: 30px; flex-wrap: wrap;
}
.section-head p{ margin: 6px 0 0; max-width: 40em; }
.band{ background: var(--paper-alt); }

/* ===================== TOOL / FILE CARDS ===================== */
.tools-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 900px){ .tools-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px){ .tools-grid{ grid-template-columns: 1fr; } }

.file-card{
  position: relative;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  padding: 26px 22px 22px;
  text-decoration: none;
  color: var(--ink);
  display: block;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.file-card:hover{ transform: translateY(-3px); box-shadow: 0 12px 26px rgba(22,34,59,0.16); }
.file-card::before{
  /* the folder tab */
  content: attr(data-no);
  position: absolute;
  top: -16px; left: 22px;
  background: var(--card-edge);
  color: #2c2410;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  padding: 5px 10px 4px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.file-card h3{ margin: 6px 0 8px; display: flex; align-items: center; gap: 10px; }
.file-card p{ color: var(--ink-soft); font-size: 0.94rem; margin-bottom: 14px; }
.file-card .tag-row{ display: flex; gap: 8px; flex-wrap: wrap; }
.file-card .arrow{
  font-family: var(--font-mono); font-size: 0.85rem; color: var(--stamp);
}

/* ===================== TOOL WORKSPACE (functional pages) ===================== */
.workspace{
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.dropzone{
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 44px 24px;
  text-align: center;
  cursor: pointer;
  background: rgba(255,255,255,0.35);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dropzone:hover, .dropzone.drag{
  border-color: var(--stamp);
  background: rgba(255,255,255,0.55);
}
.dropzone input[type=file]{ display: none; }
.dropzone .dz-title{ font-family: var(--font-mono); font-weight: 600; margin-bottom: 6px; }
.dropzone .dz-sub{ font-size: 0.85rem; color: var(--ink-soft); }

.file-list{ list-style: none; margin: 20px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.file-row{
  display: flex; align-items: center; gap: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.file-row .name{ flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .size{ color: var(--ink-soft); }
.file-row button{
  background: none; border: none; color: var(--stamp); cursor: pointer;
  font-family: var(--font-mono); font-size: 0.85rem;
}
.file-row .handle{ cursor: grab; color: var(--ink-soft); }
.file-row.dragging{ opacity: 0.5; }

.field{ margin-bottom: 18px; }
.field label{
  display: block; font-family: var(--font-mono); font-size: 0.8rem;
  letter-spacing: 0.04em; margin-bottom: 8px; color: var(--ink-soft);
}
.field input[type=text], .field input[type=number], .field select{
  width: 100%; padding: 11px 12px; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: #fff; font-family: var(--font-body);
  font-size: 0.95rem; color: var(--ink);
}
.radio-row{ display: flex; gap: 10px; flex-wrap: wrap; }
.radio-pill{
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 9px 16px; font-family: var(--font-mono); font-size: 0.82rem;
  cursor: pointer; background: #fff; text-decoration: none;
}
.radio-pill input{ display: none; }
.radio-pill.active{ border-color: var(--stamp); color: var(--stamp); background: rgba(181,52,42,0.06); }

.progress-track{
  height: 8px; background: var(--paper); border-radius: 999px; overflow: hidden;
  border: 1px solid var(--line); margin: 14px 0;
}
.progress-fill{ height: 100%; background: var(--stamp); width: 0%; transition: width 0.2s ease; }

.status-msg{
  font-family: var(--font-mono); font-size: 0.85rem;
  padding: 12px 14px; border-radius: var(--radius); margin: 14px 0;
  border: 1px solid var(--line);
}
.status-msg.error{ border-color: var(--stamp); color: var(--stamp-dark); background: rgba(181,52,42,0.06); }
.status-msg.ok{ border-color: #4C7A4C; color: #2E5A2E; background: rgba(76,122,76,0.08); }

.thumb-grid{
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr));
  gap: 16px; margin: 20px 0;
}
.page-thumb{
  position: relative; background: #fff; border: 1px solid var(--line-strong);
  border-radius: var(--radius); overflow: hidden; cursor: grab;
  box-shadow: var(--shadow);
}
.page-thumb img{ width: 100%; display: block; }
.page-thumb .pg-no{
  position: absolute; top: 6px; left: 6px;
  background: var(--ink); color: var(--paper);
  font-family: var(--font-mono); font-size: 0.68rem;
  padding: 2px 7px; border-radius: 999px;
}
.page-thumb .pg-actions{
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; justify-content: space-between;
  background: rgba(22,34,59,0.82);
  padding: 5px 6px;
}
.page-thumb .pg-actions button{
  background: none; border: none; color: var(--paper);
  font-size: 0.9rem; cursor: pointer; padding: 2px 6px;
}
.page-thumb.dragging{ opacity: 0.4; }

/* ===================== NOTICE / COMING SOON ===================== */
.notice-block{
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 26px;
  background: rgba(255,255,255,0.4);
}

/* ===================== FOOTER ===================== */
.site-footer{
  margin-top: 60px;
  border-top: 1px solid var(--line-strong);
  padding: 40px 0 34px;
  position: relative;
}
.site-footer::before{
  /* stitched red thread — a nod to files bound with red tape */
  content:"";
  position: absolute; top: -1px; left: 0; right: 0; height: 2px;
  background-image: linear-gradient(90deg, var(--stamp-dark) 60%, transparent 0%);
  background-size: 14px 2px;
  opacity: 0.6;
}
.footer-grid{
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 24px; flex-wrap: wrap;
}
.footer-links{ display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a{ font-family: var(--font-mono); font-size: 0.85rem; text-decoration: none; color: var(--ink-soft); }
.footer-links a:hover{ color: var(--stamp); }
.footer-note{ font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-soft); margin-top: 18px; }
.footer-bottom{
  border-top: 0.3px solid var(--line);
  margin-top: 15px;
  padding-top: 9px;
  text-align: center;
}
.footer-bottom p{
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--ink-soft);
  margin: 0;
}
.footer-bottom a{ font-family: var(--font-mono); font-size: 0.65rem; text-decoration: none; color: var(--ink-soft); }
.footer-bottom a:hover{ color: var(--stamp); }

/* ===================== ABOUT PAGE ===================== */
.about-grid{
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: start;
}
@media (max-width: 800px){ .about-grid{ grid-template-columns: 1fr; } }
.info-card{
  background: var(--card); border: 1px solid var(--card-edge);
  border-radius: var(--radius); padding: 22px; margin-bottom: 16px;
}
.info-card .k{ font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--ink-soft); text-transform: uppercase; }
.info-card .v{ font-family: var(--font-display); font-size: 1.5rem; margin-top: 4px; }

.privacy-list{ list-style: none; margin: 0; padding: 0; }
.privacy-list li{
  display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line);
}
.privacy-list li:first-child{ border-top: none; }
.privacy-list .mark{ color: var(--stamp); font-family: var(--font-mono); }
