@font-face {
  font-family: "Rounded Local";
  src: url("fonts/Arial_Rounded-Bold.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Fira Code Local";
  src: url("fonts/FiraCode-Medium.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #071014;
  --ink: #f7f0e8;
  --muted: #c4bbb1;
  --dim: #7c898a;
  --line: rgba(231, 205, 170, 0.17);
  --panel: rgba(9, 18, 21, 0.88);
  --panel-solid: #101b1f;
  --red: #df3038;
  --red-dark: #8f1c24;
  --sand: #d7ad78;
  --sand-light: #ecd1a8;
  --steel: #96a8aa;
  --shadow: 0 26px 86px rgba(0, 0, 0, 0.48);
  /* Poster logo center: (874 + 826 / 2, 224.3 + 960.6 / 2) in a 2560 x 1440 image. */
  --poster-aspect: 1.7777778;
  --poster-inverse-aspect: 0.5625;
  --poster-logo-offset-x: -50.2734375%;
  --poster-logo-offset-y: -48.9305556%;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  top: 50vh;
  left: 50vw;
  z-index: 0;
  width: max(100vw, calc(100vh * var(--poster-aspect)));
  height: max(100vh, calc(100vw * var(--poster-inverse-aspect)));
  background: url("images/fire-n-sand-poster.png") center / 100% 100% no-repeat;
  transform: translate(var(--poster-logo-offset-x), var(--poster-logo-offset-y));
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(5, 10, 12, 0.14), rgba(5, 10, 12, 0.42) 62%, rgba(5, 10, 12, 0.58)),
    linear-gradient(90deg, rgba(5, 10, 12, 0.28), transparent 48%, rgba(5, 10, 12, 0.34));
  pointer-events: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(231, 205, 170, 0.2);
  background:
    linear-gradient(90deg, rgba(12, 22, 25, 0.92), rgba(5, 10, 12, 0.82)),
    rgba(5, 8, 9, 0.82);
  backdrop-filter: blur(18px);
}

main {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 18px rgba(223, 48, 56, 0.34));
}

.brand strong,
h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: 0;
}

.brand small,
.eyebrow,
.panel-label,
.loop-card span,
label,
code {
  font-family: "Fira Code Local", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.topnav {
  display: flex;
  gap: clamp(12px, 3vw, 28px);
  color: var(--muted);
  font-size: 0.92rem;
}

.topnav a {
  text-decoration: none;
}

.topnav a:hover {
  color: var(--sand-light);
}

.hero-shell {
  position: relative;
  display: grid;
  align-items: end;
  min-height: calc(94vh - 72px);
  padding: clamp(48px, 9vw, 112px) clamp(18px, 5vw, 72px) 44px;
  overflow: hidden;
}

.hero-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    /*linear-gradient(180deg, rgba(236, 209, 168, 0.08), transparent 28%),
    linear-gradient(90deg, rgba(5, 10, 12, 0.86), rgba(5, 10, 12, 0.42) 48%, rgba(5, 10, 12, 0.74)),*/
    radial-gradient(180deg, rgba(236, 209, 168, 0.08), transparent 28%),
    radial-gradient(90deg, rgba(5, 10, 12, 0.86), rgba(5, 10, 12, 0.42) 48%, rgba(5, 10, 12, 0.74)),
    radial-gradient(ellipse at 58% 38%, rgba(223, 48, 56, 0.16), transparent 50%);
  pointer-events: none;
}

.hero-content,
.hero-panel {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 900px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--sand-light);
  font-size: 0.74rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 11ch;
  margin: 0;
  font-size: clamp(4rem, 11vw, 9.4rem);
  line-height: 0.88;
  text-transform: uppercase;
  text-shadow: 0 4px 0 rgba(130, 27, 32, 0.8), 0 20px 60px rgba(0, 0, 0, 0.65);
}

.title-logo {
  display: block;
  width: min(100%, 720px);
  max-height: 38vh;
  object-fit: contain;
  filter:
    drop-shadow(0 18px 44px rgba(0, 0, 0, 0.68))
    drop-shadow(0 0 18px rgba(236, 209, 168, 0.14));
}

#preview-title.image-title {
  max-width: min(720px, 86vw);
}

.tagline {
  max-width: 720px;
  margin: 28px 0 0;
  color: #d3cac0;
  font-size: clamp(1.08rem, 2vw, 1.42rem);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.72);
}

.workspace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-button,
.secondary-button {
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 6px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: wait;
  opacity: 0.64;
}

.primary-button,
.press-button {
  background: linear-gradient(145deg, #f04a45, var(--red) 48%, var(--red-dark));
  color: white;
  box-shadow: 0 12px 32px rgba(223, 48, 56, 0.25);
}

.secondary-button {
  border-color: var(--line);
  background: rgba(236, 209, 168, 0.055);
  color: var(--ink);
}

.hero-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: min(940px, 100%);
  margin-top: 68px;
  border: 1px solid var(--line);
  background: var(--line);
  box-shadow: var(--shadow);
}

