/*
 * Journey demo (cb/journey-demo): a sample website in a browser, with the
 * Conversion Journey panel offset over its right edge.
 * Drawn at a fixed size (1040 x 540) and scaled to fit by view.js (--jd-scale).
 * The sample site's text lives in data-t attributes and is drawn here, so it
 * isn't read as page content (see render.php).
 * On narrow screens (.is-narrow) the browser is scaled on its own and the panel
 * sits under it at full size, so its rows stay readable.
 * State classes, set by view.js:
 *   .jd-page.is-on     the page showing in the browser
 *   .jd__cursor.is-down  the cursor is clicking
 *   .jd-row.is-in      a panel row that has arrived
 *   .jd__sent.is-on    the "Sent to" logos under the conversion
 */
.jd { --jd-scale: 1; position: relative; max-width: 1040px; height: calc(540px * var(--jd-scale)); margin: 0 auto; }
.jd__stage { position: absolute; top: 0; left: 0; width: 1040px; height: 540px; clip-path: inset(-150px -150px 0 -150px); transform: scale(var(--jd-scale)); transform-origin: 0 0; }
.jd [data-t]::before { content: attr(data-t); }

/* Browser */
.jd__browser { position: absolute; top: 0; left: 0; width: 800px; height: 600px; border-color: rgba(255, 255, 255, .12); border-radius: 14px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); }
.jd__path { color: var(--strong); }
.jd__view { position: relative; height: calc(100% - 38px); overflow: hidden; background: #fff; font-family: "canada-type-gibson", sans-serif; color: #1f2a24; }

/* The sample site: header and nav */
.jd-site-head { display: flex; align-items: center; gap: 28px; height: 58px; padding: 0 32px; border-bottom: 1px solid #e3eae4; font-size: 13px; }
.jd-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.jd-logo i { position: relative; width: 18px; height: 18px; border-radius: 50%; background: #2f6b45; }
.jd-logo i::after { content: ""; position: absolute; left: 8px; top: 3px; width: 2px; height: 11px; background: #fff; }
.jd-nav { display: flex; gap: 20px; margin-left: auto; color: #5d6b62; }
.jd-nav span { padding: 4px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.jd-nav span.is-pressed { color: #2f6b45; border-color: #2f6b45; }
.jd-cart { width: 18px; height: 16px; border: 2px solid #5d6b62; border-top-width: 5px; border-radius: 2px 2px 5px 5px; }

/* Pages: one shows at a time */
.jd-page { position: absolute; inset: 58px 0 0; padding: 30px 32px; opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.jd-page.is-on { opacity: 1; visibility: visible; transition: opacity .3s; }
.jd-page p { margin: 0; }
.jd-crumb { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8a978e; }
.jd .jd-h1 { margin: 8px 0 6px; font-family: "canada-type-gibson", sans-serif; font-size: 28px; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; color: #1f2a24; }
.jd-meta { font-size: 14px; color: #5d6b62; margin-bottom: 18px !important; }
.jd-photo { position: relative; display: block; height: 150px; margin-bottom: 18px; overflow: hidden; border-radius: 10px; background: linear-gradient(#dcebf2 0 45%, #3f7a4f 45% 52%, #8cc276 52%); }
/* A flag on the green */
.jd-photo::before { content: ""; position: absolute; left: 62%; bottom: 30%; width: 2px; height: 34%; background: #fff; }
.jd-photo::after { content: ""; position: absolute; left: calc(62% + 2px); bottom: calc(30% + 34% - 16px); width: 18px; height: 12px; background: #e0574a; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.jd-photo--wide { height: 210px; margin: 22px 0 0; }
.jd-photo--tall { height: 260px; margin: 0; }
.jd-lines { display: grid; gap: 9px; }
.jd-lines i { display: block; height: 8px; border-radius: 4px; background: #e7ece8; }
.jd-lines i:nth-child(3n) { width: 82%; }
.jd-lines i:last-child { width: 55%; }
.jd-split { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }
.jd-split--even { grid-template-columns: 1.2fr 1fr; margin-top: 10px; }
.jd-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0 24px; }
.jd-cards > span { display: grid; gap: 12px; padding: 18px; border: 1px solid #e3eae4; border-radius: 10px; font-size: 14px; }
.jd-btn { display: inline-block; padding: 11px 20px; border: 2px solid #2f6b45; border-radius: 8px; background: #2f6b45; color: #fff; font-size: 14px; font-weight: 600; font-style: normal; transition: transform .15s, background .2s; }
.jd-btn--line { background: #fff; color: #2f6b45; }
.jd-btn.is-pressed { transform: scale(.95); }
.jd-btn.is-done { background: #3e8e63; border-color: #3e8e63; }

/* Forms */
.jd-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin: 16px 0 20px; }
.jd-split--even .jd-form { grid-template-columns: 1fr 1fr; gap: 12px 14px; margin: 0 0 18px; } /* first and last name share a row */
.jd-field { display: grid; gap: 6px; font-size: 12px; }
.jd-field--wide { grid-column: 1 / -1; }
.jd-field em { font-style: normal; font-weight: 600; color: #5d6b62; }
.jd-field > span { display: block; box-sizing: border-box; height: 36px; padding: 0 12px; overflow: hidden; border: 1px solid #d0dbd2; border-radius: 7px; font-size: 14px; line-height: 34px; white-space: nowrap; }
.jd-field > span.is-typing { border-color: #2f6b45; box-shadow: 0 0 0 3px rgba(47, 107, 69, .15); }
.jd-field > span.is-typing::after { content: ""; display: inline-block; width: 1px; height: 1em; margin-left: 1px; vertical-align: -2px; background: #1f2a24; animation: jd-caret .8s steps(1) infinite; }
@keyframes jd-caret { 50% { opacity: 0; } }
.jd-summary { padding: 18px; border-radius: 10px; background: #f3f7f3; font-size: 14px; }
.jd-summary p { display: flex; justify-content: space-between; padding: 6px 0; }
.jd-summary .jd-total { margin-top: 6px !important; padding-top: 12px; border-top: 1px solid #dce6de; font-weight: 700; }

/* Shop */
.jd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 18px; }
.jd-grid > span { display: grid; gap: 4px; font-size: 13px; }
.jd-grid > span em { font-style: normal; color: #5d6b62; }
.jd-split > .jd-club { width: 240px; }
/* Golf club "photos" (render.php draws each club as an SVG). */
.jd-club { display: block; aspect-ratio: 4 / 5; border-radius: 10px; background: #f1f5f0; }
.jd-club svg { display: block; width: 100%; height: 100%; }
.jd-price { font-size: 22px; font-weight: 700; margin-bottom: 8px !important; }
.jd-qty { font-size: 13px; color: #5d6b62; margin-bottom: 18px !important; }
.jd-qty b { display: inline-block; margin-left: 8px; padding: 4px 12px; border: 1px solid #d0dbd2; border-radius: 6px; color: #1f2a24; }
.jd-hero { padding: 26px 0 8px; }
.jd-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 560px; }
.jd-plans > span { display: grid; gap: 12px; padding: 22px; border: 1px solid #e3eae4; border-radius: 12px; font-size: 16px; }
.jd-plans > span em { font-style: normal; font-size: 20px; font-weight: 700; }
.jd-plans .jd-plan--pick { border: 2px solid #2f6b45; }
.jd-plans .jd-btn { justify-self: start; }

/* Confirmation pages */
.jd-done { display: grid; justify-items: center; gap: 4px; padding-top: 70px; text-align: center; }
.jd-check { width: 56px; height: 56px; margin-bottom: 8px; border-radius: 50%; background: #3e8e63 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 26px no-repeat; }

/* Cursor */
.jd__cursor { position: absolute; top: 0; left: 0; z-index: 5; width: 22px; height: 22px; transform: translate(620px, 300px); transition: transform .7s cubic-bezier(.45, 0, .2, 1); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3)); }
.jd__cursor.is-down path { transform: scale(.85); transform-origin: 5px 3px; }

/* Journey panel */
.jd__panel { position: absolute; top: 90px; left: 680px; width: 360px; border: 0; border-radius: 12px; box-shadow: 0 30px 70px -15px rgba(0, 0, 0, .55); }
.jd__log { min-height: 250px; background: #fff; }
.jd__log > * + * { border-top: var(--border-soft); }
.jd .jd-row { opacity: 0; transform: translateY(8px); transition: opacity .4s ease, transform .4s ease; }
.jd .jd-row.is-in { opacity: 1; transform: none; }
.jd__sent { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 1rem; border-top: var(--border-soft); background: #fff; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--medium); opacity: .25; transition: opacity .4s; }
.jd__sent.is-on { opacity: 1; }
.jd__sent img { height: 18px; width: auto; max-width: 64px; object-fit: contain; }

/* Hashing: the email row turns green once hashed; the ad platforms that get the
   hash carry a small lock. */
.jd-pii .jd-pii__value { font-family: var(--font-mono); letter-spacing: -.02em; color: var(--strong); }
.jd-pii .jd-pii__tag { display: flex; align-items: center; gap: 4px; }
.jd-pii .jd-pii__tag svg { width: 11px; height: 11px; }
.jd-pii.is-hashed .jd-pii__tag { color: #2f8a63; font-weight: 600; }
.jd-pii.is-hashed .jd-pii__value { color: #2f8a63; }
.jd__to { display: inline-flex; align-items: center; gap: 4px; }
.jd__lock { flex-shrink: 0; width: 15px; height: 15px; border-radius: 50%; background: #2f8a63 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / 8px no-repeat; }

/* Narrow screens: browser scaled on its own, panel under it at full size */
.jd.is-narrow { height: auto; padding-bottom: 3rem; }
.jd.is-narrow .jd__stage { position: relative; width: 100%; height: auto; clip-path: none; transform: none; }
.jd.is-narrow .jd__browser { position: relative; width: 800px; height: 500px; transform: scale(var(--jd-scale)); transform-origin: 0 0; margin-bottom: calc(500px * (var(--jd-scale) - 1)); }
.jd.is-narrow .jd__panel { position: relative; top: auto; left: auto; width: auto; margin: -40px 12px 0; }

@media (prefers-reduced-motion: reduce) {
	.jd * { transition: none !important; animation: none !important; }
}

/* Tee time slots; the one the cursor picks is outlined when it's clicked. */
.jd-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 620px; }
.jd-slots > span { display: grid; gap: 2px; padding: 12px; border: 1px solid #d0dbd2; border-radius: 8px; text-align: center; font-size: 14px; }
.jd-slots > span em { font-style: normal; font-size: 12px; color: #5d6b62; }
.jd-slots > span { transition: border-color .15s, background .15s, box-shadow .15s; }
.jd-slots > .jd-go:is(.is-pressed, .is-picked) { border-color: #2f6b45; background: #eef6ef; box-shadow: inset 0 0 0 1px #2f6b45; }
