:root {
  color-scheme: light;
  --ink: #11100d;
  --muted: #676056;
  --paper: #f7f2e8;
  --line: #d8c7a7;
  --gold: #d6ad43;
  --deep: #17140f;
  --white: #fffdfa;
  --green: #126f56;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.motta-public {
  background:
    radial-gradient(circle at 78% 12%, rgba(214, 173, 67, .22), transparent 26rem),
    linear-gradient(135deg, #f8f4eb 0%, #ede6da 58%, #f6f1e7 100%);
}

.site-top,
footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.site-top {
  padding: 22px 0 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: #16130f;
  color: var(--gold);
  font-weight: 900;
}

.brand strong {
  font-size: 18px;
}

.site-top nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-top nav a,
.hero-actions a,
.login-panel button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 18px;
  border: 1px solid rgba(17, 16, 13, .14);
  font-weight: 800;
}

.site-top nav a {
  background: rgba(255, 253, 250, .54);
  color: var(--ink);
}

.site-top nav .login-link,
.hero-actions .primary,
.login-panel button {
  background: var(--deep);
  color: var(--white);
  border-color: var(--deep);
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 130px);
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(320px, .78fr);
  align-items: center;
  gap: clamp(24px, 5vw, 76px);
  padding: 26px 0 52px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 14px;
  color: #8b6b22;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(44px, 7.2vw, 98px);
  line-height: .9;
  letter-spacing: 0;
  max-width: 860px;
}

.lead {
  max-width: 560px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2.1vw, 22px);
  line-height: 1.45;
  font-weight: 650;
}

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

.hero-actions a {
  min-width: 150px;
}

.hero-actions .secondary {
  background: var(--white);
}

.hero-visual {
  margin: 0;
  position: relative;
  justify-self: center;
  width: min(100%, 460px);
}

.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 28px 48px rgba(25, 20, 12, .22));
}

.hero-visual figcaption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(17, 16, 13, .88);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
}

.signal {
  margin: -54px 0 50px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 253, 250, .76);
  backdrop-filter: blur(16px);
}

.signal div {
  min-height: 110px;
  padding: 22px;
  border-right: 1px solid var(--line);
}

.signal div:last-child {
  border-right: 0;
}

.signal strong,
.signal span {
  display: block;
}

.signal strong {
  font-size: 16px;
  margin-bottom: 8px;
}

.signal span {
  color: var(--muted);
  line-height: 1.42;
  font-weight: 650;
}

footer {
  padding: 0 0 26px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.motta-login-page {
  background:
    linear-gradient(135deg, rgba(18, 111, 86, .12), transparent 34%),
    linear-gradient(135deg, #f8f4eb 0%, #ece3d4 100%);
}

.login-shell {
  width: min(1120px, calc(100% - 36px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: .86fr minmax(310px, 430px);
  align-items: center;
  gap: clamp(24px, 6vw, 80px);
}

.brand.is-login {
  align-self: start;
  padding-top: 30px;
}

.login-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  background: rgba(255, 253, 250, .88);
  box-shadow: 0 24px 70px rgba(23, 20, 15, .14);
}

.login-panel h1 {
  font-size: 34px;
  line-height: 1;
}

.login-panel p {
  margin: 14px 0 22px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.login-panel form,
.login-panel label {
  display: grid;
  gap: 10px;
}

.login-panel form {
  gap: 14px;
}

.login-panel label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.login-panel input {
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 750;
  text-transform: none;
  letter-spacing: 0;
}

.login-panel button {
  width: 100%;
  height: 48px;
  cursor: pointer;
}

.login-message {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.login-message.is-error {
  color: #9d1d1d;
}

.login-message.is-ok {
  color: var(--green);
}

.motta-shell-page {
  background: #ece8dd;
  overflow: hidden;
}

.motta-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  color: var(--ink);
}

.motta-shell-rail {
  min-height: 100vh;
  padding: 16px 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  background: #12100c;
  color: #fffaf0;
  border-right: 1px solid rgba(214, 173, 67, .28);
}

.motta-shell-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 8px;
  border-bottom: 1px solid rgba(214, 173, 67, .22);
}

.motta-shell-brand span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-weight: 900;
}

.motta-shell-brand strong {
  font-size: 17px;
}

.motta-shell-nav {
  display: grid;
  align-content: start;
  gap: 7px;
  overflow: auto;
  padding-right: 2px;
}

.motta-shell-nav button,
.motta-shell-exit {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  padding: 8px 10px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.motta-shell-nav button {
  display: grid;
  gap: 2px;
}

.motta-shell-nav button span {
  font-weight: 900;
  font-size: 13px;
}

.motta-shell-nav button small {
  color: rgba(255, 250, 240, .52);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.motta-shell-nav button.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: #11100d;
}

.motta-shell-nav button.is-active small {
  color: rgba(17, 16, 13, .62);
}

.motta-shell-exit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  font-weight: 900;
  color: rgba(255, 250, 240, .78);
}

.motta-shell-main {
  min-width: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
}

.motta-shell-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  background: rgba(255, 253, 247, .9);
  border-bottom: 1px solid var(--line);
}

.motta-shell-topbar span {
  display: block;
  color: #8b6b22;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.motta-shell-topbar strong {
  display: block;
  font-size: 21px;
  line-height: 1;
}

.motta-shell-topbar p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.motta-shell-stage {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(255, 253, 247, .58), rgba(236, 232, 221, .78)),
    #ece8dd;
}

