/* DaConTech brand palette, shared with DaConHub (tailwind.config.js there). */
:root {
  --dacon-navy: #0a1e3f;
  --dacon-orange: #ea580c;
  --dacon-amber: #fbbf24;

  /* Header height: 1rem padding top and bottom + the 3.5rem logo. */
  --header-h: 5.5rem;
}

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

html,
body {
  margin: 0;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #f8fafc;
  background-color: var(--dacon-navy);
  -webkit-font-smoothing: antialiased;
}

/* ---- Header (matches DaConHub's App.vue bar) ---- */

.topbar {
  display: flex;
  align-items: center;
  height: var(--header-h);
  padding: 1rem 0.75rem;
  background-color: var(--dacon-navy);
}

.brand {
  display: flex;
  align-items: center;
}

.brand img {
  height: 3.5rem;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

/* ---- Backdrop (same globe and navy scrim as DaConHub's HomeView) ---- */

.lab-bg {
  min-height: calc(100vh - var(--header-h));
  padding: 0 1rem 4rem;
  background-color: var(--dacon-navy);
  background-image:
    linear-gradient(
      to bottom,
      rgb(10 30 63 / 88%) 0%,
      rgb(10 30 63 / 55%) 40%,
      rgb(10 30 63 / 62%) 65%,
      rgb(10 30 63 / 92%) 100%
    ),
    url('/assets/dacontech-globe.jpeg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
}

/* Mobile browsers handle background-attachment: fixed badly; let it scroll. */
@media (max-width: 768px) {
  .lab-bg {
    background-attachment: scroll;
  }
}

/* ---- Hero ---- */

.hero {
  max-width: 42rem;
  margin: 0 auto;
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 8px rgb(0 0 0 / 40%);
}

.hero p {
  margin: 1rem 0 0;
  font-size: 1.125rem;
  line-height: 1.6;
  color: #e2e8f0;
}

/* ---- Tiles ---- */

/* Flex rather than grid so a short last row (5 apps = 3 + 2) sits centred. */
.tiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.75rem;
  max-width: 78rem;
  margin: 0 auto;
}

.tile {
  flex: 0 1 24rem;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 1rem;
  background-color: rgb(10 30 63 / 72%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 10px 30px rgb(0 0 0 / 25%);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.tile:hover,
.tile:focus-visible {
  transform: translateY(-4px);
  border-color: var(--dacon-orange);
  box-shadow: 0 16px 40px rgb(0 0 0 / 35%), 0 0 0 1px var(--dacon-orange);
}

.tile:focus-visible {
  outline: 2px solid var(--dacon-amber);
  outline-offset: 3px;
}

.tile h2 {
  margin: 0 0 0.875rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.tile h2::after {
  content: ' \2192';
  color: var(--dacon-orange);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.tile:hover h2::after,
.tile:focus-visible h2::after {
  opacity: 1;
}

.shot {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 0.5rem;
  border: 1px solid rgb(255 255 255 / 10%);
  background-color: #0f172a;
}

.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  transition: transform 0.4s ease;
}

.tile:hover .shot img {
  transform: scale(1.03);
}

.tile p {
  margin: 0.875rem 0 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #cbd5e1;
}

@media (prefers-reduced-motion: reduce) {
  .tile,
  .shot img,
  .tile h2::after {
    transition: none;
  }
  .tile:hover,
  .tile:focus-visible,
  .tile:hover .shot img {
    transform: none;
  }
}
