/* Rajkamal Pipes - Sapra Group
   One theme (follows system light/dark), one accent, one radius scale. */

@font-face { font-family: "Outfit"; src: url("../fonts/outfit-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #f3f6f5;
  --surface: #ffffff;
  --surface-2: #e9efed;
  --ink: #0f1c19;
  --muted: #475955;
  --line: #d3ddda;
  --accent: #c2410c;
  --accent-ink: #ffffff;
  --accent-soft: #fbe9df;
  --focus: #1d4ed8;
  --r: 10px;
  --shadow: 0 1px 2px rgb(15 28 25 / .05), 0 12px 32px -16px rgb(15 28 25 / .22);
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1200px;
  --nav-h: 68px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1412;
    --surface: #111c19;
    --surface-2: #172420;
    --ink: #e8efed;
    --muted: #a3b4af;
    --line: #243530;
    --accent: #fb923c;
    --accent-ink: #1a0e05;
    --accent-soft: #2a1a10;
    --focus: #93c5fd;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 12px 32px -16px rgb(0 0 0 / .7);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -.02em; margin: 0; font-weight: 600; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.icon { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r); z-index: 100; }
.skip:focus { top: 12px; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.section { padding-block: clamp(64px, 9vw, 120px); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.lede { color: var(--muted); max-width: 62ch; }
.h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); max-width: 20ch; }
.stack > * + * { margin-top: 20px; }
.eyebrow { font-family: var(--font-display); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: var(--r); border: 1.5px solid transparent; font: 600 1rem/1 var(--font-display); text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .2s cubic-bezier(.16, 1, .3, 1), background-color .2s, border-color .2s; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { filter: brightness(1.08); }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn--sm { min-height: 42px; padding: 0 18px; font-size: .95rem; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 2px; }
.link-arrow .icon { transition: transform .2s cubic-bezier(.16, 1, .3, 1); }
.link-arrow:hover .icon { transform: translateX(4px); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1; gap: 4px; }
.brand b { font: 700 1.5rem/1 var(--font-display); letter-spacing: -.03em; }
.brand b span { color: var(--accent); }
.brand small { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) { padding: 10px 14px; text-decoration: none; font-weight: 500; font-size: .98rem; border-radius: var(--r); color: var(--muted); }
.nav a:not(.btn):hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav .btn { margin-left: 12px; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--r); align-items: center; justify-content: center; cursor: pointer; }
.nav-toggle .icon { width: 24px; height: 24px; }
.nav-toggle .i-close { display: none; }
.nav-toggle[aria-expanded="true"] .i-close { display: block; }
.nav-toggle[aria-expanded="true"] .i-open { display: none; }

/* Hero */
.hero { padding-block: clamp(40px, 6vw, 72px) clamp(48px, 7vw, 88px); }
.hero .wrap { display: grid; grid-template-columns: 1.02fr .98fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 4.8vw, 3.9rem); max-width: 18ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { margin-top: 22px; font-size: 1.15rem; max-width: 44ch; }
.hero .actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.mosaic { display: grid; grid-template-columns: 1.15fr .85fr; grid-template-rows: 1fr 1fr; gap: 12px; height: clamp(360px, 42vw, 520px); }
.mosaic figure { margin: 0; overflow: hidden; border-radius: var(--r); background: var(--surface-2); }
.mosaic figure:first-child { grid-row: 1 / 3; }
.mosaic img, .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.16, 1, .3, 1); }
.mosaic figure:hover img, .tile:hover .media img { transform: scale(1.04); }

/* Facts */
.facts { border-block: 1px solid var(--line); background: var(--surface); }
.facts ul { display: grid; grid-template-columns: repeat(4, 1fr); }
.facts li { padding: 32px 24px; border-left: 1px solid var(--line); }
.facts li:first-child { border-left: 0; padding-left: 0; }
.facts strong { display: block; font: 600 clamp(1.9rem, 3.4vw, 2.8rem)/1 var(--font-display); letter-spacing: -.03em; }
.facts span { display: block; margin-top: 8px; color: var(--muted); font-size: .98rem; line-height: 1.45; max-width: 24ch; }

