/* ==========================================================================
   Syndaris - visual language referenced from apple.com:
   big tight headlines, translucent nav, pill buttons, generous air,
   #f5f5f7 section bands, restrained blue accent.
   ========================================================================== */

/* --- Tokens --------------------------------------------------------------- */
/* The site is black, always - it does not follow the OS light/dark setting.
   --bg-alt is deliberately the same black as --bg, so section bands read as
   one continuous background instead of grey blocks. Card surfaces stay a
   touch lighter so they don't disappear. */
:root{
  --bg:#000000;
  --bg-alt:#000000;
  --ink:#f5f5f7;
  --ink-2:#86868b;
  --hairline:rgba(255,255,255,.14);
  --accent:#0071e3;
  --accent-hover:#0077ed;
  --accent-quiet:#2997ff;
  --nav-bg:rgba(0,0,0,.7);
  --card:#161617;
  --card-shadow:0 4px 30px rgba(0,0,0,.5);
  --screen-1:#141416;
  --screen-2:#1d1d20;
  --skeleton:rgba(255,255,255,.16);
  --ok:#41c463;
  --max:980px;
}

/* --- Base ----------------------------------------------------------------- */
*,*::before,*::after{box-sizing:border-box}

html{
  -webkit-text-size-adjust:100%;
  scroll-behavior:smooth;
  scroll-padding-top:64px;
}

body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:"Inter",-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  font-size:17px;
  line-height:1.47;
  letter-spacing:-.01em;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

h1,h2,h3,h4{margin:0;font-weight:600;letter-spacing:-.021em;line-height:1.08}
p{margin:0}
a{color:var(--accent-quiet);text-decoration:none}
a:hover{text-decoration:underline}

.container{width:100%;max-width:var(--max);margin-inline:auto;padding-inline:22px}

.skip-link{
  position:absolute;left:-9999px;top:0;z-index:100;
  padding:12px 18px;background:var(--ink);color:var(--bg);border-radius:0 0 12px 0;
}
.skip-link:focus{left:0}

:focus-visible{outline:3px solid var(--accent);outline-offset:3px;border-radius:6px}

/* --- Nav ------------------------------------------------------------------ */
.nav{
  position:sticky;top:0;z-index:50;
  height:48px;
  background:var(--nav-bg);
  backdrop-filter:saturate(180%) blur(20px);
  -webkit-backdrop-filter:saturate(180%) blur(20px);
  border-bottom:1px solid transparent;
  transition:border-color .3s ease;
}
.nav.is-scrolled{border-bottom-color:var(--hairline)}

.nav-inner{
  max-width:var(--max);height:100%;margin-inline:auto;padding-inline:22px;
  display:flex;align-items:center;gap:36px;
}

.brand{
  display:flex;align-items:center;gap:7px;
  color:var(--ink);text-decoration:none;
  font-size:15px;font-weight:600;letter-spacing:-.01em;
}
.brand:hover{text-decoration:none;opacity:.7}
.brand-mark{width:19px;height:19px;flex:none}

.nav-links{display:flex;gap:32px;margin-left:auto}
.nav-links a{
  color:var(--ink);opacity:.82;
  font-size:12.5px;font-weight:400;letter-spacing:-.005em;
  transition:opacity .2s ease;
}
.nav-links a:hover{opacity:1;text-decoration:none}

/* --- Hero ----------------------------------------------------------------- */
.hero{padding:96px 0 8px;text-align:center}
.hero-inner{display:flex;flex-direction:column;align-items:center}

.eyebrow{
  font-size:19px;font-weight:600;letter-spacing:-.01em;
  color:var(--ink-2);margin-bottom:14px;
}

.headline{
  font-size:clamp(44px,8.4vw,88px);
  line-height:1.04;
  letter-spacing:-.025em;
  max-width:14ch;
}

.subhead{
  margin-top:20px;
  font-size:clamp(21px,3vw,28px);
  font-weight:600;
  letter-spacing:-.018em;
  color:var(--ink);
}

.body-lg{
  margin-top:20px;max-width:600px;
  font-size:19px;line-height:1.5;color:var(--ink-2);
}

.cta-row{
  margin-top:38px;
  display:flex;align-items:center;gap:30px;flex-wrap:wrap;justify-content:center;
}

.link-arrow{font-size:19px;letter-spacing:-.012em}
.link-arrow::after{content:" \203A";font-weight:500}
.link-arrow:hover{text-decoration:underline}

