/* Medkiro — content sections */

/* Segmented control (iOS) */
.segmented {
  display: inline-flex; position: relative; padding: 3px; border-radius: 12px;
  background: var(--fill); gap: 0;
}
.segmented button {
  position: relative; z-index: 1; border: 0; background: none; cursor: pointer;
  height: 34px; padding: 0 18px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--text-2);
  transition: color 0.25s;
}
.segmented button.on { color: var(--text); }
.segmented .thumb {
  position: absolute; top: 3px; bottom: 3px; left: 3px; border-radius: 9px;
  background: var(--bg-elev); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  transition: transform 0.4s var(--ease), width 0.4s var(--ease);
}
.center { display: flex; justify-content: center; }

/* 1. Leaky patient journey */
.leaks { margin-top: 34px; }
.leak-track { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; position: relative; }
.leak-track::before {
  content: ""; position: absolute; top: 37px; left: 8%; right: 8%; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  opacity: 0.35;
}
.leak-step { position: relative; text-align: center; }
.leak-step .app-icon { margin: 11px auto 0; position: relative; z-index: 1; }
.leak-step h4 { margin-top: 14px; font-size: 15px; }
.leak-drop {
  margin: 18px auto 0; max-width: 170px; padding: 12px 12px 14px; border-radius: 16px;
  background: rgba(255, 59, 48, 0.08); color: var(--red);
  font-size: 13.5px; line-height: 1.35; font-weight: 500; position: relative;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
}
.leak-drop::before {
  content: ""; position: absolute; top: -12px; left: 50%; width: 10px; height: 14px; margin-left: -5px;
  background: currentColor; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: drip 2.4s ease-in infinite; opacity: 0.8;
}
.leak-step:nth-child(2n) .leak-drop::before { animation-delay: 0.6s; }
.leak-step:nth-child(3n) .leak-drop::before { animation-delay: 1.2s; }
@keyframes drip { 0% { transform: translateY(-14px) scale(0.4); opacity: 0; } 30% { opacity: 0.9; } 100% { transform: translateY(6px) scale(1); opacity: 0; } }
.leak-drop .fix { display: none; }
.leaks.fixed .leak-drop { background: rgba(52, 199, 89, 0.12); color: #1f9d48; }
.leaks.fixed .leak-drop::before { animation: none; opacity: 0; }
.leaks.fixed .leak-drop .problem { display: none; }
.leaks.fixed .leak-drop .fix { display: block; animation: pop 0.5s var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(0.9); } }
@media (prefers-color-scheme: dark) { .leaks.fixed .leak-drop { color: var(--green); } }
.leak-summary { text-align: center; margin-top: 40px; font-size: 19px; color: var(--text-2); }
.leak-summary strong { color: var(--text); }
@media (max-width: 900px) {
  .leak-track { grid-template-columns: 1fr; gap: 10px; }
  .leak-track::before { top: 20px; bottom: 20px; left: 37px; right: auto; width: 4px; height: auto; background: linear-gradient(180deg, var(--blue), var(--teal)); }
  .leak-step { display: grid; grid-template-columns: 74px 1fr; align-items: center; text-align: left; gap: 0 12px; }
  .leak-step .app-icon { margin: 0 auto; grid-row: span 2; }
  .leak-step h4 { margin: 0; }
  .leak-drop { margin: 6px 0 0; max-width: none; }
  .leak-drop::before { display: none; }
}

