/* ---------- Showcase layout ---------- */
.showcase {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 5rem);
  align-items: center; margin-top: 4.5rem;
}
.showcase.reverse .showcase-text { order: 2; }
.showcase-text .app-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.app-icon { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 8px 24px -8px rgba(0,0,0,.6); background: #fff; object-fit: cover; }
.showcase-text h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -.02em; line-height: 1.2; }
.showcase-text .card-tag { display: block; margin-bottom: .25rem; }
.feature-list { list-style: none; margin-top: 1.25rem; display: grid; gap: .6rem; }
.feature-list li { position: relative; padding-left: 1.6rem; color: var(--muted); }
.feature-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); transform: rotate(45deg); }
.try-hint { display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.5rem; padding: .45rem .9rem; border-radius: 999px; font-size: .85rem; color: var(--accent); border: 1px dashed var(--accent-2); }
.try-hint::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: ping 1.6s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(95,211,141,.7); } 100% { box-shadow: 0 0 0 10px rgba(95,211,141,0); } }
.stack-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.25rem; list-style: none; }
.stack-tags li { font-size: .75rem; padding: .25rem .65rem; border-radius: 6px; background: var(--card); border: 1px solid var(--line); color: var(--muted); }

.demo-wrap { display: flex; justify-content: center; position: relative; }
.demo-wrap::before {
  content: ""; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(95,211,141,.22), transparent 65%); top: 50%; left: 50%; transform: translate(-50%, -50%);
  filter: blur(10px); pointer-events: none;
}

/* ---------- Website showcase (browser + phone mockups) ---------- */
.site-showcase { grid-template-columns: 1fr 1.35fr; margin-top: 6rem; }
.site-showcase h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -.02em; margin: .25rem 0 .75rem; }
.site-btn { margin-top: 1.75rem; }
.site-btn span { display: inline-block; transition: transform .3s var(--ease); }
.site-btn:hover span { transform: translateX(4px); }

