:root {
  --surface: #fff8f2;
  --travertine: #e8e2d9;
  --surface-low: #fdf2e2;
  --surface-container: #f7eddc;
  --surface-high: #f1e7d6;
  --stone-line: rgba(142, 121, 93, 0.24);
  --bronze: #8e795d;
  --charcoal: #121212;
  --ink: #201b11;
  --muted: #55504a;
  --soft: #747878;
  --white: #ffffff;
  --green: #566246;
  --danger: #8f1d14;
  --shadow: 0 28px 80px rgba(18, 18, 18, 0.08);
}

* { box-sizing: border-box; }

html {
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: clip;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(255, 248, 242, 0.92), rgba(232, 226, 217, 0.88)),
    radial-gradient(circle at 82% 8%, rgba(142, 121, 93, 0.10), transparent 30rem),
    var(--surface);
  font-family: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(90deg, rgba(142, 121, 93, 0.10) 1px, transparent 1px),
    linear-gradient(0deg, rgba(142, 121, 93, 0.08) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.30), transparent 70%);
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.app-shell, .login-shell {
  position: relative;
  z-index: 1;
  overflow-x: clip;
}

.serif {
  font-family: "Playfair Display", Georgia, serif;
}

.label {
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
}

.muted {
  color: var(--muted);
  line-height: 1.65;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--stone-line);
  background: rgba(232, 226, 217, 0.84);
  backdrop-filter: blur(20px);
}

.nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 48px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  letter-spacing: 0.13em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--bronze);
  background: var(--charcoal);
  color: var(--surface);
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
}

.brand strong {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 21px;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3vw, 44px);
}

.nav-link {
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 6px 0;
  color: var(--muted);
  background: transparent;
}

.nav-link.active,
.nav-link:hover {
  color: var(--charcoal);
  border-bottom-color: var(--charcoal);
}

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

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--charcoal);
  border-radius: 0;
  padding: 12px 18px;
  color: var(--surface);
  background: var(--charcoal);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.btn:hover {
  border-color: var(--bronze);
  background: var(--bronze);
}

.btn.secondary {
  color: var(--charcoal);
  background: transparent;
  border-color: var(--bronze);
}

.btn.secondary:hover {
  color: var(--surface);
  background: var(--bronze);
}

.btn.text {
  min-height: auto;
  padding: 0 0 5px;
  color: var(--bronze);
  border: 0;
  border-bottom: 1px solid var(--bronze);
  background: transparent;
}

.btn.text:hover {
  color: var(--charcoal);
  background: transparent;
}

.mobile-menu {
  display: none;
}

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(36px, 7vw, 96px) clamp(18px, 4vw, 48px);
}

.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.85fr);
  gap: clamp(30px, 6vw, 96px);
  align-items: center;
  padding-top: clamp(30px, 5vw, 60px);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  color: var(--bronze);
  margin: 0 0 18px;
}

.hero h1,
.page-title h1 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p {
  max-width: 620px;
  margin: 28px 0 0;
  font-size: 18px;
  line-height: 1.68;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-media {
  min-height: 660px;
  position: relative;
}

.hero-image {
  height: 640px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--stone-line);
  background: var(--surface-high);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.10;
  mix-blend-mode: multiply;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.3), transparent 45%),
    repeating-linear-gradient(90deg, rgba(18,18,18,.07) 0 1px, transparent 1px 6px);
}

.floating-panel {
  position: absolute;
  left: -36px;
  bottom: 44px;
  width: min(420px, calc(100% - 24px));
  padding: 24px;
  border: 1px solid var(--stone-line);
  background: rgba(255, 248, 242, 0.92);
  box-shadow: var(--shadow);
}

.progress-line {
  height: 1px;
  overflow: hidden;
  background: rgba(142, 121, 93, 0.28);
}

.progress-line span {
  display: block;
  height: 100%;
  width: var(--progress, 64%);
  background: var(--bronze);
  transition: width .4s ease;
}

.grid {
  display: grid;
  gap: 24px;
}