/* Companies bento */
.section-head { margin-bottom: clamp(28px, 4vw, 48px); }
.section-head .lede { margin-top: 16px; }
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.tile { grid-column: span 6; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; transition: box-shadow .3s, transform .3s cubic-bezier(.16, 1, .3, 1); }
.tile:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.tile--wide { grid-column: span 7; }
.tile--narrow { grid-column: span 5; }
.tile--full { grid-column: span 12; flex-direction: row; background: var(--accent-soft); }
.tile .media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.tile--full .media { aspect-ratio: auto; flex: 0 0 42%; min-height: 260px; }
.tile .body { padding: 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.tile h3 { font-size: 1.6rem; }
.tile p { color: var(--muted); }
.tile .tags { color: var(--ink); font-weight: 500; font-size: .95rem; }
.tile .link-arrow { margin-top: auto; align-self: flex-start; padding-top: 8px; }
.tile--full p { color: var(--ink); opacity: .85; }

/* Range groups */
.groups { border-top: 1px solid var(--line); }
.group { display: grid; grid-template-columns: 4fr 8fr; gap: 24px 48px; padding-block: 36px; border-bottom: 1px solid var(--line); }
.group h3 { font-size: 1.5rem; }
.group .note { color: var(--muted); margin-top: 8px; font-size: .98rem; max-width: 32ch; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; align-content: flex-start; }
.chips li { padding: 10px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); font-weight: 500; font-size: .98rem; line-height: 1.3; }
.chips li b { color: var(--accent); font-weight: 600; }

/* Quality split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.split .media { border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 3.2; background: var(--surface-2); }
.ticks { margin-top: 28px; display: grid; gap: 16px; }
.ticks li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.ticks .icon { color: var(--accent); width: 26px; height: 26px; margin-top: 1px; }
.ticks b { font-family: var(--font-display); font-weight: 600; }
.ticks p { color: var(--muted); font-size: .98rem; line-height: 1.5; margin-top: 2px; }

/* History */
.history { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 8px; }
.history li { padding: 28px 28px 0 0; border-top: 2px solid var(--ink); }
.history li:nth-child(n+2) { padding-left: 28px; border-left: 0; }
.history strong { font: 600 clamp(2.4rem, 5vw, 4rem)/1 var(--font-display); letter-spacing: -.04em; color: var(--accent); display: block; }
.history h3 { font-size: 1.25rem; margin-top: 14px; }
.history p { color: var(--muted); margin-top: 8px; max-width: 34ch; font-size: 1rem; }

/* Enquiry */
.enquiry { background: var(--surface); border-block: 1px solid var(--line); }
.enquiry .wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.contact-list { margin-top: 32px; display: grid; gap: 16px; }
.contact-list li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.contact-list .icon { color: var(--accent); width: 24px; height: 24px; margin-top: 2px; }
.contact-list a { text-decoration: none; font-weight: 600; }
.contact-list a:hover { text-decoration: underline; }
.contact-list small { display: block; color: var(--muted); font-size: .92rem; font-weight: 400; }