/* 2. Journey diagram */
.journey { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.journey-line { position: absolute; top: 46px; left: 7%; right: 7%; height: 3px; background: var(--fill-2); border-radius: 2px; overflow: hidden; }
.journey-line::after {
  content: ""; position: absolute; top: 0; left: -30%; width: 30%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--blue), var(--teal), transparent);
  animation: travel 3.6s linear infinite;
}
@keyframes travel { to { left: 100%; } }
.jstage { position: relative; text-align: center; }
.jnode {
  width: 92px; height: 92px; margin: 0 auto; border-radius: 28px; display: grid; place-items: center;
  background: var(--bg-elev); box-shadow: var(--shadow-2); position: relative; z-index: 1;
}
.jnode .num { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%; background: var(--text); color: var(--bg); font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.jstage h4 { margin-top: 16px; }
.jstage p { font-size: 14px; color: var(--text-3); margin-top: 4px; }
.jservices { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; align-items: center; }
.jservices span { font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: rgba(0, 122, 255, 0.1); color: var(--blue); white-space: nowrap; }
.journey-loop { margin-top: 36px; text-align: center; color: var(--text-2); font-size: 16px; }
.journey-loop svg { display: inline-block; vertical-align: middle; margin-right: 6px; }
@media (max-width: 980px) {
  .journey { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .journey-line { display: none; }
}
@media (max-width: 560px) {
  .journey { grid-template-columns: repeat(2, 1fr); }
  .jservices span { white-space: normal; }
}

/* 3. Services */
.service-tabs { margin-bottom: 34px; }
.service-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1100px) { .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .service-grid { grid-template-columns: 1fr; } }
.svc {
  display: flex; flex-direction: column; gap: 14px; padding: 26px;
  border-radius: var(--r-l); background: var(--bg-elev); box-shadow: var(--shadow-1);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  animation: cardIn 0.6s var(--ease) both;
}
.svc:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(0.98); } }
.svc-top { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.svc-top h3 { margin-top: 2px; }
.svc-top small { display: block; color: var(--text-3); font-size: 13px; font-weight: 600; }
.svc p { color: var(--text-2); font-size: 15.5px; }
.svc ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14.5px; }
.svc li { display: flex; gap: 8px; align-items: baseline; }
.svc li::before { content: "✓"; color: var(--green); font-weight: 700; }
.svc .improves { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; border-top: 0.5px solid var(--sep); }
.svc .improves em { font-style: normal; font-size: 12px; color: var(--text-3); width: 100%; margin-bottom: 2px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

/* 4. Impact matrix */
.matrix-card { padding: 0; overflow: hidden; }
.matrix-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.matrix { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 14.5px; }
.matrix th, .matrix td { padding: 14px 12px; text-align: center; border-bottom: 0.5px solid var(--sep); }
.matrix thead th { font-size: 12.5px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; background: var(--bg-elev); vertical-align: bottom; }
.matrix th:first-child, .matrix td:first-child { text-align: left; padding-left: 24px; position: sticky; left: 0; background: var(--bg-elev); z-index: 1; }
.matrix tbody tr:last-child td { border-bottom: 0; }
.matrix tbody tr:hover td { background: var(--bg-grouped); }
.matrix .svc-name { display: flex; align-items: center; gap: 10px; font-weight: 600; white-space: nowrap; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; }
.dot.s2 { background: var(--blue); box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15); }
.dot.s1 { background: transparent; border: 2.5px solid var(--blue); opacity: 0.6; }
.matrix-legend { display: flex; gap: 22px; justify-content: center; margin-top: 18px; color: var(--text-3); font-size: 14px; }
.matrix-legend span { display: inline-flex; align-items: center; gap: 8px; }

/* 5. Free audit */
.audit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.audit-copy ul { list-style: none; padding: 0; margin: 26px 0 30px; display: grid; gap: 14px; }
.audit-copy li { display: flex; gap: 14px; align-items: flex-start; font-size: 16.5px; }
.audit-card { padding: 28px; border-radius: var(--r-xl); background: var(--bg-elev); box-shadow: var(--shadow-3); position: relative; }
.audit-head { display: flex; gap: 18px; align-items: center; padding-bottom: 20px; border-bottom: 0.5px solid var(--sep); }
.ring { position: relative; width: 92px; height: 92px; flex: none; }
.ring svg { width: 92px; height: 92px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.ring .track { stroke: var(--fill); }
.ring .val { stroke: var(--orange); stroke-dasharray: 251; stroke-dashoffset: 251; transition: stroke-dashoffset 1.6s var(--ease); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 700 28px var(--font-display); }
.audit-head small { color: var(--text-3); font-size: 13px; }
.audit-head h3 { font-size: 20px; }
.checks { list-style: none; margin: 8px 0 0; padding: 0; }
.checks li { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 0.5px solid var(--sep); font-size: 15px; }
.checks li:last-child { border-bottom: 0; }
.checks .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; color: #fff; font-weight: 800; }
.checks .bad .ic { background: var(--red); }
.checks .warn .ic { background: var(--orange); }
.checks .ok .ic { background: var(--green); }
.checks em { font-style: normal; font-size: 13px; color: var(--text-3); }
.audit-tag { position: absolute; top: -14px; right: 24px; }
@media (max-width: 900px) { .audit-grid { grid-template-columns: 1fr; gap: 40px; } }

/* 6. Process timeline */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step { padding: 28px 24px; border-radius: var(--r-l); background: var(--bg-elev); box-shadow: var(--shadow-1); position: relative; }
.step .when { font-size: 13px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: 0.04em; }
.step h3 { margin: 10px 0 8px; font-size: 20px; }
.step p { color: var(--text-2); font-size: 15px; }
.step .big { font: 800 64px/1 var(--font-display); letter-spacing: -0.04em; position: absolute; right: 18px; top: 14px; color: var(--fill-2); }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
