/* ============================================================
   72 Cloud Tech — proof modules

   Shared by case.html and the home page: the outcome strip, the
   case card, the receipts table, the before/after panes and the
   scope estimator. Everything here is drawn in CSS — no images,
   same as the rest of the site. The argument is that the page is
   the portfolio.
   ============================================================ */

/* ---------- Outcome strip ---------- */

.outcomes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: clamp(36px, 5vw, 60px);
}
.outcome {
  background: var(--paper);
  padding: clamp(22px, 3vw, 34px);
  display: grid;
  gap: 10px;
  align-content: start;
}
.outcome .n {
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-stretch: 96%;
}
.outcome .n sup {
  font-size: 0.3em;
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0.1em;
  vertical-align: super;
  margin-left: 3px;
  color: var(--flare);
}
.outcome .n em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--flare);
}
.outcome .l {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.outcome .was {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.outcome .was b { font-weight: 400; text-decoration: line-through; opacity: 0.62; }

/* ---------- Case card (index teaser) ---------- */

.case-card {
  position: relative;
  display: grid;
  gap: clamp(22px, 3vw, 34px);
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: clamp(24px, 4vw, 48px);
  overflow: hidden;
  transform-style: preserve-3d;
}
.section--tint .case-card { background: var(--paper-2); }

.case-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 44px);
  align-items: end;
}
@media (max-width: 820px) { .case-card-top { grid-template-columns: 1fr; align-items: start; } }

.case-k {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--flare);
  margin-bottom: 16px;
}
.case-card h3 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
  font-weight: 700;
  font-stretch: 96%;
}
.case-card h3 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--flare); }
.case-card > .case-card-top p { color: var(--ink-soft); max-width: 44ch; }

.case-card .outcomes { margin-top: 0; }
.case-card .outcome { background: transparent; padding: clamp(16px, 2.2vw, 24px); }

.case-go {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.case-go .arrow { transition: transform .22s ease; }
.case-card:hover .case-go { color: var(--flare); }
.case-card:hover .case-go .arrow { transform: translateX(6px); }

/* ---------- Two-column narrative ---------- */

.narrative {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
@media (max-width: 900px) { .narrative { grid-template-columns: 1fr; } }

.narrative p + p { margin-top: 1.1em; }
.narrative p { max-width: 58ch; }
.narrative .drop::first-letter {
  font-family: var(--serif);
  font-style: italic;
  font-size: 3.6em;
  line-height: 0.8;
  float: left;
  padding: 6px 10px 0 0;
  color: var(--flare);
}

.pullquote {
  border-left: 2px solid var(--flare);
  padding-left: 20px;
  margin: 30px 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  max-width: 34ch;
}

.aside-card {
  border: 1px solid var(--line);
  padding: clamp(20px, 2.6vw, 30px);
  display: grid;
  gap: 16px;
  align-content: start;
  position: sticky;
  top: 100px;
}
@media (max-width: 900px) { .aside-card { position: static; } }
.aside-card h3 {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--flare);
}
.aside-card dl { display: grid; gap: 14px; }
.aside-card dt {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 3px;
}
.aside-card dd { font-size: 0.95rem; line-height: 1.4; }

/* ---------- Receipts ---------- */

.receipts { border-top: 1px solid var(--ink); }

.receipt-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 92px minmax(0, 2fr) 92px 96px;
  gap: clamp(12px, 2vw, 26px);
  align-items: center;
  padding: clamp(16px, 2.2vw, 24px) clamp(4px, 1vw, 14px);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 820px) {
  .receipt-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 14px;
    padding-block: 18px;
  }
  .receipt-row .r-track { grid-column: 1 / -1; order: 3; }
  .receipt-row .r-delta { order: 4; grid-column: 1 / -1; text-align: left; }
}

.receipt-row .r-name {
  font-size: 1rem;
  letter-spacing: -0.015em;
  font-weight: 600;
}
.receipt-row .r-name small {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 5px;
}

.receipt-row .r-before,
.receipt-row .r-after {
  font-family: var(--mono);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.receipt-row .r-before { color: var(--ink-soft); text-align: right; }
.receipt-row .r-after { text-align: right; font-weight: 700; }

/* Two bars on one axis: what it was, and what it is now. */
.r-track {
  position: relative;
  height: 26px;
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
}
.r-track i {
  display: block;
  height: 6px;
  width: 0;
  transition: width 1.1s cubic-bezier(.16, 1, .3, 1);
}
.r-track .b-was { background: var(--series-2); }
.r-track .b-now { background: var(--flare); }
.reveal.in .r-track .b-was { width: var(--was, 50%); }
.reveal.in .r-track .b-now { width: var(--now, 50%); }

.receipt-row .r-delta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: right;
  color: var(--ok);
}
.receipt-row .r-delta.is-flat { color: var(--ink-soft); }

