/*
  aipple.net - shared site styles
  Two pages for now: a black landing page with the Aipple logo (index.html),
  and an apps listing page (apps.html) that the logo links through to.
*/

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: #000;
  color: #eee;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  min-height: 100%;
}

/* ---------- Landing page ---------- */

.landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing a.logo-link {
  display: block;
  line-height: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.landing a.logo-link:hover,
.landing a.logo-link:focus-visible {
  transform: scale(1.03);
  opacity: 0.9;
}

/* Wraps the logo image so the two stacked photos below have something
   fixed to position themselves against - width/aspect-ratio live here
   instead of on the <img> itself, but render identically. */
.logo-wrap {
  position: relative;
  width: min(80vw, 640px);
  aspect-ratio: 954 / 872;
  display: block;
}

.landing img.logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* The "blink" - see the UPDATE in index.html's script for the full
   explanation. #logo-img-closed is a second full copy of the same
   photo (assets/apple-static-closed.png) with the eye itself photo-
   edited shut, stacked exactly on top of the open photo and faded in
   and out - not a small patch slid or clipped over part of the image,
   so there's no seam and no rectangle/clip-path shape to give it away.

   UPDATE: replaces two earlier attempts Keith flagged as not reading
   as a real blink - a plain sliding rectangle, then a clip-path'd
   patch cropped from below the eye. Both were a small overlay moving
   over the photo; this crossfades the whole photo instead. */
.logo-closed {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.12s ease-in-out;
  pointer-events: none;
}

.logo-closed.blink {
  opacity: 1;
}

/* ---------- Apps page ---------- */

.apps-page {
  min-height: 100vh;
  padding: 64px 24px 80px;
}

.apps-page header {
  text-align: center;
  margin-bottom: 48px;
}

.apps-page header a.back {
  color: #888;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.apps-page header a.back:hover {
  color: #ccc;
}

.apps-page h1 {
  margin: 18px 0 0;
  font-weight: 600;
  font-size: 28px;
  letter-spacing: 0.02em;
}

.apps-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: center;
  max-width: 960px;
  margin: 0 auto;
}

.app-tile {
  width: 180px;
  text-decoration: none;
  color: inherit;
  text-align: center;
}

.app-tile img {
  width: 128px;
  height: 128px;
  border-radius: 28px;
  display: block;
  margin: 0 auto 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease;
}

.app-tile:hover img,
.app-tile:focus-visible img {
  transform: translateY(-4px);
}

.app-tile .app-name {
  font-size: 15px;
  font-weight: 600;
}

.app-tile .app-status {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}
