/* v1.2: offerings, product pages and their working demos. Uses the tokens defined in site.css. */
:root { --font-dv: "Noto Serif Devanagari", "Mangal", serif; }

.dv { font-family: var(--font-dv); font-size: 1.75rem; color: var(--zari); line-height: 1.2; font-weight: 500; }

/* ---------- What we build: editorial rows ---------- */
.offers { list-style: none; padding: 0; display: grid; }
.offer {
  position: relative;
  display: grid;
  gap: 14px 48px;
  padding-block: 30px;
  border-top: 1px solid var(--rule-strong);
}
.offer:last-child { border-bottom: 1px solid var(--rule-strong); }
@media (min-width: 760px) { .offer { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); } }
.offer::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: var(--zari);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.6s var(--ease);
}
.offer:hover::after, .offer:focus-within::after { transform: scaleX(1); }
.offer-name { display: grid; gap: 8px; align-content: start; }
.offer-name a {
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1.05;
  color: var(--ink);
  text-decoration: none;
}
.offer-name a:hover { color: var(--water); }
.offer-gloss { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 0.92rem; color: var(--ink-soft); }
.offer-gloss .ml, .offer-gloss .dv { font-size: 1.25rem; }
.offer-body { display: grid; gap: 10px; align-content: start; min-width: 0; }
.offer-line { font-size: var(--step-1); line-height: 1.4; color: var(--ink); }
.offer-body p:not(.offer-line) { color: var(--ink-soft); max-width: 60ch; }
.offer-move { font-size: 0.92rem; }
.offer-move b { font-weight: 600; color: var(--zari-ink); }
.offer-link { justify-self: start; font-weight: 600; }

/* ---------- Product pages ---------- */
.product-name { font-size: clamp(3.6rem, 12vw, 8rem); line-height: 0.95; letter-spacing: -0.02em; }
.tagline { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.25; max-width: 24ch; text-wrap: balance; }

.compare-wrap { overflow-x: auto; }
.compare { width: 100%; border-collapse: collapse; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 16px 20px 16px 0; border-top: 1px solid var(--rule-strong); }
.compare thead th { border-top: 0; padding-top: 0; font-size: 0.95rem; font-weight: 600; }
.compare thead th:last-child { color: var(--zari-ink); }
.compare td:first-child { color: var(--ink-soft); width: 50%; }
.compare td:last-child { color: var(--ink); }
.compare tbody tr:last-child td { border-bottom: 1px solid var(--rule-strong); }
.lead-in { color: var(--ink-soft); max-width: 62ch; }