.receipt-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.receipt-legend i {
  display: inline-block;
  width: 14px;
  height: 4px;
  margin-right: 8px;
  vertical-align: 3px;
}

/* ---------- Before / after panes ---------- */

/* The old site: a stock theme with a hero image slot and too much nav. */
.old {
  height: 100%;
  background: #fbfbfc;
  color: #333;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  font-family: Arial, Helvetica, sans-serif;
}
.old-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px clamp(14px, 2vw, 22px);
  border-bottom: 1px solid #e3e3e8;
  background: #fff;
}
.old-nav b { font-size: 0.9rem; color: #1b4f8a; margin-right: auto; }
.old-nav span { font-size: 0.62rem; color: #5a5a63; }
.old-hero {
  background: repeating-linear-gradient(45deg, #dfe3ea, #dfe3ea 8px, #d6dae2 8px, #d6dae2 16px);
  padding: clamp(18px, 3vw, 34px);
  text-align: center;
  display: grid;
  gap: 8px;
  place-items: center;
}
.old-hero h4 { font-size: clamp(0.9rem, 1.8vw, 1.3rem); color: #2c2c33; font-weight: 700; }
.old-hero p { font-size: 0.68rem; color: #5a5a63; }
.old-hero u {
  text-decoration: none;
  background: #1b4f8a;
  color: #fff;
  font-size: 0.6rem;
  padding: 7px 16px;
  border-radius: 3px;
  margin-top: 4px;
}
.old-body { padding: clamp(12px, 2vw, 20px); display: grid; gap: 10px; align-content: start; }
.old-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.old-card { border: 1px solid #e3e3e8; padding: 10px; display: grid; gap: 6px; }
.old-card em { display: block; height: 28px; background: #edeef2; }
.old-card i { display: block; height: 4px; background: #e6e7ec; }
.old-card i:last-child { width: 62%; }
.old-foot {
  border-top: 1px solid #e3e3e8;
  padding: 10px clamp(14px, 2vw, 22px);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.58rem;
  color: #7a7a83;
  background: #f4f4f7;
}

/* The build: the same content, given a spine. */
.new {
  height: 100%;
  background: var(--paper);
  color: var(--ink);
  padding: clamp(16px, 2.4vw, 30px);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: clamp(12px, 2vw, 20px);
}
.new-nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.new-nav b { font-size: 0.9rem; letter-spacing: -0.03em; }
.new-nav span {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.new-hero h4 {
  font-size: clamp(1.1rem, 2.6vw, 2rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 700;
  font-stretch: 96%;
  max-width: 16ch;
}
.new-hero h4 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--flare); }
.new-hero p { font-size: 0.72rem; color: var(--ink-soft); margin-top: 8px; max-width: 34ch; }
.new-rows { display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.new-row {
  background: var(--paper);
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 16px;
  gap: 10px;
  align-items: baseline;
  padding: 9px 4px;
  font-size: 0.72rem;
}
.new-row span { font-family: var(--mono); font-size: 8.5px; color: var(--ink-soft); letter-spacing: 0.12em; }
.new-row u { text-decoration: none; color: var(--flare); text-align: right; }
.new-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

/* ---------- Testimonial ---------- */

.quote-slab {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(48px, 8vw, 104px) 0;
}
.quote-slab blockquote {
  font-size: clamp(1.6rem, 4.2vw, 3.1rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 700;
  font-stretch: 96%;
  max-width: 20ch;
  text-wrap: balance;
}
.quote-slab blockquote em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--flare);
}
.quote-cite {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: clamp(28px, 4vw, 44px);
  border-top: 1px solid var(--on-ink-line);
  padding-top: 22px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-ink-45);
}
.quote-cite b { color: var(--paper); font-weight: 400; }
.quote-cite .dot { width: 4px; height: 4px; background: var(--flare); border-radius: 50%; }

/* ---------- Shipped list ---------- */

.shipped {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.shipped-cell { background: var(--paper); padding: clamp(20px, 2.6vw, 30px); }
.section--tint .shipped-cell { background: var(--paper-2); }
.shipped-cell .k {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--flare);
  margin-bottom: 14px;
}
.shipped-cell ul { list-style: none; display: grid; gap: 8px; }
.shipped-cell li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 8px;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--ink-soft);
}
.shipped-cell li::before { content: "✓"; color: var(--flare); }

/* ---------- Timeline ---------- */

.timeline { border-top: 1px solid var(--line); }
.tl-row {
  display: grid;
  grid-template-columns: 110px 150px minmax(0, 1fr);
  gap: clamp(14px, 3vw, 34px);
  align-items: baseline;
  padding: clamp(18px, 2.4vw, 26px) clamp(4px, 1vw, 14px);
  border-bottom: 1px solid var(--line);
  transition: background .2s ease, padding-left .2s ease;
}
.tl-row:hover { background: var(--paper-2); padding-left: clamp(12px, 2vw, 26px); }
@media (max-width: 760px) {
  .tl-row { grid-template-columns: 1fr; gap: 6px; }
}
.tl-row .wk {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--flare);
}
.tl-row h3 { font-size: 1.12rem; letter-spacing: -0.025em; font-weight: 600; }
.tl-row p { color: var(--ink-soft); font-size: 0.95rem; }

.quote-cite a { border-bottom: 1px solid var(--flare); padding-bottom: 2px; color: var(--paper); }
.quote-cite a:hover { color: var(--flare); }

/* ============================================================
   Scope estimator

   Runs the same arithmetic we use writing a scope, in the open.
   Two columns: the controls, and a spec sheet that rewrites
   itself as they move.
   ============================================================ */

.est {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--ink);
}
@media (max-width: 900px) { .est { grid-template-columns: 1fr; } }

.est-controls {
  background: var(--paper);
  padding: clamp(22px, 3vw, 40px);
  display: grid;
  gap: clamp(26px, 3vw, 38px);
  align-content: start;
}
.section--tint .est-controls { background: var(--paper-2); }

.est-group { border: 0; display: grid; gap: 14px; }
.est-group legend {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--flare);
  padding: 0;
  margin-bottom: 2px;
}

.est-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.est-opts--row { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
@media (max-width: 560px) { .est-opts { grid-template-columns: 1fr; } }

.est-opt {
  background: var(--paper);
  border: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  padding: 14px 16px;
  cursor: pointer;
  display: grid;
  gap: 5px;
  transition: background .16s ease, color .16s ease;
}
.section--tint .est-opt { background: var(--paper-2); }
.est-opt small {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.est-opt:hover { background: var(--paper-2); }
.section--tint .est-opt:hover { background: var(--paper); }
.est-opt.on { background: var(--ink); color: var(--paper); }
.est-opt.on small { color: var(--flare); }
.est-opt:focus-visible { outline: 2px solid var(--flare); outline-offset: -2px; }

.est-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.est-chip {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  padding: 9px 13px;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.est-chip:hover { border-color: var(--ink); color: var(--ink); }
.est-chip.on { background: var(--flare); border-color: var(--flare); color: var(--on-flare); }
.est-chip:focus-visible { outline: 2px solid var(--flare); outline-offset: 2px; }

/* ---------- The spec sheet ---------- */

.est-out {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(22px, 3vw, 34px);
  display: grid;
  gap: 24px;
  align-content: start;
  position: sticky;
  top: 92px;
}
@media (max-width: 900px) { .est-out { position: static; } }

.est-k {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--on-ink-45);
  margin-bottom: 12px;
}

.est-range {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-stretch: 96%;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.est-range i { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--flare); }

.est-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-ink-70);
  margin-top: 12px;
  border-top: 1px solid var(--on-ink-line);
  padding-top: 12px;
}
.est-meta b { color: var(--flare); font-weight: 400; }

.est-scope ul { list-style: none; display: grid; gap: 7px; }
.est-scope li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 8px;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--on-ink-70);
  animation: estIn .32s cubic-bezier(.16, 1, .3, 1) both;
}
.est-scope li::before { content: "→"; color: var(--flare); }
@keyframes estIn { from { opacity: 0; transform: translateX(-5px); } }

.est-out .btn { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.est-out .btn:hover { background: var(--flare); border-color: var(--flare); color: var(--on-flare); }

.est-note {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  line-height: 1.7;
  color: var(--on-ink-45);
  border-top: 1px solid var(--on-ink-line);
  padding-top: 14px;
}
