* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ease-spring: cubic-bezier(0.34, 1.28, 0.45, 1);
  --font-rounded: "Figtree", sans-serif;
}

html, body {
  background: #ffffff;
  font-family: var(--font-rounded);
  color: #262626;
  -webkit-font-smoothing: antialiased;
}

#wrap {
  width: 100%;
  overflow-x: hidden;
}

#frame {
  position: relative;
  width: 1512px;
  height: 1986px;
  transform-origin: top left;
}

/* ===== Nav ===== */
.nav {
  position: absolute;
  left: 566px;
  top: 40px;
  width: 381px;
  height: 56px;
  background: #ffffff;
  border: 1px solid #efece8;
  border-radius: 100px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  z-index: 100;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 500;
  color: #262626;
  text-decoration: none;
  border-radius: 100px;
  transition: background 0.2s ease;
}
.nav-item:hover { background: #f5f2ee; }
.nav-item.active { background: #ffffff; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.nav-item.active:hover { background: #ffffff; }

/* ===== Card ===== */
.card {
  position: absolute;
  background: var(--bg-init);
  border-radius: var(--radius, 24px);
  transition: background 0.55s ease;
}
.card.clip { overflow: hidden; }
.card:hover, .card.force { background: var(--bg-hover); }
.card.link { cursor: pointer; text-decoration: none; color: inherit; display: block; }

/* ===== Animated element ===== */
.el {
  position: absolute;
  transform-origin: center center;
  transform: translate(0, 0) scale(1, 1) rotate(var(--ir, 0deg));
  opacity: var(--io, 1);
  transition: transform 0.6s var(--ease-spring), opacity 0.42s ease;
  will-change: transform, opacity;
  backface-visibility: hidden;
}
.card:hover .el, .card.force .el {
  transform: translate(var(--dx, 0px), var(--dy, 0px)) scale(var(--sx, 1), var(--sy, 1)) rotate(var(--hr, 0deg));
  opacity: var(--ho, 1);
}
.el img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.el.contain img { object-fit: contain; }

/* ===== Text ===== */
.txt { white-space: nowrap; }
.txt.block { white-space: pre-wrap; }
.txt .w2 { position: absolute; left: 0; top: 0; opacity: 0; transition: opacity 0.4s ease; }
.txt .w1 { transition: opacity 0.4s ease; }
.card:hover .txt.swap .w1, .card.force .txt.swap .w1 { opacity: 0; }
.card:hover .txt.swap .w2, .card.force .txt.swap .w2 { opacity: 1; }

/* ===== Safe pill (horizontal) ===== */
.pill {
  display: flex;
  align-items: center;
  gap: 11px;
  background: #fff;
  border-radius: 15px;
  padding: 9px 13px;
  box-shadow: 0 8px 24px rgba(80, 80, 120, 0.12);
  width: 208px;
}
.pill img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.pill .pt { font-size: 14px; font-weight: 700; line-height: 1.25; }
.pill .ps { font-size: 11.5px; font-weight: 400; color: #6b6b6b; line-height: 1.25; }

/* ===== EsTram mini card (vertical: When/Where) ===== */
.mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: #fff;
  border-radius: 15px;
  padding: 9px;
  width: 109px;
  box-shadow: 0 8px 22px rgba(120, 90, 80, 0.14);
  text-align: center;
}
.mini img { width: 38px; height: 38px; object-fit: contain; }
.mini .pt { font-size: 12px; font-weight: 700; }
.mini .ps { font-size: 11px; font-weight: 400; color: #555; }

/* ===== EsTram initial rows ===== */
.rows { display: flex; flex-direction: column; gap: 4px; width: 205px; }
.row {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 15px; padding: 4px 11px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}
.row img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.row .pt { font-size: 13px; font-weight: 700; line-height: 1.2; }
.row .ps { font-size: 12px; font-weight: 400; line-height: 1.2; }

/* ===== EsTram cream box ===== */
.cream {
  background: linear-gradient(180deg, rgba(255, 238, 55, 0.10), rgba(255, 109, 1, 0.06));
  border-radius: 20px;
  box-shadow: 0 4px 20.8px rgba(110, 110, 110, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 31px 22px;
}
.cream-phones { position: relative; width: 188px; height: 112px; }
.cream-phones img { position: absolute; }
.cp1 { left: 0; top: 18px; width: 84px; transform: rotate(-8.07deg); }
.cp2 { left: 50px; top: 0; width: 86px; transform: rotate(9.28deg); }
.cp3 { left: 93px; top: 18px; width: 95px; transform: rotate(21.5deg); }
.cream-title {
  margin-top: 10px; width: 197px; text-align: center;
  font-size: 13px; font-weight: 600; line-height: 22px; letter-spacing: 2px; color: #262626;
}
.cream-btn {
  margin-top: 16px; background: #ff6d01; color: #fff;
  font-size: 15px; font-weight: 700; line-height: 31px; letter-spacing: 2px;
  padding: 2px 24px; border-radius: 20px;
}

/* ===== Labels / captions base ===== */
.label  { font-weight: 900; letter-spacing: 2px; }
.caption { font-weight: 900; letter-spacing: 2px; }
.intro-p {
  font-family: var(--font-rounded); font-weight: 800;
  font-size: 20px; line-height: 35px; letter-spacing: 2px; color: #262626;
}