.install-status{
  margin-top:18px;min-height:22px;
  font-size:14px;color:var(--ink-2);letter-spacing:0;
}

.app-meta{
  margin-top:2px;
  font-size:13px;color:var(--ink-2);opacity:.8;letter-spacing:0;
}

.is-error{color:#ff453a;opacity:1}

/* --- Post-download instructions ------------------------------------------- */
.next-steps{
  margin-top:34px;width:100%;max-width:540px;
  text-align:left;
  background:var(--bg-alt);
  border:1px solid var(--hairline);
  border-radius:18px;
  padding:26px 30px 28px;
  opacity:0;transform:translateY(14px);
  transition:opacity .5s ease,transform .5s cubic-bezier(.22,.7,.2,1);
}
.next-steps.is-visible{opacity:1;transform:none}
.next-steps[hidden]{display:none}

.steps-title{
  font-size:21px;letter-spacing:-.018em;margin-bottom:16px;
}

.steps-list{
  margin:0;padding:0;list-style:none;
  counter-reset:step;
  display:grid;gap:13px;
}
.steps-list li{
  counter-increment:step;
  position:relative;padding-left:32px;
  font-size:15px;line-height:1.47;color:var(--ink-2);
}
.steps-list li::before{
  content:counter(step);
  position:absolute;left:0;top:1px;
  width:21px;height:21px;border-radius:50%;
  display:grid;place-items:center;
  background:var(--accent);color:#fff;
  font-size:11px;font-weight:600;letter-spacing:0;
}
.steps-list b{color:var(--ink);font-weight:600}

.desktop-note{
  margin-top:18px;padding-top:16px;
  border-top:1px solid var(--hairline);
  font-size:13px;line-height:1.5;color:var(--ink-2);
}
.desktop-note[hidden]{display:none}

/* --- Catalog -------------------------------------------------------------- */
.catalog-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(330px,1fr));
  gap:18px;
}

.app-card{
  display:flex;align-items:center;gap:17px;
  background:var(--card);border-radius:18px;
  padding:20px 22px;
  box-shadow:var(--card-shadow);
}

/* When the whole card is the link, it still has to read as body text rather
   than inheriting the blue link colour, and must never underline on hover. */
a.app-card{
  color:var(--ink);
  text-decoration:none;
  cursor:pointer;
}
a.app-card:hover{text-decoration:none}

/* The pill is decorative here, so make it answer to the card's hover. */
a.app-card:hover .btn-primary{background:var(--accent-hover)}

/* Listed twice on purpose: .reveal sits further down this file and would
   otherwise overwrite `transition` wholesale, killing the shadow fade. The
   compound selector outranks it. Reveal timings are kept intact. */
.app-card,
.app-card.reveal{
  transition:opacity .85s cubic-bezier(.22,.7,.2,1),
             transform .85s cubic-bezier(.22,.7,.2,1),
             scale .32s cubic-bezier(.16,1,.3,1),
             box-shadow .32s cubic-bezier(.16,1,.3,1);
}

/* Hover: lifts a hair, and the edge catches the light.
   The rim is an inset hairline; the outer glow is what makes it read as lit
   rather than merely outlined. Mouse only - on touch every card would stick.

   Uses `scale`, not `transform: scale()`, so it composes with the reveal's
   translate instead of overwriting it. */
@media (hover:hover) and (pointer:fine){
  .app-card:hover{
    scale:1.018;
    box-shadow:var(--card-shadow),
               inset 0 0 0 1px rgba(255,255,255,.2),
               0 0 0 1px rgba(255,255,255,.06),
               0 0 26px rgba(41,151,255,.14);
  }
}

.app-tile{
  flex:none;width:60px;height:60px;border-radius:14px;
  display:grid;place-items:center;overflow:hidden;
  color:#fff;font-size:23px;font-weight:600;letter-spacing:-.02em;
  box-shadow:0 2px 8px rgba(0,0,0,.16);
}
.app-tile img{width:100%;height:100%;object-fit:cover;display:block}

.app-info{flex:1;min-width:0}
.app-info h3{font-size:18px;letter-spacing:-.016em;margin-bottom:3px}
.app-info p{
  font-size:14px;line-height:1.4;color:var(--ink-2);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;
}

.app-action{
  flex:none;display:flex;flex-direction:column;align-items:center;gap:5px;
}
.app-sub{font-size:11px;color:var(--ink-2);letter-spacing:0;white-space:nowrap}

