/* ==============================
   WTFNOW – Modern Landing + Auth
   ============================== */

:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --border: #e5e7eb;

  --text: #0f172a;
  --muted: #64748b;

  --accent: #2563eb;
  --danger: #b00020;

  --radius: 16px;
  --shadow: 0 12px 36px rgba(15,23,42,0.1);

  --index-bg-opacity: 0.22;   /* fade control */
}

* { box-sizing: border-box; }


body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
}

/* true faded background image (dashboard style) */

body::before {
  content: '';
  position: fixed;
  inset: 0;

  background: url("/assets/bg/water-tanks-2.jpg") center / cover no-repeat;

  opacity: var(--index-bg-opacity);

  pointer-events: none;
  z-index: -1;
}


/* ---------------- Header ---------------- */

.logo a {
  text-decoration: none;
  font-weight: 900;
  letter-spacing: .08em;
 color: var(--danger);}

/* Header */

.site-header {
  background: linear-gradient(
    90deg,
    var(--panel),
    color-mix(in srgb, var(--accent) 8%, var(--panel))
  );
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(0,0,0,.05);
}

.site-header .inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
}

.site-header .actions {
  margin-left: auto;
  display: flex;
  gap: .6rem;
}

/* Buttons */

.site-header button {
  background: var(--accent);
  border: none;
  padding: .45rem .9rem;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  color: white;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

.site-header button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
  opacity: .95;
}

.site-header button:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(0,0,0,.12);
}

/* ---------------- Landing ---------------- */

#publicHome {
  max-width: 900px;
  margin: 6rem auto 3rem;
  padding: 0 1.25rem;
  text-align: center;
}

#publicHome h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 1rem;
}

#publicHome h1::after {
  content:'';
  display:block;
  width:64px;
  height:4px;
  background:var(--accent);
  border-radius:2px;
  margin:14px auto 0;
}

#publicHome p {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 1.5rem auto 2rem;
  max-width: 520px;
}

#publicHome ul {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem 1.25rem;
}

#publicHome li {
  background: white;
  padding: .5rem .9rem;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
  font-weight: 600;
}

/* Mock tank card */

.mock-card {
  margin: 40px auto 0;
  width: 280px;
  padding: 18px;
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow);
}

.tank-name { font-weight: 700; }

.tank-level {
  font-size: 2.6rem;
  font-weight: 900;
  margin: 10px 0;
}

.tank-status {
  color: #15803d;
  font-weight: 600;
}

/* ---------------- Auth ---------------- */

#auth {
  display: flex;
  justify-content: center;
  padding: 3rem 1rem 4rem;
}

#loginView,
#registerView {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 2.25rem;
  width: 100%;
  max-width: 420px;
}

#auth h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  text-align: center;
}

#auth input {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 0.8rem;
  font-size: .95rem;
}

#auth button[type="submit"] {
  width: 100%;
  margin-top: .75rem;
  padding: .7rem;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

#auth p {
  text-align: center;
  margin-top: 1.25rem;
  color: var(--muted);
}

#auth p button {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
}

#loginError,
#registerError {
  margin-top: .75rem;
  color: var(--danger);
  text-align: center;
  font-size: .9rem;
}

/* Password toggle */

.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px; }

.toggle-pass {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  padding: 6px;
  cursor: pointer;
  color: #555;
}

.toggle-pass:hover { color: #000; }

/* ---------------- Mobile ---------------- */

@media (max-width:520px) {
  #publicHome { margin-top:4rem; }
  #loginView,#registerView { padding:1.75rem 1.5rem; }
}


/* ===== Index header = Dashboard header clone ===== */

.site-header {
  position: relative;
  overflow: hidden;
  padding: .5rem 1.25rem 2rem;

  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.35), transparent 40%),
    radial-gradient(circle at 80% 15%, rgba(255,255,255,.25), transparent 35%),
    linear-gradient(135deg, #2563eb, #0ea5e9);

  color: white;
}

/* strong curved cut revealing background image */

.site-header::after {
  content: '';
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -1px;
  height: 70px;

  background:
    radial-gradient(160% 70px at 80% 0,
      transparent 62%,
      rgba(0,0,0,.08) 63%);

  pointer-events: none;
}

/* logo / title pill */
.logo a {
  color: white !important;
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(6px);
  padding: .45rem .95rem;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: .08em;
}
