/* Kiln Editor POC — Kiln palette only */
:root {
  --ground: #141210;
  --charcoal: #2a2622;
  --ash: #9a958c;
  --ember: #e56a2a;
  --clay: #d4a574;
  --bone: #e8e2d6;
  --brick: #8f3a24;
  --panel: #1c1916;
  --sill: #3a3530;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
  --max: 920px;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--ground); color: var(--bone);
  font-family: var(--font-mono); font-size: 14px; line-height: 1.55;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(229,106,42,.08), transparent 55%),
    linear-gradient(180deg, #171410 0%, var(--ground) 40%);
}
a { color: var(--clay); text-decoration: none; }
a:hover { color: var(--ember); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
button, .btn {
  font-family: var(--font-mono); font-size: 13px; cursor: pointer;
  border: 1px solid var(--sill); background: var(--charcoal); color: var(--bone);
  padding: .45rem .85rem; border-radius: 4px;
}
button:hover, .btn:hover { border-color: var(--ember); color: var(--ember); }
button.primary { background: var(--ember); border-color: var(--ember); color: #1a1008; font-weight: 600; }
button.primary:hover { filter: brightness(1.08); color: #1a1008; }
button.ghost { background: transparent; }
button.danger { border-color: var(--brick); color: #f0b8a0; }
button:disabled { opacity: .45; cursor: not-allowed; }
[hidden] { display: none !important; }

/* Demo chrome */
.demo-banner {
  background: var(--brick); color: var(--bone); text-align: center;
  padding: .45rem 1rem; font-size: 12px; letter-spacing: .04em;
}
.demo-banner strong { color: #fff; }
.app-bar {
  border-bottom: 1px solid var(--sill); background: rgba(20,18,16,.94);
  position: sticky; top: 0; z-index: 40; backdrop-filter: blur(8px);
}
.app-bar-inner {
  max-width: var(--max); margin: 0 auto; padding: .65rem 1.25rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem;
  justify-content: space-between;
}
.app-title {
  font-family: var(--font-display); font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; font-size: 1.15rem; margin: 0;
}
.app-title span { color: var(--ash); margin-right: .3em; letter-spacing: .18em; font-size: .85em; }
.app-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.mode-pill {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ash); border: 1px solid var(--sill); padding: .2rem .55rem; border-radius: 999px;
}
.mode-pill.edit { color: var(--ember); border-color: var(--ember); }
.mode-pill.publish { color: var(--clay); border-color: var(--clay); }
.dirty-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ember); display: inline-block; }
.status-line { font-size: 12px; color: var(--ash); }

/* Site chrome */
.site-header { border-bottom: 1px solid var(--sill); }
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: .9rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: flex; flex-direction: column; gap: .15rem; color: inherit; text-decoration: none; }
.brand:hover { text-decoration: none; color: inherit; }
.brand-name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.6rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--bone);
}
.brand-tag { color: var(--ash); font-size: 12px; }
.hours-chip {
  border: 1px solid var(--sill); background: var(--panel);
  padding: .45rem .7rem; border-radius: 4px; font-size: 12px; color: var(--clay);
  max-width: 220px;
}

main.site { flex: 1; max-width: var(--max); width: 100%; margin: 0 auto; padding: 1.5rem 1.25rem 2rem; }
.hero h1 {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: .08em; text-transform: uppercase; margin: 0 0 .5rem; line-height: 1.1;
}
.lede { color: var(--ash); font-size: 15px; max-width: 58ch; margin: 0 0 1.5rem; }
.section { margin: 2rem 0; }
.section h2 {
  font-family: var(--font-display); font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; font-size: 1.25rem; color: var(--clay);
  margin: 0 0 .85rem; border-bottom: 1px solid var(--sill); padding-bottom: .4rem;
}
.about-text { margin: 0; color: var(--bone); max-width: 65ch; }

