/* ==========================================================================
   Graintrade.pk — public brand site
   Charcoal ink + jute gold on cream. Shared by every public page; page-only
   styles live in each view's @push('styles').
   ========================================================================== */
:root {
    --ink: #16181d;
    --ink-2: #33363e;
    --muted: #6f695e;
    --muted-2: #9b9486;
    --paper: #f7f2e8;
    --paper-2: #efe6d3;
    --card: #fffdf8;
    --line: #e3d8c2;
    --rule: #d9e3ea;
    --jute: #d69e2e;
    --jute-deep: #9c6b12;
    --jute-soft: #f5e4bf;
    --emerald: #0e7a5c;
    --emerald-soft: #dcefe6;
    --clay: #c0532e;
    --clay-soft: #f7e0d6;
    --margin-red: #e07a6a;
    /* crop accents */
    --wheat: #d69e2e;
    --rice: #e9dcc0;
    --maize: #f0b92a;
    --display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
    --urdu: 'Noto Nastaliq Urdu', serif;
    --shadow: 0 1px 2px rgba(22,24,29,.06), 0 8px 24px -12px rgba(22,24,29,.18);
    --shadow-lg: 0 30px 60px -24px rgba(22,24,29,.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
    margin: 0; font-family: 'Inter', system-ui, sans-serif; font-size: 16px; line-height: 1.6;
    color: var(--ink-2); background: var(--paper); -webkit-font-smoothing: antialiased; overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); color: var(--ink); line-height: 1.08; letter-spacing: -0.02em; }
