/* Cinematic backgrounds: a full-bleed photograph that slowly drifts, a warm sunlight glow, and a dark overlay for legibility.
   Used by the sign-in pages (full screen) and the dashboard banner (inside a rounded panel). All motion stops for "reduce motion". */

.hero-bg { position: absolute; inset: 0; overflow: hidden; background: var(--brand-deep); z-index: 0; isolation: isolate; }
.hero-photo {
  position: absolute; inset: -6%; background-size: cover; background-position: center 38%;
  background-image: url("/assets/hero/solar-field-sm.jpg"); transform-origin: 62% 40%;
  animation: kenburns 30s ease-in-out infinite alternate; will-change: transform;
}
@media (min-width: 700px) { .hero-photo { background-image: url("/assets/hero/solar-field.jpg"); } }
.hero-photo.rows { background-image: url("/assets/hero/solar-rows-sm.jpg"); background-position: center 55%; }
@media (min-width: 700px) { .hero-photo.rows { background-image: url("/assets/hero/solar-rows.jpg"); } }
@keyframes kenburns { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.14) translate3d(-2.2%, -1.4%, 0); } }

/* sunlight: a soft warm glow in the upper right and thin rays that turn very slowly */
.hero-glow {
  position: absolute; width: 70vmax; height: 70vmax; right: -22vmax; top: -34vmax; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 196, 77, .55) 0%, rgba(255, 128, 40, .22) 34%, transparent 66%);
  mix-blend-mode: screen; animation: glow 9s ease-in-out infinite; pointer-events: none;
}
.hero-rays {
  position: absolute; width: 150vmax; height: 150vmax; right: -75vmax; top: -75vmax; pointer-events: none; mix-blend-mode: screen;
  background: repeating-conic-gradient(from 0deg, rgba(255, 214, 120, .13) 0deg 3deg, transparent 3deg 15deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 52%); mask-image: radial-gradient(circle, #000 0%, transparent 52%);
  animation: turn 140s linear infinite;
}
@keyframes glow { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.07); } }
@keyframes turn { to { transform: rotate(360deg); } }

.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 28, 48, .93) 0%, rgba(0, 36, 62, .74) 40%, rgba(0, 36, 62, .28) 100%),
    linear-gradient(0deg, rgba(0, 20, 36, .7) 0%, transparent 46%);
}
:root[data-theme="dark"] .hero-shade {
  background:
    linear-gradient(90deg, rgba(2, 10, 18, .95) 0%, rgba(3, 14, 26, .8) 42%, rgba(3, 14, 26, .42) 100%),
    linear-gradient(0deg, rgba(2, 8, 14, .8) 0%, transparent 50%);
}

/* ---------- sign-in pages ---------- */
body.auth-page { position: relative; min-height: 100vh; margin: 0; color: #fff; background: var(--brand-deep); overflow-x: hidden; }
.auth-top { position: relative; z-index: 2; display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) clamp(16px, 4vw, 56px); }
.auth-top .logo { height: 64px; width: auto; display: block; }
.auth-top .grow { flex: 1; }
.auth-main {
  position: relative; z-index: 2; display: grid; gap: var(--s-6); align-items: center; grid-template-columns: minmax(0, 1fr);
  padding: var(--s-5) clamp(16px, 4vw, 56px) var(--s-7); min-height: calc(100vh - 78px); max-width: 1320px; margin: 0 auto;
}
@media (min-width: 980px) { .auth-main { grid-template-columns: minmax(0, 1.15fr) minmax(380px, 460px); gap: 72px; } }
.auth-hero .hero-title { font-family: var(--font-display); font-weight: 700; color: #fff; font-size: clamp(2rem, 1.2rem + 3vw, 3.4rem); line-height: 1.08; letter-spacing: -.03em; margin: 0 0 var(--s-4); max-width: 15ch; }
.auth-hero .hero-title em { color: #ffd08a; }
.auth-hero .eyebrow { color: #fff; }
.auth-hero .lead { color: rgba(255, 255, 255, .86); font-size: clamp(1rem, .95rem + .3vw, 1.18rem); max-width: 46ch; line-height: 1.65; margin-bottom: var(--s-6); }

/* four small cards that float gently, one for each kind of system */
.chips { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-3); grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 520px; }
.chip {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; color: #fff; font-weight: 600; font-size: .9rem;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: drift 6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -1.4s);
  transition: opacity .7s var(--ease) calc(var(--d, 0) * 90ms), background-color .25s var(--ease), border-color .25s var(--ease);
}
.chip:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .45); }
.chip .ic { color: #ffb68f; flex: none; }
@media (max-width: 979px) { .chips { display: none; } .auth-hero .hero-title { max-width: none; } .auth-hero .lead { margin-bottom: 0; } }

.auth-card {
  position: relative; background: var(--glass); color: var(--ink); border: 1px solid rgba(255, 255, 255, .28); border-radius: 22px;
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 30px 80px rgba(0, 12, 24, .45); padding: var(--s-6) var(--s-5) var(--s-5); width: 100%; animation: pop .6s var(--ease) both;
}
:root[data-theme="dark"] .auth-card { border-color: rgba(255, 255, 255, .12); }
.auth-card h1 { font-size: 1.6rem; margin-bottom: 4px; color: var(--ink); max-width: none; letter-spacing: -.02em; }
.auth-card .sub { color: var(--ink-soft); margin-bottom: var(--s-5); }
.auth-card .eyebrow { color: var(--accent-ink); }

/* ---------- dashboard banner ---------- */
.banner-hero {
  position: relative; border-radius: 22px; overflow: hidden; color: #fff; min-height: 230px; margin-bottom: var(--s-5);
  display: flex; align-items: flex-end; box-shadow: var(--shadow-card);
}
.banner-hero .inner { position: relative; z-index: 2; padding: clamp(20px, 3.4vw, 40px); width: 100%; display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: flex-end; justify-content: space-between; }
.banner-hero h1 { color: #fff; margin: 0 0 6px; font-size: clamp(1.7rem, 1.2rem + 2vw, 2.5rem); letter-spacing: -.03em; }
.banner-hero h1 em { color: #ffd08a; }
.banner-hero p { color: rgba(255, 255, 255, .86); margin: 0; max-width: 52ch; }
.banner-hero .eyebrow { color: #fff; margin-bottom: 8px; }
.banner-hero .btn { background: #fff; color: var(--brand); }
.banner-hero .btn:hover { background: #ffe9d9; color: var(--brand); }
.banner-hero .hero-shade { background: linear-gradient(90deg, rgba(0, 28, 48, .86) 0%, rgba(0, 36, 62, .46) 55%, rgba(0, 36, 62, .08) 100%), linear-gradient(0deg, rgba(0, 20, 36, .55) 0%, transparent 60%); }
.banner-hero .hero-photo { animation-duration: 40s; }
