/* Brown India — "blueprint studio" design system. Hand-written, no framework. */
:root {
  --ink: #181B46;
  --ink-60: rgba(24, 27, 70, 0.6);
  --ink-14: rgba(24, 27, 70, 0.14);
  --ink-07: rgba(24, 27, 70, 0.07);
  --paper: #FCFCFA;
  --gold: #F2B434;
  --flame: #E44526;
  --font-display: 'Poppins', ui-sans-serif, sans-serif;
  --font-body: 'Public Sans', ui-sans-serif, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.015em; margin: 0; }
p { margin: 0; }
::selection { background: var(--gold); color: var(--ink); }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--flame);
  outline-offset: 2px;
}

/* ---- graph paper ---- */
.grid-paper {
  background-image:
    linear-gradient(var(--ink-07) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-07) 1px, transparent 1px);
  background-size: 36px 36px;
}
.dark {
  background-color: var(--ink);
  color: #fff;
}
.dark.grid-paper {
  background-image:
    linear-gradient(rgba(242, 180, 52, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 180, 52, 0.09) 1px, transparent 1px);
}

/* ---- structure ---- */
.wrap { max-width: 76rem; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.hairline-b { border-bottom: 1px solid var(--ink-14); }
.hairline-t { border-top: 1px solid var(--ink-14); }
.dark .hairline-b, .dark .hairline-t { border-color: rgba(255, 255, 255, 0.16); }

/* ---- type ---- */
.label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  display: flex;
  align-items: center;
  gap: 0.65em;
}
.label::before { content: ''; width: 9px; height: 9px; background: var(--gold); flex: none; }
.label.plain::before { display: none; }
.display-xl { font-size: clamp(2.5rem, 6.5vw, 4.4rem); font-weight: 700; }
.display-lg { font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 700; }
.display-md { font-size: clamp(1.35rem, 2.4vw, 1.7rem); font-weight: 600; }
.muted { color: var(--ink-60); }
.dark .muted { color: rgba(255, 255, 255, 0.68); }
.mono { font-family: var(--font-mono); }
.mark-gold {
  background-image: linear-gradient(transparent 62%, var(--gold) 62%, var(--gold) 94%, transparent 94%);
}

/* ---- buttons: rectangular, drafting-table ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.95em 1.7em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 4px 4px 0 rgba(24, 27, 70, 0.18);
}
.btn::before { content: ''; width: 8px; height: 8px; background: var(--gold); flex: none; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(24, 27, 70, 0.22); }
.btn:active { transform: translate(0, 0); box-shadow: 2px 2px 0 rgba(24, 27, 70, 0.2); }
.btn.accent { background: var(--flame); border-color: var(--flame); box-shadow: 4px 4px 0 rgba(228, 69, 38, 0.25); }
.btn.accent::before { background: #fff; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: none; }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.dark .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.dark .btn.ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* ---- panels ---- */
.panel {
  background: #fff;
  border: 1px solid var(--ink-14);
  padding: 2rem;
}
.panel.raised { box-shadow: 6px 6px 0 var(--ink-07); }
.panel.dark-panel { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---- header ---- */
.site-top { height: 4px; background: var(--gold); }
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(252, 252, 250, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--ink-14);
}
.site-header .bar { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.site-nav { display: none; gap: 1.9rem; }
.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-60);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.4em 0;
}
.site-nav a::before { content: ''; width: 7px; height: 7px; background: transparent; border: 1px solid transparent; transition: background 0.15s; }
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::before { border-color: var(--ink-14); }
.site-nav a.active { color: var(--ink); font-weight: 700; }
.site-nav a.active::before { background: var(--gold); border-color: var(--gold); }
.menu-btn { border: 1px solid var(--ink-14); background: #fff; padding: 8px 10px; cursor: pointer; }
.mnav { border-top: 1px solid var(--ink-14); background: var(--paper); padding: 10px 24px 18px; }
.mnav a {
  display: flex; align-items: center; gap: 0.6em;
  padding: 0.7em 0.2em;
  font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--ink-07);
}
.mnav a::before { content: ''; width: 7px; height: 7px; background: var(--gold); }
@media (min-width: 860px) {
  .site-nav { display: flex; }
  .menu-btn, .mnav { display: none !important; }
}

/* ---- hero ---- */
.hero { padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 7vw, 5.5rem); }
.hero-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }

/* ---- numbered rows ---- */
.num-row {
  display: grid;
  grid-template-columns: 4.4rem 1fr;
  gap: 1.4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--ink-14);
}
.num-row:last-child { border-bottom: 1px solid var(--ink-14); }
.num-row .num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--gold);
  font-weight: 700;
  line-height: 1.2;
}
@media (min-width: 760px) { .num-row { grid-template-columns: 6.5rem 1fr 1.2fr; align-items: baseline; } .num-row .body-cell { grid-column: 3; } }
@media (max-width: 759px) { .num-row .body-cell { grid-column: 2; } }

