:root {
  --black: #050505;
  --white: #f4f4ef;
  --line: #242424;
  --panel: #101010;
  --panel-soft: #171717;
  --muted: #9d9d96;
  --accent: #ff5a13;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

.dev-body,
.page-body {
  margin: 0;
  min-height: 100vh;
  overflow: auto;
  background: var(--black);
  color: var(--white);
}

.dev-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 96px;
}

.dev-header,
.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 32px;
}

.dev-header p,
.contact-card > p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.dev-header h1 {
  margin: 0;
  font-size: clamp(36px, 7vw, 82px);
  line-height: .86;
  text-transform: uppercase;
}

.dev-header nav,
.page-nav nav {
  display: flex;
  gap: 16px;
}

.dev-header a,
.page-nav a,
.contact-card a {
  color: inherit;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

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

.editor-card {
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.editor-card h2 {
  margin: 0 0 16px;
  font-size: 16px;
  text-transform: uppercase;
}

label {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

input,
textarea {
  width: 100%;
  border: 1px solid #333;
  border-radius: 0;
  padding: 11px 12px;
  background: var(--panel-soft);
  color: var(--white);
  font: inherit;
}

input[type="file"] {
  padding: 10px;
}

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

input:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
}

.dev-actions {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px max(16px, calc((100vw - 1180px) / 2));
  border-top: 1px solid var(--line);
  background: rgb(5 5 5 / 88%);
  backdrop-filter: blur(12px);
}

button {
  border: 0;
  padding: 12px 16px;
  background: var(--white);
  color: var(--black);
  font-weight: 1000;
  text-transform: uppercase;
  cursor: pointer;
}

button + button {
  background: #2a2a2a;
  color: var(--white);
}

.media-control {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid #2d2d2d;
  background: #0b0b0b;
}

.media-control + .media-control {
  margin-top: 14px;
}

.media-preview {
  width: 112px;
  aspect-ratio: 3 / 2;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #1b1b1b;
}

.media-preview::before {
  content: "MEDIA";
  color: #5f5f5a;
  font-size: 11px;
  font-weight: 900;
}

.media-preview.has-preview::before {
  display: none;
}

.media-preview img,
.media-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-control button {
  padding: 11px 12px;
  background: #2a2a2a;
  color: var(--white);
  white-space: nowrap;
}

.media-control span {
  grid-column: 2 / -1;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#save-state {
  color: var(--muted);
  font-size: 13px;
}

.contact-page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.contact-card {
  align-self: center;
}

.contact-card h1 {
  margin: 0;
  font-size: clamp(68px, 16vw, 190px);
  line-height: .78;
}

.contact-card p:nth-of-type(2) {
  max-width: 560px;
  margin: 18px 0;
  color: #d5d5cf;
  font-size: clamp(18px, 2.4vw, 28px);
}

.contact-card a,
.contact-card span {
  display: block;
  margin-top: 10px;
  font-size: clamp(18px, 2.5vw, 32px);
}

@media (max-width: 760px) {
  .editor-grid,
  .dev-header,
  .page-nav {
    grid-template-columns: 1fr;
    display: grid;
  }

  .dev-actions {
    flex-wrap: wrap;
  }

  .media-control {
    grid-template-columns: 1fr;
  }

  .media-preview {
    width: 100%;
  }

  .media-control span {
    grid-column: auto;
  }
}
