/* ===================================
   ArchSpec Landing Page
   Material intelligence for architects
   =================================== */

:root {
  --cream: #f0ebe3;
  --cream-dark: #e5dfd4;
  --charcoal: #1c1c1c;
  --charcoal-light: #3a3530;
  --terracotta: #b85c38;
  --brass: #c4a46b;
  --warm-gray: #6b6259;
  --body-gray: #8c8078;
  --paper: #f7f4ef;
  --border: rgba(28,28,28,0.08);
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--charcoal);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Navigation ── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 60px;
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-mark {
  width: 20px;
  height: 20px;
  background: var(--terracotta);
  clip-path: polygon(0 0, 100% 0, 100% 60%, 60% 100%, 0 100%);
}

.nav-brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-tagline {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warm-gray);
  font-weight: 300;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--warm-gray);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--charcoal); }

/* ── Hero ── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 580px;
  overflow: hidden;
}

.hero-left {
  padding: 80px 60px 80px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--border);
  background: var(--cream);
}

.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 20px;
  font-weight: 500;
}

.hero-headline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  color: var(--charcoal);
}

.hero-lede {
  font-size: 16px;
  color: var(--body-gray);
  margin-bottom: 40px;
  max-width: 400px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--charcoal);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover { background: var(--charcoal-light); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: transparent;
  color: var(--charcoal);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.hero-image-wrap {
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-image-placeholder {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  color: var(--warm-gray);
  letter-spacing: 0.05em;
}

/* ── Spec Chat Section ── */
.spec-section {
  padding: 100px 60px;
  background: var(--cream);
  border-top: 1px solid var(--border);
}

.spec-section-header {
  max-width: 600px;
  margin: 0 auto 60px;
  text-align: center;
}

.section-label {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 16px;
  font-weight: 500;
}

.section-headline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 16px;
}

.section-sub {
  font-size: 15px;
  color: var(--body-gray);
}

/* ── Chat Interface ── */
.spec-chat-wrap {
  max-width: 760px;
  margin: 0 auto;
}

.spec-chat {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(28,28,28,0.06);
}

.spec-messages {
  min-height: 320px;
  max-height: 420px;
  overflow-y: auto;
  padding: 32px;
}

.spec-message {
  margin-bottom: 24px;
}

.spec-message:last-child { margin-bottom: 0; }

.msg-role {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 8px;
  font-weight: 500;
}

.msg-content {
  font-size: 14px;
  color: var(--charcoal);
  line-height: 1.7;
}

.msg-content p { margin-bottom: 8px; }
.msg-content p:last-child { margin-bottom: 0; }

/* Recommendation cards */
.rec-card {
  border: 1px solid var(--border);
  padding: 20px;
  margin-top: 12px;
  background: var(--paper);
}

.rec-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.rec-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  color: var(--charcoal);
  font-weight: 500;
}

.rec-category {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terracotta);
  background: rgba(184,92,56,0.08);
  padding: 3px 8px;
  border-radius: 2px;
  white-space: nowrap;
}

.rec-specs {
  font-size: 13px;
  color: var(--warm-gray);
  margin-bottom: 10px;
  line-height: 1.6;
}

.rec-link {
  font-size: 12px;
  color: var(--charcoal);
  letter-spacing: 0.04em;
  font-weight: 500;
}

/* Input area */
.spec-input-row {
  display: flex;
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  gap: 12px;
  align-items: flex-end;
}

.spec-prompt {
  flex: 1;
  padding: 12px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--charcoal);
  outline: none;
  resize: none;
  min-height: 48px;
  max-height: 140px;
  line-height: 1.6;
}

.spec-prompt:focus {
  border-color: var(--charcoal);
}

.spec-prompt::placeholder { color: var(--warm-gray); }

.btn-search {
  padding: 12px 24px;
  background: var(--terracotta);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.btn-search:hover { background: #a04f2e; }
.btn-search:disabled { background: var(--warm-gray); cursor: not-allowed; }

/* Welcome state */
.spec-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  text-align: center;
  padding: 40px;
}

.welcome-icon {
  width: 40px;
  height: 40px;
  background: var(--cream);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.welcome-icon svg { width: 20px; height: 20px; fill: var(--warm-gray); }

.welcome-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  color: var(--charcoal);
  margin-bottom: 10px;
}

.welcome-sub {
  font-size: 14px;
  color: var(--body-gray);
  max-width: 360px;
  line-height: 1.7;
}

.spec-examples {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 400px;
}

.spec-example-btn {
  padding: 10px 16px;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--warm-gray);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1.5;
}

.spec-example-btn:hover {
  border-color: var(--charcoal);
  color: var(--charcoal);
  background: var(--cream);
}

/* Loading state */
.spec-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  color: var(--warm-gray);
  font-size: 13px;
}

.loading-dots {
  display: flex;
  gap: 4px;
}

.loading-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warm-gray);
  animation: bounce 1.2s infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-6px); opacity: 1; }
}

/* Category pills */
.cat-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.cat-pill {
  font-size: 11px;
  padding: 3px 8px;
  background: var(--cream);
  border: 1px solid var(--border);
  color: var(--warm-gray);
  letter-spacing: 0.06em;
}

/* Divider */
.rec-divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* ── Features Row ── */
.features-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
}

.feature-item {
  padding: 48px 40px;
  border-right: 1px solid var(--border);
}

.feature-item:last-child { border-right: none; }

.feature-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 16px;
}

.feature-icon svg { width: 32px; height: 32px; fill: var(--terracotta); }

.feature-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  color: var(--charcoal);
  margin-bottom: 8px;
  font-weight: 500;
}

.feature-desc {
  font-size: 13px;
  color: var(--body-gray);
  line-height: 1.7;
}

/* ── Footer ── */
.footer {
  padding: 32px 60px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-size: 12px;
  color: var(--warm-gray);
  letter-spacing: 0.06em;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 12px;
  color: var(--warm-gray);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--charcoal); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .nav { padding: 16px 24px; }
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-image-wrap { display: none; }
  .hero-left { border-right: none; padding: 60px 24px; }
  .spec-section { padding: 60px 24px; }
  .features-row { grid-template-columns: 1fr 1fr; }
  .feature-item { border-bottom: 1px solid var(--border); }
  .footer { padding: 24px; flex-direction: column; gap: 16px; text-align: center; }
}