/* ==========================================================================
   Captalo Pharma Pvt Ltd — Global Stylesheet
   Corporate pharmaceutical theme · Fast · Responsive · SEO-friendly markup
   ========================================================================== */

:root {
  /* Brand palette from official Captalo logo */
  --brand-brown: #A66D5A;
  --brand-brown-dark: #7E4F40;
  --brand-brown-deep: #4A2E26;
  --brand-gold: #D6B470;
  --brand-gold-light: #E8CF9A;
  --brand-gold-deep: #B8944E;
  --brand-ink: #2C2C2C;

  /* Mapped tokens used across the theme */
  --blue-900: #4A2E26;
  --blue-800: #A66D5A;
  --blue-700: #8B5647;
  --blue-500: #C48975;
  --cyan-500: #D6B470;
  --gold-400: #E8CF9A;
  --gold-500: #D6B470;
  --gold-600: #B8944E;
  --brown-900: #2A1810;
  --brown-800: #3E2723;
  --ink: #2C2C2C;
  --ink-soft: #5A4A42;
  --muted: #7A6A62;
  --line: rgba(166, 109, 90, 0.18);
  --surface: #FFFFFF;
  --surface-2: #FBF8F4;
  --surface-3: #F3EBE3;
  --shadow: 0 18px 50px rgba(74, 46, 38, 0.12);
  --shadow-sm: 0 8px 24px rgba(74, 46, 38, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 88px;
  --container: 1180px;
  --font-display: "Sora", sans-serif;
  --font-body: "Figtree", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --focus: 0 0 0 3px rgba(214, 180, 112, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(214, 180, 112, 0.16), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(166, 109, 90, 0.12), transparent 50%),
    linear-gradient(180deg, #FFFCFA 0%, #F7F1EA 45%, #FFFCFA 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--blue-800);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--cyan-500);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  color: var(--blue-900);
}

p {
  margin: 0 0 1em;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--blue-800);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  backdrop-filter: blur(16px);
  background: rgba(247, 250, 254, 0.82);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px rgba(6, 36, 86, 0.06);
}

.header-inner {
  width: min(100% - 2rem, var(--container));
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Brochure lead-gate bar (below header) */
.brochure-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  background: linear-gradient(105deg, var(--brand-brown-deep), var(--brand-brown-dark) 55%, #6B463A);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 20px rgba(74, 46, 38, 0.12);
}

.brochure-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  padding: 0.7rem 0;
}

.brochure-bar-copy {
  display: grid;
  gap: 0.15rem;
  min-width: min(100%, 320px);
}

.brochure-bar-copy strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.brochure-bar-copy span {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.78);
}

.brochure-bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.brochure-bar .btn-outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.brochure-bar .btn-outline:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.brochure-modal[hidden] {
  display: none !important;
}

.brochure-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.brochure-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(42, 24, 16, 0.55);
  backdrop-filter: blur(3px);
}

.brochure-modal-dialog {
  position: relative;
  width: min(440px, 100%);
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem 1.35rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  z-index: 1;
}

.brochure-modal-dialog h2 {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.brochure-modal-dialog > p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.brochure-modal-x {
  position: absolute;
  top: 0.55rem;
  right: 0.7rem;
  border: none;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.brochure-form {
  display: grid;
  gap: 0.85rem;
}

.brochure-form .btn {
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  flex-shrink: 0;
}

.brand:hover {
  color: inherit;
  opacity: 0.92;
}

.brand-logo {
  width: auto;
  height: 64px;
  max-width: min(220px, 42vw);
  object-fit: contain;
  object-position: left center;
}

.brand-logo-footer {
  height: 72px;
  max-width: 240px;
  background: #fff;
  border-radius: 14px;
  padding: 0.45rem 0.65rem;
}

.footer-slogan {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  color: var(--brand-gold);
  margin: 0.85rem 0 0.35rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  padding: 0.55rem 0.85rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-soft);
  border-radius: 999px;
  position: relative;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--blue-800);
  background: rgba(11, 61, 145, 0.06);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--blue-800);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.45rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-brown-dark), var(--brand-brown));
  color: #fff;
  box-shadow: 0 12px 28px rgba(126, 79, 64, 0.32);
}

