/* ============================================================
   KARAWAY — Feature showcase shared styles (Alma-style)
   Used by feature-01..06 + reference assets
   Depends on karaway-styles.css for tokens, .phone, .btn etc.
   ============================================================ */

.showcase {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 80px 0;
  position: relative;
}
.showcase.mint    { background: var(--surface); color: var(--ink); }
.showcase.amber   { background: var(--amber-tint); color: var(--ink); }
.showcase.alt     { background: var(--alt); color: var(--ink); }
.showcase.white   { background: #ffffff; color: var(--ink); }
.showcase.forest  { background: var(--forest); color: #fff; }
.showcase.ink     { background: #0d1f18; color: #fff; }

/* Phone UI lives in its own white card — reset color so text doesn't inherit */
.showcase.forest .phone-inner,
.showcase.ink .phone-inner { color: var(--ink); }

.sc-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}
.sc-grid {
  display: grid;
  grid-template-columns: minmax(380px, 0.85fr) 1.15fr;
  gap: 64px;
  align-items: center;
}

/* ---------- LEFT — content + floating notif cards ---------- */
.sc-left { position: relative; }
.sc-eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}
.sc-eyebrow.fg-forest { color: var(--forest); }
.sc-eyebrow.fg-white  { color: rgba(255,255,255,0.7); }
.sc-eyebrow.fg-amber  { color: #a66e22; }

.sc-h1 {
  font-size: 48px;
  line-height: 1.04;
  letter-spacing: -0.032em;
  font-weight: 700;
  margin: 16px 0 20px;
}
.showcase.forest .sc-h1, .showcase.ink .sc-h1 { color: #fff; }

.sc-body {
  font-size: 17px;
  line-height: 1.6;
  margin: 0 0 28px;
  max-width: 480px;
}
.sc-body.dim { color: var(--ink-dim); }
.showcase.forest .sc-body, .showcase.ink .sc-body { color: rgba(255,255,255,0.78); }

.sc-sub {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0 28px;
  padding: 20px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.showcase.forest .sc-sub, .showcase.ink .sc-sub {
  border-color: rgba(255,255,255,0.16);
}
.sc-sub h6 { font-size: 13.5px; font-weight: 700; margin: 0 0 6px; letter-spacing: -0.01em; }
.sc-sub p { font-size: 13px; margin: 0; line-height: 1.5; color: var(--ink-dim); }
.showcase.forest .sc-sub p, .showcase.ink .sc-sub p { color: rgba(255,255,255,0.7); }
.showcase.forest .sc-sub h6, .showcase.ink .sc-sub h6 { color: #fff; }

.sc-bullets {
  list-style: none; margin: 18px 0 24px; padding: 0; display: grid; gap: 10px;
}
.sc-bullets li {
  display: flex; align-items: center; gap: 10px;
  font-size: 14.5px; font-weight: 500;
}
.sc-bullets li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--forest); }
.showcase.forest .sc-bullets li::before, .showcase.ink .sc-bullets li::before { background: var(--amber); }
.showcase.forest .sc-bullets li, .showcase.ink .sc-bullets li { color: #fff; }

.sc-ctas { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 36px; }

/* Floating notification cards stack */
.sc-notifs {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 380px;
  margin-top: 32px;
}
.sc-notif {
  background: #ffffff;
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: 0 14px 36px -14px rgba(13,31,24,0.20), 0 2px 6px rgba(13,31,24,0.04);
  border: 1px solid rgba(13,31,24,0.06);
  font-size: 12.5px;
  color: var(--ink);
  transform: rotate(-1.5deg);
  position: relative;
}
.sc-notif:nth-child(2) { transform: rotate(1.2deg) translateX(20px); }
.sc-notif:nth-child(3) { transform: rotate(-0.8deg) translateX(-12px); }
.sc-notif .ic {
  width: 32px; height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--forest);
  font-size: 14px;
}
.sc-notif .ic.amber { background: var(--amber-tint); color: #a66e22; }
.sc-notif .ic.red   { background: rgba(176,70,56,0.12); color: #b04638; }
.sc-notif .ic.green { background: rgba(30,77,53,0.12); color: var(--forest); }
.sc-notif .ic.ink   { background: rgba(13,31,24,0.08); color: var(--ink); }
.sc-notif .bd { line-height: 1.4; flex: 1; min-width: 0; }
.sc-notif .ttl {
  font-weight: 700;
  font-size: 12.5px;
  margin-bottom: 2px;
  color: var(--ink);
}
.sc-notif .ds { font-size: 12px; color: var(--ink-dim); }

/* ---------- RIGHT — phone pair stage ---------- */
.sc-right {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 720px;
}
.phone-pair {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.phone-pair .phone {
  position: absolute;
}
.phone-pair .phone.a {
  left: 50%;
  transform: translate(-66%, 0) rotate(-2deg);
  z-index: 2;
  box-shadow:
    0 0 0 1.5px #1f1f1f,
    inset 0 0 0 1px rgba(255,255,255,0.06),
    0 30px 80px -20px rgba(13,31,24,0.30),
    0 4px 14px rgba(13,31,24,0.06);
}
.phone-pair .phone.b {
  left: 50%;
  transform: translate(-22%, -10px) rotate(3deg);
  z-index: 1;
  box-shadow:
    0 0 0 1.5px #1f1f1f,
    inset 0 0 0 1px rgba(255,255,255,0.06),
    0 24px 60px -20px rgba(13,31,24,0.20);
}
.showcase.forest .phone-pair .phone, .showcase.ink .phone-pair .phone {
  box-shadow:
    0 0 0 1.5px #2a2a2a,
    inset 0 0 0 1px rgba(255,255,255,0.08),
    0 40px 100px -20px rgba(0,0,0,0.6),
    0 6px 18px rgba(0,0,0,0.4);
}
.phone-pair-single .phone {
  position: relative;
  margin: 0 auto;
  transform: rotate(-1deg);
}

/* Mobile */
@media (max-width: 880px) {
  .showcase { padding: 56px 0; min-height: 0; }
  .sc-container { padding: 0 20px; }
  .sc-grid { grid-template-columns: 1fr; gap: 48px; }
  .sc-h1 { font-size: 32px; }
  .sc-sub { grid-template-columns: 1fr; }
  .sc-notifs { max-width: 100%; }
  .sc-notif { transform: none !important; }
  .sc-right { height: 640px; }
  .phone-pair .phone.a { transform: translate(-72%, 0) rotate(-2deg); }
  .phone-pair .phone.b { transform: translate(-28%, -10px) rotate(3deg); }
}

/* Mobile-only: also reduce mobile-pair offsets if needed (already handled above) */
@media (max-width: 600px) {
  .phone-pair .phone.a { transform: translate(-78%, 0) rotate(-2deg); }
  .phone-pair .phone.b { transform: translate(-22%, -10px) rotate(3deg); }
}

/* ============================================================
   Phone UI atoms — used inside .phone-inner content
   ============================================================ */
.pui-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 12px;
}
.pui-title { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.pui-sub { font-size: 11px; color: var(--ink-dim); white-space: nowrap; flex-shrink: 0; }

.pui-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.pui-card.surface { background: var(--surface); border-color: transparent; }
.pui-card.amber { background: var(--amber-tint); border-color: rgba(232,169,74,0.25); }
.pui-card.forest { background: var(--forest); color: #fff; border-color: transparent; }
.pui-card .lab {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--forest);
}
.pui-card.amber .lab { color: #a66e22; }
.pui-card.forest .lab { color: var(--amber); }
.pui-card.grey .lab { color: var(--ink-dim); }

.pui-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.pui-pill {
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--rule);
  white-space: nowrap;
}
.pui-pill.bare { background: var(--surface); border-color: transparent; }
.pui-pill.warn { color: #a66e22; }
.pui-pill.safe { color: var(--forest); }

.pui-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px;
  padding: 6px 0;
}
.pui-row + .pui-row { border-top: 1px solid var(--rule); }
.pui-row .left { display: flex; align-items: center; gap: 8px; }
.pui-row .left .em { font-size: 14px; }
.pui-row .right { font-size: 11px; color: var(--ink-dim); }
.pui-row .right.safe { color: var(--forest); font-weight: 600; }
.pui-row .right.warn { color: #a66e22; font-weight: 600; }

.pui-bars {
  display: flex; align-items: flex-end; gap: 5px; height: 44px; margin-top: 6px;
}
.pui-bars .b {
  flex: 1;
  background: var(--forest);
  border-radius: 2px 2px 0 0;
}
.pui-bars .b.amber { background: var(--amber); }
.pui-bars .b.ghost { background: rgba(13,31,24,0.08); }

.pui-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--forest);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 8px;
  border: 0;
  margin-top: 8px;
  white-space: nowrap;
}
.pui-btn.ghost { background: transparent; color: var(--forest); border: 1px solid var(--forest); }
.pui-btn.amber { background: var(--amber); color: var(--ink); }
.pui-btn.dark  { background: var(--ink); color: #fff; }

/* Camera viewfinder mock — now framing a real meal photo */
.pui-cam {
  height: 220px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  background: #2a2018 url('img/cam-meal.jpg') center 42% / cover no-repeat;
  margin-bottom: 12px;
}
.pui-cam::after {
  content: "";
  position: absolute;
  inset: 24px;
  border: 2px solid rgba(255,255,255,0.85);
  border-radius: 8px;
  box-shadow: 0 0 0 2000px rgba(0,0,0,0.15);
}

/* Voice recording animation — fills entire phone-inner edge-to-edge */
.pui-mic-stage {
  background: var(--ink);
  position: absolute;
  inset: 0;
  padding: 56px 24px 24px;
  border-radius: inherit;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.pui-mic-stage .rec {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5a9e7a;
  font-family: var(--font-body);
  margin-bottom: 22px;
  display: flex; align-items: center; gap: 6px;
}
.pui-mic-stage .rec::before {
  content: "";
  width: 8px; height: 8px;
  background: #5a9e7a;
  border-radius: 50%;
  animation: pulse-dot 1.4s ease-in-out infinite;
}
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.pui-mic {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  margin: 12px 0 28px;
  position: relative;
}
.pui-mic::before, .pui-mic::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  animation: pulse-ring 2.4s ease-out infinite;
}
.pui-mic::after { animation-delay: 1.2s; }
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.1); opacity: 0; }
}
.pui-mic svg { width: 36px; height: 36px; color: #fff; z-index: 1; }
.pui-mic-stage .prompt {
  font-size: 14px;
  line-height: 1.4;
  color: rgba(255,255,255,0.78);
  max-width: 220px;
  font-weight: 500;
}
.pui-mic-stage .timer {
  position: absolute;
  top: 14px; right: 18px;
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(255,255,255,0.55);
}

/* Toggle row */
.pui-toggle-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--rule);
  font-size: 12.5px;
  font-weight: 500;
}
.pui-toggle-row:first-of-type { border-top: 0; }
.pui-toggle {
  width: 34px; height: 20px;
  background: rgba(13,31,24,0.12);
  border-radius: 999px;
  position: relative;
  flex-shrink: 0;
}
.pui-toggle::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: left 200ms;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.pui-toggle.on { background: var(--forest); }
.pui-toggle.on::after { left: 16px; }
.pui-toggle.locked { opacity: 0.5; }

/* Mini bar chart with injection markers */
.pui-timeline {
  position: relative;
  height: 80px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding-top: 20px;
}
.pui-timeline .b {
  flex: 1;
  border-radius: 2px 2px 0 0;
}
.pui-timeline .diamond {
  position: absolute;
  top: 0;
  width: 10px; height: 10px;
  background: var(--amber);
  transform: rotate(45deg);
  border-radius: 1px;
}
