/* Hub layout; design tokens live in ../shared/theme.css */
@import url('../shared/theme.css');
@import url('../shared/theme-header.css');

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--page-fg);
  line-height: 1.55;
  position: relative;
  overflow-x: hidden;
  transition:
    color var(--transition-theme),
    background-color var(--transition-theme);
}

/* Layered mesh: baby pink dominant with blue + purple accents */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--mesh-base);
  background-image: var(--mesh-a), var(--mesh-b), var(--mesh-c), var(--mesh-base);
  transition: opacity var(--transition-theme);
}

/* Subtle grain (inline SVG data URI). */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.page {
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.75rem) clamp(1rem, 4vw, 2rem) 3rem;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

/* Tight, contemporary wordmark: weight contrast instead of serif/italic luxury. */
.brand {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(1.875rem, 4.5vw, 2.5rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 0;
  color: var(--page-fg);
}

.brand__the {
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--page-fg-muted);
}

.brand__accent {
  color: var(--header-accent);
  font-weight: 800;
}

.lede {
  max-width: 38rem;
  margin: 0.65rem 0 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--page-fg-muted);
  line-height: 1.6;
}

.section-heading {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 1rem;
  color: var(--page-fg-muted);
  border: none;
  padding: 0;
  display: block;
}

.app-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
  gap: clamp(0.875rem, 2.5vw, 1.125rem);
}

.app-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.25rem 1.25rem 1.1rem;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    transform 0.2s ease,
    border-color var(--transition-theme),
    box-shadow 0.2s ease,
    background var(--transition-theme);
}

.app-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.06), 0 12px 28px rgba(15, 23, 42, 0.1);
  transform: translateY(-2px);
}

[data-theme='dark'] .app-card:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 12px 28px rgba(0, 0, 0, 0.35);
}

.app-card:focus-visible {
  outline: none;
  box-shadow: var(--shadow-card), var(--focus-ring);
}

.app-card__title {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  color: var(--page-fg);
}

.app-card__desc {
  margin: 0;
  flex: 1;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--page-fg-muted);
  line-height: 1.55;
}

.app-card__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.875rem;
}

.pill {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  color: var(--header-accent);
  background: rgba(201, 162, 39, 0.08);
}

[data-theme='dark'] .pill {
  background: rgba(229, 197, 88, 0.12);
}

.pill--subtle {
  opacity: 0.92;
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 600;
  font-size: 0.6875rem;
}

.site-footer {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--page-fg-muted);
}

.site-footer p {
  margin: 0 0 0.65rem;
}

.site-footer p:last-child {
  margin-bottom: 0;
}

.site-footer code {
  font-size: 0.84em;
  font-weight: 600;
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
  background: rgba(15, 23, 42, 0.06);
}

[data-theme='dark'] .site-footer code {
  background: rgba(226, 232, 240, 0.08);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .app-card:hover {
    transform: none;
  }
}
