/* ==========================================================================
   Laxmi Batteries — Reset, typography and layout primitives
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* keep anchored sections clear of the sticky header */
  scroll-padding-top: calc(var(--header-h) + var(--sp-4));
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--ink-2);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

img { height: auto; }

input,
button,
textarea,
select { font: inherit; color: inherit; }

button { background: none; border: 0; cursor: pointer; }

ul, ol { list-style: none; padding: 0; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }

/* ---- Headings ------------------------------------------------------------ */

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: var(--lh-head);
  font-weight: 700;
  text-wrap: balance;
}

h1 { font-size: var(--fs-3xl); line-height: var(--lh-tight); letter-spacing: -0.01em; }
h2 { font-size: var(--fs-2xl); letter-spacing: -0.005em; }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p { text-wrap: pretty; }

/* ---- Focus --------------------------------------------------------------- */

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100px;
  z-index: 999;
  padding: var(--sp-3) var(--sp-5);
  background: var(--brand);
  color: var(--on-brand);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  font-weight: 600;
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: 0; color: var(--on-brand); }

/* ---- Layout primitives --------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section--tint { background: var(--surface-2); }
.section--ink  { background: var(--ink); color: #C9CDD6; }
.section--ink h2, .section--ink h3 { color: #fff; }

/* Section heading block */
.sec-head {
  max-width: 720px;
  margin: 0 auto var(--sp-7);
  text-align: center;
}
.sec-head--left { margin-inline: 0; text-align: left; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: var(--sp-3);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}
.sec-head:not(.sec-head--left) .eyebrow::after {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}

.sec-head p {
  margin-top: var(--sp-3);
  font-size: var(--fs-md);
  color: var(--muted);
}

/* Auto-fitting card grid used by several sections */
.grid {
  display: grid;
  gap: var(--sp-5);
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

/* ---- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.8125rem 1.5rem;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: var(--fs-base);
  line-height: 1;
  white-space: nowrap;
  border: 2px solid transparent;
  transition: background var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primary { background: var(--brand); color: var(--on-brand); box-shadow: var(--sh-brand); }
.btn--primary:hover { background: var(--brand-dark); color: var(--on-brand); }

.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #000; color: #fff; }

.btn--ghost { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }

.btn--onbrand { background: #fff; color: var(--brand); }
.btn--onbrand:hover { background: var(--ink); color: #fff; }

.btn--outline-light { border-color: rgba(255,255,255,.5); color: #fff; }
.btn--outline-light:hover { background: #fff; color: var(--brand); border-color: #fff; }

.btn--wa { background: #25D366; color: #0B2E17; }
.btn--wa:hover { background: #1EB855; color: #0B2E17; }

.btn--sm { padding: 0.5rem 1rem; font-size: var(--fs-sm); }
.btn--lg { padding: 1rem 2rem; font-size: var(--fs-md); }
.btn--block { width: 100%; }

@media (prefers-reduced-motion: no-preference) {
  .btn:hover  { transform: translateY(-2px); }
  .btn:active { transform: translateY(0); }
}

/* ---- Card ---------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  transition: border-color var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease),
              transform var(--t-base) var(--ease);
}
.card__title { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.card p { font-size: var(--fs-base); color: var(--ink-2); }

@media (prefers-reduced-motion: no-preference) {
  .card--lift:hover {
    transform: translateY(-4px);
    border-color: transparent;
    box-shadow: var(--sh-lg);
  }
}

/* ---- Chips / pills ------------------------------------------------------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 0.3125rem 0.75rem;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-2);
}
.chip--brand { background: var(--brand-tint); border-color: transparent; color: var(--brand-dark); }
.chip--gold  { background: #FEF5E3; border-color: transparent; color: #8A5B04; }

/* ---- Icon tile ----------------------------------------------------------- */

.icon-tile {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: var(--r-md);
  background: var(--brand-tint);
  color: var(--brand);
}
.icon-tile svg { width: 26px; height: 26px; }

/* ---- Utilities ----------------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

/* ---- Scroll reveal (progressively enhanced by reveal.js) -----------------
   Keyed on .reveal-ready, which reveal.js sets on <html> only once it has an
   observer actually watching. If the script is blocked, fails or never loads,
   nothing is ever hidden — content must never depend on JS to be visible. */

@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity var(--t-slow) var(--ease-out),
                transform var(--t-slow) var(--ease-out);
  }
  .reveal-ready .reveal.is-visible { opacity: 1; transform: none; }
}

/* Printing never scrolls, so show everything. */
@media print {
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---- Cross-document view transitions: "feels like one page" -------------- */

@view-transition { navigation: auto; }

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: vt-out 140ms var(--ease) both; }
  ::view-transition-new(root) { animation: vt-in  260ms var(--ease-out) both; }
}

@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in  { from { opacity: 0; transform: translateY(10px); } }

@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;
  }
}
