:root {
  --paper: #020617;
  --ink: #e5e7eb;
  --muted: #94a3b8;
  --line: #1e293b;
  --blue: #38bdf8;
  --accent: #60a5fa;
  --success: #22c55e;
  --warn: #fbbf24;
  --radius: 14px;
}

/* Base */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 32px),
    var(--paper);
  scroll-behavior: smooth;
}

/* ====== Hero polish ====== */
.glass { background: rgba(255,255,255,0.05); backdrop-filter: blur(14px); }
.gradient-text {
  background: linear-gradient(90deg, #60a5fa, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(96,165,250,0.30);
  color: rgba(96,165,250,0.95);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: rgba(2,6,23,0.35);
}

/* Sticky nav */
.topnav {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--line);
  background: rgba(2,6,23,0.85);
  backdrop-filter: blur(10px);
}
.topnav .inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brandmark {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .02em;
  color: #fff;
  text-decoration: none;
}
.brandmark span { color: #3b82f6; }
.navlinks { display: flex; gap: 16px; align-items: center; }
.navlinks a {
  color: rgba(148,163,184,0.95);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}
.navlinks a:hover { color: #fff; }

/* Canvas */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.25;
}

/* Container */
.container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: auto;
  padding: 34px 28px 80px;
}

/* HERO */
.hero {
  padding: 24px 0 6px;
  border-bottom: 1px solid var(--line);
}
.hero-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 22px;
  flex-wrap: wrap;
  padding-bottom: 26px;
}
.hero .brand { max-width: 700px; }
.hero .brand small {
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: .18em;
  font-size: 11px;
  color: var(--muted);
}
.hero .brand h1 {
  margin: 10px 0 0;
  font-size: 52px;
  line-height: 1.05;
  font-weight: 900;
  color: #fff;
}
.hero .brand p {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
}
.keypoints {
  display: flex;
  gap: 18px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: rgba(148,163,184,0.95);
}
.keypoints span { display: flex; align-items: center; gap: 8px; }

/* Grid */
.grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 28px;
  margin-top: 34px;
}
@media(max-width:900px) {
  .grid { grid-template-columns: 1fr; }
}

/* Panels */
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(2, 6, 23, 0.85);
}
.panel.glass {
  background: rgba(2, 6, 23, 0.65);
  backdrop-filter: blur(8px);
}
.panel header { border: none; padding: 22px 24px 0; }
.panel h2 { margin: 0; font-size: 20px; letter-spacing: 0.02em; }
.panel .body { padding: 24px; }