.btn-primary:hover {
  color: #fff;
  box-shadow: 0 16px 34px rgba(126, 79, 64, 0.4);
}

.btn-gold {
  background: linear-gradient(135deg, var(--brand-gold-light), var(--brand-gold-deep));
  color: var(--brand-brown-deep);
  box-shadow: 0 12px 28px rgba(184, 148, 78, 0.35);
}

.btn-gold:hover {
  color: var(--brown-900);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--blue-800);
  border-color: rgba(11, 61, 145, 0.25);
}

.btn-outline:hover {
  background: rgba(11, 61, 145, 0.06);
  color: var(--blue-800);
}

.btn-sm {
  padding: 0.65rem 1.1rem;
  font-size: 0.85rem;
}

.btn-nav {
  margin-left: 0.4rem;
  padding: 0.7rem 1.15rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* --------------------------------------------------------------------------
   Hero — full-bleed, brand-first
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: end;
  color: #fff;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: heroZoom 18s var(--ease) infinite alternate;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(42, 24, 16, 0.9) 0%, rgba(126, 79, 64, 0.72) 48%, rgba(74, 46, 38, 0.42) 100%),
    linear-gradient(0deg, rgba(42, 24, 16, 0.55) 0%, transparent 45%);
  z-index: 1;
}

.hero-shine {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 280px at 70% 20%, rgba(214, 180, 112, 0.28), transparent 60%),
    radial-gradient(400px 200px at 20% 80%, rgba(166, 109, 90, 0.22), transparent 55%);
  z-index: 2;
  pointer-events: none;
  animation: shimmerPulse 7s ease-in-out infinite;
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(100% - 2.5rem, var(--container));
  margin: 0 auto;
  padding: 4.5rem 0 5rem;
  max-width: 720px;
  margin-left: max(1.25rem, calc((100% - var(--container)) / 2));
}

.hero-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  letter-spacing: -0.045em;
  line-height: 0.95;
  margin: 0 0 0.55rem;
  color: #fff;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  animation: riseIn 0.9s var(--ease) both;
}

.hero-brand span {
  display: inline;
  background: linear-gradient(90deg, #fff 10%, var(--brand-gold-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-slogan {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: var(--brand-gold-light);
  margin: 0 0 1rem;
  animation: riseIn 0.9s 0.08s var(--ease) both;
}

.hero-title {
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 0.85rem;
  max-width: 28ch;
  animation: riseIn 0.9s 0.12s var(--ease) both;
}

.hero-lead {
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 42ch;
  margin-bottom: 1.75rem;
  animation: riseIn 0.9s 0.22s var(--ease) both;
}

.hero .btn-row {
  animation: riseIn 0.9s 0.32s var(--ease) both;
}

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 2rem;
  animation: riseIn 0.9s 0.4s var(--ease) both;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  backdrop-filter: blur(8px);
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-400);
  box-shadow: 0 0 0 0 rgba(245, 197, 66, 0.6);
  animation: pulseDot 2.2s ease-out infinite;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  position: relative;
}

.section-head {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.section-head.center {
  text-align: center;
  margin-inline: auto;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan-500);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  margin-bottom: 0.75rem;
}

.section-lead {
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.section-alt {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(232, 240, 250, 0.85));
}

.section-dark {
  background:
    radial-gradient(800px 400px at 0% 0%, rgba(214, 180, 112, 0.2), transparent 50%),
    radial-gradient(700px 400px at 100% 100%, rgba(166, 109, 90, 0.25), transparent 50%),
    linear-gradient(160deg, var(--brand-brown-deep), var(--brand-brown-dark) 55%, #5C3A30);
  color: rgba(255, 255, 255, 0.88);
}

.section-dark .section-title,
.section-dark h2,
.section-dark h3 {
  color: #fff;
}

.section-dark .section-lead,
.section-dark p {
  color: rgba(255, 255, 255, 0.78);
}

.section-dark .eyebrow {
  color: var(--gold-400);
}

/* Capability strip */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.cap-item {
  padding: 1.5rem 1.35rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, #F7FAFE);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.cap-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.cap-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(11, 61, 145, 0.1), rgba(0, 168, 200, 0.15));
  color: var(--blue-800);
}

.cap-item h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.cap-item p {
  color: var(--muted);
  font-size: 0.98rem;
  margin: 0;
}

/* Split layout */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.split.reverse {
  direction: rtl;
}

.split.reverse > * {
  direction: ltr;
}

.media-frame {
  position: relative;
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.media-frame img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.media-frame:hover img {
  transform: scale(1.04);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(6, 36, 86, 0.35));
  pointer-events: none;
}

.media-accent {
  position: absolute;
  width: 120px;
  height: 120px;
  border: 3px solid var(--gold-500);
  border-radius: 24px;
  z-index: -1;
}

.media-accent.tl {
  top: -16px;
  left: -16px;
}

.media-accent.br {
  bottom: -16px;
  right: -16px;
  border-color: var(--cyan-500);
}

.check-list {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0 2rem;
}

.check-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  color: var(--ink-soft);
}