/* Small pill, same shape language as the hero button.
   Qualified with .btn because these rules sit above the .btn block in this
   file - at equal specificity .btn would otherwise win and they'd render
   full size. */
.btn.btn-small{
  font-size:14px;font-weight:500;
  padding:7px 19px;
  min-width:0;min-height:0;
}

/* "Coming soon" - present but deliberately inert. */
.btn.btn-quiet{
  background:transparent;
  color:var(--ink-2);
  box-shadow:inset 0 0 0 1px var(--hairline);
  cursor:default;
}
.btn.btn-quiet:hover{background:transparent}

.catalog-empty{
  padding:34px 0;
  font-size:16px;color:var(--ink-2);
}

/* --- Button --------------------------------------------------------------- */
.btn{
  font:inherit;font-size:17px;font-weight:500;letter-spacing:-.012em;
  padding:12px 27px;border:0;border-radius:980px;
  cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;gap:9px;
  min-width:132px;min-height:47px;
  /* --mx / --my are set by the magnetic-button script in app.js; --bs is the
     press-down scale. Composed here so the two never fight over transform. */
  transform:translate(var(--mx,0px),var(--my,0px)) scale(var(--bs,1));
  transition:background-color .22s ease,
             transform .4s cubic-bezier(.16,1,.3,1),
             opacity .22s ease;
}
.btn:hover{text-decoration:none} /* .btn is sometimes an <a> */
.btn:active{--bs:.97}
.btn-primary{background:var(--accent);color:#fff}
.btn-primary:hover{background:var(--accent-hover)}
.btn[data-state="busy"]{background:var(--accent);opacity:.72;cursor:progress}
.btn[data-state="done"]{background:var(--ok)}
.btn:disabled{pointer-events:none}

.btn-label{display:inline-block}

/* --- Device showcase ------------------------------------------------------ */
.showcase{padding:64px 0 104px;text-align:center;overflow:hidden}

.phone{width:min(296px,72vw);margin-inline:auto;animation:float 7s ease-in-out infinite}

.phone-frame{
  position:relative;aspect-ratio:9/18.7;padding:9px;border-radius:46px;
  background:linear-gradient(155deg,#48484a,#111113 42%,#2c2c2e);
  box-shadow:0 34px 70px -26px rgba(0,0,0,.5),
             inset 0 0 0 1px rgba(255,255,255,.09);
}
.phone-notch{
  position:absolute;top:16px;left:50%;transform:translateX(-50%);
  width:34%;height:7px;border-radius:99px;background:#0a0a0b;z-index:2;
}
.phone-screen{
  height:100%;border-radius:38px;overflow:hidden;
  background:linear-gradient(180deg,var(--screen-1),var(--screen-2));
  padding:14px 15px 16px;
  display:flex;flex-direction:column;
  text-align:left;
}

.screen-status{
  display:flex;justify-content:space-between;align-items:center;
  font-size:9.5px;font-weight:600;color:var(--ink);opacity:.72;
  letter-spacing:0;
}
.screen-glyphs{font-size:7px;letter-spacing:1px}

.screen-title{
  margin:16px 0 14px;
  font-size:21px;font-weight:700;letter-spacing:-.02em;color:var(--ink);
}

.app-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px 10px}
.app{display:flex;flex-direction:column;align-items:center;gap:6px}

.app-icon{
  display:block;width:100%;aspect-ratio:1;border-radius:13px;
  box-shadow:0 2px 6px rgba(0,0,0,.14);
}
.app-label{display:block;width:82%;height:3.5px;border-radius:99px;background:var(--skeleton)}
.app-label.short{width:58%}

.g1{background:linear-gradient(150deg,#5ac8fa,#0071e3)}
.g2{background:linear-gradient(150deg,#ff9f0a,#ff375f)}
.g3{background:linear-gradient(150deg,#30d158,#0a9c53)}
.g4{background:linear-gradient(150deg,#bf5af2,#5e5ce6)}
.g5{background:linear-gradient(150deg,#ffd60a,#ff9f0a)}
.g6{background:linear-gradient(150deg,#64d2ff,#5e5ce6)}
.g7{background:linear-gradient(150deg,#ff6482,#bf5af2)}
.g8{background:linear-gradient(150deg,#8e8e93,#48484a)}
.g9{background:linear-gradient(150deg,#0071e3,#5e5ce6)}

.install-card{
  margin-top:auto;
  display:flex;align-items:center;gap:11px;
  padding:11px 12px;border-radius:17px;
  background:var(--card);
  box-shadow:0 6px 18px rgba(0,0,0,.1);
}
.install-card .app-icon{width:34px;flex:none;border-radius:9px}
.install-meta{flex:1;display:flex;flex-direction:column;gap:8px}
.install-name{display:block;width:62%;height:4.5px;border-radius:99px;background:var(--skeleton)}

.progress{height:5px;border-radius:99px;background:var(--skeleton);overflow:hidden}
.progress-fill{
  height:100%;width:0;border-radius:99px;background:var(--accent);
  transition:width .5s cubic-bezier(.3,.8,.3,1),background-color .3s ease;
}
.progress-fill.is-done{background:var(--ok)}

.showcase-caption{
  margin-top:44px;
  font-size:clamp(22px,3.4vw,32px);font-weight:600;letter-spacing:-.02em;
}

/* --- Bands and cards ------------------------------------------------------ */
.band{background:var(--bg-alt);padding:104px 0}

/* Same spacing as .band, but keeps the page background. */
.section{padding:104px 0}

.section-title{
  font-size:clamp(30px,4.6vw,48px);
  letter-spacing:-.023em;line-height:1.08;
  max-width:18ch;margin-bottom:52px;
}

.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}
.card{
  background:var(--card);border-radius:18px;padding:32px 28px 34px;
  box-shadow:var(--card-shadow);
}
.card h3{font-size:22px;letter-spacing:-.018em;margin-bottom:10px}
.card p{font-size:16px;line-height:1.5;color:var(--ink-2)}

/* --- How it works --------------------------------------------------------- */
.how{padding:104px 0}
.steps{list-style:none;margin:0;padding:0;display:grid;gap:44px}
.step{display:grid;grid-template-columns:auto 1fr;column-gap:22px;row-gap:8px;align-items:start}
.step-num{
  grid-row:span 2;
  width:44px;height:44px;border-radius:50%;
  display:grid;place-items:center;
  background:var(--accent);color:#fff;
  font-size:19px;font-weight:600;letter-spacing:0;
}
.step h3{font-size:24px;letter-spacing:-.02em}
.step p{color:var(--ink-2);font-size:17px;max-width:60ch}

/* --- Footer --------------------------------------------------------------- */
.footer{
  background:var(--bg-alt);
  border-top:1px solid var(--hairline);
  padding:44px 0 56px;
  font-size:12px;line-height:1.55;color:var(--ink-2);letter-spacing:0;
}
.footer-links{display:grid;grid-template-columns:repeat(3,minmax(0,200px));gap:26px;margin-bottom:34px}
.footer-col{display:flex;flex-direction:column;gap:9px}
.footer-col h4{font-size:12px;font-weight:600;color:var(--ink);letter-spacing:0}
.footer-col a{color:var(--ink-2)}
.footer-col a:hover{color:var(--ink);text-decoration:underline}
.fine-print{padding-top:20px;border-top:1px solid var(--hairline);max-width:72ch}
.copyright{margin-top:12px}

/* --- Motion --------------------------------------------------------------- */
.reveal{
  opacity:0;transform:translateY(26px);
  transition:opacity .85s cubic-bezier(.22,.7,.2,1),transform .85s cubic-bezier(.22,.7,.2,1);
}
.reveal.is-visible{opacity:1;transform:none}

@keyframes float{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-12px)}
}

@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  .phone{animation:none}
  *,*::before,*::after{transition-duration:.01ms !important;animation-duration:.01ms !important}
  .reveal{opacity:1;transform:none}
  /* Keep the lit rim, drop the movement. */
  .app-card:hover{scale:1}
  .btn{transform:none}
}

/* --- Responsive ----------------------------------------------------------- */
@media (max-width:840px){
  .cards{grid-template-columns:1fr;gap:16px}
  .footer-links{grid-template-columns:repeat(2,1fr)}
}

@media (max-width:600px){
  .hero{padding-top:66px}
  .band,.how,.section{padding:76px 0}
  .showcase{padding:48px 0 76px}
  .nav-links{gap:15px}
  .catalog-grid{grid-template-columns:1fr}
  .app-card{padding:18px;gap:14px}
  .app-tile{width:52px;height:52px;border-radius:12px;font-size:20px}
  .btn.btn-small{padding:7px 15px}
  .brand-name{display:none}
  .body-lg,.link-arrow{font-size:17px}
  .step{grid-template-columns:1fr;row-gap:10px}
  .step-num{grid-row:auto}
  .section-title{margin-bottom:38px}
}
