/* Kapeleta — café app showcase (app.html) */

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Slim header shared by app and back office */
.header__tag { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 0.78rem; font-weight: 600; color: var(--cream-2); }
.mini-nav { display: flex; gap: 4px; margin-left: auto; padding: 4px; border-radius: 999px; border: 1px solid var(--line); background: rgba(244, 231, 212, 0.03); }
.mini-nav a { padding: 8px 14px; border-radius: 999px; font-size: 0.86rem; font-weight: 500; color: var(--cream-2); transition: background-color 0.2s, color 0.2s; }
.mini-nav a:hover { color: var(--cream); background: rgba(244, 231, 212, 0.06); }
.mini-nav a[aria-current='page'] { background: var(--cream); color: var(--espresso); }
@media (max-width: 560px) {
  .header__tag { display: none; }
  .mini-nav a { padding: 7px 11px; font-size: 0.8rem; }
  .brand__word { font-size: 1.3rem; }
}

.app-intro { padding-top: clamp(32px, 5vw, 72px); text-align: center; display: grid; justify-items: center; }
.app-intro .label { margin-bottom: 22px; }
.app-intro .lede { margin-top: 22px; }

/* ---------- Screens layout ---------- */
.screens-tabs { display: none; }
.screens {
  --phone-w: 300px;
  display: grid; grid-template-columns: repeat(4, var(--phone-w)); justify-content: center; gap: clamp(20px, 2.4vw, 40px);
  max-width: calc(var(--max) + var(--gutter) * 2); margin: clamp(48px, 5vw, 80px) auto 0; padding-inline: var(--gutter);
}
.screen { margin: 0; display: grid; gap: 22px; align-content: start; }
.screen figcaption { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 4px; padding-inline: 6px; color: var(--cream-2); font-size: 0.9rem; line-height: 1.5; }
.screen figcaption .serif-num { grid-row: span 2; font-size: 1.6rem; color: var(--saffron); line-height: 1; }
.screen figcaption b { color: var(--cream); font-family: var(--f-display); font-weight: 450; font-size: 1.15rem; font-variation-settings: 'opsz' 36, 'SOFT' 50; }
.screen:nth-child(even) { margin-top: 56px; }
.dots { display: none; }

@media (max-width: 1360px) and (min-width: 721px) {
  .screens { grid-template-columns: repeat(2, var(--phone-w)); column-gap: 64px; row-gap: 72px; }
  .screen:nth-child(even) { margin-top: 0; }
}
@media (max-width: 720px) {
  .screens-tabs {
    display: flex; gap: 4px; margin: 32px var(--gutter) 0; padding: 4px; border-radius: 999px; border: 1px solid var(--line); background: rgba(244, 231, 212, 0.03);
  }
  .screens-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; border-radius: 999px; font-size: 0.84rem; font-weight: 600; color: var(--cream-2); transition: background-color 0.25s var(--ease), color 0.25s; }
  .screens-tabs button .num { font-size: 0.7rem; opacity: 0.6; }
  .screens-tabs button[aria-selected='true'] { background: var(--cream); color: var(--espresso); }
  .screens {
    position: relative; display: flex; justify-content: flex-start; gap: 20px; margin-top: 24px; padding-inline: calc((100% - var(--phone-w)) / 2); padding-bottom: 8px;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  }
  .screens::-webkit-scrollbar { display: none; }
  .screen { flex: none; width: var(--phone-w); scroll-snap-align: center; scroll-snap-stop: always; }
  .screens::after { content: ''; flex: none; width: 1px; margin-left: calc((100vw - var(--phone-w)) / 2 - 21px); }
  .screen:nth-child(even) { margin-top: 0; }
  .js .screen[data-reveal] { transform: none; }
  .dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
  .dots i { width: 6px; height: 6px; border-radius: 999px; background: var(--line-2); transition: width 0.35s var(--ease-out), background-color 0.3s; }
  .dots i.on { width: 20px; background: var(--saffron); }
}
@media (max-width: 360px) { .screens { --phone-w: 280px; } }