.hero-panel > div {
  padding: 18px;
  background: rgba(10, 15, 17, 0.82);
}

.panel-label {
  display: block;
  color: var(--dim);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.hero-panel strong {
  display: block;
  margin-top: 5px;
}

.section-band,
.workspace {
  padding: clamp(48px, 8vw, 86px) clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(8, 16, 18, 0.86), rgba(6, 12, 14, 0.92)),
    rgba(7, 11, 12, 0.78);
}

.about-band,
.press-band {
  background:
    linear-gradient(135deg, rgba(223, 48, 56, 0.08), rgba(215, 173, 120, 0.06) 46%, rgba(150, 168, 170, 0.045)),
    rgba(13, 20, 21, 0.93);
}

.section-heading,
.workspace-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto 26px;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1;
}

.about-feature,
.media-grid,
.news-list,
.platform-grid,
.atmosphere,
.data-panel > *,
.editor-grid {
  max-width: 1180px;
  margin-inline: auto;
}

.about-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 22px;
  align-items: stretch;
}

.about-copy {
  position: relative;
  min-height: 320px;
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid rgba(236, 209, 168, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(236, 209, 168, 0.075), rgba(223, 48, 56, 0.12) 52%, rgba(150, 168, 170, 0.06)),
    var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.about-copy::before {
  content: "";
  position: absolute;
  inset: auto -14% -34% auto;
  width: min(360px, 54vw);
  aspect-ratio: 1;
  border: 1px solid rgba(223, 48, 56, 0.38);
  opacity: 0.68;
  clip-path: polygon(50% 0, 100% 82%, 50% 100%, 0 82%);
}

.about-copy::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(236, 209, 168, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(236, 209, 168, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(120deg, transparent, black 28%, transparent 70%);
  opacity: 0.26;
  pointer-events: none;
}

.section-kicker {
  position: relative;
  z-index: 1;
  margin: 0 0 18px;
  color: var(--sand-light);
  font-family: "Fira Code Local", ui-monospace, monospace;
  font-size: 0.74rem;
  text-transform: uppercase;
}

.about-copy p:not(.section-kicker) {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.14rem, 2vw, 1.46rem);
  line-height: 1.55;
}

.loop-card,
.media-card,
.news-item,
.platform-grid a,
.entry-list,
.entry-form,
.data-panel textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.loop-card {
  display: grid;
  align-content: space-between;
  gap: 28px;
  padding: clamp(22px, 4vw, 34px);
  border-color: rgba(223, 48, 56, 0.3);
  background:
    linear-gradient(180deg, rgba(223, 48, 56, 0.18), rgba(215, 173, 120, 0.08) 58%, rgba(150, 168, 170, 0.04)),
    var(--panel);
}

.loop-card strong {
  display: block;
  max-width: 460px;
  margin-top: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  line-height: 1.04;
}

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

.loop-steps div {
  min-height: 96px;
  padding: 14px;
  background: rgba(8, 12, 13, 0.72);
}

.loop-steps b,
.loop-steps small {
  display: block;
}

.loop-steps b {
  color: var(--red);
  font-family: "Fira Code Local", ui-monospace, monospace;
}

.loop-steps small {
  margin-top: 20px;
  color: var(--ink);
  font-weight: 700;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.media-card {
  min-height: 210px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(223, 48, 56, 0.24), rgba(215, 173, 120, 0.12), rgba(150, 168, 170, 0.08)),
    #151d20;
}

.media-card img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  display: block;
}