.motta-shell-module {
  min-height: 100%;
}

.motta-shell-module.motta-platform,
.motta-shell-module.motta-layer {
  min-height: auto;
  background: transparent;
  font-family: inherit;
}

.motta-shell-module .motta-platform-header,
.motta-shell-module .motta-layer-header {
  display: none;
}

.motta-shell-module .motta-platform-main {
  width: 100%;
  margin: 0;
  padding: 0;
}

.motta-shell-module .motta-layer,
.motta-shell-module.motta-layer {
  min-height: auto;
  background: transparent;
}

.motta-shell-module .motta-layer-wizard-body,
.motta-shell-module .motta-layer-mockups-main,
.motta-shell-module .motta-layer-models-main {
  margin-top: 0;
}

@media (max-width: 880px) {
  .site-top,
  footer,
  main,
  .login-shell {
    width: min(100% - 24px, 720px);
  }

  .site-top,
  footer {
    align-items: flex-start;
  }

  .site-top nav {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .hero,
  .login-shell {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 34px 0 34px;
  }

  .hero-visual {
    width: min(100%, 390px);
  }

  .signal {
    margin: 0 0 32px;
    grid-template-columns: 1fr;
  }

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

  .signal div:last-child {
    border-bottom: 0;
  }

  .login-shell {
    padding: 22px 0;
  }

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

  .motta-shell-rail {
    min-height: auto;
    position: sticky;
    top: 0;
    z-index: 20;
    grid-template-rows: auto auto;
    gap: 8px;
  }

  .motta-shell-brand {
    min-height: 42px;
    border-bottom: 0;
  }

  .motta-shell-nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .motta-shell-nav button {
    min-width: 136px;
  }

  .motta-shell-exit {
    display: none;
  }

  .motta-shell-main {
    height: auto;
    min-height: calc(100vh - 126px);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .motta-shell-topbar {
    align-items: flex-start;
    padding: 14px;
  }

  .motta-shell-stage {
    padding: 10px;
  }
}

@media (max-width: 560px) {
  .site-top {
    display: grid;
  }

  .site-top nav {
    justify-content: start;
  }

  .site-top nav a {
    flex: 1 1 auto;
  }

  h1 {
    font-size: 42px;
  }

  .hero-actions a {
    flex: 1 1 100%;
  }
}

/* Motta Admin UI premium shell pass */
.motta-shell {
  --admin-bg: #ece8dd;
  --admin-paper: #fffdf7;
  --admin-paper-soft: #f7f1e5;
  --admin-ink: #11100d;
  --admin-muted: #6b6254;
  --admin-line: #d8c9aa;
  --admin-gold: #d8ae3f;
  grid-template-columns: 232px minmax(0, 1fr);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.motta-shell-stage {
  padding: 14px 18px 22px;
  background:
    linear-gradient(135deg, rgba(255, 253, 247, .68), rgba(235, 232, 222, .9)),
    var(--admin-bg);
}

.motta-shell-module,
.motta-shell-module .motta-layer,
.motta-shell-module .motta-platform {
  color: var(--admin-ink);
  font-family: inherit !important;
}

.motta-shell-module .motta-layer,
.motta-shell-module.motta-layer {
  --bg: transparent;
  --panel: var(--admin-paper);
  --panel-2: var(--admin-paper-soft);
  --line: var(--admin-line);
  --text: var(--admin-ink);
  --muted: var(--admin-muted);
  --ink: var(--admin-ink);
  --gold: var(--admin-gold);
}

.motta-shell-module .motta-platform {
  --bg: transparent;
  --panel: var(--admin-paper);
  --line: var(--admin-line);
  --text: var(--admin-ink);
  --muted: var(--admin-muted);
  --accent: var(--admin-gold);
}

.motta-shell-module .motta-layer-main,
.motta-shell-module .motta-layer-mockups-main,
.motta-shell-module .motta-layer-models-main,
.motta-shell-module .motta-platform-main.is-embedded {
  width: min(100%, 1380px);
  max-width: none;
}

.motta-shell-module .motta-layer-workbench,
.motta-shell-module .motta-layer-panel,
.motta-shell-module .motta-layer-side-panel,
.motta-shell-module .motta-layer-mockups-filter,
.motta-shell-module .motta-layer-models-filter,
.motta-shell-module .motta-layer-mockups-shelf,
.motta-shell-module .motta-layer-models-shelf,
.motta-shell-module .motta-layer-mockups-detail,
.motta-shell-module .motta-platform-panel,
.motta-shell-module .motta-platform-card {
  border-color: rgba(119, 95, 50, .24);
  border-radius: 8px;
  background: rgba(255, 253, 247, .92);
  box-shadow: 0 18px 42px rgba(34, 28, 19, .08);
}

.motta-shell-module .motta-layer-header,
.motta-shell-module .motta-platform-header {
  display: none;
}

@media (min-width: 1500px) {
  .motta-shell-stage {
    padding-right: 28px;
    padding-left: 28px;
  }
}