.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.main-grid { grid-template-columns: minmax(0, 1.1fr) 380px; }
.wide-grid { grid-template-columns: 290px minmax(0, 1fr); }

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
}

.section-header h2,
.card h2,
.card h3 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
}

.section-header h2 { font-size: clamp(34px, 4vw, 58px); line-height: 1.05; }

.card {
  min-width: 0;
  border: 1px solid var(--stone-line);
  background: rgba(255, 248, 242, 0.62);
}

.card.pad { padding: clamp(20px, 3vw, 34px); }

.case-card {
  border: 0;
  background: transparent;
  text-align: left;
}

.case-image {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--stone-line);
  background: var(--surface-high);
}

.case-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s ease;
}

.case-card:hover .case-image img {
  transform: scale(1.045);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 26px;
  padding: 6px 10px;
  border: 1px solid var(--stone-line);
  color: var(--bronze);
  background: rgba(255, 248, 242, 0.86);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
}

.case-card .chip {
  position: absolute;
  top: 18px;
  left: 18px;
  color: var(--charcoal);
  background: var(--surface);
}

.case-card h3 {
  margin: 24px 0 8px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 28px;
}

.case-card p {
  margin: 0 0 14px;
}

.spec-list {
  margin: 18px 0 24px;
  padding: 18px 0 0;
  border-top: 1px solid var(--stone-line);
}

.spec-list div {
  display: flex;
  gap: 10px;
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.4;
}

.upload-zone {
  min-height: 460px;
  display: grid;
  place-items: center;
  position: relative;
  padding: 34px;
  border: 1px dashed rgba(142, 121, 93, 0.62);
  background:
    linear-gradient(90deg, rgba(142, 121, 93, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(142, 121, 93, 0.07) 1px, transparent 1px),
    var(--surface-low);
  background-size: 42px 42px;
  text-align: center;
}

.upload-zone.drag {
  border-color: var(--charcoal);
  background-color: var(--surface-high);
}

.upload-icon {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  border: 1px solid var(--bronze);
  color: var(--bronze);
  font-size: 30px;
}

.file-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.file-row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(142, 121, 93, 0.16);
  background: rgba(255, 255, 255, 0.38);
}

.thumb {
  width: 70px;
  height: 70px;
  overflow: hidden;
  background: var(--travertine);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.analysis-shell {
  position: relative;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 36px;
  align-items: stretch;
}

.scan-board {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--stone-line);
  background: var(--charcoal);
  color: var(--surface);
}

.scan-board img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.74;
  filter: grayscale(18%);
}

.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--bronze);
  box-shadow: 0 0 24px rgba(232, 211, 171, .85);
  animation: scan 2.8s linear infinite;
}

@keyframes scan {
  from { transform: translateY(0); }
  to { transform: translateY(620px); }
}

.hotspot {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1px solid var(--surface);
  background: var(--bronze);
  transform: rotate(45deg);
}

.hotspot.one { left: 26%; top: 28%; }
.hotspot.two { left: 58%; top: 46%; }
.hotspot.three { left: 74%; top: 70%; }

.steps {
  display: grid;
  gap: 12px;
}

.step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--stone-line);
}

.step b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--stone-line);
  font-size: 11px;
  color: var(--bronze);
}

.step.active b {
  color: var(--surface);
  border-color: var(--bronze);
  background: var(--bronze);
}

.step.done b {
  color: var(--surface);
  border-color: var(--green);
  background: var(--green);
}

.material-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
}

.material-image {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--stone-line);
  background: var(--surface-high);
}

.material-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.moodboard {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(210px, 0.6fr);
  grid-template-rows: repeat(2, minmax(190px, 1fr));
  gap: 16px;
  min-height: 560px;
}

.moodboard .big { grid-row: span 2; }
.moodboard img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.report-preview {
  padding: 24px;
  background: var(--surface-container);
}

.report-page {
  min-height: 300px;
  padding: 28px;
  background: var(--white);
  border: 1px solid rgba(142, 121, 93, 0.12);
}

