/* HOMEPAGE-ONLY STYLES (scoped with .home) */
/* Uses existing CSS variables from main.css; does not override app styles */

.home { overflow-x: hidden; scroll-behavior: smooth; }

/* Top App Bar */
.home .nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  background: color-mix(in oklab, var(--md-sys-color-surface) 70%, transparent);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  z-index: 100;
}
.home .nav a { color: var(--md-sys-color-on-surface); text-decoration: none; font-weight: 500; }
.home .brand {
  font-size: 20px;
  color: var(--md-sys-color-primary);
  background: linear-gradient(135deg, var(--md-sys-color-primary), var(--md-sys-color-tertiary));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* HERO */
.home .hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 70vh;
  padding: 80px 24px;
  overflow: clip;
  isolation: isolate;
}
.home .hero-content { text-align: center; max-width: 960px; position: relative; z-index: 2; }

.home .badge {
  font-size: 12px;
  padding: 6px 10px;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 10px;
  box-shadow: var(--md-sys-elevation-level-1);
}

.home .hero-title {
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.08;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--md-sys-color-primary), var(--md-sys-color-expressive-primary));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.home .hero-sub {
  color: var(--md-sys-color-on-surface-variant);
  font-size: clamp(16px, 2.2vw, 18px);
  max-width: 760px;
  margin: 0 auto 20px;
}

.home .hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Control row */
.home .hero-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin: 16px auto 0;
  flex-wrap: wrap;
}

/* Chips */
.home .chips {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}
.home .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--md-sys-color-surface-variant);
  color: var(--md-sys-color-on-surface);
  font-size: 12px;
  box-shadow: var(--md-sys-elevation-level-1);
}

/* Motion background */
:root { --shape-fill: linear-gradient(135deg, var(--md-sys-color-primary), var(--md-sys-color-expressive-accent)); }

.home .shape-canvas {
  position: absolute;
  inset: -10% -5% -10% -5%;
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 16px 28px rgba(0,0,0,.25));
}

.home .shape {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  width: var(--size, 140px);
  aspect-ratio: 1;
  translate: calc(-50% + var(--dx, 0px)) calc(-50% + var(--dy, 0px));
  /* Recolor external SVGs using mask + gradient */
  background: var(--shape-fill);
  -webkit-mask-image: var(--shape-url);
          mask-image: var(--shape-url);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  opacity: .6;
  animation: floatY var(--duration, 12s) ease-in-out var(--delay, 0s) infinite alternate,
             spinSlow calc(var(--duration, 12s) * 1.8) linear infinite;
  will-change: transform;
  transition: filter .3s ease, transform .3s ease;
  pointer-events: auto;
}
.home .shape:nth-child(odd){ mix-blend-mode: screen; opacity:.9; }
.home .shape:hover { filter: brightness(1.05) saturate(1.02); transform: scale(1.03); }

@keyframes floatY {
  from { transform: translate3d(0, -8px, 0); }
  to   { transform: translate3d(0, 10px, 0); }
}
@keyframes spinSlow {
  from { rotate: 0deg; }
  to   { rotate: 360deg; }
}

/* Section + features */
.home .section { padding: 60px 24px; max-width: 1100px; margin: 0 auto; }

.home .features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.home .feature {
  padding: 20px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 16px;
  background: var(--md-sys-color-surface);
  box-shadow: var(--md-sys-elevation-level-1);
  opacity: 0;
  transform: translateY(20px);
  transition: all .6s cubic-bezier(0.4,0,0.2,1);
}
.home .feature.visible { opacity: 1; transform: translateY(0); }
.home .feature h4 { margin-bottom: 8px; }

/* Footer */
.home .footer {
  padding: 40px 24px;
  text-align: center;
  color: var(--md-sys-color-on-surface-variant);
}

/* Buttons (homepage emphasis) */
.home .btn { font-weight: 600; box-shadow: var(--md-sys-elevation-level-2); }
.home .btn.btn-primary { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); border: none; box-shadow: var(--md-sys-elevation-level-3); }
.home .btn.btn-primary:hover { filter: brightness(1.05); box-shadow: var(--md-sys-elevation-level-4); }
.home .btn.btn-secondary { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }

/* Extra homepage sections */
.home .grid-3 { display:grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap:16px; }
.home .card { padding:20px; border:1px solid var(--md-sys-color-outline-variant); border-radius:16px; background: var(--md-sys-color-surface); box-shadow: var(--md-sys-elevation-level-1); }
.home .faq details { border:1px solid var(--md-sys-color-outline-variant); border-radius:12px; padding:12px 16px; background: var(--md-sys-color-surface); transition: background .2s ease; }
.home .faq summary { cursor:pointer; font-weight:500; color: var(--md-sys-color-on-surface); list-style:none; }
.home .faq summary::-webkit-details-marker { display:none; }
.home .faq summary:focus { outline: none; }
.home .faq .answer { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .35s ease, opacity .35s ease; }
.home .faq details[open] .answer { max-height: 200px; opacity: 1; }

/* Responsive tweaks */
@media (max-width: 720px) {
  .home .hero { padding-top: 84px; }
  .home .shape { width: calc(var(--size, 140px) * 0.75); }
  .home .nav { padding: 12px 16px; }
}