.media-fallback {
  display: grid;
  min-height: 210px;
  place-items: center;
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.atmosphere {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(223, 48, 56, 0.3);
  background: linear-gradient(120deg, rgba(223, 48, 56, 0.14), rgba(215, 173, 120, 0.08), rgba(255, 255, 255, 0.03));
}

.icon-button {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(236, 209, 168, 0.34);
  border-radius: 999px;
  background: linear-gradient(145deg, #f04a45, var(--red-dark));
  color: white;
  cursor: pointer;
}

.atmosphere strong,
.atmosphere p {
  display: block;
  margin: 0;
}

.atmosphere p {
  color: var(--muted);
}

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

.news-item {
  padding: 18px;
}

.news-item time {
  color: var(--sand-light);
  font-family: "Fira Code Local", ui-monospace, monospace;
  font-size: 0.76rem;
}

.news-item p {
  margin: 8px 0 0;
}

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

.platform-grid a {
  padding: 18px;
  text-decoration: none;
}

.platform-grid a:hover {
  color: var(--sand-light);
}

.press-feature {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(18px, 4vw, 34px);
  max-width: 1180px;
  margin-inline: auto;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(236, 209, 168, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(223, 48, 56, 0.16), rgba(215, 173, 120, 0.11) 46%, rgba(150, 168, 170, 0.05)),
    var(--panel);
  box-shadow: var(--shadow);
}

.press-mark {
  width: clamp(72px, 10vw, 112px);
  height: auto;
  color: var(--red);
  padding: 18px;
  /*border: 1px solid rgba(212, 178, 123, 0.34);
  border-radius: 8px;
  background: rgba(8, 12, 13, 0.72);
  box-shadow: 0 0 34px rgba(217, 47, 51, 0.64);*/
}

.press-copy {
  min-width: 0;
}

.press-kicker {
  margin: 0 0 8px;
  color: var(--sand-light);
  font-family: "Fira Code Local", ui-monospace, monospace;
  font-size: 0.74rem;
  text-transform: uppercase;
}

.press-copy h3 {
  margin: 0;
  max-width: 760px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 3vw, 2.6rem);
  line-height: 1.05;
}

.press-copy p:last-child {
  max-width: 680px;
  margin: 12px 0 0;
  color: var(--muted);
}

.press-button {
  justify-self: end;
  min-height: 48px;
  padding: 13px 18px;
  border-radius: 6px;
  background: linear-gradient(145deg, var(--sand-light), var(--sand));
  color: #15110c;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.workspace {
  background:
    linear-gradient(180deg, rgba(8, 14, 16, 0.92), rgba(6, 10, 12, 0.96)),
    #080c0e;
}

.workspace-heading {
  align-items: center;
}

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

.entry-list,
.entry-form {
  padding: 18px;
}

.entry-list {
  align-self: start;
  position: sticky;
  top: 96px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #090f11;
  color: var(--ink);
  padding: 11px 12px;
}

.title-setting {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
}

.title-setting input {
  grid-column: 1;
}

.title-setting select {
  grid-column: 2;
  grid-row: 1;
}

.toast-container {
  position: fixed;
  top: 92px;
  right: clamp(18px, 4vw, 56px);
  z-index: 30;
  display: grid;
  justify-items: end;
  pointer-events: none;
}

.save-toast {
  max-width: min(340px, calc(100vw - 36px));
  padding: 14px 16px;
  border: 1px solid rgba(212, 178, 123, 0.42);
  border-radius: 6px;
  background: rgba(9, 15, 17, 0.96);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.save-toast[data-type="error"] {
  border-color: rgba(217, 47, 51, 0.62);
}

.save-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.save-toast code {
  margin: 0;
  padding: 0.18em 0.38em;
  border-radius: 6px;
  background: rgba(175, 184, 193, 0.2);
  color: var(--red);
  font-family: "Fira Code Local", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 85%;
}

textarea {
  resize: vertical;
}

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

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.section-toggles {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.toggle-row input {
  width: 18px;
  height: 18px;
}

.data-panel {
  display: grid;
  gap: 18px;
}

.data-panel p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
}

.json-output-wrap {
  position: relative;
  max-width: 1180px;
  margin-inline: auto;
  width: 100%;
}

.copy-json-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  min-height: 34px;
  padding: 7px 12px;
  background: rgba(8, 14, 16, 0.9);
}

.data-panel textarea {
  width: 100%;
  padding: 16px;
  padding-top: 56px;
  color: var(--sand-light);
  font-family: "Fira Code Local", ui-monospace, monospace;
  font-size: 0.82rem;
}

.admin-body {
  background: var(--bg);
}

.admin-body::after {
  background:
    linear-gradient(180deg, rgba(5, 10, 12, 0.72), rgba(5, 10, 12, 0.96)),
    linear-gradient(90deg, rgba(5, 10, 12, 0.86), rgba(5, 10, 12, 0.58) 52%, rgba(5, 10, 12, 0.78));
}

.admin-workspace {
  min-height: calc(100vh - 72px);
}

.admin-title {
  max-width: none;
  font-size: clamp(2.4rem, 5vw, 5rem);
  line-height: 1;
  text-shadow: 0 3px 0 rgba(130, 27, 32, 0.8), 0 16px 42px rgba(0, 0, 0, 0.55);
}

[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  body::after {
    background:
      linear-gradient(180deg, rgba(5, 10, 12, 0.12), rgba(5, 10, 12, 0.48) 48%, rgba(5, 10, 12, 0.68)),
      linear-gradient(90deg, rgba(5, 10, 12, 0.24), transparent 48%, rgba(5, 10, 12, 0.28));
  }

  .admin-body::after {
    background:
      linear-gradient(180deg, rgba(5, 10, 12, 0.6), rgba(5, 10, 12, 0.96)),
      linear-gradient(90deg, rgba(5, 10, 12, 0.76), rgba(5, 10, 12, 0.54));
  }

  .topbar,
  .section-heading,
  .workspace-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-shell {
    min-height: 680px;
    padding-top: 46vh;
  }

  .hero-panel,
  .about-feature,
  .media-grid,
  .platform-grid,
  .press-feature,
  .editor-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

  .press-button {
    justify-self: stretch;
    text-align: center;
  }

  .entry-list {
    position: static;
  }
}
