
/* =========================================================
   GHOSTLENS — Main Stylesheet
   Dark investigator theme inspired by EVP Analyzer
   ========================================================= */

:root {
  color-scheme: dark;

  --bg: #03090b;
  --bg-soft: #061115;
  --panel: #081619;
  --panel-2: #0b1d20;
  --panel-3: #102629;

  --line: #173b32;
  --line-bright: #246347;

  --text: #f1f7f3;
  --muted: #9aada6;

  --green: #69ff39;
  --green-soft: #48e6a0;
  --green-dark: #163d28;

  --amber: #ffc66d;
  --red: #ff7272;
  --blue: #78cfff;

  --radius: 16px;
  --radius-small: 10px;

  --content-width: 1180px;

  --shadow:
    0 18px 55px rgba(0, 0, 0, 0.35);
}

/* =========================================================
   RESET / GLOBAL
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(
      circle at 15% 0%,
      rgba(32, 100, 61, 0.14),
      transparent 32rem
    ),
    radial-gradient(
      circle at 90% 20%,
      rgba(20, 85, 75, 0.10),
      transparent 30rem
    ),
    var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

img {
  max-width: 100%;
}

a {
  color: var(--green-soft);
  text-decoration: none;
}

a:hover {
  color: var(--green);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

::selection {
  color: #020804;
  background: var(--green);
}

/* =========================================================
   HEADER / NAVIGATION
   ========================================================= */

.topbar {
  position: relative;
  z-index: 20;
  width: 100%;
  background: rgba(3, 11, 13, 0.94);
  border-bottom: 1px solid rgba(105, 255, 57, 0.17);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  width: min(
    calc(100% - 40px),
    var(--content-width)
  );
  min-height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

.brandmark {
  display: block;
  width: 58px;
  height: 58px;
  min-width: 58px;
  max-width: 58px;
  max-height: 58px;
  flex: 0 0 58px;
  object-fit: contain;
  border-radius: 12px;
}

.brandword {
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-size: 23px;
  font-weight: 900;
  letter-spacing: 1.5px;
  line-height: 1.05;
}

.brandword .accent {
  color: var(--green);
}

.brandword small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.8px;
  line-height: 1.2;
}

.topnav,
.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
}

.topnav a,
.nav a {
  display: inline-flex;
  align-items: center;
  padding: 9px 13px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: 9px;
  transition: 0.2s ease;
}

.topnav a:hover,
.nav a:hover {
  color: var(--green);
  background: rgba(105, 255, 57, 0.06);
  border-color: var(--line);
}

.topnav .navcta,
.nav .navcta {
  color: #031006;
  background: var(--green);
  border-color: var(--green);
  font-weight: 900;
}

.topnav .navcta:hover,
.nav .navcta:hover {
  color: #031006;
  background: #8aff69;
}

/* =========================================================
   MAIN PAGE LAYOUT
   ========================================================= */

.shell {
  width: min(
    calc(100% - 40px),
    var(--content-width)
  );
  min-height: calc(100vh - 180px);
  margin: 0 auto;
  padding: 42px 0 70px;
}

.container,
.wrap {
  width: min(
    calc(100% - 40px),
    var(--content-width)
  );
  margin-left: auto;
  margin-right: auto;
}

.page-header {
  margin-bottom: 30px;
}