.check-list li::before {
  content: "";
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 2px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B3D91' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/12px no-repeat,
    linear-gradient(135deg, rgba(245, 197, 66, 0.35), rgba(0, 168, 200, 0.2));
}

/* Products */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.filter-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 0.88rem;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.filter-btn:hover,
.filter-btn.is-active {
  background: var(--blue-800);
  border-color: var(--blue-800);
  color: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
}

.product-grid--compact {
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.product-card--compact {
  border-radius: var(--radius-sm);
}

.product-card--compact .product-visual {
  aspect-ratio: 1 / 1;
  padding: 0.85rem;
  min-height: 0;
}

.product-card--compact .product-visual img {
  max-height: 140px;
}

.product-card--compact .product-body {
  padding: 0.9rem 1rem 1.1rem;
}

.product-card--compact .product-body h3 {
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.product-card--compact .product-comp {
  font-size: 0.86rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-desc {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.35rem 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card--compact .product-actions {
  margin-top: 0.75rem;
}

.sr-anchor {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.product-visual {
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(circle at 30% 20%, rgba(245, 197, 66, 0.18), transparent 45%),
    linear-gradient(180deg, #F7FAFE, #EAF1FA);
  display: grid;
  place-items: center;
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}

.product-visual::before {
  content: "";
  position: absolute;
  width: 160%;
  height: 80px;
  left: -20%;
  top: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: rotate(-18deg) translateX(-120%);
  animation: flashSweep 4.5s ease-in-out infinite;
}

.product-visual img {
  max-height: 180px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(6, 36, 86, 0.15));
  transition: transform 0.4s var(--ease);
}

.product-card:hover .product-visual img {
  transform: scale(1.05) translateY(-4px);
}

.product-body {
  padding: 1.25rem 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-cat {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan-500);
  margin-bottom: 0.35rem;
}

.product-body h3 {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

.product-pack {
  font-weight: 700;
  color: var(--gold-600);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.product-comp {
  color: var(--ink-soft);
  font-size: 0.95rem;
  flex: 1;
}

.product-actions {
  margin-top: 1.1rem;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}

.stat {
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--gold-400);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
}

/* Facility gallery */
.gallery {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.1rem;
}

.gallery-main,
.gallery-side img,
.gallery-main img {
  border-radius: var(--radius);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-main {
  min-height: 380px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.gallery-side {
  display: grid;
  gap: 1.1rem;
}

.gallery-side .media-frame {
  min-height: 180px;
}

/* Quality timeline */
.timeline {
  display: grid;
  gap: 1.25rem;
  counter-reset: step;
}

.timeline-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1rem;
  align-items: start;
}

.timeline-num {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--blue-800);
  background: linear-gradient(135deg, rgba(245, 197, 66, 0.35), rgba(0, 168, 200, 0.2));
  border: 1px solid var(--line);
}

.timeline-body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.timeline-body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.timeline-body p {
  margin: 0;
  color: var(--ink-soft);
}

/* CTA band */
.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 8px);
  padding: clamp(2rem, 5vw, 3.25rem);
  background:
    radial-gradient(500px 200px at 90% 20%, rgba(214, 180, 112, 0.35), transparent 55%),
    linear-gradient(120deg, var(--brand-brown-deep), var(--brand-brown-dark));
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: var(--shadow);
}

.cta-band h2 {
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.4rem;
}

.cta-band p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  max-width: 46ch;
}

/* Forms */
.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  align-items: start;
}

.contact-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: var(--shadow-sm);
}

.contact-panel h3 {
  margin-bottom: 0.5rem;
}

.info-list {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

.info-list li {
  display: grid;
  gap: 0.15rem;
}

.info-list strong {
  font-family: var(--font-display);
  color: var(--blue-800);
  font-size: 0.9rem;
}

.info-list span,
.info-list a {
  color: var(--ink-soft);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-field {
  display: grid;
  gap: 0.4rem;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--blue-900);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid rgba(11, 61, 145, 0.18);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font: inherit;
  color: var(--ink);
  background: #FBFCFE;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--cyan-500);
  box-shadow: var(--focus);
  background: #fff;
}

.form-field textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.5rem 0 0;
}

.form-alert {
  display: none;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-weight: 600;
}

.form-alert.is-visible {
  display: block;
}

.form-alert.success {
  background: rgba(16, 160, 110, 0.12);
  color: #0d6b49;
  border: 1px solid rgba(16, 160, 110, 0.25);
}

.form-alert.error {
  background: rgba(180, 40, 40, 0.1);
  color: #8f1d1d;
  border: 1px solid rgba(180, 40, 40, 0.22);
}

.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* Page hero (inner) */
.page-hero {
  position: relative;
  padding: clamp(3rem, 6vw, 4.5rem) 0;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(600px 280px at 85% 20%, rgba(214, 180, 112, 0.3), transparent 55%),
    linear-gradient(120deg, var(--brand-brown-deep), var(--brand-brown-dark));
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    url("../images/facility/factory-front.png") center/cover no-repeat;
  opacity: 0.18;
  mix-blend-mode: luminosity;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.1rem);
  max-width: 16ch;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.82);
  max-width: 52ch;
  margin: 0;
  font-size: 1.1rem;
}

