/* Ivanov Decorating — demo preview site
   Mobile-first, heritage-paint palette */

:root {
  --ink: #2c302e;
  --muted: #5c635e;
  --green: #3d5248;
  --green-dark: #2c3c35;
  --green-soft: #e7eee9;
  --plaster: #f4ebe3;
  --cream: #fffdf9;
  --paper: #fffcf8;
  --line: #d9d0c6;
  --brass: #b08a54;
  --ribbon-bg: #3d5248;
  --ribbon-fg: #f7f1e8;
  --shadow: 0 10px 30px rgba(44, 48, 46, 0.08);
  --radius: 16px;
  --header-h: 4.25rem;
  --ribbon-h: 2rem;
  --font-sans: "Figtree", "Segoe UI", system-ui, sans-serif;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--ribbon-h) + var(--header-h) + 0.5rem);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--plaster);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

/* Demo ribbon */
.demo-ribbon {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--ribbon-h);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ribbon-bg);
  color: var(--ribbon-fg);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Header */
.site-header {
  position: sticky;
  top: var(--ribbon-h);
  z-index: 30;
  background: rgba(255, 253, 249, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.logo-mark { color: var(--green); flex-shrink: 0; }

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-text strong {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
}

.logo-text span {
  font-size: 0.75rem;
  color: var(--muted);
}

.nav {
  display: none;
  margin-left: auto;
  gap: 1.15rem;
}

.nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.btn:focus-visible,
.chat-launcher:focus-visible,
.chat-close:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--green);
  color: #fff;
}

.btn-primary:hover { background: var(--green-dark); }

.btn-ghost {
  background: transparent;
  color: var(--green-dark);
  border: 1px solid var(--green);
}

.btn-ghost:hover { background: var(--green-soft); }

.btn-header {
  margin-left: auto;
  background: var(--green);
  color: #fff;
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Hero */
.hero {
  background:
    radial-gradient(1200px 480px at 80% -10%, rgba(176, 138, 84, 0.18), transparent 60%),
    linear-gradient(180deg, #ebe3d6 0%, var(--plaster) 100%);
  padding: 2.5rem 0 3rem;
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  max-width: 40rem;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.swatches {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  transform: rotate(3deg);
}

.swatch {
  aspect-ratio: 1;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(44, 48, 46, 0.12);
  border: 6px solid #fff;
}

.swatch span {
  display: none;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--green);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; line-height: 1.2; color: var(--ink); }

h1 { font-size: clamp(2rem, 6vw, 3.35rem); margin: 0 0 1rem; letter-spacing: -0.02em; }

h2 { font-size: clamp(1.6rem, 3.5vw, 2.15rem); margin: 0 0 0.75rem; }

h3 { font-size: 1.2rem; margin: 0 0 0.4rem; }

.lead {
  margin: 0 0 1.5rem;
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 36rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }

/* Sections */
.section { padding: 3.25rem 0; }

.section-alt { background: var(--cream); border-block: 1px solid var(--line); }

.section-intro { margin: 0 0 1.75rem; color: var(--muted); max-width: 36rem; }

.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow);
}

.card p { margin: 0; color: var(--muted); }

.icon { color: var(--green); margin-bottom: 0.7rem; }

.split {
  display: grid;
  gap: 1.5rem;
}

.area-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  align-content: start;
}

.area-list li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  font-weight: 600;
}

.reviews-block { max-width: 40rem; }

.reviews-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
  box-shadow: var(--shadow);
}

.reviews-card p {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.contact-details {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.contact-details strong {
  display: inline-block;
  min-width: 5.5rem;
  color: var(--muted);
  font-weight: 600;
}

.quote-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.85rem;
}

.quote-form label { display: grid; gap: 0.3rem; font-weight: 600; font-size: 0.9rem; }

.quote-form input,
.quote-form select,
.quote-form textarea,
.chat-compose input {
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  width: 100%;
}

.quote-form textarea { resize: vertical; min-height: 5rem; }

.form-note, .form-success {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 400;
}

.form-success {
  color: var(--green-dark);
  background: var(--green-soft);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
}

/* Footer */
.site-footer {
  background: var(--green-dark);
  color: #e8efe9;
  padding: 2rem 0;
  font-size: 0.92rem;
}

.footer-inner p { margin: 0 0 0.4rem; }

.site-footer a { color: #fff; }

.footer-demo { opacity: 0.75; font-size: 0.8rem; }

/* Chat widget */
.chat-widget {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.7rem;
  width: min(24.5rem, calc(100vw - 1.5rem));
  pointer-events: none;
}

.chat-launcher,
.chat-panel,
.chat-compose { pointer-events: auto; }

.chat-launcher {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 0;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(45, 82, 72, 0.35);
  display: grid;
  place-items: center;
  align-self: flex-end;
}

.chat-launcher:hover { background: var(--green-dark); }

.chat-launcher.is-open { display: none; }

.chat-panel {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(44, 48, 46, 0.2);
  display: flex;
  flex-direction: column;
  max-height: min(38rem, calc(100dvh - 5.5rem));
  min-height: 0;
  overflow: hidden;
}

.chat-panel[hidden] {
  display: none !important;
}

.chat-header {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  background: var(--green);
  color: #fff;
  padding: 0.85rem 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  transform: translateZ(0);
}

.chat-title { margin: 0; font-weight: 700; font-size: 0.98rem; }

.chat-sub { margin: 0.1rem 0 0; font-size: 0.75rem; opacity: 0.85; }

.chat-close {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 6px;
}

.chat-log {
  position: relative;
  z-index: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  clip-path: inset(0);
  background: linear-gradient(180deg, #f7f3ee, var(--paper));
}

.chat-log-inner {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.9rem 0.9rem 4rem;
  min-height: 100%;
}

.msg {
  max-width: 88%;
  padding: 0.65rem 0.8rem;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.msg p { margin: 0; }

.msg-bot {
  background: #fff;
  border: 1px solid var(--line);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.msg-user {
  background: var(--green);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.chip {
  border: 1px solid var(--green);
  background: var(--green-soft);
  color: var(--green-dark);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
}

.chip:hover { background: #dce6df; }

.lead-panel {
  flex: 0 0 auto;
  margin: 0 0.9rem 0.15rem;
  background: #1f2a25;
  color: #f4ebe3;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
}

.lead-panel-label {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: #c4a574;
}

.lead-panel-body {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
}

.chat-compose {
  flex: 0 0 auto;
  display: flex;
  gap: 0.45rem;
  padding: 0.7rem 0.8rem 0.85rem;
  border-top: 1px solid var(--line);
  background: #fff;
}

.chat-send { padding: 0.65rem 0.95rem; flex-shrink: 0; }

@media (min-width: 700px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
  .card-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 1fr 1fr; align-items: start; }
  .hero { padding: 4.25rem 0 4.5rem; }
  .section { padding: 4rem 0; }
}

@media (min-width: 900px) {
  .hero-inner { max-width: none; }
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr); gap: 3.5rem; }
  .swatches { display: grid; }
}

@media (min-width: 880px) {
  .nav { display: flex; }
  .btn-header { margin-left: 1.25rem; }
}
