/* ============================================================
   Infyze Technologies — App & Website Cost Calculator
   Loaded alongside styles.css; reuses the brand tokens.
   ============================================================ */

/* ---------- hero ---------- */
.calc-hero {
  position: relative; overflow: hidden;
  padding: clamp(2rem, 4vw, 3.25rem) 0 clamp(2rem, 4vw, 3rem);
  background: linear-gradient(180deg, var(--orange-soft), #fff 85%);
}
.calc-hero .breadcrumb { margin-bottom: 1.5rem; }
.calc-hero-inner { position: relative; z-index: 1; max-width: 680px; }
.calc-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.25rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: 1rem; }
.calc-hero .lede { font-size: clamp(1.05rem, 1.5vw, 1.18rem); color: var(--ink-2); max-width: 54ch; margin: 0; }

/* ---------- layout: form + sticky estimate ---------- */
.calc-body { padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem); }
.calc-grid { display: grid; grid-template-columns: 1.55fr .95fr; gap: clamp(1.75rem, 4vw, 3rem); align-items: start; }

/* question blocks */
.calc-step { margin-bottom: 2.5rem; }
.calc-step:last-child { margin-bottom: 0; }
.calc-step-head { display: flex; align-items: baseline; gap: .7rem; margin-bottom: 1.1rem; }
.calc-step-num {
  flex-shrink: 0; font-family: var(--font-display); font-weight: 700; font-size: .82rem;
  color: var(--orange-deep); background: var(--orange-soft); width: 26px; height: 26px;
  border-radius: 8px; display: grid; place-items: center; letter-spacing: 0;
}
.calc-step-head h2 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
.calc-step-head .opt { font-size: .82rem; color: var(--ink-3); font-weight: 400; font-family: var(--font-body); }

/* option cards (radio) */
.opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .85rem; }
.opt-card { position: relative; cursor: pointer; }
.opt-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.opt-card .opt-inner {
  height: 100%; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  padding: 1.1rem 1.15rem; display: flex; flex-direction: column; gap: .3rem;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.opt-card .opt-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--bg-3); color: var(--ink-2); margin-bottom: .55rem; transition: background .18s var(--ease), color .18s var(--ease); }