.page-header h1,
.page-title {
  margin: 0 0 9px;
  font-size: clamp(27px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -1px;
}

.page-header p,
.page-description {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

/* =========================================================
   HERO / HOMEPAGE
   ========================================================= */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  align-items: center;
  gap: 45px;
}

.hero-home {
  min-height: 490px;
  padding: 35px 0 55px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 19px;
  color: var(--green-soft);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
}

.eyebrow-dot,
.pulse-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(105, 255, 57, 0.8);
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(42px, 6vw, 70px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -2.8px;
}

.accent {
  color: var(--green);
}

.lead {
  max-width: 590px;
  margin: 0 0 27px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 29px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
}

/* The large artwork belongs ONLY to the homepage hero. */

.hero-art-wrap {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 440px;
  height: 390px;
  min-height: 0;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-orbit {
  position: absolute;
  z-index: -1;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(105, 255, 57, 0.22);
  border-radius: 50%;
  box-shadow:
    0 0 50px rgba(50, 255, 110, 0.08),
    inset 0 0 45px rgba(50, 255, 110, 0.05);
}

.hero-art {
  display: block;
  width: 100%;
  max-width: 360px;
  height: 360px;
  max-height: 360px;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.button,
button.button {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line-bright);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.button:hover,
button.button:hover {
  color: var(--green);
  background: var(--panel-3);
  border-color: var(--green);
  transform: translateY(-1px);
}

.button.primary,
button.button.primary {
  color: #031006;
  background: var(--green);
  border-color: var(--green);
}

.button.primary:hover,
button.button.primary:hover {
  color: #031006;
  background: #8aff69;
}

.button.danger {
  color: #fff;
  background: rgba(255, 70, 70, 0.12);
  border-color: rgba(255, 100, 100, 0.4);
}

.button.small {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 11px;
}

/* =========================================================
   CARDS / PANELS
   ========================================================= */

.card,
.panel,
.feature-card {
  padding: 23px;
  background:
    linear-gradient(
      145deg,
      rgba(12, 31, 32, 0.97),
      rgba(5, 16, 19, 0.98)
    );
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card h2,
.panel h2,
.feature-card h2 {
  margin-top: 0;
}

.card + .card,
.panel + .panel {
  margin-top: 20px;
}

.featuregrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.feature-card {
  min-width: 0;
  box-shadow: none;
}

.feature-card h3 {
  margin: 0 0 9px;
  color: var(--text);
  font-size: 17px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.section-heading {
  margin: 45px 0 18px;
  font-size: 23px;
  font-weight: 900;
}

/* =========================================================
   AUTHENTICATION / LOGIN / REGISTER
   ========================================================= */

.auth-wrap {
  width: 100%;
  max-width: 490px;
  margin: 30px auto;
}

.auth-card {
  padding: 32px;
  background: linear-gradient(145deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.auth-card h1,
.auth-card h2 {
  margin: 0 0 9px;
  font-size: 29px;
  line-height: 1.2;
}

.auth-card > p {
  margin: 0 0 25px;
  color: var(--muted);
}

/* =========================================================
   FORMS / INPUTS
   ========================================================= */

form {
  width: 100%;
}

.form-group,
.form-row,
.field {
  margin-bottom: 18px;
}

label {
  display: block;
  margin-bottom: 7px;
  color: #dce9e1;
  font-size: 12px;
  font-weight: 800;
}

input,
select,
textarea {
  display: block;
  width: 100%;
  min-height: 43px;
  padding: 11px 13px;
  color: var(--text);
  background: #030d10;
  border: 1px solid #23473e;
  border-radius: 9px;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(105, 255, 57, 0.10);
}

input::placeholder,
textarea::placeholder {
  color: #647c73;
}

input[type="checkbox"],
input[type="radio"] {
  display: inline-block;
  width: auto;
  min-height: 0;
  margin-right: 7px;
  accent-color: var(--green);
}

input[type="file"] {
  padding: 10px;
  background: #061316;
}

.form-help,
.help-text,
small {
  color: var(--muted);
}

.form-help,
.help-text {
  display: block;
  margin-top: 6px;
  font-size: 11px;
}

.form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

/* =========================================================
   TABLES / LISTS
   ========================================================= */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(5, 17, 19, 0.8);
  font-size: 13px;
}

th,
td {
  padding: 13px 15px;
  border-bottom: 1px solid rgba(35, 71, 62, 0.65);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--green-soft);
  background: rgba(20, 55, 40, 0.35);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: rgba(105, 255, 57, 0.035);
}

/* =========================================================
   STATUS / FLASH MESSAGES
   ========================================================= */

.flash,
.alert,
.notice {
  margin: 0 0 17px;
  padding: 13px 16px;
  color: var(--text);
  background: rgba(72, 230, 160, 0.08);
  border: 1px solid rgba(72, 230, 160, 0.3);
  border-radius: 10px;
  font-size: 13px;
}

.flash.error,
.alert.error,
.notice.error {
  background: rgba(255, 90, 90, 0.09);
  border-color: rgba(255, 90, 90, 0.4);
}

.flash.warning,
.alert.warning {
  background: rgba(255, 198, 109, 0.08);
  border-color: rgba(255, 198, 109, 0.4);
}

.badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  color: var(--green-soft);
  background: rgba(72, 230, 160, 0.08);
  border: 1px solid rgba(72, 230, 160, 0.25);
  border-radius: 30px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.badge.warning {
  color: var(--amber);
  border-color: rgba(255, 198, 109, 0.35);
}

.badge.danger {
  color: var(--red);
  border-color: rgba(255, 114, 114, 0.35);
}

/* =========================================================
   RECORDINGS / IMAGE PREVIEWS / MEDIA
   ========================================================= */

.recording-card,
.image-card,
.evidence-card {
  min-width: 0;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.recording-card img,
.image-card img,
.evidence-card img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 9px;
}

audio,
video {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 12px;
}

audio {
  accent-color: var(--green);
}

.waveform,
.spectrogram,
.media-preview {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border-radius: 10px;
}

.empty-state {
  padding: 35px 20px;
  color: var(--muted);
  background: rgba(5, 17, 19, 0.7);
  border: 1px dashed var(--line-bright);
  border-radius: 12px;
  text-align: center;
}

/* =========================================================
   FOOTER
   ========================================================= */

footer,
.site-footer {
  padding: 25px 20px;
  color: var(--muted);
  background: rgba(3, 11, 13, 0.85);
  border-top: 1px solid rgba(105, 255, 57, 0.13);
  font-size: 11px;
  text-align: center;
}

footer a,
.site-footer a {
  color: var(--green-soft);
}

/* =========================================================
   UTILITIES
   ========================================================= */

.muted {
  color: var(--muted);
}

.text-green {
  color: var(--green);
}

.text-amber {
  color: var(--amber);
}

.text-red {
  color: var(--red);
}

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.hidden {
  display: none !important;
}

/* =========================================================
   RESPONSIVE TABLET
   ========================================================= */

@media (max-width: 900px) {
  .topbar-inner {
    min-height: 78px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.8fr);
    gap: 20px;
  }

  .hero-art-wrap {
    max-width: 340px;
    height: 330px;
  }

  .hero-art {
    max-width: 310px;
    height: 310px;
    max-height: 310px;
  }

  .featuregrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =========================================================
   RESPONSIVE MOBILE
   ========================================================= */

@media (max-width: 700px) {
  .topbar-inner {
    width: calc(100% - 28px);
    padding: 12px 0;
    flex-wrap: wrap;
    gap: 12px;
  }

  .brandmark {
    width: 48px;
    height: 48px;
    min-width: 48px;
    max-width: 48px;
    max-height: 48px;
    flex-basis: 48px;
  }

  .brandword {
    font-size: 19px;
  }

  .brandword small {
    font-size: 8px;
    letter-spacing: 1.2px;
  }

  .topnav,
  .nav {
    width: 100%;
    justify-content: flex-start;
    gap: 5px;
  }

  .topnav a,
  .nav a {
    padding: 7px 9px;
    font-size: 11px;
  }

  .shell {
    width: calc(100% - 28px);
    padding-top: 28px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .hero-home {
    min-height: 0;
    padding: 25px 0 35px;
  }

  .hero h1 {
    font-size: clamp(39px, 11vw, 55px);
    letter-spacing: -1.8px;
  }

  .lead {
    font-size: 15px;
  }

  .hero-art-wrap {
    width: 100%;
    max-width: 320px;
    height: 290px;
    margin-top: 5px;
  }

  .hero-art {
    width: 100%;
    max-width: 280px;
    height: 280px;
    max-height: 280px;
  }

  .hero-orbit {
    width: 230px;
    height: 230px;
  }

  .featuregrid {
    grid-template-columns: 1fr;
  }

  .auth-wrap {
    margin: 10px auto;
  }

  .auth-card,
  .card,
  .panel {
    padding: 20px;
  }

  .actions {
    align-items: stretch;
  }

  .actions .button {
    flex: 1 1 auto;
  }
}

/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 400px) {
  .brandword {
    font-size: 17px;
  }

  .brandword small {
    font-size: 7px;
  }

  .hero h1 {
    font-size: 37px;
  }

  .button {
    padding: 10px 13px;
  }
}
/* TEMPORARY GHOST IMAGE DIAGNOSTIC */
.brandmark {
    display: block !important;
    width: 55px !important;
    height: 55px !important;
    max-width: 55px !important;
    max-height: 55px !important;
    object-fit: contain !important;
}

body {
    background-image: none !important;
}

body img {
    max-width: 100% !important;
}

.hero-art,
.hero-art-wrap {
    display: none !important;
}