.devices { position: relative; padding: 0 0 48px 0; }
.browser {
  border-radius: 12px; overflow: hidden; background: #fff;
  box-shadow: 0 0 0 1px var(--line), 0 40px 80px -30px rgba(0,0,0,.85);
}
.browser-bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; background: #1d2622; border-bottom: 1px solid #000; }
.browser-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.browser-bar i:nth-child(2) { background: #febc2e; }
.browser-bar i:nth-child(3) { background: #28c840; }
.browser-url {
  flex: 1; max-width: 300px; margin: 0 auto; transform: translateX(-20px); text-align: center;
  font-size: .78rem; color: var(--muted); background: #0f1512; border-radius: 6px; padding: 3px 10px;
}
.browser-url::before { content: "🔒 "; font-size: .65rem; }
.browser-url:hover { color: var(--text); }
.browser-view { aspect-ratio: 16 / 10; overflow-y: auto; scrollbar-width: thin; }
.browser-view img, .mini-screen img { width: 100%; height: auto; display: block; }

.mini-phone {
  position: absolute; right: -14px; bottom: 0; width: 26%; min-width: 120px; max-width: 170px;
  padding: 6px; border-radius: 26px; background: #0b0b0c;
  box-shadow: 0 0 0 1.5px #2b2f2d, 0 30px 50px -20px rgba(0,0,0,.9);
  animation: float 7s ease-in-out infinite reverse;
}
.mini-screen { aspect-ratio: 9 / 19.5; border-radius: 20px; overflow-y: auto; background: #fff; scrollbar-width: none; }
.mini-screen::-webkit-scrollbar { display: none; }

/* ---------- Phone frame ---------- */
.phone {
  position: relative; width: min(300px, 100%); height: 620px;
  padding: 11px; border-radius: 50px; background: #0b0b0c;
  box-shadow: 0 0 0 2px #2b2f2d, 0 40px 80px -30px rgba(0,0,0,.85), inset 0 0 0 1px #3a3d3c;
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 40px; overflow: hidden; }

/* ---------- iOS look ---------- */
.ios {
  --ios-bg: #f2f2f7; --ios-cell: #fff; --ios-sep: #d8d8dc; --ios-label: #000; --ios-2: #8a8a8e;
  --ios-blue: #007aff; --ios-green: #34c759; --ios-red: #ff3b30;
  background: var(--ios-bg); color: var(--ios-label);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  font-size: 14px; line-height: 1.3; text-align: left;
}
.ios.white { --ios-bg: #fff; }
.ios p { color: inherit; }
.ios p + p { margin-top: 0; }
.ios button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.ios input { font: inherit; color: var(--ios-label); border: 0; outline: 0; background: transparent; min-width: 0; }
.ios .pos { color: var(--ios-green); }
.ios .neg { color: var(--ios-red); }

.ios-status {
  position: absolute; z-index: 30; inset: 0 0 auto 0; height: 44px; padding: 0 26px;
  display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 14px;
  background: var(--ios-bg);
}
.island { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); width: 92px; height: 26px; border-radius: 20px; background: #000; }
.ios-sys { display: flex; align-items: flex-end; gap: 2px; }
.ios-sys b { width: 3px; background: #000; border-radius: 1px; }
.ios-sys b:nth-child(1) { height: 4px; } .ios-sys b:nth-child(2) { height: 6px; } .ios-sys b:nth-child(3) { height: 8px; } .ios-sys b:nth-child(4) { height: 10px; }
.ios-sys em { width: 22px; height: 11px; margin-left: 5px; border-radius: 3px; border: 1.5px solid #000; background: linear-gradient(90deg, #000 75%, transparent 75%); background-clip: content-box; padding: 1px; }

.ios-view {
  position: absolute; inset: 44px 0 0 0; overflow-y: auto; background: var(--ios-bg);
  transition: transform .45s cubic-bezier(.2,.8,.2,1), filter .45s; scrollbar-width: none;
}
.ios-view::-webkit-scrollbar { display: none; }
.ios-view.push { transform: translateX(100%); z-index: 2; visibility: hidden; transition: transform .45s cubic-bezier(.2,.8,.2,1), visibility 0s .45s; }
.ios-view.push.in { transform: none; visibility: visible; box-shadow: -10px 0 30px rgba(0,0,0,.08); transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.ios-view.behind { transform: translateX(-25%); filter: brightness(.96); }

.ios-nav { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 12px; position: sticky; top: 0; z-index: 3; background: var(--ios-bg); }
.ios-nav.bar { border-bottom: .5px solid var(--ios-sep); }
.ios-title { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ios-btn { min-width: 36px; height: 32px; display: inline-flex; align-items: center; color: var(--ios-blue) !important; }
.ios-btn:last-child { justify-content: flex-end; }
.ios-btn.link { gap: 2px; font-size: 15px; }
.ios-btn.strong { font-weight: 600; }
.ios-btn:disabled { color: #c4c4c7 !important; cursor: default; }
.ios-btn.pulse { position: relative; }
.ios-btn.pulse::after { content: ""; position: absolute; right: -2px; top: 2px; width: 30px; height: 28px; border-radius: 50%; animation: ping 1.6s infinite; }
.ios-large { font-size: 30px; font-weight: 700; letter-spacing: -.02em; padding: 0 16px 8px; }

.ios-chips { display: flex; gap: 6px; padding: 2px 16px 10px; }
.ios-chips:empty { display: none; }
.ios-chips button { padding: 5px 13px; border-radius: 999px; font-size: 13px; font-weight: 500; background: rgba(120,120,128,.14); transition: background .2s, color .2s; }
.ios-chips button.on { background: var(--ios-blue); color: #fff; }

.ios-sec { padding: 16px 32px 6px; font-size: 12px; text-transform: uppercase; color: var(--ios-2); letter-spacing: .01em; }
.ios-group { margin: 0 16px; background: var(--ios-cell); border-radius: 11px; overflow: hidden; }
.ios-note, .ios-foot { padding: 6px 32px 0; font-size: 11.5px; color: var(--ios-2); }
.ios-foot { text-align: center; padding-top: 18px; padding-bottom: 24px; }

.ios-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; padding: 8px 14px; position: relative; text-align: left; }
.ios-row + .ios-row::before { content: ""; position: absolute; top: 0; left: 14px; right: 0; border-top: .5px solid var(--ios-sep); }
.ios-row.tap:active { background: #e5e5ea; }
.ios-row.center { justify-content: center; color: var(--ios-blue); gap: 4px; }
.ios-row.col { flex-direction: column; align-items: stretch; gap: 6px; }
.ios-row input { text-align: right; color: var(--ios-2); flex: 1; }
.ios-row input:focus { color: var(--ios-label); }
.ios-row input.date { flex: none; width: auto; padding: 4px 8px; border-radius: 7px; background: rgba(120,120,128,.12); color: var(--ios-label); font-size: 13px; }
.ios-row > span:first-child { flex-shrink: 0; }
.val { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.val small { font-size: 11px; color: var(--ios-2); }

.trip-l, .trip-r { display: flex; flex-direction: column; gap: 2px; }
.trip-r { align-items: flex-end; margin-left: auto; }
.trip small { font-size: 11.5px; color: var(--ios-2); }
.trip b { font-size: 14.5px; }
.chev { color: #c4c4c7; display: flex; }
.trip.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { background: #d7f5e0; } 100% { background: transparent; } }

.dash { padding: 16px 12px 14px; text-align: center; }
.dash > small { color: var(--ios-2); font-size: 13px; }
.dash > strong { display: block; font-size: 32px; font-weight: 700; letter-spacing: -.02em; margin: 2px 0 12px; font-variant-numeric: tabular-nums; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); }
.tiles div { display: flex; flex-direction: column; gap: 2px; }
.tiles b { font-size: 14px; font-variant-numeric: tabular-nums; }
.tiles small { font-size: 10.5px; color: var(--ios-2); }

.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 16px; text-align: center; color: var(--ios-2); }
.empty b { color: var(--ios-label); font-size: 16px; }

/* Sheet */
.ios-sheet {
  position: absolute; inset: 54px 0 0 0; z-index: 20; background: var(--ios-bg); border-radius: 12px 12px 0 0;
  overflow-y: auto; transform: translateY(105%); transition: transform .5s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 -6px 30px rgba(0,0,0,.15); scrollbar-width: none;
}
.ios-sheet::-webkit-scrollbar { display: none; }
.ios-sheet.in { transform: none; }
.sheet-nav { border-radius: 12px 12px 0 0; height: 48px; }
.phone-screen::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.35); opacity: 0; pointer-events: none; transition: opacity .4s; z-index: 10; }
.phone-screen.sheet-open::after { opacity: 1; }

/* Segmented control */
.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: rgba(120,120,128,.14); flex-shrink: 0; }
.seg button { padding: 4px 12px; border-radius: 7px; font-size: 13px; font-weight: 500; transition: background .2s, box-shadow .2s; }
.seg button.on { background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.seg.wide { display: flex; width: 100%; }
.seg.wide button { flex: 1; padding: 6px 0; }
.toll { display: flex; align-items: center; gap: 8px; }
.toll input { text-align: left; color: var(--ios-label); }

/* Quote app */
.welcome { height: 100%; display: flex; flex-direction: column; gap: 18px; padding: 16px 18px 20px; text-align: center; }
.welcome .spacer { flex: 1; }
.welcome h4 { font-size: 32px; font-weight: 700; }
.welcome p { color: var(--ios-2); margin-top: -8px; }
.credit { color: var(--ios-2); font-size: 11.5px; text-align: center; display: block; }
.rb { width: 100%; padding: 8px 10px; border: 1px solid #d1d1d6 !important; border-radius: 7px; background: #fff !important; text-align: left; }
.rb:focus { border-color: var(--ios-blue) !important; }
.ios-prominent { width: 100%; padding: 11px; border-radius: 11px; background: var(--ios-blue) !important; color: #fff !important; font-weight: 600 !important; transition: opacity .2s, transform .15s; }
.ios-prominent:active { transform: scale(.98); }
.ios-prominent:disabled { opacity: .35; cursor: default; }
.calc { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.calc h5 { font-size: 16px; font-weight: 600; margin-top: 4px; }
.calc .ios-prominent { margin-top: 8px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.toggle-row[hidden] { display: none; }
.ios-toggle { position: relative; width: 50px; height: 30px; flex-shrink: 0; }
.ios-toggle input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.ios-toggle i { position: absolute; inset: 0; border-radius: 999px; background: #e9e9ea; transition: background .25s; pointer-events: none; }
.ios-toggle i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.2); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.ios-toggle input:checked + i { background: var(--ios-green); }
.ios-toggle input:checked + i::after { transform: translateX(20px); }
.err { color: var(--ios-red); font-size: 13.5px; }
.err:empty { display: none; }
.result { display: flex; flex-direction: column; gap: 6px; }
.result:empty { display: none; }
.result.show > * { animation: rise .45s cubic-bezier(.2,.8,.2,1) both; }
.result.show > *:nth-child(2) { animation-delay: .06s; } .result.show > *:nth-child(3) { animation-delay: .12s; } .result.show > *:nth-child(4) { animation-delay: .18s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.calc .credit { margin-top: 28px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .showcase { grid-template-columns: 1fr; }
  .showcase.reverse .showcase-text { order: 0; }
  .devices { padding-right: 24px; }
  .mini-phone { right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .phone { animation: none; }
}

/* ---------- "Tap here" guides on the demos ---------- */
.coach { position: absolute; inset: 0; z-index: 25; pointer-events: none; opacity: 0; animation: coachIn .6s ease 1s forwards; transition: opacity .35s ease; }
.coach.gone { opacity: 0 !important; animation: none; }
@keyframes coachIn { to { opacity: 1; } }

.coach-ring {
  position: absolute; left: var(--tx); top: var(--ty); width: var(--ring); height: var(--ring);
  border-radius: 999px; transform: translate(-50%, -50%);
  border: 2px solid #22b35e; box-shadow: 0 0 0 0 rgba(34,179,94,.45);
  animation: coachRing 1.6s ease-out infinite;
}
.coach.center .coach-ring { width: calc(var(--ring) * 1); height: 46px; border-radius: 12px; }
@keyframes coachRing {
  0% { box-shadow: 0 0 0 0 rgba(34,179,94,.5); opacity: 1; }
  100% { box-shadow: 0 0 0 14px rgba(34,179,94,0); opacity: .7; }
}

.coach-body { position: absolute; top: calc(var(--tb) + 2px); display: flex; flex-direction: column; gap: 2px; }
.coach.center .coach-body { left: var(--ax, var(--tx)); transform: translateX(-50%); align-items: center; }
.coach.right .coach-body { right: calc(var(--tr) + 4px); align-items: flex-end; }

.coach-arrow { width: 38px; height: 44px; overflow: visible; animation: coachBob 1.4s ease-in-out infinite; }
.coach.right .coach-arrow { margin-right: 2px; }
.coach-arrow path { fill: none; stroke: #1c9c52; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.coach-arrow .shaft { stroke-dasharray: 70; stroke-dashoffset: 70; animation: coachDraw 2.8s ease-in-out infinite; }
.coach-arrow .head { stroke-dasharray: 24; stroke-dashoffset: 24; animation: coachHead 2.8s ease-in-out infinite; }
@keyframes coachDraw { 0% { stroke-dashoffset: 70; } 35%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -70; } }
@keyframes coachHead { 0%, 30% { stroke-dashoffset: 24; } 45%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 24; } }
@keyframes coachBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.coach-label {
  white-space: nowrap; font: 600 12px/1 "Inter", -apple-system, sans-serif; letter-spacing: .01em;
  color: #d9ffe8; background: #0d1210; padding: 8px 12px; border-radius: 999px;
  box-shadow: 0 8px 20px -6px rgba(0,0,0,.45), 0 0 0 1px rgba(95,211,141,.35);
}

@media (prefers-reduced-motion: reduce) {
  .coach { opacity: 1; }
  .coach-arrow .shaft, .coach-arrow .head { stroke-dashoffset: 0; }
}