.demo {
  display: grid;
  gap: 22px;
  padding: clamp(16px, 3vw, 28px);
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 4px;
  min-width: 0;
}
.demo figcaption { font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- Kayal: sheet + workflow ---------- */
.kayal-body { display: grid; gap: 24px; min-width: 0; }
@media (min-width: 700px) {
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
  .flow::before { display: none; }
}
.sheet-wrap { overflow-x: auto; min-width: 0; }
.sheet { width: 100%; border-collapse: collapse; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.sheet th, .sheet td { padding: 8px 10px; border: 1px solid var(--rule); white-space: nowrap; text-align: left; }
.sheet th { font-weight: 600; background: var(--band); }
.sheet .num { text-align: right; }
.sheet .rowh { color: var(--ink-soft); background: var(--band); text-align: center; width: 2.2em; }
.sheet tr.live td { background: var(--paper); }
.sheet tr.live td.rowh { background: var(--zari); color: var(--on-ink); }
.sheet tr.live.enter td { animation: rowin 0.6s var(--ease) both; }
.sheet td.flash { animation: flash 1.1s var(--ease); }
@keyframes rowin { from { opacity: 0; } }
@keyframes flash { 0% { background: var(--zari-soft); } }
.pill { display: inline-block; padding: 0.1em 0.65em; border-radius: 999px; font-size: 0.8rem; font-weight: 600; border: 1px solid var(--rule-strong); color: var(--ink-soft); }
.pill--done { border-color: var(--water); color: var(--water); }
.pill--wait { border-color: var(--zari); color: var(--zari-ink); }

.flow { list-style: none; padding: 0; display: grid; gap: 16px; position: relative; }
.flow::before { content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 2px; background: var(--rule-strong); }
.flow-step { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 12px; position: relative; }
.flow-dot {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border-radius: 50%;
  border: 2px solid var(--rule-strong);
  background: var(--paper-raised);
  position: relative;
  z-index: 1;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.flow-step > div { display: grid; gap: 2px; min-width: 0; }
.flow-step strong { font-weight: 600; transition: color 0.35s var(--ease); }
.flow-step span:not(.flow-dot) { font-size: 0.9rem; color: var(--ink-soft); }
.flow-step.done .flow-dot { background: var(--zari); border-color: var(--zari); }
.flow-step.active .flow-dot { border-color: var(--zari); box-shadow: 0 0 0 5px var(--zari-soft); }
.flow-step.active strong { color: var(--zari-ink); }

/* ---------- Lakshya: goal tree ---------- */
.frame-switch { justify-self: start; display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--rule-strong); border-radius: 999px; }
.frame-switch button {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 0.42em 1em;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.frame-switch button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.goal { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; align-items: center; }
.goal--top { padding-bottom: 20px; border-bottom: 1px solid var(--rule-strong); }
.goal-children { display: grid; gap: 18px; }
@media (min-width: 760px) { .goal-children { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.goal-children .goal { grid-template-columns: 48px minmax(0, 1fr); align-items: start; }
.goal-kind { display: block; font-size: 0.8rem; font-weight: 600; color: var(--zari-ink); transition: opacity 0.25s var(--ease); }
.goal-kind.swap { opacity: 0; }
.goal strong { display: block; font-weight: 600; line-height: 1.35; }
.goal--top strong { font-family: var(--font-display); font-weight: 400; font-size: var(--step-1); }
.goal-owner { font-size: 0.85rem; color: var(--ink-soft); }
.ring-wrap { position: relative; width: 100%; aspect-ratio: 1; max-width: 100%; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.ring circle { fill: none; stroke-width: 4; }
.ring-bg { stroke: var(--rule); }
.ring-fg { stroke: var(--zari); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p)); }
.goals.armed .ring-fg { stroke-dashoffset: 100; }
.goals.armed.in .ring-fg { stroke-dashoffset: calc(100 - var(--p)); transition: stroke-dashoffset 1.6s var(--ease) 0.3s; }
.ring-v { position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.78rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Handloom: carving the part you use ---------- */
.carve { position: relative; }
.carve-body { display: grid; gap: 22px; position: relative; }
@media (min-width: 820px) { .carve-body { grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr); align-items: center; } }
.carve-panel { display: grid; gap: 12px; min-width: 0; align-content: start; }
.carve-title { font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 5px; }
.tile {
  aspect-ratio: 1;
  max-width: 100%;
  border-radius: 2px;
  background: var(--rule);
  outline: 1.5px solid transparent;
  outline-offset: -1.5px;
  transition: opacity 0.5s var(--ease), background-color 0.4s var(--ease), outline-color 0.4s var(--ease);
}
.tile.used { outline-color: var(--zari); }
.tile.picked { background: var(--zari); }
.carve.running .tile:not(.used) { opacity: 0.35; }
.carve-arrow { display: none; }
@media (min-width: 820px) {
  .carve-arrow { display: block; position: relative; height: 2px; background: var(--zari-soft); }
  .carve-arrow::after { content: ""; position: absolute; right: -1px; top: -4px; border-left: 8px solid var(--zari-soft); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
}
.slots { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.slot {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 8px 12px 11px;
  border: 1px dashed var(--rule-strong);
  border-radius: 3px;
  font-size: 0.92rem;
  font-weight: 600;
  color: transparent;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.slot.filled {
  border: 1px solid var(--zari);
  color: var(--ink);
  background:
    linear-gradient(var(--zari), var(--zari)) left calc(100% - 4px) / 100% 2px no-repeat,
    linear-gradient(var(--zari), var(--zari)) left 100% / 100% 1px no-repeat,
    var(--paper);
}
.flyer { position: absolute; border-radius: 2px; background: var(--zari); pointer-events: none; z-index: 3; }

.fit { display: grid; gap: 28px; }
@media (min-width: 700px) { .fit { grid-template-columns: 1fr 1fr; gap: 40px; } }
.fit > div { display: grid; gap: 12px; align-content: start; }
.fit h3 { font-size: var(--step-1); }

.promise { display: grid; gap: 16px; }
.promise p { color: var(--ink-soft); max-width: 62ch; }
.promise p.strong { color: var(--ink); font-size: var(--step-1); line-height: 1.45; }

/* ---------- Explore other offerings ---------- */
.explore a { color: var(--ink); font-weight: 600; text-decoration: none; }
.explore a:hover { color: var(--water); }

@media (prefers-reduced-motion: reduce) {
  .goals.armed .ring-fg { stroke-dashoffset: calc(100 - var(--p)) !important; }
  .offer::after { transition: none; }
}
