/* ============================================================
   Arlline — marketing page only (index.html).
   Additive layer over styles.css. home.html and software.html
   do not load this file, so they are unaffected.
   ============================================================ */

/* ---------- nav breathing room for six links ---------- */
@media (min-width: 721px) and (max-width: 1080px) {
  .nav-links { gap: 22px; font-size: 12.5px; }
}

/* ---------- section rhythm ---------- */
#services { background: var(--bg-deep); }

/* Six services read as a menu — alternate the editorial indent
   instead of singling out the second row. */
.svc:nth-child(2) { margin-left: 0; }
.svc:nth-child(even) { margin-left: 7%; }
@media (max-width: 880px) {
  .svc:nth-child(even) { margin-left: 0; }
}

/* ---------- staggered reveals (opt-in via --rvd) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .work-grid .rv:nth-child(n),
  .engines .rv:nth-child(n) {
    transition-delay: var(--rvd, 0s);
  }
}

/* ---------- headline stat band ---------- */
.stat-band {
  margin-top: 84px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
@media (max-width: 880px) {
  .stat-band { grid-template-columns: repeat(2, 1fr); gap: 34px 24px; margin-top: 56px; }
}
.stat { display: flex; flex-direction: column; gap: 8px; }
.stat-num {
  font-family: var(--serif);
  font-size: clamp(32px, 3.6vw, 46px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
.stat-label {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- engines: lead gen + e-commerce ---------- */
.engines-lede { margin: 26px 0 0; }

.engines {
  margin-top: 74px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
@media (max-width: 980px) {
  .engines { grid-template-columns: 1fr; gap: 22px; }
}

.engine {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg);
  padding: 44px 42px 40px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}
.engine::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 1s cubic-bezier(0.22, 0.7, 0.2, 1) 0.15s;
}
.engine.in::before { transform: scaleX(1); }
.engine:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px -34px rgba(29, 25, 21, 0.4);
}
@media (max-width: 720px) {
  .engine { padding: 34px 26px 32px; }
}

.engine-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.engine-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 99px;
  padding: 4px 11px;
  white-space: nowrap;
}
.engine-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.1;
  margin: 0;
}