/* ---------- Phone ---------- */
.phone {
  position: relative; width: var(--phone-w); aspect-ratio: 300 / 640; padding: 9px; border-radius: 48px;
  background: linear-gradient(145deg, #3a2c23, #120c09 45%, #2a1f19); box-shadow: 0 0 0 1px rgba(244, 231, 212, 0.1), 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.6) inset;
}
.phone__screen {
  position: relative; height: 100%; display: flex; flex-direction: column; overflow: hidden; border-radius: 40px;
  background: radial-gradient(120% 50% at 50% 0%, #2a1e17, var(--espresso) 60%); color: var(--cream);
  font-size: 13px; line-height: 1.4;
}
.sbar { position: relative; display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 26px 0 30px; font-size: 13px; font-weight: 600; flex: none; }
.sbar svg { width: 46px; height: 11px; }
.island { position: absolute; left: 50%; top: 10px; width: 86px; height: 25px; margin-left: -43px; border-radius: 999px; background: #000; }
.ph-body { flex: 1; min-height: 0; padding: 6px 18px 12px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }

.ph-label { font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cream-3); }
.ph-muted { color: var(--cream-3); font-size: 11.5px; }
.ph-title { font-family: var(--f-display); font-size: 28px; font-weight: 400; line-height: 1; letter-spacing: -0.02em; font-variation-settings: 'opsz' 72, 'SOFT' 60; padding-top: 4px; }
.ph-top { display: flex; justify-content: space-between; align-items: flex-start; padding-top: 4px; }
.ph-eyebrow { font-size: 11px; color: var(--cream-3); font-weight: 500; }
.ph-hello { font-family: var(--f-display); font-size: 27px; line-height: 1.05; letter-spacing: -0.02em; font-variation-settings: 'opsz' 72, 'SOFT' 60; margin-top: 3px; }
.ph-hello em { color: var(--saffron); font-weight: 340; font-variation-settings: 'opsz' 72, 'SOFT' 100, 'WONK' 1; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--mocha); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; box-shadow: 0 0 0 2px var(--espresso), 0 0 0 3.5px rgba(231, 164, 60, 0.6); }

.ph-btn { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 44px; border-radius: 14px; font-size: 13.5px; font-weight: 700; transition: transform 0.15s var(--ease), background-color 0.2s, opacity 0.2s; }
.ph-btn:active { transform: scale(0.97); }
.ph-btn--primary { background: var(--saffron); color: var(--on-saffron); }
.ph-btn--primary:hover { background: var(--saffron-hi); }
.ph-btn--ghost { border: 1px solid var(--line-2); color: var(--cream); }
.ph-btn--ghost:hover { background: rgba(244, 231, 212, 0.06); }
.ph-btn.is-done { background: var(--cream); }
.ph-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 6px; border-radius: 999px; background: rgba(244, 231, 212, 0.07); font-size: 10.5px; font-weight: 600; color: var(--cream-2); }
.ph-chip svg { width: 12px; height: 12px; color: var(--saffron); }

