@font-face {
  font-family: "Tektur";
  src: url("assets/fonts/Tektur-Medium.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("assets/fonts/InstrumentSans-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/InstrumentSerif-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --paper: #f6ecdd;
  --paper-strong: #fbf7ef;
  --paper-soft: #efe2d0;
  --ink: #1e1b17;
  --muted: #6e675d;
  --line: rgba(30, 27, 23, 0.18);
  --accent: #d77957;
  --accent-soft: #efd4c8;
  --teal: #93ada5;
  --shadow: 0 24px 80px rgba(69, 52, 30, 0.14);
  --shell-width: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at top, rgba(147, 173, 165, 0.18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(215, 121, 87, 0.12), transparent 28%),
    var(--paper);
  font-family: "Instrument Sans", sans-serif;
}

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

button,
input,
a {
  font: inherit;
}

button,
a {
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease, opacity 160ms ease;
}

button:hover,
a:hover {
  transform: translateY(-1px);
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.page-shell {
  width: min(calc(100% - 1.6rem), 1280px);
  margin: 0 auto;
  padding: 1.2rem 0 3rem;
}

.site-topline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.brand-lockup {
  display: block;
  width: min(360px, 74vw);
}

.brand-lockup img {
  width: 100%;
  height: auto;
}

.site-kicker {
  margin: 0;
  color: var(--muted);
  font-family: "Tektur", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.browser-stage,
.article-shell,
.demo-shell,
.waitroom-card {
  width: min(100%, var(--shell-width));
  margin: 0 auto;
}

.browser-window,
.status-ribbon,
.article-shell,
.demo-card,
.waitroom-card,
.share-dialog {
  background: rgba(251, 247, 239, 0.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.browser-window {
  overflow: hidden;
  border-radius: 2rem;
}

.browser-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(244, 236, 221, 0.94);
  border-bottom: 1px solid var(--line);
}

.window-dots {
  display: flex;
  gap: 0.45rem;
}

.window-dots span {
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid rgba(30, 27, 23, 0.45);
  border-radius: 999px;
  background: var(--paper-strong);
}

.address-form {
  min-width: 0;
}

.address-bar {
  display: flex;
  gap: 0.65rem;
  min-width: 0;
}

.crumb-strip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.45rem 0.65rem;
  border: 2px solid rgba(30, 27, 23, 0.92);
  border-radius: 999px;
  background: rgba(251, 247, 239, 0.96);
}

.crumb-chip {
  flex: none;
  border: 0;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.crumb-chip.is-active {
  background: rgba(30, 27, 23, 0.08);
  color: var(--ink);
}

.crumb-strip input {
  flex: 1 1 auto;
  min-width: 5rem;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.submit-button,
.share-button,
.primary-action,
.secondary-action,
.close-button {
  border: 2px solid rgba(30, 27, 23, 0.92);
  border-radius: 999px;
  background: var(--paper-strong);
  color: var(--ink);
  cursor: pointer;
}

.submit-button,
.share-button,
.close-button {
  padding: 0.7rem 1rem;
}

.browser-canvas {
  padding: 1.2rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent),
    rgba(245, 237, 224, 0.9);
}

.stage-frame {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.stage-media-shell {
  position: relative;
  overflow: hidden;
  border-radius: 1.8rem;
  background: #ede2d0;
  cursor: crosshair;
}

.stage-image {
  width: 100%;
  height: auto;
  aspect-ratio: 1280 / 900;
  object-fit: cover;
}

.stage-hotspot {
  position: absolute;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0.7rem;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.stage-hotspot span {
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(251, 247, 239, 0.92);
  border: 1px solid rgba(30, 27, 23, 0.15);
  color: var(--ink);
  opacity: 0;
  transition: opacity 160ms ease;
}

.stage-hotspot:hover span,
.stage-hotspot:focus-visible span {
  opacity: 1;
}

.stage-caption {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.status-ribbon {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
  padding: 0.95rem 1.15rem;
  border-radius: 1.2rem;
}

.status-ribbon strong {
  font-family: "Tektur", sans-serif;
  font-size: 0.95rem;
}

.status-ribbon.is-error {
  border-color: rgba(147, 44, 29, 0.28);
  color: #842e21;
}

.empty-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: min(70vh, 54rem);
  padding: 2rem 1rem;
  text-align: center;
}

.empty-stage-title,
.article-intro h1,
.article-section h2,
.share-dialog h2,
.demo-copy h2,
.waitroom-card h1 {
  margin: 0;
  font-family: "Tektur", sans-serif;
  letter-spacing: -0.04em;
}

.empty-stage-title {
  max-width: 16ch;
  font-size: clamp(2.3rem, 5vw, 4.2rem);
  line-height: 0.94;
}

.empty-stage-copy,
.article-lead,
.article-section p,
.share-copy,
.demo-copy p,
.waitroom-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.stage-actions,
.share-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
}

.primary-action,
.secondary-action,
.link-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.1rem;
  text-decoration: none;
}

.primary-action {
  background: var(--accent);
  color: var(--paper-strong);
}

.example-prompt-list {
  display: grid;
  gap: 0.6rem;
  width: min(100%, 36rem);
  padding: 0;
  margin: 0;
  list-style: none;
}

.example-prompt-list button {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.42);
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 2.2rem;
  margin-top: 1.2rem;
  padding: 2rem;
  border-radius: 2rem;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--accent);
  font-family: "Tektur", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.article-intro h1 {
  font-size: clamp(2.4rem, 4.8vw, 4.5rem);
  line-height: 0.94;
  max-width: 12ch;
}

.article-lead {
  margin-top: 1rem;
  font-size: 1.08rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.stat-row div {
  padding: 1rem;
  border-radius: 1.3rem;
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid var(--line);
}

.stat-row dt {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.stat-row dd {
  margin: 0.45rem 0 0;
  font-family: "Instrument Serif", serif;
  font-size: 1.05rem;
}

.article-body {
  display: grid;
  gap: 1.4rem;
}

.article-section {
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}

.article-section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.article-section h2 {
  font-size: clamp(1.65rem, 2.6vw, 2.3rem);
  line-height: 1;
  margin-bottom: 0.55rem;
}

.demo-shell {
  display: grid;
  gap: 1rem;
  margin-top: 1.2rem;
}

.demo-copy {
  max-width: 42rem;
}

.demo-copy h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.95;
  margin-bottom: 0.7rem;
}

.demo-card {
  padding: 1rem;
  border-radius: 2rem;
}

.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(35, 27, 18, 0.18);
  backdrop-filter: blur(8px);
}

.share-dialog {
  width: min(100%, 42rem);
  padding: 1.4rem;
  border-radius: 1.7rem;
}

.share-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.share-field input {
  width: 100%;
  margin-top: 1rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.62);
}

.site-footer {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.waitroom-card {
  margin-top: 1rem;
  padding: 2rem;
  border-radius: 2rem;
}

.waitroom-card h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 0.94;
  max-width: 14ch;
}

.waitroom-stat-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.3rem;
}

.waitroom-stat {
  padding: 1.15rem;
  border-radius: 1.4rem;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid var(--line);
}

.waitroom-stat span {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.82rem;
}

.waitroom-stat strong {
  display: block;
  margin-top: 0.45rem;
  font-size: 1.5rem;
}

@media (max-width: 980px) {
  .site-topline {
    flex-direction: column;
    align-items: flex-start;
  }

  .browser-toolbar {
    grid-template-columns: 1fr;
  }

  .article-shell {
    grid-template-columns: 1fr;
  }

  .stat-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(calc(100% - 1rem), 1280px);
    padding-top: 0.8rem;
  }

  .crumb-strip {
    flex-wrap: wrap;
    border-radius: 1.2rem;
  }

  .crumb-strip input {
    width: 100%;
  }

  .empty-stage {
    min-height: 24rem;
  }

  .status-ribbon,
  .article-shell,
  .demo-card,
  .waitroom-card,
  .share-dialog {
    border-radius: 1.4rem;
  }
}