.form { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(22px, 3vw, 36px); display: grid; gap: 20px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 600; font-size: .98rem; }
.field input, .field select, .field textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid #6f827d; border-radius: var(--r); padding: 12px 14px; min-height: 48px; width: 100%; }
@media (prefers-color-scheme: dark) { .field input, .field select, .field textarea { border-color: #5d716b; } }
.field textarea { min-height: 110px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.field .help { color: var(--muted); font-size: .9rem; }
.field .err { color: #b42318; font-size: .92rem; font-weight: 500; display: none; }
@media (prefers-color-scheme: dark) { .field .err { color: #fda29b; } }
.field.invalid .err { display: block; }
.field.invalid input, .field.invalid select { border-color: #b42318; }
.form .fine { color: var(--muted); font-size: .92rem; }
.form .fine a { font-weight: 600; }

/* Inner pages */
.page-head { padding-block: clamp(48px, 7vw, 96px) clamp(24px, 3vw, 40px); }
.page-head h1 { font-size: clamp(2.2rem, 4.6vw, 3.8rem); max-width: 18ch; }
.page-head .lede { margin-top: 20px; font-size: 1.12rem; }
.crumbs { font-size: .92rem; color: var(--muted); margin-bottom: 20px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.prose { max-width: 68ch; }
.prose p + p { margin-top: 18px; }
.prose h2 { font-size: 1.6rem; margin: 40px 0 14px; }
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; border-top: 1px solid var(--line); margin-top: 28px; }
.people li { padding: 22px 20px 22px 0; border-bottom: 1px solid var(--line); }
.people b { font: 600 1.15rem var(--font-display); display: block; }
.people span { color: var(--muted); font-size: .96rem; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 32px; }
.gallery figure { margin: 0; }
.gallery .media { aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: var(--surface-2); }
.gallery figcaption { margin-top: 10px; font-size: .96rem; color: var(--muted); }
.company { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: start; padding-block: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line); }
.company:first-of-type { border-top: 0; }
.company h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.company .media { border-radius: var(--r); overflow: hidden; aspect-ratio: 16 / 10; background: var(--surface-2); }
.company .meta { color: var(--muted); font-size: .98rem; margin-top: 6px; }
.company .chips { margin-top: 20px; }
.company .link-arrow { margin-top: 24px; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.contact-grid > div { padding: 28px 28px 28px 0; border-bottom: 1px solid var(--line); }
.contact-grid h3 { font-size: 1.3rem; margin-bottom: 4px; }
.contact-grid .who { color: var(--muted); font-size: .96rem; margin-bottom: 14px; }
.contact-grid ul { display: grid; gap: 8px; }
.contact-grid a { text-decoration: none; font-weight: 600; }
.contact-grid a:hover { text-decoration: underline; }
.notfound { min-height: 60dvh; display: grid; place-content: center; text-align: left; gap: 16px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface-2); padding-block: 56px 28px; }
.footer-grid { display: grid; grid-template-columns: 1.1fr repeat(3, 1fr); gap: 32px; }
.site-footer h4 { font-size: 1.05rem; margin-bottom: 12px; }
.site-footer p, .site-footer li { color: var(--muted); font-size: .96rem; line-height: 1.6; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: var(--ink); }
.site-footer .brand { margin-bottom: 14px; }
.legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .9rem; }

/* Mobile action bar */
.action-bar { display: none; }

/* Motion: only where it carries meaning (entrance order, scroll reveal). */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .lede, .hero .actions, .mosaic figure { animation: rise .8s cubic-bezier(.16, 1, .3, 1) both; }
  .hero .lede { animation-delay: .08s; }
  .hero .actions { animation-delay: .16s; }
  .mosaic figure:nth-child(1) { animation-delay: .1s; }
  .mosaic figure:nth-child(2) { animation-delay: .2s; }
  .mosaic figure:nth-child(3) { animation-delay: .3s; }
  .js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1); }
  .js .reveal.in { opacity: 1; transform: none; }
}
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* Tablet / mobile */
@media (max-width: 960px) {
  .hero .wrap, .split, .enquiry .wrap, .company { grid-template-columns: 1fr; }
  .mosaic { height: clamp(280px, 60vw, 420px); }
  .facts ul { grid-template-columns: 1fr 1fr; }
  .facts li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .facts li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .tile, .tile--wide, .tile--narrow, .tile--full { grid-column: span 12; }
  .tile--full { flex-direction: column; }
  .tile--full .media { aspect-ratio: 16 / 9; flex: none; min-height: 0; }
  .group { grid-template-columns: 1fr; gap: 20px; }
  .history { grid-template-columns: 1fr; }
  .history li, .history li:nth-child(n+2) { padding: 24px 0 24px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav { position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 12px 16px 20px; gap: 2px; display: none; }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 12px; font-size: 1.05rem; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); }
  .nav .btn { margin: 10px 0 0; }
}
@media (max-width: 640px) {
  body { padding-bottom: 72px; font-size: 1rem; }
  .hero .actions .btn { flex: 1 1 100%; }
  .hero .actions .btn--ghost { display: none; }
  .form .row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .facts li { padding: 24px 16px; }
  .tile .body { padding: 22px; }
  .action-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: fixed; inset: auto 0 0 0; z-index: 40; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition-duration: .01ms !important; } }