.staff-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.staff-card {
  background: var(--panel); border: 1px solid var(--sill); border-radius: 4px;
  overflow: hidden; display: flex; flex-direction: column;
}
.staff-photo-wrap {
  position: relative; aspect-ratio: 1; background: var(--charcoal);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.staff-photo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.staff-photo-wrap .ph {
  color: var(--ash); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  text-align: center; padding: 1rem;
}
.staff-body { padding: .75rem .85rem 1rem; display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.staff-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: .08em; text-transform: uppercase; margin: 0; }
.staff-role { color: var(--ash); font-size: 12px; margin: 0; }
.staff-bio { color: var(--bone); font-size: 12px; margin: .35rem 0 0; }

/* Edit affordances */
body.mode-edit [data-editable] {
  outline: 1px dashed transparent; border-radius: 2px; cursor: text;
  transition: outline-color .15s, background .15s;
}
body.mode-edit [data-editable]:hover,
body.mode-edit [data-editable]:focus {
  outline-color: var(--ember); background: rgba(229,106,42,.08); outline-offset: 2px;
}
body.mode-edit [contenteditable="true"] { min-width: 1ch; }
.edit-hint {
  display: none; font-size: 11px; color: var(--ash); margin: 0 0 1rem;
  letter-spacing: .04em;
}
body.mode-edit .edit-hint { display: block; }
.staff-toolbar {
  display: none; gap: .3rem; flex-wrap: wrap; padding: .5rem .85rem .75rem;
  border-top: 1px solid var(--sill); background: rgba(0,0,0,.2);
}
body.mode-edit .staff-toolbar { display: flex; }
.staff-toolbar button { font-size: 11px; padding: .3rem .5rem; }
.photo-btn {
  position: absolute; bottom: .5rem; right: .5rem; display: none;
  font-size: 11px; padding: .3rem .55rem; background: rgba(20,18,16,.88);
}
body.mode-edit .photo-btn { display: inline-block; }
.add-staff-row { display: none; margin-top: 1rem; }
body.mode-edit .add-staff-row { display: block; }

/* Publish screen */
.publish-wrap { max-width: var(--max); margin: 0 auto; padding: 1.5rem 1.25rem 3rem; width: 100%; }
.publish-wrap h1 {
  font-family: var(--font-display); font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; font-size: 1.8rem; margin: 0 0 .4rem;
}
.publish-msg { color: var(--ash); margin: 0 0 1.25rem; }
.fake-url {
  display: inline-block; background: var(--panel); border: 1px solid var(--sill);
  padding: .55rem .85rem; border-radius: 4px; color: var(--clay); font-size: 13px;
  margin-bottom: 1.5rem; word-break: break-all;
}
.compare {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
@media (max-width: 700px) { .compare { grid-template-columns: 1fr; } }
.compare-pane {
  border: 1px solid var(--sill); border-radius: 4px; background: var(--panel); overflow: hidden;
}
.compare-label {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  padding: .45rem .7rem; border-bottom: 1px solid var(--sill); color: var(--ash);
  background: var(--charcoal);
}
.compare-pane.after .compare-label { color: var(--ember); }
.compare-body { padding: .85rem; font-size: 12px; }
.compare-body h3 { margin: 0 0 .35rem; font-family: var(--font-display); letter-spacing: .08em; text-transform: uppercase; font-size: 1.1rem; }
.compare-body .meta { color: var(--ash); margin: 0 0 .75rem; }
.compare-staff { display: flex; flex-direction: column; gap: .5rem; }
.compare-staff-row { display: flex; gap: .55rem; align-items: center; }
.compare-staff-row img, .compare-staff-row .mini-ph {
  width: 36px; height: 36px; border-radius: 3px; object-fit: cover; background: var(--charcoal); flex-shrink: 0;
}
.compare-staff-row .mini-ph { display: grid; place-items: center; font-size: 9px; color: var(--ash); }
.publish-actions { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.live-note {
  margin-top: 1rem; padding: .75rem .9rem; border: 1px solid var(--ember);
  background: rgba(229,106,42,.1); border-radius: 4px; color: var(--bone); display: none;
}
.live-note.show { display: block; }

/* Kiln footer tag (BS3) */
.kiln-tag { margin: 0; padding: 1.5rem 1rem 2.5rem; text-align: center; }
.kiln-tag .k {
  display: inline-flex; flex-direction: column; align-items: center; gap: .4rem;
  color: #9a958c; text-decoration: none; font-size: .75rem; line-height: 1.5;
  letter-spacing: .06em; opacity: .85; transition: opacity .2s, color .2s;
}
.kiln-tag .k:hover { opacity: 1; color: #e8e2d6; text-decoration: none; }
.kiln-tag .k img { width: 28px; height: 28px; }
.kiln-tag .fire {
  font-family: var(--font-display); font-weight: 700; font-size: .85rem;
  letter-spacing: .18em; text-transform: uppercase;
}
.kiln-tag .rule { width: 56px; height: 1px; background: #9a958c; opacity: .5; margin: .15rem auto; display: block; }
.kiln-tag .ksig {
  font-family: var(--font-mono); font-weight: 400; font-size: .65rem;
  letter-spacing: .28em; text-transform: uppercase; color: #9a958c;
}

.toast {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  background: var(--charcoal); border: 1px solid var(--ember); color: var(--bone);
  padding: .55rem 1rem; border-radius: 4px; font-size: 12px; z-index: 50;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.toast.show { opacity: 1; }
