:root {
  --ink: #171714;
  --muted: #66685f;
  --paper: #f4f1ea;
  --surface: #ffffff;
  --surface-2: #ebe5da;
  --line: #d3cabe;
  --sage: #596b58;
  --sage-dark: #263c2f;
  --clay: #9f5a3e;
  --blue: #34495a;
  --gold: #a9873b;
  --shadow: 0 14px 34px rgba(23, 23, 20, 0.08);
  --radius: 4px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: 0;
}

a {
  color: inherit;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 0 40px;
  background: rgba(244, 241, 234, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

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

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  flex-wrap: wrap;
}

.nav a,
.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 0;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav a:hover,
.button:hover,
button:hover {
  transform: none;
}

.nav a:hover {
  color: var(--clay);
  background: transparent;
}

.nav a[aria-current="page"] {
  border-bottom-color: var(--ink);
}

.button.primary,
button.primary {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.button.secondary,
button.secondary {
  background: transparent;
  border-color: var(--line);
}

.button.ghost,
button.ghost {
  color: var(--sage-dark);
  border-color: rgba(88, 114, 92, 0.22);
}

.button.danger,
button.danger {
  color: #fff;
  background: #8f2d25;
}

.button.small,
button.small {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.88rem;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: calc(100vh - 76px);
  padding: 78px 40px 86px;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 34px 40px 34px auto;
  width: min(48vw, 710px);
  background-image: url("./assets/makon-hero-interior.png");
  background-position: center;
  background-size: cover;
  border: 1px solid var(--line);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 34px 40px 34px auto;
  width: min(48vw, 710px);
  background: linear-gradient(90deg, rgba(244, 241, 234, 0.62), rgba(244, 241, 234, 0.04) 42%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 26px;
  width: 100%;
  max-width: 620px;
  min-width: 0;
}

.eyebrow {
  margin: 0;
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 7.2rem;
  font-weight: 500;
  line-height: 0.84;
  text-wrap: balance;
}

.hero p {
  width: 100%;
  max-width: 560px;
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}

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

.hero .button.secondary {
  background: transparent;
  border-color: rgba(23, 23, 20, 0.28);
  color: var(--ink);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 0;
  width: 100%;
  max-width: 620px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.stat {
  padding: 14px 16px 14px 0;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
}

.stat:last-child {
  border-right: 0;
}

.stat strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.95rem;
  font-weight: 500;
}

.stat span {
  color: var(--muted);
  font-size: 0.85rem;
}

.section {
  padding: 92px 40px;
}

.section.alt {
  background: #eee8dd;
}

.section.deep {
  color: #fff;
  background: var(--ink);
}

.section-inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(280px, 0.74fr);
  gap: 48px;
  align-items: end;
  margin-bottom: 46px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.section-head h2,
.client-hero h1,
.admin-heading h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3rem;
  font-weight: 500;
  line-height: 1.02;
}

.section-head p,
.lead {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.deep .section-head p,
.deep .lead {
  color: rgba(255, 255, 255, 0.72);
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
  counter-reset: project;
}

.project-card,
.staff-card,
.service-card,
.package-card,
.link-row,
.empty-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.project-card {
  position: relative;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 220px;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  counter-increment: project;
}

.project-card::after {
  content: "0" counter(project);
  position: absolute;
  top: 18px;
  left: 18px;
  color: rgba(23, 23, 20, 0.72);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
}

.project-visual {
  min-height: 220px;
  background:
    linear-gradient(135deg, rgba(23, 23, 20, 0.12), rgba(23, 23, 20, 0.02)),
    var(--project-bg);
  background-size: cover;
  background-position: center;
  border-right: 1px solid var(--line);
}

.project-card:nth-child(1) {
  --project-bg: linear-gradient(135deg, #d2d9d0, #9fb2a3 55%, #5b6b62);
}

.project-card:nth-child(2) {
  --project-bg: linear-gradient(135deg, #cfc2b2, #7c8a88 55%, #2f4146);
}

.project-card:nth-child(3) {
  --project-bg: linear-gradient(135deg, #ece8df, #b55f3d 58%, #32373b);
}

.project-card:nth-child(4) {
  --project-bg: linear-gradient(135deg, #d9dccf, #c5a84d 52%, #36516b);
}

.project-copy {
  display: grid;
  grid-template-columns: minmax(0, 0.46fr) minmax(0, 0.62fr) auto;
  gap: 28px;
  align-items: center;
  padding: 28px;
}

.project-copy h3,
.staff-card h3,
.service-card h3,
.package-card h3 {
  margin: 0;
  font-size: 1.08rem;
}

.project-copy h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.75rem;
  font-weight: 500;
}

.project-copy p,
.staff-card p,
.service-card p,
.package-card p,
.meta,
.field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.tag-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 0;
  color: var(--muted);
  background: transparent;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  font-size: 0.78rem;
  font-weight: 700;
}

.staff-grid,
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.staff-grid {
  border-top: 1px solid var(--line);
}

.service-grid {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.staff-card,
.service-card {
  display: grid;
  gap: 16px;
  padding: 24px;
  border-radius: 0;
}

.avatar {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-weight: 800;
}

.staff-card {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.staff-card:nth-child(4n) {
  border-right: 0;
}

.service-card {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  border-top: 0;
  border-right: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 0;
}

.service-card p {
  color: rgba(255, 255, 255, 0.7);
}

.service-index {
  color: var(--gold);
  font-weight: 800;
}

.client-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 34px 0;
  background: transparent;
  border: 1px solid var(--line);
  border-right: 0;
  border-left: 0;
  border-radius: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}

.contact-item {
  padding: 24px 22px 24px 0;
  border-top: 0;
  border-right: 1px solid var(--line);
}

.contact-item:last-child {
  border-right: 0;
}

.contact-item strong {
  display: block;
  margin-bottom: 8px;
}

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 40px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: #ebe5da;
}

.admin-page,
.client-page {
  min-height: 100vh;
}

.login-shell {
  display: grid;
  min-height: calc(100vh - 72px);
  place-items: center;
  padding: 42px 20px;
}

.login-panel {
  display: grid;
  gap: 18px;
  width: min(480px, 100%);
  padding: 26px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-panel h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.08;
}

.login-form {
  display: grid;
  gap: 14px;
}

.form-error {
  min-height: 1.3em;
  margin: 0;
  color: #8f2d25;
  font-size: 0.92rem;
  font-weight: 750;
}

.admin-shell {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 22px;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 34px 28px 60px;
}

.admin-sidebar,
.admin-main,
.client-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.admin-sidebar {
  position: sticky;
  top: 94px;
  align-self: start;
  display: grid;
  gap: 16px;
  max-height: calc(100vh - 120px);
  padding: 18px;
  overflow: auto;
}

.admin-main {
  display: grid;
  gap: 26px;
  padding: 24px;
}

.admin-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.package-list {
  display: grid;
  gap: 10px;
}

.package-card {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 14px;
  text-align: left;
}

.package-card.active {
  border-color: var(--sage);
  background: #f0f6ef;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.78fr);
  gap: 22px;
}

.admin-form {
  display: grid;
  gap: 18px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  color: #2a332d;
  font-size: 0.88rem;
  font-weight: 750;
}

input,
textarea,
select {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(88, 114, 92, 0.14);
}

.file-zone {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px dashed rgba(88, 114, 92, 0.55);
  border-radius: 8px;
}

.link-list,
.preview-stack {
  display: grid;
  gap: 10px;
}

.link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.link-name {
  overflow: hidden;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.embed-frame {
  width: 100%;
  min-height: 380px;
  border: 0;
  border-radius: 8px;
  background: #e8ece8;
}

.embed-frame.walkthrough {
  min-height: 260px;
}

.preview-panel {
  display: grid;
  gap: 16px;
  align-content: start;
}

.preview-box {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.link-output {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.link-output input {
  font-size: 0.88rem;
}

.empty-panel {
  display: grid;
  min-height: 150px;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.client-hero {
  display: grid;
  gap: 18px;
  padding: 48px 40px 34px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(21, 23, 22, 0.92), rgba(47, 81, 57, 0.78)),
    url("./assets/makon-hero-interior.png");
  background-position: center;
  background-size: cover;
}

.client-hero-inner,
.client-main {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.client-hero .lead {
  max-width: 740px;
  color: rgba(255, 255, 255, 0.78);
}

.client-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  padding: 28px 40px 64px;
}

.client-panel {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.client-panel h2,
.preview-box h2,
.preview-box h3 {
  margin: 0;
  font-size: 1.24rem;
}

.dashboard-stack {
  display: grid;
  gap: 20px;
}

.detail-list {
  display: grid;
  gap: 12px;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  font-weight: 760;
  text-align: right;
}

.walkthrough-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.walkthrough-item {
  display: grid;
  gap: 10px;
}

.walkthrough-item h3 {
  margin: 0;
  font-size: 1rem;
}

.floor-plan-frame {
  display: grid;
  gap: 10px;
  margin: 0;
}

.floor-plan-image {
  width: 100%;
  max-height: 720px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f6f2;
}

.floor-plan-frame figcaption {
  color: var(--muted);
  font-size: 0.92rem;
}

.comment-box {
  padding: 16px;
  color: var(--ink);
  line-height: 1.7;
  white-space: normal;
  border-left: 3px solid var(--sage);
  background: var(--surface-2);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  max-width: min(380px, calc(100vw - 44px));
  padding: 12px 14px;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1060px) {
  .project-grid,
  .staff-grid,
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .project-copy {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .tag-row {
    justify-content: flex-start;
  }

  .hero::before,
  .hero::after {
    width: 46vw;
  }

  .admin-shell,
  .admin-grid,
  .client-main {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .topbar,
  .app-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 18px;
  }

  .nav {
    justify-content: flex-start;
    gap: 4px;
    width: 100%;
  }

  .nav a {
    min-height: 36px;
    padding: 8px 6px;
    font-size: 0.88rem;
  }

  .hero {
    min-height: auto;
    padding: 300px 20px 54px;
  }

  .hero::before {
    inset: 20px 20px auto 20px;
    width: auto;
    height: 250px;
  }

  .hero::after {
    inset: 20px 20px auto 20px;
    width: auto;
    height: 250px;
    background: linear-gradient(0deg, rgba(244, 241, 234, 0.1), rgba(244, 241, 234, 0.42));
  }

  .hero h1 {
    font-size: 4.05rem;
  }

  .hero-stats,
  .section-head,
  .client-strip,
  .field-grid,
  .contact-grid,
  .walkthrough-grid {
    grid-template-columns: 1fr;
  }

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

  .stat:last-child {
    border-bottom: 0;
  }

  .section,
  .client-hero,
  .client-main {
    padding-left: 20px;
    padding-right: 20px;
  }

  .project-grid,
  .staff-grid,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .project-visual {
    min-height: 160px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .project-copy {
    padding: 20px 0 24px;
  }

  .staff-card,
  .service-card {
    border-right: 0;
  }

  .service-card {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }

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

  .contact-item:last-child {
    border-bottom: 0;
  }

  .admin-shell {
    padding: 22px 14px 46px;
  }

  .admin-main {
    padding: 16px;
  }

  .admin-heading,
  .link-row,
  .link-output {
    grid-template-columns: 1fr;
  }

  .embed-frame {
    min-height: 300px;
  }
}
