/* Yellowbirdie 3D demo. Dark Built with Baron chrome outside, a Yellowbirdie-green showcase inside. Classes prefixed yb-. */
@font-face { font-family: "Bricolage Grotesque"; src: url(fonts/bricolage-grotesque-latin.woff2) format("woff2"); font-weight: 200 800; font-stretch: 100%; font-display: swap; }

/* ---------- dark intro ---------- */
.yb-intro { padding-block: clamp(56px, 8vw, 112px) clamp(44px, 6vw, 80px); overflow: hidden; }
.yb-intro h1 { max-width: 13ch; margin-bottom: 22px; }
.yb-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* ---------- the showcase ---------- */
.yb-show {
  --yb-layout: overlay;
  --cream: #f6f1e4; --cream-2: rgba(246,241,228,.86); --cream-3: rgba(246,241,228,.66);
  --gold: #FECE00; --crimson: #B70114; --g-deep: #0c2c17; --g: #1b5e33;
  --disp: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  padding: 0; position: relative; isolation: isolate; color: var(--cream-2);
  background:
    radial-gradient(70% 50% at 72% 8%, rgba(78,170,104,.32), transparent 70%),
    repeating-linear-gradient(118deg, rgba(255,255,255,.026) 0 110px, rgba(0,0,0,.04) 110px 220px),
    linear-gradient(180deg, #154a28 0%, #1b5e33 18%, #1a5a31 60%, #134425 88%, #0d3019 100%);
  border-block: 1px solid rgba(254,206,0,.18);
}
.yb-show::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3; box-shadow: inset 0 0 160px rgba(3,20,10,.55); }

/* the sticky 3D view: full screen behind the text on wide screens */
.yb-view { position: sticky; top: 0; height: 100vh; margin-bottom: -100vh; z-index: 0; overflow: hidden; }
.yb-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; opacity: 0; transition: opacity .8s var(--ease); -webkit-tap-highlight-color: transparent; }
.yb-gl .yb-canvas { opacity: 1; }
.yb-canvas.yb-dragging { cursor: grabbing; }
.yb-band-still { display: none; }
.yb-drag-hint { display: none; }

.yb-stage { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); align-items: center; gap: clamp(24px, 4vw, 64px);
  max-width: 1400px; margin-inline: auto; padding: 64px clamp(20px, 5vw, 72px) 0; pointer-events: none; }
.yb-stage.yb-r { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); }
.yb-card { grid-column: 1; grid-row: 1; pointer-events: auto; max-width: 31rem; }
.yb-spot { grid-column: 2; grid-row: 1; align-self: stretch; margin-block: 28px; min-height: 320px; position: relative; display: grid; place-items: center; }
.yb-r .yb-card { grid-column: 2; justify-self: end; }
.yb-r .yb-spot { grid-column: 1; }
.yb-stage[data-stage="hero"] .yb-spot { margin-block: 8px 20px; }

