/* RenoPlot — Design tokens match landing page */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #1a1612;
  --warm: #f5f0ea;
  --sand: #e8dfd4;
  --copper: #c47a3a;
  --copper-light: #d99a5b;
  --slate: #4a4440;
  --cream: #faf8f5;
  --moss: #6b7c5e;
  --white: #ffffff;
  --error: #c0392b;
  --radius: 12px;
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: 'Space Grotesk', sans-serif;
}

/* ── NAV ──────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(196, 122, 58, 0.12);
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.5px;
  text-decoration: none;
}

.nav-logo span { color: var(--copper); }

.nav-cta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
  background: var(--copper);
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  text-decoration: none;
  transition: background 0.2s;
}

.nav-cta:hover { background: var(--copper-light); }

/* ── PAGE WRAPPER ─────────────────────────────────────────────────────── */
.page {
  min-height: 100vh;
  padding: 7rem 1.5rem 4rem;
}

.container {
  max-width: 680px;
  margin: 0 auto;
}

.container--wide {
  max-width: 860px;
  margin: 0 auto;
}

/* ── UPLOAD PAGE ──────────────────────────────────────────────────────── */
.upload-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.upload-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}

.upload-header p {
  color: var(--slate);
  font-size: 1.05rem;
}

.upload-card {
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 2px 16px rgba(26,22,18,0.06);
}

/* Drop zone */
.dropzone {
  border: 2px dashed var(--sand);
  border-radius: 10px;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
  background: var(--warm);
}

.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--copper);
  background: #fdf6f0;
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.dropzone-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
}

.dropzone-label {
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  display: block;
}

.dropzone-sub {
  font-size: 0.85rem;
  color: var(--slate);
  margin-top: 0.25rem;
  display: block;
}

.dropzone-preview {
  display: none;
  margin-top: 1rem;
}

.dropzone-preview img {
  max-height: 220px;
  border-radius: 8px;
  object-fit: cover;
  max-width: 100%;
}

/* Form */
.form-group {
  margin-top: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
  letter-spacing: 0.2px;
}

.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--sand);
  border-radius: 8px;
  background: var(--warm);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--ink);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234a4440' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  cursor: pointer;
}

.form-select:focus {
  outline: none;
  border-color: var(--copper);
}

.btn-primary {
  display: block;
  width: 100%;
  margin-top: 1.75rem;
  padding: 0.9rem 1.5rem;
  background: var(--copper);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  letter-spacing: 0.2px;
}

.btn-primary:hover { background: var(--copper-light); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.error-banner {
  background: #fdf0ef;
  border: 1px solid #f5c6c1;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: var(--error);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

/* ── LOADING STATE ────────────────────────────────────────────────────── */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(8px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.25rem;
}

.loading-overlay.active { display: flex; }

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--sand);
  border-top-color: var(--copper);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
}

.loading-sub {
  font-size: 0.9rem;
  color: var(--slate);
  margin-top: -0.5rem;
}

/* ── RESULTS PAGE ─────────────────────────────────────────────────────── */
.results-header {
  text-align: center;
  margin-bottom: 2rem;
}

.results-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: var(--sand);
  color: var(--slate);
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  margin-bottom: 0.75rem;
}

.results-header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.results-room-type {
  color: var(--copper);
  text-transform: capitalize;
}

/* Cost card — big hero number */
.cost-card {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius);
  padding: 2.25rem 2rem;
  text-align: center;
  margin-bottom: 1.25rem;
}

.cost-label {
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 0.5rem;
}

.cost-range {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -1px;
}

.cost-currency {
  font-size: 1.5rem;
  opacity: 0.7;
  margin-right: 0.25rem;
}

.cost-note {
  font-size: 0.8rem;
  opacity: 0.55;
  margin-top: 0.4rem;
}

/* Info grid */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 500px) {
  .info-grid { grid-template-columns: 1fr; }
}

.info-card {
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem;
}

.info-card-label {
  font-size: 0.75rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 0.4rem;
}

.info-card-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  text-transform: capitalize;
}

/* Materials breakdown */
.section-card {
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 0.85rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 1rem;
  font-weight: 600;
}

.material-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.material-row:last-child { margin-bottom: 0; }

.material-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--sand);
  border-radius: 4px;
  overflow: hidden;
}

.material-bar {
  height: 100%;
  background: var(--copper);
  border-radius: 4px;
  transition: width 0.6s ease;
}

.material-name {
  font-size: 0.9rem;
  color: var(--ink);
  min-width: 160px;
}

.material-pct {
  font-size: 0.85rem;
  color: var(--slate);
  font-weight: 500;
  min-width: 40px;
  text-align: right;
}

/* AI observations */
.ai-observations {
  font-size: 0.95rem;
  color: var(--slate);
  line-height: 1.65;
}

/* Photo */
.photo-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.25rem;
  max-height: 320px;
}

.photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* CTA at bottom */
.results-cta {
  text-align: center;
  margin-top: 2rem;
}

.btn-secondary {
  display: inline-block;
  padding: 0.8rem 2rem;
  border: 2px solid var(--copper);
  color: var(--copper);
  border-radius: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.btn-secondary:hover {
  background: var(--copper);
  color: var(--white);
}

.disclaimer {
  font-size: 0.78rem;
  color: var(--slate);
  opacity: 0.7;
  margin-top: 1rem;
  text-align: center;
}