/* Account */
.account { display: flex; flex-direction: column; gap: 16px; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.account-grid>div { display: flex; flex-direction: column; }
.edit-profile a {
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 12px;
}
.edit-profile a:hover { text-decoration: underline; }

/* Monospace */
.mono { font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.16em; }

/* Upload */
.upload {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border: 2px dashed var(--line);
  padding: 26px;
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.upload button {
  padding: 16px 36px;
  border-radius: 999px;
  border: 1px solid #334155;
  background: #0f172a;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  transition: background 0.3s, transform 0.15s;
}
.upload button:hover { background: #000; transform: translateY(-1px); }

/* Progress */
.progress {
  height: 4px;
  background: var(--line);
  margin-top: 18px;
  overflow: hidden;
  border-radius: 4px;
}
.progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: 2.5s cubic-bezier(.2, .8, .2, 1);
}

/* Jobs grid */
.jobs {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

/* Job card */
.job {
  height: 320px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Status badge */
.status {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid;
}

/* Status colors */
.ready { color: var(--success); border-color: var(--success); }
.processing { color: var(--warn); border-color: var(--warn); }
.queued { color: #6b7280; border-color: #cbd5e1; }

/* Text handling */
.job .mono, .job p { overflow: hidden; text-overflow: ellipsis; }

/* Clamp title */
.job p strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Button locked to bottom */
.job-btn {
  margin-top: auto;
  width: 100%;
  padding: 8px 0;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  cursor: pointer;
}
.job-btn.outline { border: 1px solid var(--line); background: transparent; color: var(--accent); }
.job-btn.primary { border: none; background: var(--accent); color: #fff; }

/* Modal (FIXED: open class now shows) */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 30, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal.open { display: flex; }

.modal-box {
  background: var(--paper);
  width: 100%;
  max-width: 520px;
  padding: 34px;
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,0.18);
  position: relative;
}

.xbtn{
  position:absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(2,6,23,0.55);
  color: #fff;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}
.xbtn:hover{ background: rgba(2,6,23,0.90); }

.modal-box h2 { margin-top: 0; margin-bottom: 12px; font-size: 22px; }

.modal-box input, .modal-box select {
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  margin-bottom: 14px;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,0.25);
  background: rgb(43 38 65);
  color: var(--ink);
}
.modal-box button[type="submit"], .modal-box button:not(.xbtn) {
  background: var(--accent);
  color: #000;
  border: none;
  padding: 14px 30px;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: 0.3s;
}
.modal-box button[type="submit"]:hover, .modal-box button:not(.xbtn):hover { background: var(--blue); color: #fff; }

.auth-alert{
  border: 1px solid rgba(248,113,113,0.35);
  background: rgba(248,113,113,0.12);
  color: rgba(254,226,226,0.95);
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  margin: 10px 0 14px;
}
.auth-row{
  display:flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}
.auth-row a{
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}
.auth-row a:hover{ text-decoration: underline; }

/* Footer */
footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--muted);
}
hr { border: none; border-top: 1px solid var(--line); margin: 20px 0; }

/* Responsive tweaks */
@media(max-width:600px) {
  .account-grid { grid-template-columns: 1fr; }
  .upload { flex-direction: column; align-items: flex-start; }
}

/* ===== Sample Estimates ===== */
.samples-sub { color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 6px; }
.samples-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
}
.sample-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  cursor: pointer;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(148,163,184,0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.sample-image:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 35px rgba(0,0,0,0.35);
  border-color: rgba(96,165,250,0.45);
}
.samples-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.tab-btn {
  border: 1px solid rgba(148,163,184,0.20);
  background: rgba(2,6,23,0.35);
  color: rgba(226,232,240,0.92);
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .10em;
  cursor: pointer;
  transition: .15s ease;
}
.tab-btn:hover { border-color: rgba(96,165,250,.55); }
.tab-btn.active {
  border-color: rgba(96,165,250,.9);
  background: rgba(96,165,250,.15);
  color: #fff;
}

/* ===== Image Modal ===== */
#imageModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.90);
  display: none;
  z-index: 2500;
  align-items: center;
  justify-content: center;
}
#imageModal.open { display: flex; }
#imageModal .frame {
  position: relative;
  width: min(1100px, 92vw);
  height: min(86vh, 820px);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(2,6,23,0.75);
  overflow: hidden;
}
#imageModal img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.modal-btn {
  position: absolute;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(2,6,23,0.55);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  user-select: none;
  transition: .15s ease;
}
.modal-btn:hover { background: rgba(2,6,23,0.90); }
#modalClose { top: 14px; right: 14px; font-size: 22px; }
#modalPrev { left: 14px; top: 50%; transform: translateY(-50%); font-size: 26px; }
#modalNext { right: 14px; top: 50%; transform: translateY(-50%); font-size: 26px; }
#modalCaption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(2,6,23,0.55);
  color: rgba(255,255,255,0.86);
  font-size: 12px;
}
.brandmark img { flex-shrink: 0; }

/* ===== Nav Buttons (Login / Register) ===== */
.navlinks { display:flex; gap:14px; align-items:center; }

.nav-btn{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-decoration: none;
  user-select: none;
  white-space: nowrap;
  isolation: isolate;
  overflow: hidden;
  transform: translateZ(0);
  transition: transform .15s ease, box-shadow .25s ease, border-color .25s ease;
}

/* Solid button (Register) */
.nav-btn--solid{
  background: #1F5EFF;
  color: #fff;
  border: 1px solid rgba(31,94,255,.35);
  box-shadow: 0 10px 24px rgba(31,94,255,.18);
}

/* Outline button (Login) */
.nav-btn--outline{
  background: rgba(31,94,255,.12);
  color: #fff;
  border: 1px solid rgba(31,94,255,.35);
}