p { margin: 0; }
svg { display: block; flex-shrink: 0; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.urdu { font-family: var(--urdu); direction: rtl; line-height: 2.2; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    font: 600 .95rem/1 'Inter', sans-serif; height: 48px; padding: 0 22px; border-radius: 999px;
    border: 1.5px solid transparent; cursor: pointer; white-space: nowrap;
    transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:focus-visible { outline: 3px solid var(--jute); outline-offset: 3px; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #000; transform: translateY(-1px); }
.btn .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--jute); color: var(--ink); display: grid; place-items: center; margin-right: -8px; }
.btn-line { border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-jute { background: var(--jute); color: var(--ink); }
.btn-jute:hover { background: #e4ad3d; transform: translateY(-1px); }
.btn-sm { height: 40px; padding: 0 18px; font-size: .9rem; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.03em; color: var(--ink); }
.logo-mark { width: 34px; height: 34px; }
.logo .pk { font-family: var(--mono); font-size: .68em; font-weight: 700; letter-spacing: 0; background: var(--jute); color: var(--ink); padding: 2px 7px 3px; border-radius: 6px; margin-left: 3px; position: relative; top: -1px; }
.logo .sub { font-family: var(--display); font-weight: 600; font-size: .8em; color: var(--muted); margin-left: 4px; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(247,242,232,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { height: 76px; display: flex; align-items: center; gap: 32px; }
.nav-links { display: flex; gap: 4px; font-size: .92rem; font-weight: 500; color: var(--muted); }
.nav-links a, .nav-links .is-soon { padding: 8px 12px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.nav-links .is-soon { color: var(--muted-2); cursor: default; gap: 7px; }
.nav-links .is-soon .soon { font-size: .56rem; line-height: 1; padding: 3px 5px 2px; border-radius: 4px; }
.nav-links a:hover { color: var(--ink); background: rgba(22,24,29,.04); }
.nav-links a.active { color: var(--ink); background: var(--paper-2); }
.nav-links .soon { font-family: var(--mono); font-size: .58rem; font-weight: 700; letter-spacing: .06em; background: var(--jute-soft); color: var(--jute-deep); padding: 1px 5px; border-radius: 4px; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.nav-actions .signin { font-weight: 600; font-size: .92rem; color: var(--ink); white-space: nowrap; }
.menu-btn { display: none; width: 42px; height: 42px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; place-items: center; }
.mobile-menu { display: none; }

/* ---------- Section scaffolding ---------- */
section.sec { padding: 110px 0; }
.eyebrow { font-family: var(--mono); font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--jute-deep); display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.eyebrow::before { content: ''; width: 22px; height: 2px; background: var(--jute); }
.sec-head { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; margin-bottom: 56px; }
.sec-head h2 { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 800; letter-spacing: -0.035em; }
.sec-head p { color: var(--muted); font-size: 1.05rem; max-width: 480px; }

/* Page header for inner pages */
.page-head { padding: 64px 0 56px; border-bottom: 1.5px solid var(--ink); position: relative; overflow: hidden; }
.page-head h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); font-weight: 800; letter-spacing: -0.045em; max-width: 860px; margin-bottom: 14px; }
.page-head .lead { font-size: 1.12rem; color: var(--muted); max-width: 620px; }
.page-head .urdu { color: var(--muted); font-size: 1.25rem; display: block; text-align: left; margin-bottom: 6px; }

/* ---------- Chips & ticks ---------- */
.chip { display: inline-block; font-family: var(--mono); font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 5px; }
.chip-em { background: var(--emerald); color: #fff; }
.chip-em-soft { background: var(--emerald-soft); color: var(--emerald); }
.chip-jute { background: var(--jute-soft); color: var(--jute-deep); }
.chip-clay { background: var(--clay-soft); color: var(--clay); }
.chip-ink { background: var(--ink); color: var(--paper); }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; }
.ticks li::before { content: ''; flex-shrink: 0; width: 18px; height: 18px; margin-top: 3px; border-radius: 5px; background: var(--jute) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316181d' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/12px no-repeat; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); border-bottom: 1.5px solid var(--jute); padding-bottom: 2px; }
.link-arrow:hover { color: var(--jute-deep); }

/* ---------- Kanta slip (shared motif) ---------- */
.slip {
    background: #fffef9; padding: 22px 22px 26px; box-shadow: var(--shadow-lg);
    font-family: var(--mono); font-size: 12px; color: var(--ink-2); position: relative;
    --tooth: radial-gradient(circle at 6px 0, transparent 5px, #fffef9 5.5px);
}
.slip::before, .slip::after { content: ''; position: absolute; left: 0; right: 0; height: 10px; background: var(--tooth); background-size: 12px 10px; }
.slip::before { top: -10px; transform: rotate(180deg); }
.slip::after { bottom: -10px; }
.slip h5 { margin: 0 0 2px; font-family: var(--mono); font-size: 13px; text-align: center; letter-spacing: .12em; color: var(--ink); }
.slip .sub { text-align: center; color: var(--muted-2); font-size: 10.5px; margin-bottom: 12px; }
.slip .row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.slip .row span:first-child { color: var(--muted); }
.slip hr { border: 0; border-top: 1.5px dashed var(--line); margin: 8px 0; }
.slip .big { font-size: 15px; font-weight: 700; color: var(--ink); }
.pin { position: absolute; top: -16px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--clay); box-shadow: inset -3px -3px 0 rgba(0,0,0,.18), 0 3px 6px rgba(0,0,0,.25); z-index: 3; }

/* ---------- Forms (calculators) ---------- */
.field { display: grid; gap: 6px; }
.field label { font-family: var(--mono); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field input, .field select {
    font: 500 1rem 'Inter', sans-serif; color: var(--ink); height: 48px; padding: 0 14px;
    border: 1.5px solid var(--line); border-radius: 10px; background: #fff; width: 100%;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--jute-soft); }

/* ---------- CTA (jute sack) ---------- */
.sack {
    background-color: var(--jute); border-radius: 28px; padding: 64px; position: relative; overflow: hidden;
    background-image:
        repeating-linear-gradient(45deg, rgba(22,24,29,.05) 0 2px, transparent 2px 7px),
        repeating-linear-gradient(-45deg, rgba(255,255,255,.07) 0 2px, transparent 2px 7px);
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center;
}
.sack::after { content: ''; position: absolute; inset: 22px; border: 2px dashed rgba(22,24,29,.25); border-radius: 18px; pointer-events: none; }
.sack > * { position: relative; z-index: 1; }
.sack h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.035em; margin-bottom: 10px; }
.sack p { color: rgba(22,24,29,.75); font-size: 1.05rem; }
.sack .urdu { color: var(--ink); font-size: 1.3rem; margin-top: 4px; text-align: left; }
.sack .actions { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }

/* ---------- Footer ---------- */
footer.site { margin-top: 110px; border-top: 1.5px solid var(--ink); }
.foot { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 36px; padding: 56px 24px 36px; }
.foot p { font-size: .9rem; color: var(--muted); margin-top: 14px; max-width: 300px; }
.foot h5 { margin: 0 0 14px; font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; }
.foot a.l, .foot span.l { display: block; padding: 4px 0; font-size: .92rem; color: var(--ink-2); }
.foot .free { font-family: var(--mono); font-size: .6rem; font-weight: 700; letter-spacing: .06em; background: var(--emerald); color: #fff; padding: 2px 6px; border-radius: 4px; margin-left: 6px; vertical-align: 2px; }
.foot a.l:hover { color: var(--jute-deep); }
.foot .soon { font-family: var(--mono); font-size: .6rem; color: var(--jute-deep); margin-left: 4px; }
.foot-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 20px 24px 28px; font-size: .84rem; color: var(--muted-2); border-top: 1px dashed var(--line); }

/* ---------- Responsive ---------- */
/* Narrow desktops: tighten the nav so the CTA never runs off the edge. */
@media (max-width: 1240px) {
    .nav-inner { gap: 20px; }
    .nav-links { gap: 0; }
    .nav-links a, .nav-links .is-soon { padding: 8px 9px; }
    .nav-actions { gap: 14px; }
}
@media (max-width: 1060px) {
    .sack { grid-template-columns: 1fr; padding: 48px 40px; }
    .foot { grid-template-columns: repeat(4, 1fr); }
    .foot > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 1060px) {
    .nav-links, .nav-actions .signin { display: none; }
    .menu-btn { display: grid; }
    .mobile-menu.open { display: grid; gap: 2px; padding: 8px 16px 18px; border-top: 1px solid var(--line); background: var(--paper); }
    .mobile-menu a, .mobile-menu .is-soon { padding: 12px 8px; font-weight: 600; color: var(--ink); border-bottom: 1px dashed var(--line); display: flex; justify-content: space-between; align-items: center; }
    .mobile-menu .is-soon { color: var(--muted-2); }
    .mobile-menu a:last-child { border-bottom: 0; }
    .mobile-menu .soon { font-family: var(--mono); font-size: .62rem; color: var(--jute-deep); }
}
@media (max-width: 900px) {
    .nav-inner { gap: 12px; }
    .sec-head { grid-template-columns: 1fr; gap: 16px; }
    section.sec { padding: 80px 0; }
}
@media (max-width: 560px) {
    .wrap { padding: 0 16px; }
    .nav-actions .btn { display: none; }
    .sack { padding: 40px 26px; border-radius: 22px; }
    .foot { grid-template-columns: 1fr 1fr; padding: 44px 16px 28px; }
    .foot-base { padding: 18px 16px 24px; }
    .foot a.l, .foot span.l { padding: 8px 0; }
    /* Small uppercase labels are ~10px on desktop; keep them readable on phones. */
    body .chip, body .led, body .foot .soon, body .foot .free, body .rate-soon, body .res small, body .q-out div small,
    body .mock-strip small, body .stat small, body .board-top small, body .tbl th, body .a-date, body .num-tag, body .product-tag span { font-size: 11.5px; }
    .page-head { padding: 44px 0 40px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Form pages (Digital Khata sign-up, enquiries) ---------- */
.start { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; padding-top: 64px; padding-bottom: 110px; }
.start > * { min-width: 0; }
.start-copy h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); font-weight: 800; letter-spacing: -0.04em; margin-bottom: 14px; }
.start-copy .urdu { color: var(--muted); font-size: 1.25rem; display: block; text-align: left; margin-bottom: 8px; }
.start-copy .lead { font-size: 1.1rem; color: var(--muted); margin-bottom: 28px; max-width: 480px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; counter-increment: s; }
.steps li::before { content: counter(s, decimal-leading-zero); width: 40px; height: 40px; border-radius: 10px; background: var(--ink); color: var(--jute); display: grid; place-items: center; font-family: var(--mono); font-size: .78rem; font-weight: 700; }
.steps b { display: block; color: var(--ink); }
.steps span { color: var(--muted); font-size: .94rem; }

.form-card { background: var(--card); border: 1.5px solid var(--ink); border-radius: 22px; padding: 32px; box-shadow: 8px 8px 0 var(--jute); }
.form-card h2 { font-size: 1.35rem; margin-bottom: 4px; }
.form-card > p { color: var(--muted); font-size: .92rem; margin-bottom: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field textarea { font: 500 1rem 'Inter', sans-serif; color: var(--ink); padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; width: 100%; min-height: 96px; resize: vertical; }
.field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--jute-soft); }
.field label .opt { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted-2); }
.field .err { color: var(--clay); font-size: .84rem; }
.field.has-error input, .field.has-error select { border-color: var(--clay); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-card .btn { width: 100%; justify-content: center; margin-top: 22px; }
.form-card .fine { margin-top: 12px; font-size: .82rem; color: var(--muted-2); text-align: center; }

.done { text-align: center; padding: 16px 4px; }
.done .tick { width: 64px; height: 64px; border-radius: 50%; background: var(--emerald); color: #fff; display: grid; place-items: center; margin: 0 auto 18px; }
.done h2 { font-size: 1.6rem; margin-bottom: 8px; }
.done p { color: var(--muted); margin-bottom: 6px; }
.done .urdu { font-size: 1.15rem; color: var(--ink-2); margin: 12px 0 22px; }
@media (max-width: 960px) {
    .start { grid-template-columns: 1fr; gap: 40px; padding-top: 44px; padding-bottom: 80px; }
}
@media (max-width: 560px) {
    .form-card { padding: 22px; box-shadow: 5px 5px 0 var(--jute); }
    .form-grid { grid-template-columns: 1fr; }
}