/* Home */
.stamp-strip { padding: 12px 14px; border-radius: 16px; background: rgba(231, 164, 60, 0.1); border: 1px solid rgba(231, 164, 60, 0.25); }
.stamp-strip__dots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin-bottom: 8px; }
.stamp-strip__dots i { height: 6px; border-radius: 3px; background: rgba(244, 231, 212, 0.12); }
.stamp-strip__dots i.on { background: var(--saffron); }
.stamp-strip p { font-size: 11.5px; color: var(--cream-2); }
.stamp-strip b { color: var(--cream); }
.usual { padding: 14px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); display: grid; gap: 12px; }
.usual__head { display: flex; justify-content: space-between; align-items: center; }
.usual__row { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; }
.cup-top { width: 52px; height: 52px; }
.usual__name { font-family: var(--f-display); font-size: 17px; font-weight: 450; font-variation-settings: 'opsz' 36, 'SOFT' 60; }
.usual__row b { font-weight: 700; }
.ph-section { display: grid; gap: 9px; }
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.feature { display: grid; gap: 4px; padding: 10px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); font-size: 11.5px; }
.feature b { font-weight: 600; line-height: 1.25; }
.feature .num { color: var(--cream-3); }
.feature__art { height: 54px; border-radius: 10px; margin-bottom: 4px; background: radial-gradient(circle at 50% 60%, var(--t) 0 16px, transparent 17px), radial-gradient(circle at 50% 60%, #f4e7d4 0 22px, transparent 23px), linear-gradient(160deg, #3a2a20, #2a1f19); }

.tabbar { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 10px 22px; border-top: 1px solid var(--line); background: rgba(20, 14, 11, 0.7); }
.tabbar span { display: grid; justify-items: center; gap: 3px; font-size: 9.5px; font-weight: 600; color: var(--cream-3); }
.tabbar svg { width: 21px; height: 21px; }
.tabbar .on { color: var(--saffron); }

/* Order */
.ph-body--order { gap: 11px; }
.ph-nav { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; text-align: center; }
.ph-nav__title { font-size: 13.5px; font-weight: 700; }
.ph-icon { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(244, 231, 212, 0.07); }
.ph-icon svg { width: 17px; height: 17px; }
.ph-icon:empty { background: none; }
.ph-icon i { position: absolute; top: -3px; right: -3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--saffron); color: var(--on-saffron); font-style: normal; font-size: 9.5px; font-weight: 800; display: grid; place-items: center; }
.ph-icon i.bump { animation: bump 0.5s var(--ease-out); }
.drink-hero { height: 112px; border-radius: 20px; display: grid; place-items: center; background: radial-gradient(60% 80% at 50% 40%, rgba(231, 164, 60, 0.18), transparent 70%), var(--card); border: 1px solid var(--line); }
.drink-hero svg { width: 96px; height: 96px; }
.drink-head { display: flex; justify-content: space-between; align-items: baseline; }
.drink-name { font-family: var(--f-display); font-size: 23px; line-height: 1; letter-spacing: -0.015em; font-variation-settings: 'opsz' 72, 'SOFT' 60; }
.drink-head b { font-size: 15px; font-weight: 700; }
.opt { display: grid; gap: 6px; }
.opt--row { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 12px; background: rgba(244, 231, 212, 0.04); }
.opt--row b { font-weight: 600; margin-right: 6px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 12px; background: rgba(244, 231, 212, 0.06); }
.seg button { min-height: 32px; border-radius: 9px; font-size: 12px; font-weight: 600; color: var(--cream-2); transition: background-color 0.25s var(--ease), color 0.2s; }
.seg button[aria-checked='true'] { background: var(--cream); color: var(--espresso); }
.pills { display: flex; gap: 6px; }
.pills button { flex: 1; min-height: 32px; padding: 0 6px; border-radius: 10px; border: 1px solid var(--line-2); font-size: 12px; font-weight: 600; color: var(--cream-2); transition: all 0.2s var(--ease); }
.pills button:active, .seg button:active { transform: scale(0.96); }
.pills button[aria-checked='true'] { border-color: var(--saffron); background: var(--saffron-lo); color: var(--cream); }
.pills small, .seg small { font-weight: 500; opacity: 0.7; font-size: 10px; }
.switch { position: relative; width: 42px; height: 25px; border-radius: 999px; background: rgba(244, 231, 212, 0.15); transition: background-color 0.25s var(--ease); flex: none; }
.switch i { position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: var(--cream); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); transition: transform 0.3s var(--ease-out); }
.switch[aria-checked='true'] { background: var(--saffron); }
.switch[aria-checked='true'] i { transform: translateX(17px); }
.ph-cta { flex: none; padding: 10px 16px 24px; border-top: 1px solid var(--line); background: rgba(20, 14, 11, 0.6); }
.ph-cta--split { display: flex; gap: 10px; align-items: center; }
.ph-cta--split .ph-btn { flex: 1; }

/* Status */
.ring { position: relative; width: 150px; height: 150px; margin: 2px auto 0; }
.ring svg { width: 100%; height: 100%; }
.ring__bar { stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 2s var(--ease-out) 0.4s; }
.ring.is-on .ring__bar { stroke-dashoffset: 38; }
.ring__label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 1px; }
.ring__label b { font-family: var(--f-display); font-size: 32px; font-weight: 380; line-height: 1.05; letter-spacing: -0.02em; font-variation-settings: 'opsz' 72, 'SOFT' 60; }
.status-line { text-align: center; font-size: 12.5px; color: var(--cream-2); margin-top: -4px; }
.status-line em { font-family: var(--f-display); font-style: italic; font-size: 15px; color: var(--saffron); font-variation-settings: 'opsz' 36, 'SOFT' 100, 'WONK' 1; }
.track { display: grid; gap: 0; padding: 4px 4px 0; }
.track li { position: relative; display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; font-size: 12.5px; color: var(--cream-3); }
.track li::before { content: ''; position: absolute; left: 9.5px; top: 22px; height: calc(100% - 12px); width: 1px; background: var(--line-2); }
.track li:last-child::before { display: none; }
.track li i { position: relative; z-index: 1; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--espresso); }
.track li i svg { width: 11px; height: 11px; }
.track li.done { color: var(--cream-2); }
.track li.done i { background: var(--saffron); border-color: var(--saffron); color: var(--on-saffron); }
.track li.done::before { background: var(--saffron); }
.track li.now { color: var(--cream); font-weight: 600; }
.track li.now i { border-color: var(--saffron); }
.track li.now i::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--saffron); animation: pulse 1.6s var(--ease) infinite; }
.track li.now small { color: var(--saffron); font-weight: 700; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(231, 164, 60, 0.5); } 60% { box-shadow: 0 0 0 7px rgba(231, 164, 60, 0); } }
.receipt { display: grid; gap: 6px; padding: 12px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); font-size: 11.5px; }
.receipt p { display: flex; justify-content: space-between; gap: 10px; color: var(--cream-2); }
.receipt b { color: var(--cream); font-weight: 600; }
.receipt__total { padding-top: 6px; border-top: 1px dashed var(--line-2); }
.pickup-code { display: grid; padding-right: 6px; }
.pickup-code b { font-family: var(--f-display); font-size: 26px; font-weight: 420; line-height: 1; font-variation-settings: 'opsz' 72; }

