:root {
  --bg: #f4efe6;
  --surface: rgba(255, 252, 246, 0.78);
  --ink: #182028;
  --muted: #5c645f;
  --line: rgba(24, 32, 40, 0.1);
  --accent: #bd5d38;
  --accent-dark: #8f4225;
  --accent-soft: rgba(189, 93, 56, 0.14);
  --sage: #6f8a72;
  --danger: #a74838;
  --shadow: 0 24px 60px rgba(40, 25, 10, 0.12);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --content-width: 1240px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(213, 172, 85, 0.3), transparent 28%),
    radial-gradient(circle at 85% 18%, rgba(111, 138, 114, 0.22), transparent 26%),
    linear-gradient(145deg, #f8f2e8 0%, #efe5d4 54%, #f5eee4 100%);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

a,
button {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.site-shell {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding: 28px 20px 56px;
}

.backdrop {
  position: fixed;
  border-radius: 999px;
  filter: blur(12px);
  pointer-events: none;
  z-index: 0;
}

.backdrop-one {
  top: -40px;
  right: -90px;
  width: 280px;
  height: 280px;
  background: rgba(189, 93, 56, 0.16);
  animation: floatBlob 8s ease-in-out infinite;
}

.backdrop-two {
  bottom: 40px;
  left: -80px;
  width: 240px;
  height: 240px;
  background: rgba(111, 138, 114, 0.18);
  animation: floatBlob 10s ease-in-out infinite reverse;
}

.topbar,
.page-frame {
  position: relative;
  z-index: 1;
}

.topbar {
  max-width: var(--content-width);
  margin: 0 auto 22px;
  padding: 18px 22px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  backdrop-filter: blur(20px);
  background: rgba(255, 248, 240, 0.72);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand strong {
  display: block;
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
}

.brand small,
.topbar-badge {
  color: var(--muted);
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff7f0;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
}

.topbar-badge {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(24, 32, 40, 0.08);
}

.page-frame {
  max-width: var(--content-width);
  margin: 0 auto;
  animation: riseIn 500ms ease;
}

.hero-panel,
.section-card,
.contact-card,
.detail-card,
.form-card,
.empty-card,
.split-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel {
  padding: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.9fr);
  gap: 28px;
  margin-bottom: 22px;
}

.hero-panel h1,
.split-card h2,
.form-card h2,
.detail-card h2,
.empty-card h2 {
  margin: 0 0 12px;
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
  line-height: 0.98;
}

.hero-panel h1 {
  font-size: clamp(2.3rem, 5vw, 4.4rem);
}

.hero-panel p,
.section-copy,
.detail-note,
.empty-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-actions,
.button-row,
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 22px;
}

.toolbar {
  margin-bottom: 18px;
}

.button,
.button-link,
.button-ghost,
.button-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  text-decoration: none;
}

.button,
.button-link {
  color: #fffaf4;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 14px 24px rgba(143, 66, 37, 0.24);
}

.button-ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(24, 32, 40, 0.08);
}

.button-danger {
  color: #fff8f6;
  background: linear-gradient(135deg, #c45f4d, var(--danger));
}

.button:hover,
.button-link:hover,
.button-ghost:hover,
.button-danger:hover {
  transform: translateY(-1px);
}

.hero-stats,
.detail-side {
  display: grid;
  gap: 14px;
}

.stat-tile {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(24, 32, 40, 0.06);
}

.stat-tile strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.8rem;
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
}

.stat-tile span {
  color: var(--muted);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.82fr);
  gap: 22px;
}

.split-card,
.form-card,
.detail-card,
.section-card,
.empty-card {
  padding: 24px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-bottom: 18px;
}

.app-input,
.app-textarea {
  width: 100%;
  border: 1px solid rgba(24, 32, 40, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  padding: 15px 16px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.app-textarea {
  min-height: 132px;
  resize: vertical;
}

.app-input:focus,
.app-textarea:focus {
  border-color: rgba(189, 93, 56, 0.5);
  box-shadow: 0 0 0 4px rgba(189, 93, 56, 0.12);
  transform: translateY(-1px);
}

.contacts-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.contact-card {
  position: relative;
  overflow: hidden;
}

.contact-card.is-selected {
  outline: 2px solid rgba(189, 93, 56, 0.24);
  box-shadow: 0 28px 64px rgba(143, 66, 37, 0.18);
}

.contact-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -34px auto;
  width: 120px;
  height: 120px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(213, 172, 85, 0.28), rgba(111, 138, 114, 0.18));
  transform: rotate(18deg);
}

.contact-head,
.detail-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(189, 93, 56, 0.9), rgba(111, 138, 114, 0.86));
  color: #fffef8;
  font-weight: 800;
  font-size: 1.1rem;
  flex: 0 0 auto;
}

.detail-hero .avatar {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  font-size: 1.45rem;
}

.contact-meta,
.meta-row,
.field-message {
  color: var(--muted);
}

.meta-pill {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(111, 138, 114, 0.12);
  color: #516554;
  font-size: 0.9rem;
  font-weight: 700;
}

.contact-card h3 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
}

.contact-card p {
  position: relative;
  z-index: 1;
  margin: 10px 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.detail-note {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.66);
}

.form-shell,
.form-grid {
  display: grid;
  gap: 16px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.field-message {
  min-height: 1.3em;
  margin: 0;
}

.empty-card {
  text-align: center;
}

.is-hidden {
  display: none !important;
}

@keyframes floatBlob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(14px);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero-panel,
  .split-layout,
  .search-panel {
    grid-template-columns: 1fr;
  }

  .topbar {
    border-radius: 28px;
    justify-content: flex-start;
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .site-shell {
    padding: 16px 14px 32px;
  }

  .hero-panel,
  .split-card,
  .form-card,
  .detail-card,
  .section-card,
  .empty-card {
    padding: 20px;
    border-radius: 24px;
  }

  .hero-panel h1 {
    font-size: 2.6rem;
  }
}
