/* ============================================================
   In Unity Apps Hub — page styles
   Water-fill variant (1a) of the Apps Hub design.
   ============================================================ */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--siu-black);
  background: var(--siu-white);
  min-height: 100%;
}

img, svg { display: block; }

/* Entrance — safe fade-up (content stays visible if animation never runs) */
@keyframes hubFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.hub-reveal { animation: hubFadeUp .6s var(--ease-out) both; }
.hub-reveal.d1 { animation-delay: .09s; }
.hub-reveal.d2 { animation-delay: .18s; }
.hub-reveal.d3 { animation-delay: .27s; }

/* Focus rings — keyboard only */
a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 170, 225, 0.55);
  border-radius: 10px;
}

/* ============ HEADER ============ */

.hub-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-1);
  transition: box-shadow .2s var(--ease-out), border-color .2s var(--ease-out);
}

.hub-header.scrolled {
  border-bottom-color: var(--siu-black);
  box-shadow: var(--shadow-1);
}

.hub-header__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 11px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hub-header__logo-link { display: inline-flex; align-items: center; }

.hub-header__logo { height: 42px; width: auto; }

.hub-header__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--siu-black);
  text-decoration: none;
}

/* ============ HERO — WATER-FILL ============ */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--siu-blue);
  padding: 96px 20px 92px;
}

.hero__depth {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60%;
  background: linear-gradient(0deg, rgba(22,115,186,0.20), rgba(22,115,186,0));
  pointer-events: none;
}

.hero__inner {
  position: relative;
  max-width: 840px;
  margin: 0 auto;
  text-align: center;
}

.hero__badge {
  display: inline-block;
  background: var(--siu-white);
  color: var(--siu-blue-deep);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 15px;
  border-radius: 999px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 33px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--siu-black);
  margin: 18px 0 0;
  text-wrap: balance;
}

.hero__lead {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--siu-black);
  max-width: 620px;
  margin: 20px auto 0;
  text-wrap: pretty;
}

.hero__cta-row {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--accent-primary);
  color: var(--siu-white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  padding: 14px 24px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: var(--shadow-water);
  transition: background .2s var(--ease-out);
}

.hero__cta:hover { background: var(--accent-primary-hover); }

.hero__waves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 50px;
}

/* ============ THE APPS ============ */

.apps {
  background: var(--siu-white);
  padding: 64px 20px;
  scroll-margin-top: 88px;
}

.apps__inner { max-width: 1160px; margin: 0 auto; }

.apps__intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 40px;
}

.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--siu-blue-deep);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 27px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--siu-black);
  margin: 12px 0 0;
}

.apps__sub {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--siu-gray);
  margin: 12px 0 0;
}

.apps__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.app-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  background: var(--siu-white);
  border: 2px solid var(--siu-black);
  border-radius: 12px;
  padding: 24px;
  text-decoration: none;
  color: var(--siu-black);
  box-shadow: var(--shadow-1);
  transition: box-shadow .2s var(--ease-out), transform .2s var(--ease-out);
}

.app-card:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-4px);
}

.hub-chip {
  width: 74px;
  height: 74px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-shadow: var(--shadow-1);
  flex-shrink: 0;
  overflow: hidden;
  background: var(--siu-white);
  border: 1px solid var(--border-1);
}

.hub-chip--dark {
  background: var(--siu-black);
  border-color: var(--siu-black);
}

.hub-chip img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-card__heading {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.app-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--siu-black);
  margin: 0;
}

.app-card__subtitle {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--siu-gray);
}

.app-card__desc {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--siu-black);
  margin: 0;
}

.app-card__open {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-primary);
  color: var(--siu-white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 999px;
}

/* ============ WHY THESE ARE FREE ============ */

.why-band {
  position: relative;
  overflow: hidden;
  background: var(--siu-yellow);
  padding: 64px 20px;
}

.why-band__vessel {
  position: absolute;
  right: -34px;
  bottom: -48px;
  width: 260px;
  opacity: 0.10;
  pointer-events: none;
}

.why-band__inner {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.why-band__copy {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--siu-black);
  margin: 16px 0 0;
  text-wrap: pretty;
}

.why-band__cta-row {
  display: flex;
  justify-content: center;
  margin-top: 26px;
}

.why-band__cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--accent-primary);
  color: var(--siu-white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  padding: 14px 24px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: var(--shadow-1);
  transition: background .2s var(--ease-out);
}

.why-band__cta:hover { background: var(--accent-primary-hover); }

/* ============ FOOTER ============ */

.hub-footer {
  background: var(--siu-white);
  border-top: 1px solid var(--border-1);
  padding: 48px 20px 40px;
}

.hub-footer__inner { max-width: 1160px; margin: 0 auto; }

.hub-footer__cols {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.hub-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 340px;
}

.hub-footer__brand-link { display: inline-flex; align-items: center; }

.hub-footer__logo { height: 58px; width: auto; }

.hub-footer__tagline {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--siu-gray);
  margin: 0;
}

.hub-footer__nav {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.hub-footer__group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hub-footer__heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--siu-black);
}

.hub-footer__link {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--siu-black);
  text-decoration: none;
}

.hub-footer__link:hover { color: var(--siu-blue-deep); }

.hub-footer__legal {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  justify-content: space-between;
}

.hub-footer__legal span {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--siu-gray);
}

/* ============ RESPONSIVE (mobile-first overrides) ============ */

@media (min-width: 640px) {
  .hero__title { font-size: 46px; }
  .section-title { font-size: 33px; }
  .hero__lead { font-size: 20px; }
}

@media (min-width: 768px) {
  .apps, .why-band { padding-top: 96px; padding-bottom: 96px; }
  .hero { padding-top: 116px; padding-bottom: 104px; }
  .hub-footer__cols {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

@media (min-width: 900px) {
  .apps__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1080px) {
  .hero__title { font-size: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hub-reveal { animation: none; }
}
