:root {
  --ink: #111317;
  --muted: #667085;
  --line: rgba(17, 19, 23, .12);
  --paper: #fbfaf7;
  --accent: #d95d39;
  --accent-2: #1d6f5f;
  --dark: #141414;
  --light: #ffffff;
  --shadow: 0 24px 80px rgba(17, 19, 23, .14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
  padding: 18px clamp(18px, 5vw, 70px);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 247, .9);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  letter-spacing: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--ink);
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

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

.nav-cta,
.btn,
.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 750;
}

.nav-cta,
.btn {
  color: white;
  background: var(--ink);
}

.ghost {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}

.section {
  padding: clamp(58px, 8vw, 110px) clamp(18px, 5vw, 70px);
}

.section-title {
  max-width: 780px;
  margin: 0 0 34px;
}

.kicker {
  margin: 0 0 12px;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .12em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(42px, 8vw, 96px);
  line-height: .92;
  letter-spacing: 0;
  max-width: 980px;
}

h2 {
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  font-size: 22px;
}

p {
  color: var(--muted);
  line-height: 1.7;
}

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

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .68);
  box-shadow: 0 12px 40px rgba(17, 19, 23, .06);
}

.pad {
  padding: 26px;
}

.stat {
  font-size: 36px;
  font-weight: 900;
  color: var(--ink);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, .7);
  font-size: 13px;
}

.panel input,
.panel select,
.panel textarea {
  width: 100%;
  min-height: 46px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, .9);
  outline: 0;
}

.panel textarea {
  min-height: 96px;
  resize: vertical;
}

.panel input:focus,
.panel select:focus,
.panel textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

.split {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.visual {
  min-height: 440px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .25);
  box-shadow: var(--shadow);
  background:
    linear-gradient(140deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .02)),
    var(--visual, linear-gradient(135deg, #d95d39, #1d6f5f));
  background-size: cover;
  background-position: center;
}

.image-strip {
  display: grid;
  grid-template-columns: 1.2fr .8fr .8fr;
  gap: 16px;
}

.photo {
  min-height: 260px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 14px 44px rgba(17, 19, 23, .1);
  background: #ddd;
}

.photo.tall {
  min-height: 420px;
  grid-row: span 2;
}

.photo img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: block;
  object-fit: cover;
  transition: transform .45s ease;
}

.photo:hover img {
  transform: scale(1.05);
}

.timeline {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}

.timeline article {
  position: relative;
  margin-bottom: 24px;
}

.timeline article:before {
  content: "";
  position: absolute;
  left: -31px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
}

.ai-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: var(--ink);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
  cursor: pointer;
  font-weight: 900;
}

.ai-panel {
  position: fixed;
  right: 22px;
  bottom: 94px;
  z-index: 70;
  width: min(390px, calc(100vw - 28px));
  max-height: min(690px, calc(100vh - 118px));
  display: none;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .24);
}

.ai-panel.is-open {
  display: flex;
}

.ai-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  color: white;
  background: var(--ink);
}

.ai-head strong {
  display: block;
}

.ai-head small {
  display: block;
  color: rgba(255, 255, 255, .7);
}

.ai-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
  color: white;
  background: transparent;
  cursor: pointer;
}

.ai-log {
  flex: 1;
  overflow: auto;
  padding: 16px;
  background: #f7f5f0;
}

.bubble {
  width: fit-content;
  max-width: 88%;
  margin: 0 0 10px;
  padding: 11px 13px;
  border-radius: 8px;
  color: var(--ink);
  background: white;
  box-shadow: 0 8px 24px rgba(17, 19, 23, .07);
  line-height: 1.45;
}

.bubble.user {
  margin-left: auto;
  color: white;
  background: var(--accent-2);
}

.ai-form {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: white;
}

.ai-form input,
.ai-form select,
.ai-form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  outline: 0;
  background: #fff;
}

.ai-form textarea {
  min-height: 76px;
  resize: vertical;
}

.ai-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ai-copy {
  display: none;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #174f43;
  background: #e7f4ef;
  font-size: 13px;
}

.ai-copy.is-visible {
  display: block;
}

.restaurant-theme {
  --paper: #fff8f0;
  --ink: #251915;
  --accent: #c84c2c;
  --accent-2: #6f3b23;
}

.realestate-theme {
  --paper: #f5f7f4;
  --ink: #14211c;
  --accent: #1d6f5f;
  --accent-2: #224f8f;
}

.gym-theme {
  --paper: #f6f6f3;
  --ink: #121212;
  --accent: #e2552f;
  --accent-2: #2c6e49;
}

.clinic-theme {
  --paper: #f5fbfb;
  --ink: #102024;
  --accent: #247c92;
  --accent-2: #5c6bc0;
}

.salon-theme {
  --paper: #fff7f7;
  --ink: #23181d;
  --accent: #b94d72;
  --accent-2: #7c5a40;
}

.law-theme {
  --paper: #f7f6f1;
  --ink: #151922;
  --accent: #8b6f3d;
  --accent-2: #32435f;
}

.magazine-hero {
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: 1fr .72fr;
  gap: 0;
}

.magazine-hero .copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(44px, 7vw, 90px);
}

.magazine-hero .side {
  display: grid;
  grid-template-rows: 1fr 1fr;
}

.side-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.dashboard-hero {
  display: grid;
  grid-template-columns: 290px 1fr;
  min-height: calc(100vh - 74px);
}

.dashboard-menu {
  padding: 34px;
  border-right: 1px solid var(--line);
}

.dashboard-main {
  padding: clamp(34px, 6vw, 74px);
}

.property-board,
.class-board,
.treatment-board {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.wide {
  grid-column: span 7;
}

.mid {
  grid-column: span 5;
}

.small {
  grid-column: span 4;
}

.dark-band {
  color: white;
  background: var(--ink);
}

.dark-band p,
.dark-band .tag {
  color: rgba(255, 255, 255, .72);
}

.dark-band .tag {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .07);
}

@media (max-width: 880px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .grid-3,
  .grid-2,
  .split,
  .magazine-hero,
  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .magazine-hero {
    min-height: auto;
  }

  .dashboard-menu {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .property-board,
  .class-board,
  .treatment-board {
    grid-template-columns: 1fr;
  }

  .wide,
  .mid,
  .small {
    grid-column: auto;
  }

  .image-strip {
    grid-template-columns: 1fr;
  }

  .photo.tall {
    min-height: 320px;
  }

  .visual {
    min-height: 320px;
  }
}
