/* ============================================================
   Techify Boost — Mühendislik / veri görselleştirme bileşenleri
   Saf CSS + hafif JS ile chart, gauge, funnel, canlı akış.
   Tüm renkler Shopify yeşili token'larına bağlı.
   ============================================================ */

/* ---- bölüm başlığı sol hizalı varyant ---- */
.eng-head { max-width: 720px; margin: 0 auto 36px; text-align: center; }
.eng-head .eyebrow { color: var(--violet); }
[data-theme="dark"] .eng-head .eyebrow { color: var(--green); }
.eng-head h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px,3.6vw,40px); color: var(--headline); letter-spacing: -0.5px; margin-top: 8px; }
.eng-head p { color: var(--dim); font-size: 16px; margin-top: 14px; line-height: 1.7; }

/* ---- panel kabı ---- */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 14px 40px rgba(0, 128, 96, 0.06);
}
.panel-title { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--headline); margin-bottom: 4px; }
.panel-title .lucide { width: 18px; height: 18px; color: var(--violet); }
[data-theme="dark"] .panel-title .lucide { color: var(--green); }
.panel-sub { font-size: 12.5px; color: var(--mute); margin-bottom: 20px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 920px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ============================================================
   GAUGE (radial / conic) — Core Web Vitals
   ============================================================ */
.gauge-row { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 22px; }
.gauge { text-align: center; }
.gauge .ring {
  --val: 0;
  --col: var(--violet);
  width: 130px; height: 130px; border-radius: 50%;
  display: grid; place-items: center;
  background:
    radial-gradient(closest-side, var(--card) 76%, transparent 77% 100%),
    conic-gradient(var(--col) calc(var(--val) * 1%), var(--bg-3) 0);
  margin: 0 auto 12px;
  position: relative;
  transition: --val 1.4s ease;
}
.gauge .ring .num { font-family: var(--font-display); font-weight: 700; font-size: 26px; color: var(--headline); }
.gauge .ring .unit { font-size: 11px; color: var(--mute); display: block; margin-top: -2px; }
.gauge .glabel { font-size: 13px; color: var(--dim); font-weight: 600; }
.gauge .gnote { font-size: 11px; color: var(--mute); margin-top: 2px; }

/* ============================================================
   BAR CHART — önce / sonra karşılaştırma
   ============================================================ */
.bars { display: flex; flex-direction: column; gap: 18px; margin-top: 6px; }
.bar-item .bar-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 7px; }
.bar-item .bar-top b { color: var(--headline); font-weight: 600; }
.bar-item .bar-top span { color: var(--violet); font-weight: 700; font-family: var(--font-display); }
[data-theme="dark"] .bar-item .bar-top span { color: var(--green); }
.bar-track { height: 12px; background: var(--bg-3); border-radius: 8px; overflow: hidden; display: flex; }
.bar-track .fill { height: 100%; border-radius: 8px; width: 0; transition: width 1.3s cubic-bezier(.22,1,.36,1); }
.bar-track .fill.before { background: repeating-linear-gradient(45deg, var(--mute) 0 6px, transparent 6px 12px); opacity: 0.5; }
.bar-track .fill.after { background: linear-gradient(90deg, var(--violet), var(--green-2)); }
.bar-legend { display: flex; gap: 18px; margin-top: 14px; font-size: 12px; color: var(--mute); }
.bar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bar-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.bar-legend .lb { background: var(--mute); opacity: 0.5; }
.bar-legend .la { background: var(--violet); }

/* ============================================================
   AREA / LINE CHART (SVG)
   ============================================================ */