/* Rewards */
.stamp-card {
  position: relative; padding: 16px 16px 14px; border-radius: 20px; color: var(--espresso); overflow: hidden;
  background: radial-gradient(120% 80% at 100% 0%, rgba(231, 164, 60, 0.25), transparent 50%), var(--cream);
  box-shadow: 0 18px 30px -18px rgba(0, 0, 0, 0.8);
}
.stamp-card::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.25; background-image: repeating-linear-gradient(90deg, rgba(29, 21, 17, 0.05) 0 1px, transparent 1px 4px); }
.stamp-card__head { display: flex; justify-content: space-between; align-items: center; }
.stamp-card__brand { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-display); font-size: 16px; font-weight: 560; font-variation-settings: 'opsz' 36, 'SOFT' 100, 'WONK' 1; }
.stamp-card__brand svg { width: 20px; height: 20px; color: #b77a1f; }
.stamp-card__count { font-size: 12px; font-weight: 600; color: rgba(29, 21, 17, 0.6); }
.stamp-card__count b { font-family: var(--f-display); font-size: 26px; font-weight: 420; color: var(--espresso); font-variation-settings: 'opsz' 72; }
.stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 14px; }
.stamps i { position: relative; aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed rgba(29, 21, 17, 0.3); display: grid; place-items: center; }
.stamps i.on { border: 0; background: var(--espresso); }
.stamps i.on::after {
  content: ''; width: 58%; height: 58%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 28'%3E%3Cellipse cx='10' cy='14' rx='9' ry='13' fill='%23e7a43c'/%3E%3Cpath d='M10 1.5C5.5 9 14.5 18 10 26.5' fill='none' stroke='%231d1511' stroke-width='1.8'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: rotate(28deg);
}
.stamps i.new { animation: stamp 0.6s var(--ease-out) both 0.8s; }
.js .stamps i.new { animation-play-state: paused; }
.js .is-in .stamps i.new { animation-play-state: running; }
@keyframes stamp { 0% { transform: scale(1.6) rotate(-12deg); opacity: 0; } 60% { transform: scale(0.92); opacity: 1; } 100% { transform: none; } }
.stamps i.free { border: 1.5px solid #b77a1f; }
.stamps i.free span { font-size: 8.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #8f5e14; }
.stamp-card__foot { margin-top: 12px; font-size: 11.5px; font-weight: 500; color: rgba(29, 21, 17, 0.72); }
.perk { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 12px; }
.perk b { display: block; font-weight: 600; margin-bottom: 4px; }
.perk small { color: var(--cream-3); font-weight: 600; }
.perk__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--saffron-lo); color: var(--saffron); }
.perk__icon svg { width: 18px; height: 18px; }
.bar { display: block; height: 4px; border-radius: 4px; background: rgba(244, 231, 212, 0.1); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--saffron); border-radius: inherit; }
.history li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--cream-2); }
.history li:last-child { border-bottom: 0; }
.history b { color: var(--saffron); font-weight: 700; }

/* Notes under the phones */
.app-notes { padding-block: clamp(64px, 7vw, 120px); }
.app-facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.app-facts > div { padding: 22px 24px 0 0; }
.app-facts > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.app-facts dt { font-size: var(--t-label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--cream-3); font-weight: 600; }
.app-facts dd { margin-top: 8px; font-family: var(--f-display); font-size: 1.25rem; line-height: 1.3; font-variation-settings: 'opsz' 36, 'SOFT' 50; max-width: 18em; }
@media (max-width: 720px) {
  .app-facts { grid-template-columns: 1fr; border-top: 0; }
  .app-facts > div, .app-facts > div + div { padding: 18px 0; border-left: 0; border-top: 1px solid var(--line); }
}
.footer--slim { padding-top: 0; }
.phone.flash { animation: flash 1.2s var(--ease-out); }
@keyframes flash { 0% { box-shadow: 0 0 0 1px rgba(244, 231, 212, 0.1), 0 0 0 0 rgba(231, 164, 60, 0.6); } 100% { box-shadow: 0 0 0 1px rgba(244, 231, 212, 0.1), 0 0 0 22px rgba(231, 164, 60, 0); } }
[data-here][aria-pressed='true'] { border-color: var(--saffron); color: var(--saffron); }
