* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: "Inter", sans-serif;
  background: #E1C485;
  color: #fff;
}

/* CONTAINER */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ================= HEADER ================= */
.site-header {
  background: #E1C485;
  border-bottom: 1px solid rgba(0,0,0,0.15);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}

.logo img {
  height: 40px;
}

.main-nav a {
  color: #fff;
  text-decoration: none;
  margin-left: 20px;
  font-weight: 600;
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: #ffffff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.main-nav a:hover {
  transform: translateY(-1px);
}

.main-nav a:hover::after {
  transform: scaleX(1);
}

.main-nav a:active {
  opacity: 0.7;
}

/* ================= FOOTER ================= */
.site-footer {
  border-top: 1px solid rgba(0,0,0,0.25);
  padding: 24px 0;
}

.footer-inner {
  text-align: center;
}

/* ================= MAIN ================= */
.typewriter-page {
  display: flex;
  justify-content: center;
  padding-bottom:40px;
  padding-top:3px;
}

.typewriter-wrap {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: center;
}

/* ================= STAGE ================= */
.typewriter-stage {
  position: relative;
  width: min(1100px, 96vw);
  height: 100vh;
  overflow: hidden; /* ključno: sprečava lom na desktopu */
}

/* ================= TYPEWRITER MACHINE ================= */
.typewriter-machine {
  position: absolute;
  left: 50%;
  bottom: 0; /* odmah iznad footera */
  transform: translateX(-50%);
  width: 55%;
  z-index: 2;
  display: flex;
  justify-content: center;
    pointer-events: none;
}

.typewriter-machine img {
  width: 100%;
  height: auto;
  display: block;
    pointer-events: none;
}

/* ================= PAPER ================= */
.paper {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 37%;              
  top: 0;
  bottom: var(--machineCut, 50vh); /* ⬅ JS postavlja realnu vrednost */

  background: #ffffff;
  color: #111;
  border-radius: 0;
  border: 1px solid rgba(0,0,0,0.18);
  box-shadow: 0 22px 36px rgba(0,0,0,0.18);

  z-index: 1;
}

/* ================= PAPER CONTENT ================= */
.paper-inner{
  height: 100%;
  padding: 22px 24px 18px;
  overflow-y: auto;          /* ✅ ručni scroll */
  overflow-x: hidden;
  overscroll-behavior: contain;
  position: relative;
}


.paper-topline {
  width: 100%;
  height: 10px;
  background: rgba(0,0,0,0.06);
}

.paper-title {
  font-size: 20px;
  font-weight: 700;
  margin: 18px 0 12px;
}

/* ================= TYPED TEXT ================= */
.typed {
  font-size: 16px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.cursor {
  display: inline-block;
  width: 10px;
  height: 18px;
  background: rgba(0,0,0,0.75);
  margin-top: 8px;
  animation: blink 0.8s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}
/* CTA na kraju teksta */
.cta-wrap{
  margin-top: 18px;
  padding-bottom: 6px;
  text-align:center;
}

.cta-text{
  font-weight: 700;
  margin-bottom: 10px;
}

.cta-btn{
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.20);
  background: #E1C485;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.cta-btn:hover{ transform: translateY(-1px); }
.cta-btn:active{ opacity: 0.75; }

/* ================= MOBILE ================= */
@media (max-width: 900px) {

  .typewriter-page{
    padding-top: 0;      /* ⬅ vrati kao ranije na mobilnom */
    padding-bottom: 0;   /* ⬅ vrati kao ranije na mobilnom */
  }

  .typewriter-stage{
    height: min(620px, 72vh);  /* ⬅ kao ranije (da papir ne “naraste”) */
  }
	
	.typewriter-machine {
		width:118%;
	}
	
  .paper {
    width: 74%;
    bottom: var(--machineCut, 28vh);
  }

  .paper-inner {
    padding: 18px 16px 16px;
  }

  .paper-title {
    font-size: 30px;
  }

  .typed {
    font-size: 15px;
  }
}
