/* =========================================================
   Sri Krishna Packaging Industries — main stylesheet
   ========================================================= */

:root {
  --kraft: #8a5a2b;        /* primary: corrugated kraft brown */
  --kraft-dark: #6b431d;
  --accent: #d9913f;       /* warm highlight */
  --ink: #2a211b;          /* headings / dark backgrounds */
  --text: #5a5049;
  --muted: #8b8079;
  --paper: #f7f2ec;        /* light section background */
  --line: #e8e0d7;
  --white: #fff;
  --max: 1170px;
  --radius: 6px;
  --shadow: 0 6px 24px rgba(42, 33, 27, .08);
  --head: "Oswald", "Arial Narrow", Arial, sans-serif;
  --body: "Open Sans", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { font-family: var(--body); color: var(--text); line-height: 1.75; background: var(--white); font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: var(--kraft); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }
ul { list-style: none; }
h1, h2, h3, h4 { font-family: var(--head); color: var(--ink); font-weight: 500; line-height: 1.25; letter-spacing: .3px; }
strong { color: var(--ink); }

.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section--paper { background: var(--paper); }
.section-title { text-align: center; font-size: 38px; margin-bottom: 12px; }
.section-sub { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 45px; }
.section-title::after {
  content: ""; display: block; width: 60px; height: 3px; background: var(--accent); margin: 14px auto 0;
}
.text-center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; background: var(--kraft); color: var(--white); padding: 13px 30px;
  font-family: var(--head); text-transform: uppercase; letter-spacing: 1px; font-size: 15px;
  border: 0; border-radius: var(--radius); cursor: pointer; transition: background .2s, transform .2s;
}
.btn:hover { background: var(--kraft-dark); color: var(--white); transform: translateY(-2px); }
.btn--light { background: var(--white); color: var(--kraft); }
.btn--light:hover { background: var(--accent); color: var(--white); }

/* ---------- Image placeholder (used when an image can't load) ---------- */
.img-missing {
  display: flex; align-items: center; justify-content: center; text-align: center;
  width: 100%; height: 100%; min-height: 140px; padding: 10px;
  background: repeating-linear-gradient(45deg, #efe7de, #efe7de 10px, #f7f2ec 10px, #f7f2ec 20px);
  color: var(--muted); font-size: 13px;
}

/* =========================================================
   Top bar + header
   ========================================================= */
.topbar { background: var(--ink); color: #cfc6bf; font-size: 13px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; min-height: 38px; gap: 15px; flex-wrap: wrap; }
.topbar a { color: #cfc6bf; }
.topbar a:hover { color: var(--accent); }
.topbar span + span { margin-left: 18px; }

.header { background: var(--white); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.header .container { display: flex; align-items: center; justify-content: space-between; min-height: 84px; }
.logo { display: flex; align-items: center; }
.logo img { max-height: 64px; width: auto; }
.logo-text { display: none; font-family: var(--head); font-size: 24px; color: var(--ink); line-height: 1.1; }
.logo-text small { display: block; font-size: 12px; letter-spacing: 3px; color: var(--kraft); text-transform: uppercase; }

.nav ul { display: flex; gap: 4px; }
.nav a {
  display: block; padding: 10px 15px; font-family: var(--head); text-transform: uppercase;
  font-size: 15px; letter-spacing: .6px; color: var(--ink); border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--kraft); }
.nav a.active { color: var(--kraft); border-bottom-color: var(--accent); }

.menu-toggle {
  display: none; background: none; border: 0; cursor: pointer; width: 44px; height: 44px; position: relative;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  position: absolute; left: 10px; width: 24px; height: 2px; background: var(--ink); content: ""; transition: .3s;
}
.menu-toggle span { top: 21px; }
.menu-toggle span::before { left: 0; top: -7px; }
.menu-toggle span::after { left: 0; top: 7px; }
.menu-toggle[aria-expanded="true"] span { background: transparent; }
.menu-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--white);
    max-height: 0; overflow: hidden; transition: max-height .35s ease; box-shadow: 0 8px 16px rgba(0,0,0,.06);
  }
  .nav.open { max-height: 400px; }
  .nav ul { flex-direction: column; padding: 10px 20px 20px; }
  .nav a { border-bottom: 1px solid var(--line); }
  .nav a.active { border-bottom-color: var(--line); }
  .topbar .hide-sm { display: none; }
}