.report-page h4 {
  margin: 80px 0 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 28px;
  font-weight: 500;
  text-align: center;
}

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

.metric {
  padding: 22px;
  border: 1px solid var(--stone-line);
  background: rgba(255, 255, 255, 0.35);
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 34px;
  line-height: 1;
}

.form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--bronze);
}

.input, textarea, select {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--charcoal);
  border-radius: 0;
  padding: 12px 0;
  color: var(--ink);
  background: transparent;
  outline: none;
}

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

.timeline {
  display: grid;
  gap: 18px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--stone-line);
}

.dark-card {
  color: var(--surface);
  background: var(--charcoal);
  border-color: var(--charcoal);
}

.dark-card .muted {
  color: rgba(255, 248, 242, 0.72);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  max-width: min(420px, calc(100vw - 48px));
  padding: 18px 20px;
  border: 1px solid var(--bronze);
  background: var(--charcoal);
  color: var(--surface);
  box-shadow: var(--shadow);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 520px) minmax(0, 1fr);
}

.login-panel {
  display: grid;
  place-items: center;
  padding: clamp(22px, 4vw, 52px);
  background: var(--surface);
}

.login-card {
  width: min(100%, 430px);
}

.login-card h1 {
  margin: 34px 0 14px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(42px, 5vw, 64px);
  line-height: 1;
}

.login-art {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: var(--charcoal);
}

.login-art img {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  object-fit: cover;
  opacity: 0.72;
}

.login-art-copy {
  position: absolute;
  left: clamp(28px, 5vw, 74px);
  right: clamp(28px, 5vw, 74px);
  bottom: clamp(28px, 7vw, 88px);
  color: var(--surface);
}

.login-art-copy h2 {
  max-width: 720px;
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.02;
}

.error {
  color: var(--danger);
  margin: 12px 0 0;
  font-weight: 700;
}

.hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .nav-links { display: none; }
  .nav.mobile-open .nav-inner {
    align-items: stretch;
    flex-wrap: wrap;
  }
  .nav.mobile-open .nav-links {
    order: 3;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--stone-line);
  }
  .nav.mobile-open .nav-links .nav-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border: 1px solid var(--stone-line);
    background: rgba(255, 248, 242, 0.72);
    text-align: center;
  }
  .nav.mobile-open .nav-links .nav-link.active {
    color: var(--surface);
    border-color: var(--charcoal);
    background: var(--charcoal);
  }
  .mobile-menu { display: inline-flex; }
  .nav-actions .contact { display: none; }
  .hero,
  .main-grid,
  .wide-grid,
  .analysis-shell {
    grid-template-columns: 1fr;
  }
  .hero-media { min-height: auto; }
  .hero-image { height: min(72vh, 640px); }
  .floating-panel {
    position: relative;
    left: auto;
    bottom: auto;
    width: 100%;
    margin-top: -1px;
  }
  .cols-3, .cols-4, .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .nav-inner { min-height: 68px; }
  .brand strong { font-size: 18px; }
  .nav.mobile-open .nav-links { grid-template-columns: 1fr 1fr; }
  .nav.mobile-open .nav-links .nav-link { letter-spacing: 0.08em; }
  .nav-actions .btn:not(.mobile-menu) { display: none; }
  .container { padding-top: 42px; padding-bottom: 58px; }
  .hero h1, .page-title h1 { font-size: clamp(42px, 15vw, 64px); }
  .hero p { font-size: 16px; }
  .hero-image { height: 440px; }
  .section-header { align-items: flex-start; flex-direction: column; }
  .cols-3, .cols-4, .metric-grid, .material-grid, .moodboard { grid-template-columns: 1fr; }
  .moodboard { grid-template-rows: none; min-height: 0; }
  .moodboard .big, .moodboard > div { min-height: 260px; }
  .file-row { grid-template-columns: 56px 1fr; }
  .file-row .btn { grid-column: 1 / -1; }
  .timeline-row { grid-template-columns: 1fr; }
  .login-shell { grid-template-columns: 1fr; }
  .login-art { display: none; }
}