/* Footer */
.site-footer {
  position: relative;
  margin-top: 2rem;
  background: linear-gradient(180deg, #3A241C, #241611);
  color: rgba(255, 255, 255, 0.78);
  overflow: hidden;
}

.footer-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  right: -80px;
  top: -140px;
  background: radial-gradient(circle, rgba(214, 180, 112, 0.22), transparent 65%);
  pointer-events: none;
}

.footer-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 2rem;
  padding: 3.5rem 0 2.5rem;
}

.footer-brand p {
  margin-top: 1rem;
  max-width: 34ch;
  color: rgba(255, 255, 255, 0.7);
}

.footer-heading {
  font-size: 0.95rem;
  color: var(--gold-400);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.footer-links,
.footer-contact {
  display: grid;
  gap: 0.55rem;
}

.footer-links a,
.footer-contact a {
  color: rgba(255, 255, 255, 0.75);
}

.footer-links a:hover,
.footer-contact a:hover {
  color: var(--gold-400);
}

.footer-contact {
  margin-bottom: 1.25rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 0 1.4rem;
  font-size: 0.88rem;
}

.footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.flash-line {
  height: 3px;
  width: 72px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-400), var(--cyan-500));
  margin: 0.85rem 0 1.25rem;
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */
@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes heroZoom {
  from { transform: scale(1.04); }
  to { transform: scale(1.1); }
}

@keyframes shimmerPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(245, 197, 66, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(245, 197, 66, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 197, 66, 0); }
}

@keyframes flashSweep {
  0%, 55% { transform: rotate(-18deg) translateX(-120%); }
  80%, 100% { transform: rotate(-18deg) translateX(120%); }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .product-grid--compact {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .cap-grid,
  .product-grid,
  .product-grid--compact,
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .split,
  .contact-layout,
  .gallery,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .split.reverse {
    direction: ltr;
  }

  .gallery-main {
    min-height: 280px;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 1rem auto;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }

  .site-nav.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .btn-nav {
    margin-left: 0;
    width: 100%;
  }

  .hero-content {
    margin-left: auto;
    padding-bottom: 3.5rem;
  }
}

@media (max-width: 640px) {
  .cap-grid,
  .product-grid,
  .product-grid--compact,
  .stats,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: calc(92vh - var(--header-h));
  }

  .brand-logo {
    height: 52px;
  }

  .footer-bottom-inner {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