/* The diagonal sweep layer (like the video) */
.nav-btn::before{
  content:"";
  position:absolute;
  inset:-2px;
  z-index:-1;

  /* sweep color */
  background: #5EC8FF;

  /* diagonal edge */
  clip-path: polygon(25% 0%, 100% 0%, 75% 100%, 0% 100%);

  /* start off to the right */
  transform: translateX(120%);
  transition: transform .55s cubic-bezier(.2,.85,.2,1);
  opacity: .95;
}

/* Hover effect */
.nav-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(94,200,255,.55);
  box-shadow: 0 14px 34px rgba(94,200,255,.22);
}
.nav-btn:hover::before{
  transform: translateX(0%);
}

/* Optional: make solid button background shift slightly on hover */
.nav-btn--solid:hover{
  box-shadow: 0 18px 40px rgba(94,200,255,.24);
}

/* Keyboard accessibility */
.nav-btn:focus-visible{
  outline: 2px solid rgba(94,200,255,.85);
  outline-offset: 2px;
}

/* Mobile tighten */
@media (max-width: 600px){
  .nav-btn{
    padding: 9px 12px;
    font-size: 11px;
  }
}
/* ===== Nav Buttons (Login / Register) ===== */
.navlinks { display:flex; gap:14px; align-items:center; }

.nav-btn{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 10px 14px;
  border-radius: 12px;           /* ✅ square-ish */
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-decoration: none;
  user-select: none;
  white-space: nowrap;

  isolation: isolate;
  overflow: hidden;
  transform: translateZ(0);

  transition: transform .15s ease, box-shadow .25s ease, border-color .25s ease, color .25s ease;
}

/* Solid button (Register) */
.nav-btn--solid{
  background: #1F5EFF;            /* Normal */
  color: #fff;
  border: 1px solid rgba(31,94,255,.45);
  box-shadow: 0 10px 24px rgba(31,94,255,.18);
}

/* Outline button (Login) */
.nav-btn--outline{
  background: rgba(31,94,255,.10);
  color: #fff;
  border: 1px solid rgba(31,94,255,.45);
}

/* Full-fill hover layer (covers entire button) */
.nav-btn::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background:#5EC8FF;             /* Hover */
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .45s cubic-bezier(.2,.85,.2,1);
}

/* Hover: full color fill */
.nav-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(94,200,255,.75);
  box-shadow: 0 14px 34px rgba(94,200,255,.22);
  color: #00122a;                  /* readable on light hover */
}

.nav-btn:hover::before{
  transform: scaleX(1);
}

/* Optional: tiny press feedback */
.nav-btn:active{
  transform: translateY(0px) scale(.98);
}

/* Keyboard accessibility */
.nav-btn:focus-visible{
  outline: 2px solid rgba(94,200,255,.85);
  outline-offset: 2px;
}

/* Mobile tighten */
@media (max-width: 600px){
  .nav-btn{
    padding: 9px 12px;
    font-size: 11px;
    border-radius: 10px;
  }
}
/* =========================
   LIGHT NAV OVERRIDES
   ========================= */

/* Light glass nav (not white) */
.topnav{
  background: rgba(248, 250, 252, 0.78) !important;  /* light slate glass */
  backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.10) !important;
}

/* Nav inner spacing (optional tweak, keep if you want) */
.topnav .inner{
  padding: 16px 28px !important;
}

/* Brand + links readable on light bg */
.brandmark{
  color: #0f172a !important; /* slate-900 */
}

.navlinks a{
  color: rgba(15, 23, 42, 0.78) !important; /* slate */
}

.navlinks a:hover{
  color: #0f172a !important;
}

/* Keep your buttons looking good on light nav */
.nav-btn--outline{
  background: rgba(31, 94, 255, 0.10) !important;
  border-color: rgba(31, 94, 255, 0.40) !important;
  color: #0f172a !important;
}

.nav-btn--solid{
  color: #ffffff !important; /* solid stays white text by default */
}

/* On hover fill, make sure text stays readable */
.nav-btn:hover{
  color: #00122a !important;
}


