/* ==========================================================================
   App page / 01 — the four features, each one opening onto the app itself.

   The rows are the site's hairline list (.rules) made into disclosures: one
   open at a time, the panel easing open on a grid row so the page never
   jumps. Inside, the copy sits under the feature's own name and the app sits
   in a phone drawn here in CSS, so it is sharp at any size and the four
   rows share one frame whether they hold a live demo or a screen.

   No cards, no glow: the phone is the object, hairlines do the rest.
   ========================================================================== */

.try{ border-top:1px solid var(--line); }
.try-row{ border-bottom:1px solid var(--line); }
.try-h{ margin:0; font:inherit; }

/* ---- the row: the whole of it is the control ---- */
.try-btn{
  position:relative; display:grid; width:100%; text-align:left; cursor:pointer;
  grid-template-columns:minmax(0,5fr) minmax(0,6fr) 9.5rem;
  gap:clamp(18px,3vw,48px); align-items:baseline;
  padding:clamp(20px,2.2vw,30px) 0;
  color:var(--fg); font:inherit; background:none; border:0;
  -webkit-tap-highlight-color:transparent;
}
.try-t{
  font-family:var(--display); font-weight:700; letter-spacing:-.015em;
  font-size:clamp(16px,1.5vw,20px); line-height:1.25;
  transition:color .3s var(--ease);
}
.try-p{ font-size:14.5px; font-weight:300; line-height:1.62; color:var(--fg-2); }
.try-cue{
  display:inline-flex; align-items:center; gap:12px; align-self:center; justify-self:end;
  font-family:var(--mono); font-size:9.5px; letter-spacing:.16em; text-transform:uppercase;
  color:var(--fg-3); white-space:nowrap; transition:color .3s var(--ease);
}
/* a hairline circle with a plus that turns into a minus */
.try-cue i{
  position:relative; width:26px; height:26px; border-radius:50%;
  border:1px solid var(--line-2); flex:none;
  transition:border-color .3s var(--ease), background-color .3s var(--ease);
}
.try-cue i::before, .try-cue i::after{
  content:''; position:absolute; left:50%; top:50%; width:10px; height:1px;
  background:currentColor; transform:translate(-50%,-50%);
  transition:transform .45s var(--ease), opacity .3s var(--ease);
}
.try-cue i::after{ transform:translate(-50%,-50%) rotate(90deg); }
.try-btn[aria-expanded="true"] .try-cue i::after{ transform:translate(-50%,-50%) rotate(0deg); opacity:0; }