.opt-card .opt-ico svg { width: 19px; height: 19px; }
.opt-card strong { font-family: var(--font-display); font-size: 1rem; color: var(--ink); font-weight: 600; }
.opt-card span.opt-desc { font-size: .82rem; color: var(--ink-3); line-height: 1.4; }
.opt-card:hover .opt-inner { border-color: var(--gray-400); }
.opt-card input:checked + .opt-inner { border-color: var(--orange); background: var(--orange-soft); box-shadow: 0 0 0 3px rgba(242,106,17,.12); }
.opt-card input:checked + .opt-inner .opt-ico { background: var(--orange); color: #fff; }
.opt-card input:focus-visible + .opt-inner { outline: 3px solid var(--orange); outline-offset: 2px; }

/* feature chips (checkboxes) */
.chip-grid { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip-opt { position: relative; cursor: pointer; }
.chip-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.chip-opt .chip-inner {
  display: inline-flex; align-items: center; gap: .5rem; border: 1.5px solid var(--line);
  border-radius: 999px; background: #fff; padding: .6rem 1.05rem; font-size: .95rem; font-weight: 500; color: var(--ink-2);
  transition: border-color .18s var(--ease), background .18s var(--ease), color .18s var(--ease);
}
.chip-opt .chip-check { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--gray-400); display: grid; place-items: center; flex-shrink: 0; transition: background .18s var(--ease), border-color .18s var(--ease); }
.chip-opt .chip-check svg { width: 11px; height: 11px; color: #fff; opacity: 0; transition: opacity .15s var(--ease); }
.chip-opt:hover .chip-inner { border-color: var(--gray-400); }
.chip-opt input:checked + .chip-inner { border-color: var(--orange); background: var(--orange-soft); color: var(--ink); }
.chip-opt input:checked + .chip-inner .chip-check { background: var(--orange); border-color: var(--orange); }
.chip-opt input:checked + .chip-inner .chip-check svg { opacity: 1; }
.chip-opt input:focus-visible + .chip-inner { outline: 3px solid var(--orange); outline-offset: 2px; }

/* segmented control (design, timeline, platforms) */
.seg { display: inline-flex; flex-wrap: wrap; gap: .3rem; background: var(--bg-3); border: 1px solid var(--line); padding: .3rem; border-radius: 14px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.seg .seg-inner { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1rem; border-radius: 10px; font-size: .92rem; font-weight: 600; color: var(--ink-3); transition: background .18s var(--ease), color .18s var(--ease); }
.seg input:checked + .seg-inner { background: var(--ink); color: #fff; }
.seg input:focus-visible + .seg-inner { outline: 3px solid var(--orange); outline-offset: 2px; }
.platforms-wrap[hidden] { display: none; }

/* ---------- sticky estimate panel ---------- */
.estimate {
  position: sticky; top: 96px; background: var(--charcoal); color: #fff;
  border-radius: var(--radius-lg); padding: clamp(1.5rem, 3vw, 2rem); overflow: hidden;
}
.estimate::before {
  content: ""; position: absolute; top: -30%; right: -12%; width: 60%; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(242,106,17,.3), transparent 70%); pointer-events: none;
}
.estimate-inner { position: relative; z-index: 1; }
.estimate .eyebrow { color: #ffb27a; }
.estimate .eyebrow-mark { background: var(--orange); }
.est-amount {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; color: #fff;
  font-size: clamp(1.85rem, 3vw, 2.4rem); margin: .35rem 0 .2rem;
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .4rem; row-gap: .1rem;
}
.est-amount .dash { color: var(--orange); font-weight: 600; font-size: .8em; }
.est-sub { color: rgba(255,255,255,.62); font-size: .9rem; margin: 0 0 1.4rem; }
.est-lines { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.1rem; margin-bottom: 1.3rem; display: flex; flex-direction: column; gap: .55rem; }
.est-line { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; }
.est-line span:first-child { color: rgba(255,255,255,.68); }
.est-line span:last-child { color: #fff; font-weight: 500; text-align: right; }
.est-timeline { display: flex; align-items: center; gap: .6rem; background: rgba(255,255,255,.06); border-radius: 12px; padding: .8rem 1rem; margin-bottom: 1.3rem; }
.est-timeline svg { width: 20px; height: 20px; color: var(--orange); flex-shrink: 0; }
.est-timeline strong { color: #fff; font-family: var(--font-display); }
.est-timeline small { display: block; color: rgba(255,255,255,.6); font-size: .8rem; }
.est-cta { width: 100%; justify-content: center; }
.est-note { font-size: .78rem; color: rgba(255,255,255,.5); margin: 1rem 0 0; line-height: 1.5; }

/* currency toggle */
.cur-toggle { display: inline-flex; gap: .2rem; background: rgba(255,255,255,.1); border-radius: 999px; padding: .25rem; margin-bottom: 1.1rem; }
.cur-toggle button { border: 0; background: transparent; color: rgba(255,255,255,.7); font: inherit; font-size: .82rem; font-weight: 600; padding: .35rem .8rem; border-radius: 999px; transition: background .18s var(--ease), color .18s var(--ease); }
.cur-toggle button[aria-pressed="true"] { background: #fff; color: var(--ink); }

/* ---------- lead capture ---------- */
.calc-lead { padding: 0 0 clamp(3rem, 6vw, 5rem); }
.calc-lead-card { position: relative; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.75rem, 4vw, 3rem); }
.calc-lead-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: center; }
.calc-lead h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1rem; }
.calc-lead .lead-copy p { color: var(--ink-2); margin: 0 0 1.5rem; font-size: 1.02rem; max-width: 42ch; }
.calc-lead .lead-points { display: flex; flex-direction: column; gap: .7rem; }
.calc-lead .lead-points li { color: var(--ink-2); position: relative; padding-left: 1.7rem; font-size: .96rem; }
.calc-lead .lead-points li::before { content: ""; position: absolute; left: 0; top: .5em; width: 12px; height: 7px; border-left: 2px solid var(--orange); border-bottom: 2px solid var(--orange); transform: rotate(-45deg); }
.calc-lead .lead-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2rem); }
.calc-lead .lead-form h3 { font-size: 1.3rem; margin-bottom: 1.25rem; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .calc-grid { grid-template-columns: 1fr; }
  .estimate { position: static; margin-top: 1rem; }
  .calc-lead-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .opt-grid { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .est-amount, .opt-card .opt-inner, .chip-opt .chip-inner { transition: none; }
}