/* ---- stats band ---- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 860px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 2.3rem 1.6rem; border-left: 1px solid rgba(255, 255, 255, 0.14); }
.stat:first-child { border-left: none; }
@media (max-width: 859px) { .stat:nth-child(3) { border-left: none; } .stat:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,0.14); } }
.stat .val { font-family: var(--font-mono); font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 700; color: var(--gold); line-height: 1.1; }
.stat .cap { margin-top: 0.6rem; font-size: 0.88rem; color: rgba(255, 255, 255, 0.72); line-height: 1.5; }

/* ---- process strip ---- */
.process { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.14); }
@media (min-width: 860px) { .process { grid-template-columns: repeat(4, 1fr); } }
.process .step { background: var(--ink); padding: 1.4rem 1.2rem 1.5rem; }
.process .step .n { font-family: var(--font-mono); font-size: 0.75rem; color: var(--gold); }
.process .step .t { margin-top: 0.5rem; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; color: #fff; }

/* ---- division columns ---- */
.divisions { display: grid; gap: 1px; background: var(--ink-14); border: 1px solid var(--ink-14); }
@media (min-width: 940px) { .divisions { grid-template-columns: repeat(3, 1fr); } }
.division { background: #fff; padding: 2.2rem 2rem 2.4rem; display: flex; flex-direction: column; }
.division .kicker { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-60); display: flex; justify-content: space-between; }
.division .kicker .n { color: var(--gold); font-weight: 700; }
.division h3 { margin-top: 1rem; font-size: 1.45rem; }
.division .teaser { margin-top: 0.9rem; color: var(--ink-60); font-size: 0.95rem; }
.division ul { list-style: none; margin: 1.4rem 0 1.8rem; padding: 0; display: grid; gap: 0.55rem; flex: 1; }
.division li { display: flex; gap: 0.7em; align-items: baseline; font-size: 0.93rem; }
.division li::before { content: ''; width: 7px; height: 7px; background: var(--gold); flex: none; transform: translateY(-1px); }

/* ---- service rows (detail pages) ---- */
.svc-row {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  gap: 1.5rem;
  padding: 2.2rem 0;
  border-top: 1px solid var(--ink-14);
  scroll-margin-top: 96px;
}
.svc-row:last-of-type { border-bottom: 1px solid var(--ink-14); }
.svc-row .num { font-family: var(--font-mono); color: var(--gold); font-weight: 700; font-size: 1.25rem; }
.svc-row h2, .svc-row h3 { font-size: 1.4rem; }
.svc-row .desc { margin-top: 0.8rem; color: var(--ink-60); max-width: 54rem; }

/* ---- forms ---- */
.field { display: grid; gap: 0.45rem; font-size: 0.9rem; font-weight: 600; }
.field input, .field textarea, .field select {
  width: 100%;
  font: inherit;
  font-weight: 400;
  padding: 0.85em 1em;
  border: 1px solid var(--ink-14);
  background: #fff;
  color: var(--ink);
  border-radius: 0;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--ink); }
.form-grid { display: grid; gap: 1.1rem; }
.form-2col { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .form-2col { grid-template-columns: 1fr 1fr; } }
.alert { padding: 0.9rem 1.1rem; font-size: 0.92rem; border: 1px solid; }
.alert.err { background: #FDF0EC; border-color: rgba(228, 69, 38, 0.4); color: #A32B12; }
.alert.ok { background: #FEF7E6; border-color: var(--gold); }

/* ---- job rows ---- */
.job-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.6rem 0.2rem;
  border-top: 1px solid var(--ink-14);
  text-decoration: none;
  transition: background 0.15s;
}
.job-row:last-child { border-bottom: 1px solid var(--ink-14); }
.job-row:hover { background: #fff; }
.job-row .meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin-top: 0.4rem; font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-60); }
.job-row .go { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 0.6em; }
.job-row .go::after { content: '→'; color: var(--flame); }

/* ---- footer ---- */
.site-footer { background: var(--ink); color: #fff; }
.site-footer a { text-decoration: none; color: rgba(255, 255, 255, 0.78); }
.site-footer a:hover { color: var(--gold); }
.foot-grid { display: grid; gap: 2.6rem; padding: 4rem 0 3rem; }
@media (min-width: 860px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1.1fr; } }
.foot-label { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold); }
.foot-list { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; gap: 0.6rem; font-size: 0.92rem; }
.foot-base { border-top: 1px solid rgba(255, 255, 255, 0.14); padding: 1.3rem 0; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; font-size: 0.8rem; color: rgba(255, 255, 255, 0.55); }

/* ---- misc ---- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.2rem; margin-bottom: 2.4rem; }
.ticker { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-60); display: flex; flex-wrap: wrap; gap: 0.5rem 2.6rem; justify-content: center; padding: 0.85rem 0; }
.ticker .dot { color: var(--gold); }
.two-col { display: grid; gap: 2.5rem; }
@media (min-width: 940px) { .two-col { grid-template-columns: 1fr 1fr; } }
.prose-narrow { max-width: 46rem; }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.reveal { animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
.reveal-1 { animation-delay: 0.08s; }
.reveal-2 { animation-delay: 0.16s; }
.reveal-3 { animation-delay: 0.24s; }

@keyframes drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.drift { animation: drift 5.5s ease-in-out infinite; }
.drift.slow { animation-duration: 7.5s; animation-delay: 1s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .drift { animation: none; }
}

.hidden { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