/* the site's one hover treatment: a lift of the surface and a brand hairline */
.try-btn::before{
  content:''; position:absolute; left:calc(var(--gutter) * -.35); right:calc(var(--gutter) * -.35);
  top:0; bottom:0; z-index:-1; pointer-events:none;
  background:linear-gradient(var(--hv-wash), var(--hv-wash)); opacity:0;
  transition:opacity .3s var(--ease);
}
.try-btn::after{
  content:''; position:absolute; left:0; right:0; top:-1px; height:1px; pointer-events:none;
  background:linear-gradient(90deg, var(--hv-line-a), var(--hv-line-b));
  opacity:0; transform:scaleX(.35); transform-origin:left center;
  transition:opacity .3s var(--ease), transform .45s var(--ease);
}
.try-row{ position:relative; isolation:isolate; }
.try-btn:hover::before{ opacity:1; }
.try-btn:hover::after, .try-btn[aria-expanded="true"]::after{ opacity:1; transform:scaleX(1); }
.try-btn:hover .try-cue, .try-btn[aria-expanded="true"] .try-cue{ color:var(--fg); }
.try-btn:hover .try-cue i{ border-color:rgba(226,228,255,.34); }
.try-btn[aria-expanded="true"] .try-cue i{ border-color:rgba(226,228,255,.4); background:rgba(226,228,255,.05); }
.try-btn:focus-visible{ outline:2px solid #c7b5fb; outline-offset:6px; }

/* ---- the panel: a grid row that eases open, so nothing below it jumps ---- */
/* Without the script every row simply stays open, so nothing is hidden from
   anyone; the script marks the list and folds the rows. */
.try-panel{ display:grid; grid-template-rows:1fr; }
.try-panel[hidden]{ display:none; }
.try[data-js] .try-panel{ grid-template-rows:0fr; transition:grid-template-rows .7s var(--ease); }
.try[data-js] .try-panel[data-open]{ grid-template-rows:1fr; }
.try-clip{ min-height:0; overflow:hidden; }
.try-inner{
  display:grid; grid-template-columns:minmax(0,5fr) minmax(0,6fr) 9.5rem;
  gap:clamp(18px,3vw,48px); align-items:start;
  padding:clamp(4px,1vw,10px) 0 clamp(40px,5vw,72px);
}
.try[data-js] .try-inner{ opacity:0; transform:translateY(14px); transition:opacity .5s var(--ease), transform .7s var(--ease); }
.try[data-js] .try-panel[data-open] .try-inner{ opacity:1; transform:none; transition-delay:.12s; }
.try:not([data-js]) .try-cue{ display:none; }

.try-copy{ display:grid; gap:22px; align-content:start; padding-top:clamp(8px,2vw,28px); }
.try-copy .lbl{ display:flex; align-items:center; gap:10px; }
.try-copy .lbl i{ width:6px; height:6px; border-radius:50%; background:var(--g-pink);
  box-shadow:0 0 0 3px rgba(233,30,99,.15); animation:breathe 3.4s ease-in-out infinite; }
.try-copy p{ font-size:15.5px; font-weight:300; line-height:1.68; color:var(--fg-2); max-width:44ch; }
.try-copy .try-hint{ font-family:var(--mono); font-size:10px; letter-spacing:.06em; line-height:1.7; color:var(--fg-3); max-width:52ch; }
.try-copy ul{ list-style:none; border-top:1px solid var(--line); max-width:44ch; }
.try-copy li{ display:flex; gap:14px; padding:12px 0; border-bottom:1px solid var(--line);
  font-size:14px; font-weight:300; line-height:1.55; color:var(--fg-2); }
.try-copy li b{ font-family:var(--mono); font-weight:400; font-size:10px; letter-spacing:.12em;
  color:var(--fg-3); padding-top:3px; min-width:22px; }

/* live figures from the map, in the site's type rather than the demo's */
.try-stats{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); border-top:1px solid var(--line); max-width:46ch; }
.try-stats div{ padding:14px 14px 0 0; min-width:0; }
.try-stats div + div{ padding-left:14px; border-left:1px solid var(--line); }
.try-stats dt{ font-family:var(--mono); font-size:9px; letter-spacing:.14em; text-transform:uppercase; color:var(--fg-3); }
.try-stats dd{ font-family:var(--mono); font-size:clamp(17px,1.6vw,21px); letter-spacing:-.01em; margin-top:8px;
  color:var(--fg); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
/* the busiest venue is a name, not a number: it may take two lines */
.try-stats dd[data-stat="hottest"]{ white-space:normal; font-size:clamp(13px,1.1vw,15px); line-height:1.3; letter-spacing:0;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; }
.try-stats dd small{ display:block; font-size:10px; letter-spacing:.06em; color:var(--fg-3); margin-top:4px; }

/* ---- the phone ---- */
.try-figure{ margin:0; display:grid; justify-items:center; gap:18px; grid-column:2 / span 2; }
.try-figure figcaption{
  width:min(100%,420px); display:flex; justify-content:space-between; gap:16px;
  border-top:1px solid var(--line); padding-top:14px;
  font:10px/1.6 var(--mono); letter-spacing:.02em; color:var(--fg-3);
}
.try-figure figcaption span:last-child{ color:#aaa5b7; white-space:nowrap; }

.phone{
  /* as big as it can be while the whole phone still fits under the row */
  --pw:clamp(240px, min(28vw, calc((100svh - 250px) * .488)), 336px);
  position:relative; width:var(--pw); aspect-ratio:.488;
  padding:calc(var(--pw) * .034);
  border-radius:calc(var(--pw) * .168);
  background:linear-gradient(145deg,#2b2b33 0%,#0d0d12 22%,#08080c 70%,#1c1c23 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.16),
    inset 0 0 0 calc(var(--pw) * .012) #121218,
    inset 0 0 0 calc(var(--pw) * .016) rgba(255,255,255,.05),
    0 40px 80px -30px rgba(0,0,0,.9),
    0 18px 36px -18px rgba(0,0,0,.7);
}
/* the side buttons: two volume keys and the power key, just proud of the edge */
.phone::before, .phone::after{
  content:''; position:absolute; width:3px; border-radius:2px;
  background:linear-gradient(90deg,#1a1a21,#34343d);
}
.phone::before{ left:-2px; top:21%; height:9%;
  box-shadow:0 calc(var(--pw) * .26) 0 #26262e; }
.phone::after{ right:-2px; top:27%; height:14%; background:linear-gradient(270deg,#1a1a21,#34343d); }
.phone-screen{
  position:relative; width:100%; height:100%; overflow:hidden; isolation:isolate;
  border-radius:calc(var(--pw) * .136); background:#000; container-type:inline-size;
  transform:translateZ(0);
}
.phone-screen > iframe, .phone-screen > img{
  position:absolute; inset:0; width:100%; height:100%; border:0; display:block;
}
.phone-screen > img{ object-fit:cover; object-position:top center; }
/* the island, over whatever the screen shows */
.phone-screen .island{
  position:absolute; left:50%; top:2.7cqw; z-index:2; width:30cqw; height:8.6cqw;
  transform:translateX(-50%); border-radius:99px; background:#000; pointer-events:none;
}
.phone[data-own-island] .island{ display:none; }
/* a status bar for a screen captured without one, drawn to match the demos' */
.phone-screen .sbar{
  position:absolute; left:0; right:0; top:0; height:12.8cqw; z-index:2; pointer-events:none;
  display:flex; align-items:center; justify-content:space-between; padding:1cqw 7.2cqw 0 11.3cqw;
  color:#fff; font:600 4.1cqw/1 -apple-system,BlinkMacSystemFont,'SF Pro Text','Helvetica Neue',sans-serif; letter-spacing:-.01em;
}
.phone-screen .sbar svg{ height:2.95cqw; width:auto; fill:currentColor; }
/* while a demo loads: the app's dark, and one quiet line */
.phone-screen .loading{
  position:absolute; inset:0; display:grid; place-items:center; z-index:1;
  font:9px var(--mono); letter-spacing:.18em; text-transform:uppercase; color:#6e7085;
  background:#09090f; transition:opacity .5s var(--ease);
}
.phone-screen .loading span{ animation:breathe 2.4s ease-in-out infinite; }
.phone-screen[data-ready] .loading{ opacity:0; pointer-events:none; }

/* ---- smaller screens ---- */
@media (max-width:1100px){
  .try-btn{ grid-template-columns:minmax(0,5fr) minmax(0,7fr); }
  .try-cue{ justify-self:start; }
  .try-cue{ grid-column:1 / -1; justify-self:start; margin-top:-4px; }
  .try-inner{ grid-template-columns:minmax(0,1fr) auto; }
  .try-figure{ grid-column:2; }
}
@media (max-width:820px){
  .try-btn{ grid-template-columns:1fr; gap:10px; }
  .try-cue{ margin-top:6px; }
  .try-inner{ grid-template-columns:1fr; gap:32px; }
  /* on a phone the row's own sentence has already said what it is: show the
     app first, the detail after it */
  .try-figure{ grid-column:1; order:-1; }
  .try-copy{ padding-top:0; }
  .phone{ --pw:min(300px, 76vw); }
  .try-stats{ max-width:none; }
}
@media (max-width:900px){
  .try-cue, .try-stats dt, .try-copy li b, .try-figure figcaption{ font-size:11px; letter-spacing:.1em; }
  .try-copy .try-hint{ font-size:11px; }
}
@media (prefers-reduced-motion:reduce){
  .try-panel, .try-inner, .try-cue i::before, .try-cue i::after{ transition:none !important; }
  .phone-screen .loading span, .try-copy .lbl i{ animation:none; }
}