.engine-lede {
  font-family: var(--serif);
  font-size: clamp(19px, 1.7vw, 22px);
  line-height: 1.45;
  margin: 0 0 20px;
  text-wrap: pretty;
}
.engine-body {
  margin: 0 0 16px;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.engine-list {
  margin: 12px 0 30px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.engine-list li {
  position: relative;
  padding: 13px 0 13px 26px;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
  color: var(--ink-soft);
}
.engine-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 21px;
  width: 9px;
  height: 1px;
  background: var(--accent);
}

.engine-stats {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  padding: 26px 0 22px;
  border-top: 1px solid var(--line);
}
.mini-stat { display: flex; flex-direction: column; gap: 6px; }
.mini-num {
  font-family: var(--serif);
  font-size: clamp(28px, 2.8vw, 36px);
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.mini-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  line-height: 1.5;
}
.engine-sectors {
  margin: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0.8;
  line-height: 1.8;
}

/* ---------- work card visual (replaces image placeholder) ---------- */
.work-grid { grid-template-columns: repeat(2, 1fr); }

.work-viz {
  position: relative;
  aspect-ratio: 16 / 10;
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  overflow: hidden;
  background:
    linear-gradient(to right, var(--line) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(to bottom, var(--line) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--bg-deep);
}
.work-viz::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--bg-deep) 6%, transparent 55%);
  pointer-events: none;
}
.viz-kind {
  position: relative;
  z-index: 1;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.viz-metric {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 62px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.viz-label {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
@media (max-width: 720px) {
  .work-viz { padding: 22px 22px; }
}

/* ---------- sparklines ---------- */
.spark {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 46%;
  display: block;
}
.spark-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.spark-fill {
  fill: var(--accent);
  opacity: 0;
  transition: opacity 1.1s ease 0.45s;
}
@media (prefers-reduced-motion: no-preference) {
  .rv.in .spark-line,
  .cs-inner .spark-line {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.22, 0.7, 0.2, 1) 0.1s;
  }
  .rv.in .spark-fill,
  .cs-inner .spark-fill { opacity: 0.1; }
}
@media (prefers-reduced-motion: reduce) {
  .spark-line { stroke-dashoffset: 0; }
  .spark-fill { opacity: 0.1; transition: none; }
  .engine::before { transform: scaleX(1); }
}
.work-card:hover .spark-fill { opacity: 0.16; }

/* ---------- case study: chart + result stats ---------- */
.cs-viz {
  position: relative;
  height: 226px;
  margin-bottom: 40px;
  padding: 22px 24px 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background:
    linear-gradient(to right, var(--line) 1px, transparent 1px) 0 0 / 60px 52px,
    linear-gradient(to bottom, var(--line) 1px, transparent 1px) 0 0 / 60px 52px,
    var(--bg-deep);
}
.cs-viz .spark { height: 60%; bottom: 36px; }
.cs-viz .viz-kind { position: relative; z-index: 1; }
.cs-viz-axis {
  position: absolute;
  z-index: 1;
  left: 24px;
  right: 24px;
  bottom: 12px;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0.7;
}
@media (max-width: 720px) {
  .cs-viz { height: 168px; padding: 18px 18px 0; }
}

.cs-stats {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px 22px;
}
@media (max-width: 720px) {
  .cs-stats { grid-template-columns: repeat(2, 1fr); }
}
.cs-stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.cs-stat-num {
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.cs-stat-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* Case study prose reads as an article, not a placeholder sheet. */
.cs-inner p { font-size: 16.5px; line-height: 1.72; }

/* ---------- method / playbook band ---------- */
.method {
  background: var(--ink);
  color: var(--bg);
}
.method .eyebrow { color: var(--accent); }
.method .statement { color: var(--bg); }
.method .method-lede {
  color: rgba(247, 243, 236, 0.68);
  margin: 26px 0 0;
}

.method-grid {
  margin-top: 76px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(247, 243, 236, 0.14);
  border: 1px solid rgba(247, 243, 236, 0.14);
  border-radius: 4px;
  overflow: hidden;
}
@media (max-width: 780px) { .method-grid { grid-template-columns: 1fr; } }

.mth {
  background: var(--ink);
  padding: 34px 32px 32px;
  transition: background 0.4s ease;
}
.mth:hover { background: #241f1a; }
.mth-fig {
  display: block;
  font-family: var(--serif);
  font-size: clamp(34px, 3.8vw, 46px);
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-bottom: 20px;
}
.mth h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(20px, 2.1vw, 25px);
  margin: 0 0 12px;
}
.mth p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.65;
  color: rgba(247, 243, 236, 0.64);
  text-wrap: pretty;
}
@media (max-width: 720px) { .mth { padding: 28px 24px; } }

.method-cta {
  display: block;
  margin-top: 34px;
  padding: 30px 34px;
  border: 1px solid rgba(247, 243, 236, 0.22);
  border-radius: 4px;
  text-decoration: none;
  color: var(--bg);
  transition: border-color 0.35s ease, background 0.35s ease, transform 0.35s ease;
}
.method-cta:hover {
  border-color: var(--accent);
  background: rgba(201, 122, 88, 0.09);
  transform: translateY(-3px);
}
.method-cta .mc-label {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.method-cta .mc-title {
  display: block;
  font-family: var(--serif);
  font-size: clamp(23px, 2.8vw, 34px);
  line-height: 1.2;
  margin-bottom: 16px;
}
.method-cta .mc-meta {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(247, 243, 236, 0.5);
  line-height: 1.8;
}
.method-cta .mc-meta b {
  color: var(--accent);
  font-weight: 400;
  white-space: nowrap;
  margin-left: 6px;
}
@media (max-width: 720px) { .method-cta { padding: 24px 22px; } }