/* =========================================================
   Sliders
   ========================================================= */
.slider { position: relative; overflow: hidden; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.slide.active { opacity: 1; z-index: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }

.hero { height: 560px; background: linear-gradient(135deg, #4a3a2e, #1e1712); }
.hero .slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,.05) 60%); }
.hero .img-missing { background: transparent; color: transparent; }
.hero .caption { position: absolute; left: 0; right: 0; bottom: 70px; z-index: 2; text-align: center; padding: 0 20px; }
.hero .caption h2 {
  display: inline-block; color: var(--white); font-size: 40px; text-shadow: 0 2px 10px rgba(0,0,0,.4);
  transform: translateY(20px); opacity: 0; transition: all .8s ease .3s;
}
.hero .slide.active .caption h2 { transform: none; opacity: 1; }

.slider-btn {
  position: absolute; top: 50%; z-index: 3; transform: translateY(-50%);
  width: 48px; height: 48px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.18); color: var(--white); font-size: 20px; transition: background .2s;
}
.slider-btn:hover { background: var(--accent); }
.slider-btn.prev { left: 20px; }
.slider-btn.next { right: 20px; }
.slider-dots { position: absolute; bottom: 25px; left: 0; right: 0; z-index: 3; display: flex; justify-content: center; gap: 10px; }
.slider-dots button { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--white); background: transparent; cursor: pointer; padding: 0; }
.slider-dots button.active { background: var(--white); }

@media (max-width: 768px) {
  .hero { height: 340px; }
  .hero .caption { bottom: 55px; }
  .hero .caption h2 { font-size: 24px; }
  .slider-btn { width: 38px; height: 38px; font-size: 16px; }
  .slider-btn.prev { left: 8px; } .slider-btn.next { right: 8px; }
}

/* =========================================================
   Page banner (inner pages)
   ========================================================= */
