:root {
  --ink: #111111;
  --paper: #ffffff;
  --line: #d9d9d9;
  --muted: #6b6b6b;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  opacity: 0.6;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

header.site-header {
  border-bottom: 1px solid var(--line);
}

header.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  padding-bottom: 28px;
}

.wordmark {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

nav.site-nav a {
  font-size: 14px;
  text-decoration: none;
  margin-left: 24px;
  letter-spacing: 0.02em;
}

main.hero {
  padding: 88px 0 64px;
  border-bottom: 1px solid var(--line);
}

main.hero h1 {
  font-size: 40px;
  line-height: 1.15;
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

main.hero p.lead {
  font-size: 17px;
  color: var(--muted);
  max-width: 46ch;
  margin: 0;
}

section {
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}

section h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 28px;
  font-weight: 600;
}

.styles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 32px;
}

.styles-grid dt {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
}

.styles-grid dd {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.contact-lines p {
  margin: 0 0 10px;
  font-size: 15px;
}

.contact-lines .muted {
  color: var(--muted);
}

footer.site-footer {
  padding: 32px 0 64px;
}

footer.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: var(--muted);
}

footer.site-footer a {
  text-decoration: none;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

/* Privacy page */
.legal h1 {
  font-size: 26px;
  margin-bottom: 8px;
}

.legal h2 {
  text-transform: none;
  letter-spacing: normal;
  font-size: 17px;
  color: var(--ink);
  margin: 32px 0 8px;
  font-weight: 700;
}

.legal p, .legal li {
  font-size: 15px;
}

.legal ul {
  padding-left: 20px;
}

.back-link {
  display: inline-block;
  margin: 40px 0 0;
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

/* Chat widget */
#chat-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  z-index: 40;
}

#chat-toggle svg {
  width: 24px;
  height: 24px;
}

#chat-panel {
  position: fixed;
  right: 24px;
  bottom: 92px;
  width: min(360px, calc(100vw - 32px));
  height: min(480px, calc(100vh - 140px));
  background: var(--paper);
  border: 1px solid var(--ink);
  display: flex;
  flex-direction: column;
  z-index: 41;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

#chat-panel[hidden] {
  display: none;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.chat-header strong {
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chat-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: var(--ink);
  padding: 4px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-system-note {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 4px;
}

.chat-bubble {
  max-width: 85%;
  padding: 9px 12px;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble.client {
  align-self: flex-end;
  background: var(--ink);
  color: var(--paper);
}

.chat-bubble.studio {
  align-self: flex-start;
  background: #f2f2f2;
  color: var(--ink);
  border: 1px solid var(--line);
}

.chat-bubble.pending {
  opacity: 0.55;
}

.chat-attach-badge {
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.75;
}

form.chat-form {
  border-top: 1px solid var(--line);
  padding: 10px;
}

.chat-input-row {
  display: flex;
  gap: 8px;
}

.chat-form textarea {
  flex: 1;
  resize: none;
  height: 40px;
  font-family: inherit;
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  color: var(--ink);
}

.chat-form textarea:focus {
  outline: 1px solid var(--ink);
}

.chat-form button {
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 0 16px;
  font-size: 13px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chat-form button:disabled {
  opacity: 0.4;
  cursor: default;
}

.chat-attach-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
}

.chat-attach-btn {
  cursor: pointer;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.chat-attach-btn:hover {
  color: var(--ink);
}

.chat-attach-names {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 480px) {
  main.hero h1 {
    font-size: 30px;
  }
  .styles-grid {
    grid-template-columns: 1fr;
  }
}