.yb-card h2 { font-family: var(--disp); font-weight: 600; font-size: clamp(2.5rem, 1.1rem + 4.3vw, 5.4rem); line-height: .93; letter-spacing: -.045em; color: var(--cream); margin: 18px 0 22px; text-wrap: balance; }
.yb-card h2 em { font-style: normal; color: var(--gold); }
.yb-card > p { font-size: clamp(1.04rem, .98rem + .3vw, 1.2rem); line-height: 1.55; color: var(--cream-2); max-width: 36ch; }
.yb-kick, .yb-brand { display: inline-flex; align-items: center; gap: 10px; font: 500 .78rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.yb-brand { color: var(--cream); font-family: var(--disp); font-weight: 600; font-size: 1.02rem; letter-spacing: -.01em; text-transform: none; }
.yb-brand i { width: 11px; height: 11px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(254,206,0,.18); }
.yb-scroll { display: inline-flex; align-items: center; gap: 12px; margin-top: 34px; font: 500 .74rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--cream-3); }
.yb-scroll span { width: 1px; height: 34px; background: linear-gradient(var(--gold), transparent); animation: yb-drop 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes yb-drop { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* controls */
.yb-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.yb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  background: var(--gold); color: #0f2a17; font: 650 1rem/1 var(--font); letter-spacing: -.005em; box-shadow: 0 10px 30px -10px rgba(254,206,0,.6), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .2s var(--ease), background .2s, box-shadow .2s; }
.yb-btn svg { width: 18px; height: 18px; flex: none; }
.yb-btn:hover { background: #ffdb3a; transform: translateY(-1px); }
.yb-btn:active { transform: scale(.97); }
.yb-btn[aria-pressed="true"] { background: var(--cream); box-shadow: 0 10px 30px -12px rgba(246,241,228,.5); }
.yb-btn-ghost { background: rgba(4,24,12,.28); color: var(--cream); border-color: rgba(246,241,228,.4); box-shadow: none; }
.yb-btn-ghost:hover { background: rgba(4,24,12,.45); border-color: var(--cream); }
.yb-icon { width: 50px; padding: 0; }
.yb-show :focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; border-radius: 999px; }
.yb-read { display: inline-flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(246,241,228,.16); background: rgba(4,24,12,.34);
  font-size: .76rem; line-height: 1.3; letter-spacing: .03em; color: var(--cream-3); font-variant-numeric: tabular-nums; }
.yb-read b { color: var(--cream); font-weight: 500; }
.yb-card > p.yb-read { margin-top: 24px; font-size: .76rem; line-height: 1.3; color: var(--cream-3); max-width: none; }
.yb-stage[data-stage="putt"] { grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); }
.yb-count { display: inline-flex; align-items: baseline; gap: 10px; margin-left: 6px; font: 500 .78rem/1 var(--mono); letter-spacing: .04em; color: var(--cream-3); text-transform: uppercase; }
.yb-count b { font: 600 2.6rem/1 var(--disp); letter-spacing: -.04em; color: var(--gold); font-variant-numeric: tabular-nums; min-width: 1ch; }
.yb-count.bump b { animation: yb-bump .5s var(--ease); }
@keyframes yb-bump { 40% { transform: scale(1.35); } }

.yb-finishes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.yb-finishes button { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 16px 0 10px; border-radius: 999px; cursor: pointer; font: 550 .92rem/1 var(--font);
  color: var(--cream-2); background: rgba(4,24,12,.3); border: 1px solid rgba(246,241,228,.22); transition: border-color .2s, background .2s, color .2s; }
.yb-finishes button:hover { border-color: rgba(246,241,228,.5); color: var(--cream); }
.yb-finishes button[aria-pressed="true"] { color: var(--cream); border-color: var(--gold); background: rgba(254,206,0,.12); }
.yb-finishes i { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 -3px 5px rgba(0,0,0,.3), inset 0 2px 3px rgba(255,255,255,.55), 0 0 0 1px rgba(0,0,0,.25); }
.f-brushed { background: linear-gradient(160deg, #eef0f1, #9ca3a7 55%, #d6dadc); }
.f-matte { background: linear-gradient(160deg, #5b6366, #2c3133); }
.f-polished { background: radial-gradient(circle at 35% 30%, #fff, #c4cacd 40%, #6d7579 75%, #e3e6e8); }
.f-gold { background: linear-gradient(160deg, #fff0a6, #d9a53a 55%, #8d6210); }

/* still drawing: shown while the model loads and whenever 3D is unavailable */
.yb-still { width: min(78%, 420px); height: auto; filter: drop-shadow(0 30px 40px rgba(2,17,8,.45)); transition: opacity .6s var(--ease); }
.yb-still-2 { transform: rotate(14deg) scale(.92); } .yb-still-3 { transform: scaleX(-1) rotate(-8deg); } .yb-still-4 { transform: rotate(30deg) scale(.9); } .yb-still-5 { transform: scaleX(-1) rotate(18deg); }
.yb-gl .yb-still { opacity: 0; }
.yb-nogl-note { display: none; margin-top: 18px; font: 500 .8rem/1.5 var(--mono); color: var(--cream-3); }
.yb-gl-only { visibility: hidden; }
.yb-gl .yb-gl-only { visibility: visible; }
.yb-nogl .yb-gl-only { display: none; }
.yb-nogl .yb-nogl-note { display: block; }
.yb-nogl .yb-scroll { display: none; }

/* ---------- phones and narrow screens: the putter gets its own band on top, text below it ---------- */
@media (max-width: 760px) {
  .yb-show { --yb-layout: band; }
  .yb-view { top: 64px; height: 46svh; margin-bottom: 0; z-index: 2; background: inherit; background-attachment: scroll;
    border-bottom: 1px solid rgba(246,241,228,.14); box-shadow: 0 18px 30px -18px rgba(2,17,8,.7); }
  .yb-view { background:
    radial-gradient(80% 70% at 60% 20%, rgba(78,170,104,.34), transparent 70%),
    repeating-linear-gradient(118deg, rgba(255,255,255,.026) 0 80px, rgba(0,0,0,.04) 80px 160px),
    linear-gradient(180deg, #154a28, #1b5e33); }
  .yb-band-still { display: block; position: absolute; inset: 6% 0; background: url(still.svg) center / contain no-repeat; filter: drop-shadow(0 20px 26px rgba(2,17,8,.45)); transition: opacity .6s var(--ease); }
  .yb-gl .yb-band-still { opacity: 0; }
  .yb-drag-hint { display: block; position: absolute; right: 14px; bottom: 10px; z-index: 1; margin: 0; font: 500 .68rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--cream-3); opacity: 0; transition: opacity .6s; }
  .yb-gl .yb-drag-hint { opacity: 1; }
  .yb-stage, .yb-stage.yb-r { display: block; min-height: calc(100svh - 64px - 46svh); padding: 26px 20px 40px; }
  .yb-spot { display: none; }
  .yb-card, .yb-r .yb-card { max-width: none; }
  .yb-card h2 { font-size: clamp(2.1rem, 1.3rem + 4vw, 2.9rem); margin: 12px 0 12px; }
  .yb-card > p { font-size: 1rem; }
  .yb-controls { margin-top: 18px; gap: 10px; }
  .yb-finishes { margin-top: 16px; }
  .yb-finishes button { min-height: 40px; padding: 0 12px 0 8px; font-size: .86rem; }
  .yb-scroll { margin-top: 18px; }
  .yb-show::after { box-shadow: none; }
}

/* ---------- what is real (dark) ---------- */
.yb-real { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.yb-real h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); margin-bottom: 16px; }
.yb-real-link { margin-top: 22px; }
.yb-ticks { gap: 12px; }
@media (max-width: 820px) { .yb-real { grid-template-columns: minmax(0, 1fr); } }

@media (prefers-reduced-motion: reduce) { .yb-scroll span { animation: none; } }