.area-chart { width: 100%; height: 200px; display: block; overflow: visible; }
.area-chart .grid-line { stroke: var(--line-soft); stroke-width: 1; }
.area-chart .area-fill { fill: url(#areaGrad); opacity: 0.9; }
.area-chart .area-stroke { fill: none; stroke: var(--violet); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
[data-theme="dark"] .area-chart .area-stroke { stroke: var(--green); }
.area-chart .dot { fill: var(--card); stroke: var(--violet); stroke-width: 2.5; }
[data-theme="dark"] .area-chart .dot { stroke: var(--green); }
.area-chart .xlabel { fill: var(--mute); font-size: 10px; }
.area-dash { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 14px; }
.area-kpi .v { font-family: var(--font-display); font-weight: 700; font-size: 30px; color: var(--headline); }
.area-kpi .l { font-size: 12px; color: var(--mute); }
.area-trend { font-size: 13px; font-weight: 700; color: #16a34a; display: inline-flex; align-items: center; gap: 5px; }
.area-trend .lucide { width: 16px; height: 16px; }

/* ============================================================
   FUNNEL
   ============================================================ */
.funnel { display: flex; flex-direction: column; gap: 8px; }
.funnel-row { display: grid; grid-template-columns: 150px 1fr 70px; align-items: center; gap: 14px; }
.funnel-row .fl { font-size: 13px; color: var(--dim); font-weight: 500; }
.funnel-bar-wrap { background: var(--bg-3); border-radius: 8px; overflow: hidden; }
.funnel-bar {
  height: 38px; border-radius: 8px;
  background: linear-gradient(90deg, var(--violet), var(--green-2));
  width: 0; transition: width 1.2s cubic-bezier(.22,1,.36,1);
  display: flex; align-items: center; padding-left: 14px;
  color: #fff; font-weight: 700; font-size: 13px; font-family: var(--font-display);
  white-space: nowrap;
}
.funnel-row .fv { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--violet); text-align: right; }
[data-theme="dark"] .funnel-row .fv { color: var(--green); }
@media (max-width: 600px) { .funnel-row { grid-template-columns: 92px 1fr 50px; gap: 8px; } .funnel-bar { font-size: 11px; } }

/* ============================================================
   LIVE DATA FEED (ticker)
   ============================================================ */
.feed { display: flex; flex-direction: column; gap: 0; max-height: 320px; overflow: hidden; }
.feed-row {
  display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 12px;
  padding: 12px 4px; border-bottom: 1px solid var(--line-soft);
  animation: feedIn 0.5s ease;
}
@keyframes feedIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.feed-dot { width: 9px; height: 9px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,0.16); }
.feed-dot.blue { background: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.16); }
.feed-dot.amber { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,0.16); }
.feed-text { font-size: 13px; color: var(--text); }
.feed-text b { color: var(--headline); font-weight: 600; }
.feed-time { font-size: 11px; color: var(--mute); font-variant-numeric: tabular-nums; }
.feed-live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: #16a34a; }
.feed-live .pulse { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,0.5); } 70% { box-shadow: 0 0 0 8px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }

/* ============================================================
   KPI COUNTERS
   ============================================================ */
.kpi-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px; text-align: center;
}
.kpi .ic-box {
  width: 42px; height: 42px; border-radius: 11px; margin: 0 auto 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(0,128,96,0.14), rgba(94,142,62,0.14));
  color: var(--violet);
}
[data-theme="dark"] .kpi .ic-box { color: var(--green); }
.kpi .ic-box .lucide { width: 22px; height: 22px; }
.kpi .v { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px,3.4vw,40px); color: var(--headline); line-height: 1; }
.kpi .v .suf { color: var(--violet); }
[data-theme="dark"] .kpi .v .suf { color: var(--green); }
.kpi .l { font-size: 13px; color: var(--mute); margin-top: 8px; }
@media (max-width: 760px) { .kpi-band { grid-template-columns: 1fr 1fr; } }

/* ============================================================
   ARCHITECTURE / STACK DIAGRAM
   ============================================================ */
.arch { display: flex; flex-direction: column; gap: 14px; }
.arch-layer {
  border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px;
  background: var(--card-2);
  position: relative;
}
.arch-layer .al-head { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--headline); margin-bottom: 12px; }
.arch-layer .al-head .lucide { width: 17px; height: 17px; color: var(--violet); }
[data-theme="dark"] .arch-layer .al-head .lucide { color: var(--green); }
.arch-layer .al-head .tag { margin-left: auto; font-size: 10.5px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--mute); background: var(--bg-3); padding: 3px 9px; border-radius: 20px; }
.arch-nodes { display: flex; flex-wrap: wrap; gap: 8px; }
.arch-node {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 9px; padding: 8px 12px; font-size: 12.5px; color: var(--text); font-weight: 500;
}
.arch-node img { width: 16px; height: 16px; }
.arch-node .lucide { width: 15px; height: 15px; color: var(--violet); }
[data-theme="dark"] .arch-node .lucide { color: var(--green); }
.arch-flow { text-align: center; color: var(--mute); margin: -6px 0; }
.arch-flow .lucide { width: 18px; height: 18px; }

/* ============================================================
   CHECKLIST / SPEC
   ============================================================ */
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; }
.spec-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; color: var(--text); }
.spec-item .lucide { width: 18px; height: 18px; color: #16a34a; flex-shrink: 0; margin-top: 1px; }
.spec-item .sv { margin-left: auto; font-size: 12px; color: var(--mute); font-weight: 600; white-space: nowrap; }
@media (max-width: 700px) { .spec-grid { grid-template-columns: 1fr; } }

/* ============================================================
   TECH PILL ROW
   ============================================================ */
.pill-row { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 30px; padding: 9px 16px; font-size: 13px; font-weight: 500; color: var(--text);
}
.pill img { width: 18px; height: 18px; }
.pill .lucide { width: 16px; height: 16px; color: var(--violet); }
[data-theme="dark"] .pill .lucide { color: var(--green); }

/* full-width section tint */
.sec-tint { background: var(--bg-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
