:root {
  --text: #1f2328;
  --muted: #6a717a;
  --line: #d9dee6;
  --accent: #f59a00;
  --accent-soft: #fff3dd;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 15% 20%, #ffffff 0%, #f6f6f4 45%),
    linear-gradient(160deg, #ffffff 0%, #f2f3f1 100%);
  color: var(--text);
  font-family: var(--font-sans);
}

body {
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.38;
  z-index: 0;
}

.container {
  width: min(960px, calc(100% - 48px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero {
  padding: 82px 0 32px;
  position: relative;
}

.hero h1 {
  margin: 10px 0 0;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 4.2rem);
  letter-spacing: 0.04em;
  font-weight: 600;
  color: #171a1f;
}

.hero p {
  margin-top: 18px;
  max-width: 740px;
  line-height: 1.9;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
}

.hero-side-logo {
  position: fixed;
  right: clamp(-72px, -6vw, -28px);
  top: clamp(-26px, -2vw, -8px);
  width: clamp(240px, 32vw, 420px);
  height: auto;
  opacity: 0.12;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #f2cd8f;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: #8d6a2e;
  background: var(--accent-soft);
}

.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(245, 154, 0, 0.32);
}

.apps-grid {
  margin: 34px 0 80px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.app-card {
  --card-glow-rgb: 0, 136, 204;
  --card-order: 0;
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--line);
  background: linear-gradient(170deg, #ffffff 0%, #fbfbfa 100%);
  border-radius: 20px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transform: translateY(24px);
  opacity: 0;
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: calc(var(--card-order) * 0.08s);
  box-shadow: 0 14px 30px rgba(15, 19, 26, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.app-card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -70px;
  top: -70px;
  background: radial-gradient(circle, rgba(var(--card-glow-rgb), 0.14), transparent 70%);
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.app-logo {
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.28s ease;
}

.app-media img {
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.app-header {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  row-gap: 8px;
  align-items: start;
}

.app-info {
  min-width: 0;
}

.app-name {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 600;
  color: #181c22;
}

.app-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0.03em;
}

.app-logo {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  margin-top: 1px;
  border-radius: 10px;
  border: 1px solid #d9e1e8;
  background: #ffffff;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(31, 35, 40, 0.08);
}

.app-logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4f6d7b;
  font-size: 0.82rem;
  font-weight: 700;
  background: #eef4f8;
}

.app-media {
  margin: 16px 0 14px;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #dce7ee;
  background: #f3f8fb;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.app-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.app-media-placeholder {
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 136, 204, 0.2), transparent 48%),
    linear-gradient(145deg, #f8fbff 0%, #ebf5fb 100%);
}

.app-media-placeholder::before,
.app-media-placeholder::after {
  content: "";
  position: absolute;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #d3e3ee;
  box-shadow: 0 8px 20px rgba(31, 35, 40, 0.08);
}

.app-media-placeholder::before {
  width: 34%;
  height: 72%;
  right: 9%;
  bottom: 12%;
}

.app-media-placeholder::after {
  width: 46%;
  height: 22%;
  left: 11%;
  bottom: 14%;
}

.media-label {
  position: relative;
  z-index: 1;
  font-size: 0.8rem;
  color: #4f6d7b;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid #d4e4ee;
  border-radius: 999px;
  padding: 5px 10px;
}

.app-description {
  margin: 18px 0 22px;
  flex: 1;
  color: #454c56;
  line-height: 1.8;
  font-size: 0.95rem;
}

.app-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-footer .app-meta {
  width: auto;
  margin-top: 0;
}

.app-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-category {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #e1e5eb;
  background: #f6f8fa;
  color: #7a838e;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  font-weight: 500;
}

.platforms {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.badge {
  font-size: 0.7rem;
  color: #4b6b7d;
  border: 1px solid #9fd5ee;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eaf6fc;
  font-weight: 500;
}

@media (hover: hover) and (pointer: fine) {
  .app-card:hover {
    transform: translateY(-5px) scale(1.008);
    box-shadow: 0 20px 38px rgba(15, 19, 26, 0.14);
    border-color: #c4ccd4;
  }

  .app-card:hover::after {
    transform: scale(1.12);
    opacity: 0.92;
  }

  .app-card:hover .app-logo {
    transform: translateY(-2px) rotate(3deg);
    box-shadow: 0 8px 18px rgba(31, 35, 40, 0.14);
  }

  .app-card:hover .app-media img {
    transform: scale(1.035);
  }
}

.footer {
  border-top: 1px solid #d9dee6;
  padding: 24px 0 40px;
  color: #7b828c;
  font-size: 0.86rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-copy {
  margin: 0;
}

.footer-links {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.footer-links a {
  color: #006c99;
  text-decoration: none;
  font-weight: 500;
}

.footer-links a:hover {
  text-decoration: underline;
}

@keyframes rise {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .container {
    width: min(100%, calc(100% - 28px));
  }

  .hero {
    padding-top: 58px;
  }

  .hero-side-logo {
    right: -20px;
    top: -8px;
    width: 148px;
    opacity: 0.1;
  }

  .apps-grid {
    gap: 12px;
    margin-top: 24px;
  }

  .app-header {
    column-gap: 10px;
    row-gap: 6px;
  }

  .app-media {
    margin-top: 14px;
  }

  .app-logo {
    width: 50px;
    height: 50px;
    border-radius: 9px;
  }

  .app-meta {
    width: 100%;
    margin-top: 2px;
  }

  .app-footer .app-meta {
    width: 100%;
    margin-top: 0;
  }

  .app-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .footer {
    align-items: flex-start;
  }

  .footer-links {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media (max-width: 600px) {
  .app-card {
    grid-column: span 12;
    border-radius: 16px;
    padding: 18px;
  }
}
