/* Shared by the app and every public page (see brand.js): social media buttons, gentle animations and card photos. */

/* Social media buttons: brand.js fills [data-social] with the links the owner set in Control center. */
.social-box{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;margin:14px 0}
.social-box[hidden]{display:none}
.social-box>small{color:#8e9088;font-size:12px;letter-spacing:.04em}
.social-links{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}
.social-link{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:50%;border:1px solid #3d3522;background:#121310;color:#d9b44a;text-decoration:none;transition:transform .2s ease,background .2s ease,color .2s ease,border-color .2s ease}
.social-link svg{width:19px;height:19px;display:block}
.social-link:hover,.social-link:focus-visible{background:#d9b44a;border-color:#d9b44a;color:#14120c;transform:translateY(-2px)}

/* Cards lift a little under the mouse (before the slide-in rules, which win while a card is sliding in). */
@media (hover:hover){
  html.if-motion :is(.landing-features>div,.ex-card,.rc-card,.pg-card,.ov-stat,.ov-meal){transition:transform .25s ease,box-shadow .25s ease}
  html.if-motion :is(.landing-features>div,.ex-card,.rc-card,.pg-card,.ov-stat,.ov-meal):hover{transform:translateY(-4px);box-shadow:0 14px 30px rgba(0,0,0,.35)}
}

/* Sections and cards slide in as they reach the screen (only below the first screen, so nothing visible ever hides). */
html.if-motion .rv{opacity:0;transform:translateY(22px);transition:opacity .6s ease var(--rv-delay,0ms),transform .65s cubic-bezier(.2,.7,.2,1) var(--rv-delay,0ms)}
html.if-motion .rv.rv-in{opacity:1;transform:none}

/* First screens: the headline, text and buttons rise in one after another. */
@keyframes if-rise{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}
html.if-motion :is(.landing-copy,.pp-hero-copy,.ex-hero,.pp-hero>div:first-child)>*{animation:if-rise .7s cubic-bezier(.2,.7,.2,1) both}
html.if-motion :is(.landing-copy,.pp-hero-copy,.ex-hero,.pp-hero>div:first-child)>:nth-child(2){animation-delay:.08s}
html.if-motion :is(.landing-copy,.pp-hero-copy,.ex-hero,.pp-hero>div:first-child)>:nth-child(3){animation-delay:.16s}
html.if-motion :is(.landing-copy,.pp-hero-copy,.ex-hero,.pp-hero>div:first-child)>:nth-child(4){animation-delay:.24s}
html.if-motion :is(.landing-copy,.pp-hero-copy,.ex-hero,.pp-hero>div:first-child)>:nth-child(n+5){animation-delay:.32s}

/* A slow gold light breathing over the first page's photo, and a shine passing over the main buttons now and then. */
.landing-hero{position:relative;isolation:isolate}
@keyframes if-glow{from{opacity:.3}to{opacity:.85}}
html.if-motion .landing-hero:after{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(42% 55% at 72% 38%,rgba(217,180,74,.18),transparent 70%);animation:if-glow 7s ease-in-out infinite alternate}
html[dir=rtl].if-motion .landing-hero:after{background:radial-gradient(42% 55% at 28% 38%,rgba(217,180,74,.18),transparent 70%)}
@keyframes if-shine{0%,72%{transform:translateX(-120%) skewX(-18deg)}100%{transform:translateX(320%) skewX(-18deg)}}
html.if-motion :is(.landing-actions .gold-btn,.pp-btn.gold.big){position:relative;overflow:hidden}
html.if-motion :is(.landing-actions .gold-btn,.pp-btn.gold.big):after{content:"";position:absolute;top:0;bottom:0;left:0;width:34%;pointer-events:none;background:linear-gradient(90deg,transparent,rgba(255,255,255,.38),transparent);animation:if-shine 6s ease-in-out infinite}

/* Photos behind Overview cards (brand.js sets --photo as each card comes near the screen). */
.has-photo{position:relative;isolation:isolate;overflow:hidden}
.has-photo:before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(180deg,rgba(9,10,9,.66) 0,rgba(9,10,9,.9) 58%,rgba(9,10,9,.97) 100%),var(--photo) var(--photo-at,center)/cover no-repeat}
@keyframes if-photo{from{opacity:0}to{opacity:1}}
html.if-motion .has-photo:before{animation:if-photo .9s ease both}

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