.page-banner {
  background: linear-gradient(120deg, rgba(42,33,27,.92), rgba(138,90,43,.85)),
              repeating-linear-gradient(90deg, #6b431d 0 2px, #7a4f25 2px 14px);
  color: var(--white); padding: 70px 0 60px; text-align: center;
}
.page-banner h1 { color: var(--white); font-size: 44px; }
.breadcrumb { margin-top: 8px; font-size: 14px; color: #e6d9cc; }
.breadcrumb a { color: #fff; }
.breadcrumb a:hover { color: var(--accent); }

/* =========================================================
   Home: welcome
   ========================================================= */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.box-slider { height: 400px; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.box-slider .slide img { object-fit: contain; background: var(--white); }
.kicker { font-family: var(--head); color: var(--accent); font-size: 20px; letter-spacing: 1px; }
.welcome h1 { font-size: 36px; margin: 6px 0 18px; }
.welcome h1 small { display: block; font-size: 22px; color: var(--muted); font-weight: 400; margin-top: 6px; }
.welcome p { margin-bottom: 24px; }
.stats { display: flex; gap: 30px; margin: 0 0 28px; flex-wrap: wrap; }
.stat b { display: block; font-family: var(--head); font-size: 32px; color: var(--kraft); line-height: 1.1; font-weight: 500; }
.stat span { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 35px; }
  .box-slider { height: 300px; }
}

/* =========================================================
   Why choose us
   ========================================================= */
.why { background: var(--ink); color: #d9d0c8; position: relative; overflow: hidden; }
.why::before {
  content: ""; position: absolute; inset: 0; opacity: .07;
  background: repeating-linear-gradient(90deg, #fff 0 2px, transparent 2px 16px);
}
.why .container { position: relative; }
.why .section-title { color: var(--white); }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.why-card {
  display: flex; align-items: center; gap: 18px; padding: 22px; border-radius: var(--radius);
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); color: var(--white);
  transition: background .25s, transform .25s;
}
.why-card:hover { background: rgba(217,145,63,.18); transform: translateY(-4px); color: var(--white); }
.why-num {
  flex: 0 0 56px; height: 56px; border-radius: 50%; border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center; font-family: var(--head); font-size: 24px; color: var(--accent);
}
.why-card span { font-family: var(--head); font-size: 18px; letter-spacing: .4px; }
@media (max-width: 960px) { .why-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .why-grid { grid-template-columns: 1fr; } }

/* ---------- Vision / mission ---------- */
.vm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.vm-card { background: var(--white); padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow); border-top: 4px solid var(--accent); }
.vm-card h3 { font-size: 26px; margin-bottom: 10px; }
.vm-card p { font-size: 18px; }
@media (max-width: 760px) { .vm-grid { grid-template-columns: 1fr; } }

/* ---------- Feature list (diversification etc.) ---------- */
.check-list li { position: relative; padding-left: 32px; margin-bottom: 12px; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: var(--white); font-size: 13px; display: flex; align-items: center; justify-content: center;
}
.highlight-box {
  background: var(--kraft); color: var(--white); border-radius: var(--radius); padding: 36px; text-align: center;
}
.highlight-box b { display: block; font-family: var(--head); font-size: 56px; line-height: 1; font-weight: 500; }
.highlight-box span { display: block; margin-top: 6px; color: #f1e3d4; }
.highlight-box hr { border: 0; border-top: 1px solid rgba(255,255,255,.25); margin: 24px 0; }

/* ---------- Clients ---------- */
.clients-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.client {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  height: 150px; padding: 18px; display: flex; align-items: center; justify-content: center; transition: box-shadow .25s, transform .25s;
}
.client:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.client img { max-height: 110px; width: auto; object-fit: contain; }
@media (max-width: 760px) { .clients-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- CTA band ---------- */
.cta { background: linear-gradient(120deg, var(--kraft-dark), var(--kraft)); color: #f1e3d4; text-align: center; padding: 65px 0; }
.cta h2 { color: var(--white); font-size: 38px; margin-bottom: 8px; }
.cta p { font-size: 18px; margin-bottom: 26px; }

/* =========================================================
   About page
   ========================================================= */
.prose p { margin-bottom: 18px; }
.prose p:last-child { margin-bottom: 0; }
.reason-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.reason {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px;
  border-left: 4px solid var(--accent); scroll-margin-top: 110px;
}
.reason h3 { font-size: 22px; margin-bottom: 14px; display: flex; align-items: center; gap: 12px; }
.reason h3 .why-num { flex-basis: 42px; height: 42px; font-size: 18px; }
.reason:target { box-shadow: 0 0 0 3px var(--accent), var(--shadow); }
@media (max-width: 760px) { .reason-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Services page
   ========================================================= */
.service-block { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: center; padding: 40px 0; border-bottom: 1px solid var(--line); }
.service-block:last-child { border-bottom: 0; }
.service-block:nth-child(even) .service-text { order: 2; }
.service-text .num { font-family: var(--head); color: var(--accent); font-size: 18px; letter-spacing: 1px; }
.service-text h3 { font-size: 28px; margin: 4px 0 10px; }
.spec { display: inline-block; background: var(--paper); border: 1px solid var(--line); border-radius: 30px; padding: 4px 14px; font-size: 14px; color: var(--kraft-dark); font-weight: 600; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.thumbs a, .thumbs .thumb { display: block; border-radius: var(--radius); overflow: hidden; height: 190px; background: var(--paper); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.thumbs a:hover img { transform: scale(1.06); }
@media (max-width: 760px) {
  .service-block { grid-template-columns: 1fr; gap: 20px; }
  .service-block:nth-child(even) .service-text { order: 0; }
}

.flute-grid { display: grid; grid-template-columns: repeat(3, 1fr) 1.3fr; gap: 20px; align-items: stretch; }
.flute { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 20px; text-align: center; }
.flute b { display: block; font-family: var(--head); font-size: 48px; color: var(--kraft); line-height: 1; font-weight: 500; }
.flute span { display: block; margin-top: 8px; font-family: var(--head); font-size: 18px; color: var(--ink); }
.flute-img { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; display: flex; align-items: center; justify-content: center; }
@media (max-width: 860px) { .flute-grid { grid-template-columns: repeat(3, 1fr); } .flute-img { grid-column: 1 / -1; } }
@media (max-width: 500px) { .flute-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Quality page
   ========================================================= */
.test-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.test-card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 34px 28px; text-align: center;
  transition: transform .25s;
}
.test-card:hover { transform: translateY(-5px); }
.test-icon {
  width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; background: var(--paper);
  display: flex; align-items: center; justify-content: center;
}
.test-icon svg { width: 36px; height: 36px; stroke: var(--kraft); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.test-card h3 { font-size: 21px; margin-bottom: 8px; }
.test-card p { font-size: 15px; color: var(--muted); }
@media (max-width: 960px) { .test-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .test-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Infrastructure gallery
   ========================================================= */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.gallery-item { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: block; color: var(--ink); }
.gallery-item .ph { height: 200px; overflow: hidden; background: var(--paper); position: relative; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-item:hover img { transform: scale(1.07); }
.gallery-item .ph::after {
  content: "+"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 44px; color: var(--white); background: rgba(138,90,43,.55); opacity: 0; transition: opacity .3s;
}
.gallery-item:hover .ph::after { opacity: 1; }
.gallery-item h3 { font-size: 16px; padding: 14px 16px; font-weight: 400; }
.gallery-item:hover { color: var(--kraft); }
@media (max-width: 960px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .gallery { grid-template-columns: repeat(2, 1fr); } .gallery-item .ph { height: 150px; } }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 1000; background: rgba(20,15,12,.92);
  display: none; align-items: center; justify-content: center; flex-direction: column; padding: 60px 70px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 160px); border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lightbox .img-missing { width: min(600px, 80vw); height: 50vh; }
.lightbox-caption { color: var(--white); font-family: var(--head); font-size: 20px; margin-top: 16px; text-align: center; }
.lightbox-count { color: #b8aca2; font-size: 13px; margin-top: 4px; }
.lb-btn {
  position: absolute; background: rgba(255,255,255,.12); color: var(--white); border: 0; cursor: pointer;
  width: 50px; height: 50px; border-radius: 50%; font-size: 22px; transition: background .2s;
}
.lb-btn:hover { background: var(--accent); }
.lb-close { top: 18px; right: 18px; font-size: 26px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .lightbox { padding: 60px 12px; } .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; } }

/* =========================================================
   Contact page
   ========================================================= */
.contact-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px 26px; border-top: 4px solid var(--accent); }
.card h3 { font-size: 21px; margin: 16px 0 10px; }
.card p { font-size: 15px; overflow-wrap: anywhere; }
.card p + p { margin-top: 10px; }
.info-icon { width: 54px; height: 54px; border-radius: 50%; background: var(--paper); display: flex; align-items: center; justify-content: center; }
.info-icon svg { width: 24px; height: 24px; stroke: var(--kraft); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.map { margin-top: 40px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); line-height: 0; }
.map iframe { width: 100%; height: 420px; border: 0; }
@media (max-width: 1024px) { .contact-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .contact-cards { grid-template-columns: 1fr; } .map iframe { height: 300px; } }

/* =========================================================
   Footer
   ========================================================= */
.footer { background: var(--ink); color: #b8aca2; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr; gap: 40px; padding-top: 60px; padding-bottom: 40px; }
.footer h4 { color: var(--white); font-size: 19px; margin-bottom: 16px; }
.footer a { color: #b8aca2; }
.footer a:hover { color: var(--accent); }
.footer li { margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 20px 0; text-align: center; font-size: 13px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 46px; height: 46px; border: 0; border-radius: 50%;
  background: var(--kraft); color: var(--white); font-size: 18px; cursor: pointer; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transform: translateY(10px); transition: all .3s;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--accent); }

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .slide, .hero .caption h2 { transition: none; }
}

/* ---------- Small screens: tighter spacing & type ---------- */
@media (max-width: 600px) {
  body { font-size: 15px; }
  .section { padding: 55px 0; }
  .section-title { font-size: 30px; }
  .page-banner { padding: 50px 0 42px; }
  .page-banner h1 { font-size: 32px; }
  .welcome h1 { font-size: 28px; }
  .welcome h1 small { font-size: 18px; }
  .stats { gap: 20px; }
  .stat b { font-size: 26px; }
  .highlight-box { padding: 28px 20px; }
  .highlight-box b { font-size: 44px; }
  .reason, .vm-card { padding: 26px 22px; }
  .cta h2 { font-size: 28px; }
  .thumbs a, .thumbs .thumb { height: 150px; }
  .logo img { max-height: 52px; }
  .logo-text { font-size: 20px; }
  .header .container { min-height: 70px; }
  html { scroll-padding-top: 80px; }
}
@media (max-width: 600px) {
  .topbar .container { justify-content: center; }
  .topbar span + span { display: none; }
}
